|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.squawk.MethodBody
public final class MethodBody
An instance of MethodBody represents the Squawk bytecode for
a method as well as all the other information related to the bytecode
such as exception handler tables, oop map for the activation frame etc.
| Field Summary | |
|---|---|
static boolean |
LOCAL_LONG_ORDER_NORMAL
Configuration option. |
| Constructor Summary | |
|---|---|
MethodBody(Method definingMethod,
int index,
int maxStack,
Klass[] locals,
ExceptionHandler[] exceptionTable,
int[] lnt,
ScopedLocalVariable[] lvt,
byte[] code,
byte[] typeMap,
boolean reverseParameters)
Creates a MethodBody representing the implementation details
of a method. |
|
| Method Summary | |
|---|---|
byte[] |
getCode()
Gets the bytecode. |
Klass |
getDefiningClass()
Gets the class that defined this method. |
Method |
getDefiningMethod()
Gets the class that defined this method. |
ExceptionHandler[] |
getExceptionTable()
Get the exception table. |
int |
getIndex()
Gets the index of this method's definition in the symbols table of its defining class. |
int |
getMaxStack()
Get the number of stack words needed. |
MethodMetadata |
getMetadata()
Gets the debug information (if any) pertaining to this method body. |
int |
getParametersCount()
Get the number of parameters. |
byte[] |
getTypeMap()
Gets the type map describing the types in activation frame expected by each bytecode. |
Klass[] |
getTypes()
Get the type map. |
static boolean |
isInterpreterInvoked(Object oop)
Determines if a given method is only invoked from the interpreter |
String |
toString()
Produce String for debugging |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final boolean LOCAL_LONG_ORDER_NORMAL
If set true then a long or double local variable will be referenced as slot+0. If set false then it is addressed as slot+1.
Setting this false is will produce the correct offsets when the locals are allocated at a negative offset from the frame pointer (which is common for virtually all C ABIs).
| Constructor Detail |
|---|
public MethodBody(Method definingMethod,
int index,
int maxStack,
Klass[] locals,
ExceptionHandler[] exceptionTable,
int[] lnt,
ScopedLocalVariable[] lvt,
byte[] code,
byte[] typeMap,
boolean reverseParameters)
MethodBody representing the implementation details
of a method.
definingMethod - the method in which the method body was definedindex - the index of the method in the symbols tablemaxStack - the maximum size in words of the operand stacklocals - the types of the local variables (excludes parameters)exceptionTable - the exception handler tablelnt - the table mapping instruction addresses to the
source line numbers that start at the addresses.
The table is encoded as an int array where the high
16-bits of each element is an instruction address and
the low 16-bits is the corresponding source linelvt - the table describing the symbolic information for
the local variables in the methodcode - the Squawk bytecodetypeMap - the type map describing the type of the value (if any) written
to memory by each instruction in 'code'reverseParameters - true if the parameters are pushed right-to-left| Method Detail |
|---|
public String toString()
toString in class Objectpublic int getIndex()
public byte[] getCode()
public byte[] getTypeMap()
public Klass[] getTypes()
public Method getDefiningMethod()
public Klass getDefiningClass()
public int getParametersCount()
public ExceptionHandler[] getExceptionTable()
public int getMaxStack()
public MethodMetadata getMetadata()
public static boolean isInterpreterInvoked(Object oop)
oop - the pointer to the method
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||