Class InstructionDescriptor

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

public abstract class InstructionDescriptor extends Object
Descriptor for a concrete bytecode instruction. Instances describe static properties of an instruction, for example name, length and arguments.
Since:
25.1
  • Constructor Details

    • InstructionDescriptor

      protected InstructionDescriptor(Object token)
      Internal constructor for generated code. Do not use.
      Since:
      25.1
  • Method Details

    • getLength

      public abstract int getLength()
      Returns the encoded size of this instruction in bytes.
      Since:
      25.1
    • getName

      public abstract String getName()
      Returns a human readable instruction name. Two descriptors with the same name also have the same operation code.
      Since:
      25.1
      See Also:
    • getOperationCode

      public abstract int getOperationCode()
      Returns the operation code for this instruction. The value is only intended for debugging or tooling. Two descriptors with the same operation code also have the same name.
      Since:
      25.1
      See Also:
    • getArgumentDescriptors

      public abstract List<InstructionDescriptor.ArgumentDescriptor> getArgumentDescriptors()
      Returns an immutable list describing the immediate arguments of this instruction. The list size and the descriptor kinds are stable, the runtime values of the arguments may change.
      Since:
      25.1
    • isInstrumentation

      public abstract boolean isInstrumentation()
      Returns true if this instruction represents a bytecode or tag instrumentation instruction, else false. Instrumentation instructions may get inserted dynamically during execution, e.g., if a tag is materialized or an Instrumentation is configured.
      Since:
      25.1
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Since:
      25.1
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      Since:
      25.1
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Since:
      25.1