Package com.oracle.truffle.api.frame
Class FrameExtensions
java.lang.Object
com.oracle.truffle.api.frame.FrameExtensions
Internal frame accessor methods for internal Truffle components that are trusted.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidClears a frame slot.abstract voidCopies a value from one slot to another.abstract voidCopies a range of values from one frame to another.abstract booleanexpectBoolean(Frame frame, int slot) Reads a boolean from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.abstract byteexpectByte(Frame frame, int slot) Reads a byte from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.abstract doubleexpectDouble(Frame frame, int slot) Reads a double from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.abstract floatexpectFloat(Frame frame, int slot) Reads a float from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.abstract intReads an int from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.abstract longexpectLong(Frame frame, int slot) Reads a long from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.abstract ObjectexpectObject(Frame frame, int slot) Reads an Object from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.abstract booleangetBoolean(Frame frame, int slot) Reads a boolean from the frame.abstract byteReads a byte from the frame.abstract doubleReads a double from the frame.abstract floatReads a float from the frame.abstract intReads an int from the frame.abstract longReads a long from the frame.abstract ObjectReads an object from the frame.abstract bytefinal ObjectReads the value of a slot from the frame.final ObjectrequireObject(Frame frame, int slot) Reads an Object from the frame, recovering gracefully when the slot is not Object.abstract voidsetBoolean(Frame frame, int slot, boolean value) Stores a boolean into the frame.abstract voidStores a byte into the frame.abstract voidStores a double into the frame.abstract voidStores a float into the frame.abstract voidStores an int into the frame.abstract voidStores a long into the frame.abstract voidStores an Object into the frame.abstract ObjectuncheckedGetObject(Frame frame, int slot) Reads an object from the frame without checking the slot's tag.
-
Constructor Details
-
FrameExtensions
protected FrameExtensions()
-
-
Method Details
-
getTag
-
getObject
Reads an object from the frame.- Throws:
FrameSlotTypeException- Since:
- 24.2
-
getBoolean
Reads a boolean from the frame.- Throws:
FrameSlotTypeException- Since:
- 24.2
-
getInt
Reads an int from the frame.- Throws:
FrameSlotTypeException- Since:
- 24.2
-
getLong
Reads a long from the frame.- Throws:
FrameSlotTypeException- Since:
- 24.2
-
getByte
Reads a byte from the frame.- Throws:
FrameSlotTypeException- Since:
- 24.2
-
getFloat
Reads a float from the frame.- Throws:
FrameSlotTypeException- Since:
- 24.2
-
getDouble
Reads a double from the frame.- Since:
- 24.2
-
setObject
Stores an Object into the frame.- Since:
- 24.2
-
setBoolean
Stores a boolean into the frame.- Since:
- 24.2
-
setByte
Stores a byte into the frame.- Since:
- 24.2
-
setInt
Stores an int into the frame.- Since:
- 24.2
-
setLong
Stores a long into the frame.- Since:
- 24.2
-
setFloat
Stores a float into the frame.- Since:
- 24.2
-
setDouble
Stores a double into the frame.- Since:
- 24.2
-
expectBoolean
Reads a boolean from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.- Throws:
UnexpectedResultException- Since:
- 24.2
-
expectByte
Reads a byte from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.- Throws:
UnexpectedResultException- Since:
- 24.2
-
expectInt
Reads an int from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.- Throws:
UnexpectedResultException- Since:
- 24.2
-
expectLong
Reads a long from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.- Throws:
UnexpectedResultException- Since:
- 24.2
-
expectObject
Reads an Object from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.- Throws:
UnexpectedResultException- Since:
- 24.2
-
expectFloat
Reads a float from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.- Throws:
UnexpectedResultException- Since:
- 24.2
-
expectDouble
Reads a double from the frame, throwing anUnexpectedResultExceptionwith the slot value when the tag does not match.- Throws:
UnexpectedResultException- Since:
- 24.2
-
requireObject
Reads an Object from the frame, recovering gracefully when the slot is not Object.- Since:
- 24.2
-
uncheckedGetObject
Reads an object from the frame without checking the slot's tag.- Since:
- 24.2
-
copy
Copies a value from one slot to another.- Since:
- 24.2
-
copyTo
public abstract void copyTo(Frame srcFrame, int srcOffset, Frame dstFrame, int dstOffset, int length) Copies a range of values from one frame to another.- Since:
- 24.2
-
clear
Clears a frame slot.- Since:
- 24.2
-
getValue
Reads the value of a slot from the frame.- Since:
- 24.2
-