public class Compiler
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
LCO_IS_EFFECTIVE
When this flag is set to true, last call optimization is made effective.
|
| Constructor and Description |
|---|
Compiler()
Creates and returns a new Compiler.
|
| Modifier and Type | Method and Description |
|---|---|
Instruction[] |
code()
Returns the extracted code array of this compiler's latest complete
compilation.
|
DefinedEntry |
codeEntry()
When compiling a definition, this returns the
DefinedEntry of the
symbol being defined; null otherwise.
|
void |
compile(Expression exp)
Compiles the specified expression in the context of this compiler.
|
Instruction |
generate(Instruction inst) |
Instruction |
generate(PushScope pushScope,
Expression body) |
void |
generateStackPop(byte sort) |
void |
generateUnwrapper(byte sort) |
void |
generateWrapper(byte sort) |
void |
inline(Instruction[] code) |
boolean |
isCompilingDefinition()
Return true iff this is compiling a definition.
|
boolean |
isShowingCode() |
Instruction |
lastInstruction() |
int |
nextCodeAddress()
Returns the next available index in _codeList
to use as the address of the next instruction.
|
void |
setCodeEntry(DefinedEntry entry)
Sets the _codeEntry of this compiler to the specified
DefinedEntry.
|
void |
showCode() |
int |
targetAddress()
Returns the next available index in _codeList
marking as a target address.
|
void |
toggleShowCode() |
public static boolean LCO_IS_EFFECTIVE
public final Instruction[] code()
public final int nextCodeAddress()
public final int targetAddress()
public final void setCodeEntry(DefinedEntry entry)
public final DefinedEntry codeEntry()
public final boolean isCompilingDefinition()
public final void compile(Expression exp)
public final Instruction lastInstruction()
public final void toggleShowCode()
public final boolean isShowingCode()
public final void showCode()
public final Instruction generate(Instruction inst)
public final Instruction generate(PushScope pushScope, Expression body)
public final void inline(Instruction[] code)
public final void generateStackPop(byte sort)
public final void generateWrapper(byte sort)
public final void generateUnwrapper(byte sort)