|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InterpCompiler
Language-independent interpreter-compiler interface to support the construction of interpreters.
Field Summary |
---|
Fields inherited from interface com.sun.squawk.compiler.BaseCompiler |
---|
C_DYNAMIC, C_JVM, C_JVM_DYNAMIC, C_NORMAL, E_ADDRESS, E_NONE, E_NULL, E_REGISTER, P_HIGH, P_LOW, P_MEDIUM |
Fields inherited from interface com.sun.squawk.compiler.Types |
---|
BYTE, DOUBLE, FLOAT, INT, IP, LONG, LP, MP, OOP, REF, RELOC_ABSOLUTE_INT, RELOC_RELATIVE_INT, SHORT, SS, UBYTE, UINT, ULONG, USHORT, UWORD, VOID, WORD |
Method Summary | |
---|---|
Compiler |
alloca()
Add a stack allocation node to the IR. |
Compiler |
framePointer()
Push the frame pointer. |
int |
getFramePointerByteOffset(int fp_value)
Map the FP.xxx offset codes into real ABI offsets. |
int |
getIPOffset()
Get the offset from the frame pointer to slot used for the IP variable. |
int |
getJumpByte(int bytecodes,
int interp,
int offset)
Get a single byte of a jump instruction sequence. |
int |
getJumpSize()
Get the length of a jump instruction. |
int |
getLPOffset()
Get the offset from the frame pointer to slot used for the LP variable. |
int |
getMPOffset()
Get the offset from the frame pointer to slot used for the MP variable. |
Local |
local(Type type)
Define a local variable type. |
Local |
local(Type type,
int hint)
Define a local variable type. |
Local |
parm(Type type)
Define a parameter variable. |
Local |
parm(Type type,
int hint)
Define a parameter variable. |
Compiler |
peekReceiver()
Peek the receiver in the runtime stack. |
Compiler |
stackCheck()
Ensure that there is enough stack (the values are in bytes). |
Compiler |
store(Local local)
Set a local variable or parameter to a value popped from the stack. |
Compiler |
write(Type type)
Store a value at a reference. |
Methods inherited from interface com.sun.squawk.compiler.BaseCompiler |
---|
add, and, begin, bf, bf, bind, br, br, bt, bt, call, call, call, call, cmpg, cmpl, com, comment, compile, convert, data, deadCode, decode, div, drop, dumpAll, dup, dupReceiver, end, enter, enter, enter, enter, eq, force, ge, getCode, getCodeSize, getFixupInfo, getLocalCount, getRelocationInfo, gt, isBigEndian, jump, label, le, leave, leave, literal, literal, literal, literal, literal, literal, literal, load, loadParm, loadsMustBeAligned, lt, mul, ne, neg, or, pop, popAll, push, read, rem, result, ret, ret, shl, shr, storeParm, sub, swap, swapAll, swapForABI, symbol, tableSwitchEndPadding, tableSwitchPadding, tosType, ushr, xor |
Method Detail |
---|
int getMPOffset()
int getIPOffset()
int getLPOffset()
int getJumpSize()
int getJumpByte(int bytecodes, int interp, int offset)
bytecodes
- the address of the bytecode arrayinterp
- the address of the interpreteroffset
- the offset to the byte to return
Compiler alloca()
Stack: ..., SIZE -> ...
Compiler stackCheck()
Stack: EXTRA_LOCALS, EXTRA_STACK -> _
Compiler peekReceiver()
Stack: ... -> ..., OOP
Compiler framePointer()
Stack: ... -> ..., REF
int getFramePointerByteOffset(int fp_value)
fp_value
- the FP.xxx code
Local parm(Type type, int hint)
Stack: _ -> _
parm
in interface BaseCompiler
type
- the type of the local variable (Must be primary, or MP, or IP)hint
- the P_XXXX priority hint.
Local parm(Type type)
Stack: _ -> _
parm
in interface BaseCompiler
type
- the type of the local variable (Must be primary, or MP, or IP)
Local local(Type type, int hint)
Stack: ... -> ...
local
in interface BaseCompiler
type
- the type of the local variable (Must be primary, or MP, or IP)hint
- the P_XXXX priority hint.
Local local(Type type)
Stack: ... -> ...
local
in interface BaseCompiler
type
- the type of the local variable (Must be primary, or MP, or IP)
Compiler store(Local local)
Stack: ..., VALUE -> ...
Checks: 1- The local and the value from the stack need to be a primary type or one of MP/IP/LP/SS (i.e., a pointer).
store
in interface BaseCompiler
local
- the local variable to store into
Compiler write(Type type)
Stack: ..., VALUE, REF -> ...
Checks: 1- The address on the top of the stack should be of type reference (REF). 2- The other value on the stack has to have the same primitive type as the type of the write. All types can be used with this method (primary, secondary, and pseudo types MP/IP/LP/SS), except for VOID.
write
in interface BaseCompiler
type
- the type of the data to load
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |