public interface Frame
Object.| Modifier and Type | Method and Description |
|---|---|
default void |
clear(int slot)
Clears the given indexed slot in the frame.
|
default void |
clearObjectStatic(int slot)
Clears the object value at the given slot in the frame.
|
default void |
clearPrimitiveStatic(int slot)
Clears the primitive value at the given slot in the frame.
|
default void |
copy(int srcSlot,
int destSlot)
Copies, including the type, from one slot to another.
|
default void |
copyObjectStatic(int srcSlot,
int destSlot)
Copies an object value from one slot to another.
|
default void |
copyPrimitiveStatic(int srcSlot,
int destSlot)
Copies a primitive value from one slot to another.
|
Object[] |
getArguments()
Retrieves the arguments object from this frame.
|
default Object |
getAuxiliarySlot(int slot) |
default boolean |
getBoolean(int slot)
Read access to a local variable of type boolean.
|
default boolean |
getBooleanStatic(int slot)
Static read access to a local variable of type boolean.
|
default byte |
getByte(int slot)
Read access to a local variable of type byte.
|
default byte |
getByteStatic(int slot)
Static read access to a local variable of type byte.
|
default double |
getDouble(int slot)
Read access to a local variable of type double.
|
default double |
getDoubleStatic(int slot)
Static read access to a local variable of type double.
|
default float |
getFloat(int slot)
Read access to a local variable of type float.
|
default float |
getFloatStatic(int slot)
Static read access to a local variable of type float.
|
FrameDescriptor |
getFrameDescriptor() |
default int |
getInt(int slot)
Read access to a local variable of type int.
|
default int |
getIntStatic(int slot)
Static read access to a local variable of type int.
|
default long |
getLong(int slot)
Read access to a local variable of type long.
|
default long |
getLongStatic(int slot)
Static read access to a local variable of type long.
|
default Object |
getObject(int slot)
Read access to a local variable of type
Object. |
default Object |
getObjectStatic(int slot)
Static read access to a local variable of type
Object. |
default byte |
getTag(int slot)
Determines the actual
FrameSlotKind of the value in the slot, and returns it as
FrameSlotKind.tag. |
default Object |
getValue(int slot)
Read access to a local variable of any type.
|
default boolean |
isBoolean(int slot)
Check whether the given indexed slot is of type boolean.
|
default boolean |
isByte(int slot)
Check whether the given indexed slot is of type byte.
|
default boolean |
isDouble(int slot)
Check whether the given indexed slot is of type double.
|
default boolean |
isFloat(int slot)
Check whether the given indexed slot is of type float.
|
default boolean |
isInt(int slot)
Check whether the given indexed slot is of type int.
|
default boolean |
isLong(int slot)
Check whether the given indexed slot is of type long.
|
default boolean |
isObject(int slot)
Check whether the given indexed slot is of type object.
|
default boolean |
isStatic(int slot)
Checks whether the given indexed slot is static.
|
MaterializedFrame |
materialize()
Materializes this frame, which allows it to be stored in a field or cast to
Object. |
default void |
setAuxiliarySlot(int slot,
Object value)
Sets the value of the given auxiliary slot.
|
default void |
setBoolean(int slot,
boolean value)
Write access to a local variable of type boolean.
|
default void |
setBooleanStatic(int slot,
boolean value)
Static write access to a local variable of type boolean.
|
default void |
setByte(int slot,
byte value)
Write access to a local variable of type byte.
|
default void |
setByteStatic(int slot,
byte value)
Static write access to a local variable of type byte.
|
default void |
setDouble(int slot,
double value)
Write access to a local variable of type double.
|
default void |
setDoubleStatic(int slot,
double value)
Static write access to a local variable of type double.
|
default void |
setFloat(int slot,
float value)
Write access to a local variable of type float.
|
default void |
setFloatStatic(int slot,
float value)
Static write access to a local variable of type float.
|
default void |
setInt(int slot,
int value)
Write access to a local variable of type int.
|
default void |
setIntStatic(int slot,
int value)
Static write access to a local variable of type int.
|
default void |
setLong(int slot,
long value)
Write access to a local variable of type long.
|
default void |
setLongStatic(int slot,
long value)
Static write access to a local variable of type long.
|
default void |
setObject(int slot,
Object value)
Write access to a local variable of type
Object. |
default void |
setObjectStatic(int slot,
Object value)
Static write access to a local variable of type
Object. |
default void |
swap(int first,
int second)
Swaps, including the type, the contents of two slots.
|
FrameDescriptor getFrameDescriptor()
Object[] getArguments()
MaterializedFrame materialize()
Object.default Object getObject(int slot) throws FrameSlotTypeException
Object.slot - the slot of the local variableFrameSlotTypeException - if the current value is not of type objectdefault void setObject(int slot,
Object value)
Object.slot - the slot of the local variablevalue - the new value of the local variabledefault byte getByte(int slot)
throws FrameSlotTypeException
slot - the slot of the local variableFrameSlotTypeExceptiondefault void setByte(int slot,
byte value)
slot - the slot of the local variablevalue - the new value of the local variabledefault boolean getBoolean(int slot)
throws FrameSlotTypeException
slot - the slot of the local variableFrameSlotTypeException - if the current value is not of type booleandefault void setBoolean(int slot,
boolean value)
slot - the slot of the local variablevalue - the new value of the local variabledefault int getInt(int slot)
throws FrameSlotTypeException
slot - the slot of the local variableFrameSlotTypeException - if the current value is not of type intdefault void setInt(int slot,
int value)
slot - the slot of the local variablevalue - the new value of the local variabledefault long getLong(int slot)
throws FrameSlotTypeException
slot - the slot of the local variableFrameSlotTypeException - if the current value is not of type longdefault void setLong(int slot,
long value)
slot - the slot of the local variablevalue - the new value of the local variabledefault float getFloat(int slot)
throws FrameSlotTypeException
slot - the slot of the local variableFrameSlotTypeException - if the current value is not of type floatdefault void setFloat(int slot,
float value)
slot - the slot of the local variablevalue - the new value of the local variabledefault double getDouble(int slot)
throws FrameSlotTypeException
slot - the slot of the local variableFrameSlotTypeException - if the current value is not of type doubledefault void setDouble(int slot,
double value)
slot - the slot of the local variablevalue - the new value of the local variabledefault Object getValue(int slot)
slot - the slot of the local variabledefault void copy(int srcSlot,
int destSlot)
srcSlot - the slot of the source local variabledestSlot - the slot of the target local variabledefault void swap(int first,
int second)
first - the slot of the first local variablesecond - the slot of the second local variabledefault byte getTag(int slot)
FrameSlotKind of the value in the slot, and returns it as
FrameSlotKind.tag.slot - the slot of the local variabledefault boolean isObject(int slot)
slot - the slot of the local variabledefault boolean isByte(int slot)
slot - the slot of the local variabledefault boolean isBoolean(int slot)
slot - the slot of the local variabledefault boolean isInt(int slot)
slot - the slot of the local variabledefault boolean isLong(int slot)
slot - the slot of the local variabledefault boolean isFloat(int slot)
slot - the slot of the local variabledefault boolean isDouble(int slot)
slot - the slot of the local variabledefault boolean isStatic(int slot)
slot - the slot of the local variabledefault void clear(int slot)
FrameSlotTypeException.
This method is intended to be used for implementations of liveness analysis. As such, the compiler will find and report any inconsistency with respect to liveness analysis when using this method, such as clearing a slot in a branch, but not on another one, and their execution merge.
Liveness analysis implementations are expected to clear unused slots on method entry
slot - the slot of the local variabledefault Object getAuxiliarySlot(int slot)
slot - the auxiliary slot index to querynull if it was never set (not the
frame descriptor's default value)default void setAuxiliarySlot(int slot,
Object value)
slot - the auxiliary slot indexvalue - the new valuedefault Object getObjectStatic(int slot)
Object. Requires the given slot to use
FrameSlotKind.Static. Since this method does not perform any type checks, language
implementations have to guarantee that the variable in the given slot is of type
Object.slot - the slot of the local variabledefault void setObjectStatic(int slot,
Object value)
Object. Requires the given slot to
use FrameSlotKind.Static. Since this method does not update the internal slot type,
language implementations have to track this information.
Writing an object value to this slot does not change the underlying primitive value.slot - the slot of the local variablevalue - the new value of the local variabledefault byte getByteStatic(int slot)
FrameSlotKind.Static. Since this method does not perform any type checks, language
implementations have to guarantee that the variable in the given slot can be interpreted as
type byte.slot - the slot of the local variabledefault void setByteStatic(int slot,
byte value)
FrameSlotKind.Static. Since this method does not update the internal slot type,
language implementations have to track this information.
Writing a primitive value to this slot does not change the underlying object value.slot - the slot of the local variablevalue - the new value of the local variabledefault boolean getBooleanStatic(int slot)
FrameSlotKind.Static. Since this method does not perform any type checks, language
implementations have to guarantee that the variable in the given slot can be interpreted as
type boolean.
Reading a boolean value after writing a byte, int, or float value to this slot does not give
any guarantees about the upper 56 respectively 32 bits of the underlying value and can lead
to unexpected results and suboptimal performance.slot - the slot of the local variabledefault void setBooleanStatic(int slot,
boolean value)
FrameSlotKind.Static. Since this method does not update the internal slot type,
language implementations have to track this information.
Writing a primitive value to this slot does not change the underlying object value.slot - the slot of the local variablevalue - the new value of the local variabledefault int getIntStatic(int slot)
FrameSlotKind.Static. Since this method does not perform any type checks, language
implementations have to guarantee that the variable in the given slot can be interpreted as
type int.
Reading an int value after writing a byte value to this slot does not give any guarantees
about the upper 24 bits of the underlying value and can lead to unexpected results and
suboptimal performance.slot - the slot of the local variabledefault void setIntStatic(int slot,
int value)
FrameSlotKind.Static. Since this method does not update the internal slot type,
language implementations have to track this information.
Writing a primitive value to this slot does not change the underlying object value.slot - the slot of the local variablevalue - the new value of the local variabledefault long getLongStatic(int slot)
FrameSlotKind.Static. Since this method does not perform any type checks, language
implementations have to guarantee that the variable in the given slot can be interpreted as
type long.
Reading a long value after writing a byte, int, or float value to this slot does not give any
guarantees about the upper 56 respectively 32 bits of the underlying value and can lead to
unexpected results and suboptimal performance.slot - the slot of the local variabledefault void setLongStatic(int slot,
long value)
FrameSlotKind.Static. Since this method does not update the internal slot type,
language implementations have to track this information.
Writing a primitive value to this slot does not change the underlying object value.slot - the slot of the local variablevalue - the new value of the local variabledefault float getFloatStatic(int slot)
FrameSlotKind.Static. Since this method does not perform any type checks, language
implementations have to guarantee that the variable in the given slot can be interpreted as
type float.
Reading a float value after writing a byte value to this slot does not give any guarantees
about the upper 24 bits of the underlying value and can lead to unexpected results and
suboptimal performance.slot - the slot of the local variabledefault void setFloatStatic(int slot,
float value)
FrameSlotKind.Static. Since this method does not update the internal slot type,
language implementations have to track this information.
Writing a primitive value to this slot does not change the underlying object value.slot - the slot of the local variablevalue - the new value of the local variabledefault double getDoubleStatic(int slot)
FrameSlotKind.Static. Since this method does not perform any type checks, language
implementations have to guarantee that the variable in the given slot can be interpreted as
type double.
Reading a double value after writing a byte, int, or float value to this slot does not give
any guarantees about the upper 56 respectively 32 bits of the underlying value and can lead
to unexpected results and suboptimal performance.slot - the slot of the local variabledefault void setDoubleStatic(int slot,
double value)
FrameSlotKind.Static. Since this method does not update the internal slot type,
language implementations have to track this information.
Writing a primitive value to this slot does not change the underlying object value.slot - the slot of the local variablevalue - the new value of the local variabledefault void copyPrimitiveStatic(int srcSlot,
int destSlot)
FrameSlotKind.Static. Since this method does not perform any type checks, language
implementations have to guarantee that the variable at the source slot is a primitive value.
An existing object value at the destination slot is not overwritten.srcSlot - the slot of the source local variabledestSlot - the slot of the target local variabledefault void copyObjectStatic(int srcSlot,
int destSlot)
FrameSlotKind.Static. Since this method does not perform any type checks, language
implementations have to guarantee that the variable at the source slot is an Object.
An existing primitive value at the destination slot is not overwritten.srcSlot - the slot of the source local variabledestSlot - the slot of the target local variabledefault void clearPrimitiveStatic(int slot)
FrameSlotKind.Static. Writing over a previously cleared slot is still allowed.
Subsequent reads to the slot, unless re-written to, will not give any guarantees about the
returned value.
Since this method does not perform any type checks, language implementations have to
guarantee that the variable at the given slot is a primitive value. An existing object value
at this slot is not cleared.
This method is intended to be used for implementations of liveness analysis. As such, the compiler will find and report any inconsistency with respect to liveness analysis when using this method, such as clearing a slot in a branch, but not on another one, and their execution merge.
Liveness analysis implementations are expected to clear unused slots on method entry.slot - the slot of the local variabledefault void clearObjectStatic(int slot)
FrameSlotKind.Static. Writing over a previously cleared slot is still allowed.
Subsequent reads to the slot, unless re-written to, will not give any guarantees about the
returned value.
Since this method does not perform any type checks, language implementations have to
guarantee that the variable at the given slot is an Object. An existing primitive
value at this slot is not cleared.
This method is intended to be used for implementations of liveness analysis. As such, the compiler will find and report any inconsistency with respect to liveness analysis when using this method, such as clearing a slot in a branch, but not on another one, and their execution merge.
Liveness analysis implementations are expected to clear unused slots on method entry.slot - the slot of the local variable