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
    • setLongOrObject

      public final void setLongOrObject(Frame frame, int slot, Object value)
    • setIntOrObject

      public final void setIntOrObject(Frame frame, int slot, Object value)
    • setByteOrObject

      public final void setByteOrObject(Frame frame, int slot, Object value)
    • setBooleanOrObject

      public final void setBooleanOrObject(Frame frame, int slot, Object value)
    • setFloatOrObject

      public final void setFloatOrObject(Frame frame, int slot, Object value)
    • setDoubleOrObject

      public final void setDoubleOrObject(Frame frame, int slot, Object value)
    • 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)
    • getObject

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

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

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

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

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

      public void setLong(Frame frame, long slot, long value)
      Stores a long into the frame.
      Since:
      25.1
    • setLongOrObject

      public void setLongOrObject(Frame frame, long slot, Object value)
      Since:
      25.1
    • setIntOrObject

      public void setIntOrObject(Frame frame, long slot, Object value)
      Since:
      25.1
    • setByteOrObject

      public void setByteOrObject(Frame frame, long slot, Object value)
      Since:
      25.1
    • setBooleanOrObject

      public void setBooleanOrObject(Frame frame, long slot, Object value)
      Since:
      25.1
    • setFloatOrObject

      public void setFloatOrObject(Frame frame, long slot, Object value)
      Since:
      25.1
    • setDoubleOrObject

      public void setDoubleOrObject(Frame frame, long slot, Object value)
      Since:
      25.1
    • setFloat

      public void setFloat(Frame frame, long slot, float value)
      Since:
      25.1
    • setDouble

      public void setDouble(Frame frame, long slot, double value)
      Since:
      25.1
    • expectBoolean

      public boolean expectBoolean(Frame frame, long slot) throws UnexpectedResultException
      Throws:
      UnexpectedResultException
      Since:
      25.1
    • expectByte

      public byte expectByte(Frame frame, long slot) throws UnexpectedResultException
      Throws:
      UnexpectedResultException
      Since:
      25.1
    • expectInt

      public int expectInt(Frame frame, long slot) throws UnexpectedResultException
      Throws:
      UnexpectedResultException
      Since:
      25.1
    • expectLong

      public long expectLong(Frame frame, long slot) throws UnexpectedResultException
      Throws:
      UnexpectedResultException
      Since:
      25.1
    • expectObject

      public Object expectObject(Frame frame, long slot) throws UnexpectedResultException
      Throws:
      UnexpectedResultException
      Since:
      25.1
    • expectFloat

      public float expectFloat(Frame frame, long slot) throws UnexpectedResultException
      Throws:
      UnexpectedResultException
      Since:
      25.1
    • expectDouble

      public double expectDouble(Frame frame, long slot) throws UnexpectedResultException
      Throws:
      UnexpectedResultException
      Since:
      25.1
    • requireObject

      public Object requireObject(Frame frame, long slot)
      Since:
      25.1
    • uncheckedGetObject

      public Object uncheckedGetObject(Frame frame, long slot)
      Since:
      25.1
    • getTag

      public byte getTag(Frame frame, long slot)
      Since:
      25.1
    • getTag

      public byte getTag(Frame frame, int slot)
      Since:
      25.1
    • copy

      public void copy(Frame frame, long srcSlot, long dstSlot)
      Since:
      25.1
    • copyTo

      public void copyTo(Frame srcFrame, long srcOffset, Frame dstFrame, long dstOffset, long length)
      Since:
      25.1
    • clear

      public void clear(Frame frame, long slot)
      Since:
      25.1
    • getValue

      public Object getValue(Frame frame, long slot)
      Since:
      25.1