Class FrameUtil

java.lang.Object
com.oracle.truffle.api.frame.FrameUtil

public final class FrameUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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 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).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FrameUtil

      public FrameUtil()
  • Method Details

    • getObjectSafe

      public static 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:
      IllegalStateException - if the slot kind does not match
      See Also:
    • 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:
      IllegalStateException - if the slot kind does not match
      See Also:
    • 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:
      IllegalStateException - if the slot kind does not match
      See Also:
    • 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:
      IllegalStateException - if the slot kind does not match
      See Also:
    • 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:
      IllegalStateException - if the slot kind does not match
      See Also:
    • 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:
      IllegalStateException - if the slot kind does not match
      See Also:
    • 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:
      IllegalStateException - if the slot kind does not match
      See Also: