Class InstructionTracer.InstructionAccess
java.lang.Object
com.oracle.truffle.api.bytecode.InstructionTracer.InstructionAccess
- Enclosing interface:
InstructionTracer
Accessor for properties of the instruction about to execute.
Instances of this class are provided by the generated interpreter and are scoped to a single
InstructionTracer.onInstructionEnter(InstructionTracer.InstructionAccess, BytecodeNode, int, Frame) invocation. They must not be stored, shared
across threads, or used after the callback returns.
- Since:
- 25.1
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstructionAccess(Object token) Internal constructor for generated code. -
Method Summary
Modifier and TypeMethodDescriptionabstract InstructiongetTracedInstruction(BytecodeNode bytecode, int bytecodeIndex) Materializes theInstructionobject for the instruction at the given bytecode index.abstract intgetTracedOperationCode(BytecodeNode bytecode, int bytecodeIndex) Returns the operation code for the instruction at the given bytecode index, without allocating anInstructionobject.
-
Constructor Details
-
InstructionAccess
-
-
Method Details
-
getTracedInstruction
Materializes theInstructionobject for the instruction at the given bytecode index.- Parameters:
bytecode- theBytecodeNodecurrently being interpretedbytecodeIndex- the bytecode index (BCI) of the instruction- Returns:
- the materialized
Instructionrepresenting the instruction atBCI - Since:
- 25.1
-
getTracedOperationCode
Returns the operation code for the instruction at the given bytecode index, without allocating anInstructionobject.The returned value corresponds to
Instruction.getOperationCode()for the same instruction.- Parameters:
bytecode- theBytecodeNodecurrently being interpretedbytecodeIndex- the bytecode index (BCI) of the instruction- Returns:
- the integer operation code of the instruction at
BCI - Since:
- 25.1
- See Also:
-