Class FrameExtensions

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

public abstract class FrameExtensions extends Object
Internal frame accessor methods for internal Truffle components that are trusted.
  • Constructor Details

    • FrameExtensions

      protected FrameExtensions()
  • Method Details

    • getObject

      public abstract Object getObject(Frame frame, int slot) throws FrameSlotTypeException
      Reads an object from the frame.
      Throws:
      FrameSlotTypeException
      Since:
      24.2
    • setObject

      public abstract void setObject(Frame frame, int slot, Object value)
      Stores an Object into the frame.
      Since:
      24.2
    • setBoolean

      public abstract void setBoolean(Frame frame, int slot, boolean value)
      Stores a boolean into the frame.
      Since:
      24.2
    • setByte

      public abstract void setByte(Frame frame, int slot, byte value)
      Stores a byte into the frame.
      Since:
      24.2
    • setInt

      public abstract void setInt(Frame frame, int slot, int value)
      Stores an int into the frame.
      Since:
      24.2
    • setLong

      public abstract void setLong(Frame frame, int slot, long value)
      Stores a long into the frame.
      Since:
      24.2
    • setFloat

      public abstract void setFloat(Frame frame, int slot, float value)
      Stores a float into the frame.
      Since:
      24.2
    • setDouble

      public abstract void setDouble(Frame frame, int slot, double value)
      Stores a double into the frame.
      Since:
      24.2
    • expectBoolean

      public abstract boolean expectBoolean(Frame frame, int slot) throws UnexpectedResultException
      Reads a boolean from the frame, throwing an UnexpectedResultException with the slot value when the tag does not match.
      Throws:
      UnexpectedResultException
      Since:
      24.2
    • expectByte

      public abstract byte expectByte(Frame frame, int slot) throws UnexpectedResultException
      Reads a byte from the frame, throwing an UnexpectedResultException with the slot value when the tag does not match.
      Throws:
      UnexpectedResultException
      Since:
      24.2
    • expectInt

      public abstract int expectInt(Frame frame, int slot) throws UnexpectedResultException
      Reads an int from the frame, throwing an UnexpectedResultException with the slot value when the tag does not match.
      Throws:
      UnexpectedResultException
      Since:
      24.2
    • expectLong

      public abstract long expectLong(Frame frame, int slot) throws UnexpectedResultException
      Reads a long from the frame, throwing an UnexpectedResultException with the slot value when the tag does not match.
      Throws:
      UnexpectedResultException
      Since:
      24.2
    • expectObject

      public abstract Object expectObject(Frame frame, int slot) throws UnexpectedResultException
      Reads an Object from the frame, throwing an UnexpectedResultException with the slot value when the tag does not match.
      Throws:
      UnexpectedResultException
      Since:
      24.2
    • expectFloat

      public abstract float expectFloat(Frame frame, int slot) throws UnexpectedResultException
      Reads a float from the frame, throwing an UnexpectedResultException with the slot value when the tag does not match.
      Throws:
      UnexpectedResultException
      Since:
      24.2
    • expectDouble

      public abstract double expectDouble(Frame frame, int slot) throws UnexpectedResultException
      Reads a double from the frame, throwing an UnexpectedResultException with the slot value when the tag does not match.
      Throws:
      UnexpectedResultException
      Since:
      24.2
    • requireObject

      public final Object requireObject(Frame frame, int slot)
      Reads an Object from the frame, recovering gracefully when the slot is not Object.
      Since:
      24.2
    • uncheckedGetObject

      public abstract Object uncheckedGetObject(Frame frame, int slot)
      Reads an object from the frame without checking the slot's tag.
      Since:
      24.2
    • copy

      public abstract void copy(Frame frame, int srcSlot, int dstSlot)
      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

      public abstract void clear(Frame frame, int slot)
      Clears a frame slot.
      Since:
      24.2
    • getValue

      public final Object getValue(Frame frame, int slot)
      Reads the value of a slot from the frame.
      Since:
      24.2
    • resetFrame

      public abstract void resetFrame(Frame frame)