public final class ProgramBuilder extends Object
Constructor and Description |
---|
ProgramBuilder(MemoryBuilder staticMemBuilder)
initializes the program
|
Modifier and Type | Method and Description |
---|---|
ProgramBuilder |
add(Instruction object,
ParsingContext.Location loc) |
ProgramBuilder |
addAll(Instruction[] objects,
List<ParsingContext.Location> debug) |
ProgramBuilder |
addAll(ProgramBuilder opb) |
boolean |
contains(Class<? extends Instruction> instr) |
static int |
generateID() |
Program.Type |
getType() |
boolean |
hasAsyncCalls() |
boolean |
hasDeterministicFunctions() |
void |
intern(Object[] array) |
<T> T |
itterate(Function<Object,T> func) |
ProgramBuilder |
set(int idx,
Instruction object) |
ProgramBuilder |
setExecType(Program.ExecutionType pexecType) |
ProgramBuilder |
setType(Program.Type ptype) |
int |
size() |
Object[] |
toArray() |
Program |
toProgram(String name,
String source,
List<String> parameterNames) |
Program |
toProgram(String name,
String source,
String[] parameterNames) |
Program |
toProgram(String name,
String source,
String[] parameterNames,
Map<String,Integer> localTable) |
String |
toString() |
public ProgramBuilder(MemoryBuilder staticMemBuilder)
public static int generateID()
public void intern(Object[] array)
public Program.Type getType()
public ProgramBuilder setType(Program.Type ptype)
type
- the type to setpublic ProgramBuilder setExecType(Program.ExecutionType pexecType)
public ProgramBuilder add(Instruction object, ParsingContext.Location loc)
public boolean contains(Class<? extends Instruction> instr)
public ProgramBuilder set(int idx, Instruction object)
public ProgramBuilder addAll(Instruction[] objects, List<ParsingContext.Location> debug)
public ProgramBuilder addAll(ProgramBuilder opb)
public int size()
public Object[] toArray()
public boolean hasDeterministicFunctions()
public boolean hasAsyncCalls()
public Program toProgram(String name, String source, String[] parameterNames) throws CompileException
CompileException
public Program toProgram(String name, String source, String[] parameterNames, Map<String,Integer> localTable) throws CompileException
CompileException
public Program toProgram(String name, String source, List<String> parameterNames) throws CompileException
CompileException
Copyright © 2018 SPF4J. All rights reserved.