Class BytecodeDSLAccess

java.lang.Object
com.oracle.truffle.api.bytecode.BytecodeDSLAccess

public abstract sealed class BytecodeDSLAccess extends Object
Accessor class used to abstract away frame and bytecode array accesses in the generated code. Do not use directly.
Since:
24.2
  • Method Details

    • lookup

      public static final BytecodeDSLAccess lookup(Object token, boolean allowUnsafe)
      Obtains an accessor. Used by generated code; do not use directly.
      Since:
      24.2
    • getByteArraySupport

      public abstract ByteArraySupport getByteArraySupport()
      Returns a ByteArraySupport to use for byte array accesses.
      Since:
      24.2
    • getFrameExtensions

      public abstract FrameExtensions getFrameExtensions()
      Returns a FrameExtensions to use for frame accesses.
      Since:
      24.2
    • readInt

      public abstract int readInt(int[] arr, int index)
      Reads from an int array.
      Since:
      24.2
    • writeInt

      public abstract void writeInt(int[] arr, int index, int value)
      Writes to an int array.
      Since:
      24.2
    • readObject

      public abstract <T> T readObject(T[] arr, int index)
      Reads from an Object array.
      Since:
      24.2
    • writeObject

      public abstract <T> void writeObject(T[] arr, int index, T value)
      Writes to an Object array.
      Since:
      24.2
    • uncheckedCast

      public abstract <T> T uncheckedCast(Object arr, Class<T> clazz)
      Casts a value to the given class. Also assumes non-null.
      Since:
      24.2