Class InstructionDescriptor
java.lang.Object
com.oracle.truffle.api.bytecode.InstructionDescriptor
Descriptor for a concrete bytecode instruction. Instances describe static properties of an
instruction, for example name, length and arguments.
- Since:
- 25.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDescriptor for a single immediate argument of an instruction. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstructionDescriptor(Object token) Internal constructor for generated code. -
Method Summary
Modifier and TypeMethodDescriptionbooleanabstract List<InstructionDescriptor.ArgumentDescriptor> Returns an immutable list describing the immediate arguments of this instruction.abstract intReturns the encoded size of this instruction in bytes.abstract StringgetName()Returns a human readable instruction name.abstract intReturns the operation code for this instruction.inthashCode()abstract booleanReturnstrueif this instruction represents a bytecode or tag instrumentation instruction, elsefalse.toString()
-
Constructor Details
-
InstructionDescriptor
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
Returns a human readable instruction name. Two descriptors with the same name also have the sameoperation 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 samename.- Since:
- 25.1
- See Also:
-
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()Returnstrueif this instruction represents a bytecode or tag instrumentation instruction, elsefalse. Instrumentation instructions may get inserted dynamically during execution, e.g., if a tag is materialized or anInstrumentationisconfigured.- Since:
- 25.1
-
hashCode
-
equals
-
toString
-