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 void
Clears a frame slot.abstract void
Copies a value from one slot to another.abstract void
Copies a range of values from one frame to another.abstract boolean
expectBoolean
(Frame frame, int slot) Reads a boolean from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.abstract byte
expectByte
(Frame frame, int slot) Reads a byte from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.abstract double
expectDouble
(Frame frame, int slot) Reads a double from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.abstract float
expectFloat
(Frame frame, int slot) Reads a float from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.abstract int
Reads an int from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.abstract long
expectLong
(Frame frame, int slot) Reads a long from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.abstract Object
expectObject
(Frame frame, int slot) Reads an Object from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.abstract Object
Reads an object from the frame.final Object
Reads the value of a slot from the frame.final Object
requireObject
(Frame frame, int slot) Reads an Object from the frame, recovering gracefully when the slot is not Object.abstract void
resetFrame
(Frame frame) abstract void
setBoolean
(Frame frame, int slot, boolean value) Stores a boolean into the frame.abstract void
Stores a byte into the frame.abstract void
Stores a double into the frame.abstract void
Stores a float into the frame.abstract void
Stores an int into the frame.abstract void
Stores a long into the frame.abstract void
Stores an Object into the frame.abstract Object
uncheckedGetObject
(Frame frame, int slot) Reads an object from the frame without checking the slot's tag.
-
Constructor Details
-
FrameExtensions
protected FrameExtensions()
-
-
Method Details
-
getObject
Reads an object from the frame.- Throws:
FrameSlotTypeException
- Since:
- 24.2
-
setObject
-
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 anUnexpectedResultException
with the slot value when the tag does not match.- Throws:
UnexpectedResultException
- Since:
- 24.2
-
expectByte
Reads a byte from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.- Throws:
UnexpectedResultException
- Since:
- 24.2
-
expectInt
Reads an int from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.- Throws:
UnexpectedResultException
- Since:
- 24.2
-
expectLong
Reads a long from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.- Throws:
UnexpectedResultException
- Since:
- 24.2
-
expectObject
Reads an Object from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.- Throws:
UnexpectedResultException
- Since:
- 24.2
-
expectFloat
Reads a float from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.- Throws:
UnexpectedResultException
- Since:
- 24.2
-
expectDouble
Reads a double from the frame, throwing anUnexpectedResultException
with the slot value when the tag does not match.- Throws:
UnexpectedResultException
- Since:
- 24.2
-
requireObject
-
uncheckedGetObject
-
copy
Copies a value from one slot to another.- Since:
- 24.2
-
copyTo
-
clear
-
getValue
-
resetFrame
-