|
" 2013 FRC Java 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 |
ENABLE_RELOCATION_TABLES
This was sketched out, but not used. |
static boolean |
ENABLE_SPECIFIC_TYPE_TABLES
The method info is capable of encoding the types of the parameters and locals, but this is currently only used for debugging when using the CheneyCollector (see checkActivationForAddresses()). |
static boolean |
FORCE_LARGE_FORMAT
Debug LARGE format. |
static boolean |
LOCAL_LONG_ORDER_NORMAL
Configuration option. |
Constructor Summary | |
---|---|
MethodBody(Method definingMethod,
int maxStack,
Klass[] locals,
ExceptionHandler[] exceptionTable,
int[] lnt,
ScopedLocalVariable[] lvt,
byte[] code,
byte[] typeMap,
boolean reverseParameters,
boolean inlinedSuperConstructor)
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. |
boolean |
getInlinedSuperConstructor()
True IFF this is a constructor that inlined java.lang.Object. |
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. |
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, 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).
public static final boolean ENABLE_SPECIFIC_TYPE_TABLES
public static final boolean ENABLE_RELOCATION_TABLES
public static final boolean FORCE_LARGE_FORMAT
Constructor Detail |
---|
public MethodBody(Method definingMethod, int maxStack, Klass[] locals, ExceptionHandler[] exceptionTable, int[] lnt, ScopedLocalVariable[] lvt, byte[] code, byte[] typeMap, boolean reverseParameters, boolean inlinedSuperConstructor)
MethodBody
representing the implementation details
of a method.
definingMethod
- the method in which the method body was definedmaxStack
- 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-leftinlinedSuperConstructor
- True IFF this is a constructor that inlined java.lang.Object.Method Detail |
---|
public String toString()
toString
in class Object
public byte[] getCode()
public Klass[] getTypes()
public Method getDefiningMethod()
public Klass getDefiningClass()
public int getParametersCount()
public ExceptionHandler[] getExceptionTable()
public int getMaxStack()
public MethodMetadata getMetadata()
public boolean getInlinedSuperConstructor()
public static boolean isInterpreterInvoked(Object oop)
oop
- the pointer to the method
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |