Package com.oracle.truffle.api.frame
Class FrameUtil
- java.lang.Object
-
- com.oracle.truffle.api.frame.FrameUtil
-
public final class FrameUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FrameUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
getBooleanSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).static byte
getByteSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).static double
getDoubleSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).static float
getFloatSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).static int
getIntSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).static long
getLongSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).static java.lang.Object
getObjectSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).
-
-
-
Method Detail
-
getObjectSafe
public static java.lang.Object getObjectSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).- Parameters:
frameSlot
- the slot of the variable- Throws:
java.lang.IllegalStateException
- if the slot kind does not match- See Also:
Frame.getObject(FrameSlot)
-
getByteSafe
public static byte getByteSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).- Parameters:
frameSlot
- the slot of the variable- Throws:
java.lang.IllegalStateException
- if the slot kind does not match- See Also:
Frame.getByte(FrameSlot)
-
getBooleanSafe
public static boolean getBooleanSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).- Parameters:
frameSlot
- the slot of the variable- Throws:
java.lang.IllegalStateException
- if the slot kind does not match- See Also:
Frame.getBoolean(FrameSlot)
-
getIntSafe
public static int getIntSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).- Parameters:
frameSlot
- the slot of the variable- Throws:
java.lang.IllegalStateException
- if the slot kind does not match- See Also:
Frame.getInt(FrameSlot)
-
getLongSafe
public static long getLongSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).- Parameters:
frameSlot
- the slot of the variable- Throws:
java.lang.IllegalStateException
- if the slot kind does not match- See Also:
Frame.getLong(FrameSlot)
-
getDoubleSafe
public static double getDoubleSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).- Parameters:
frameSlot
- the slot of the variable- Throws:
java.lang.IllegalStateException
- if the slot kind does not match- See Also:
Frame.getDouble(FrameSlot)
-
getFloatSafe
public static float getFloatSafe(Frame frame, FrameSlot frameSlot)
Read a frame slot that is guaranteed to be of the desired kind (either previously checked by a guard or statically known).- Parameters:
frameSlot
- the slot of the variable- Throws:
java.lang.IllegalStateException
- if the slot kind does not match- See Also:
Frame.getFloat(FrameSlot)
-
-