Class SelfOpcodeWithoutSource
java.lang.Object
ai.timefold.jpyinterpreter.opcodes.SelfOpcodeWithoutSource
- All Implemented Interfaces:
Opcode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturn the bytecode index of the instruction, which can be used to identify the instruction as the target of a jump.getStackMetadataAfterInstructionForBranches(FunctionMetadata functionMetadata, StackMetadata stackMetadata) Return a list ofStackMetadatacorresponding to each branch returned byOpcode.getPossibleNextBytecodeIndexList().voidimplement(FunctionMetadata functionMetadata, StackMetadata stackMetadata) Implements the opcode.booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.timefold.jpyinterpreter.opcodes.Opcode
getPossibleNextBytecodeIndexList, isForcedJump
-
Constructor Details
-
SelfOpcodeWithoutSource
public SelfOpcodeWithoutSource()
-
-
Method Details
-
getBytecodeIndex
public int getBytecodeIndex()Description copied from interface:OpcodeReturn the bytecode index of the instruction, which can be used to identify the instruction as the target of a jump.- Specified by:
getBytecodeIndexin interfaceOpcode- Returns:
- The bytecode index of the instruction, which is defined as the number of instructions before it in the instruction listing.
-
getStackMetadataAfterInstructionForBranches
public List<StackMetadata> getStackMetadataAfterInstructionForBranches(FunctionMetadata functionMetadata, StackMetadata stackMetadata) Description copied from interface:OpcodeReturn a list ofStackMetadatacorresponding to each branch returned byOpcode.getPossibleNextBytecodeIndexList().- Specified by:
getStackMetadataAfterInstructionForBranchesin interfaceOpcode- Parameters:
functionMetadata- Metadata about the function being compiled.stackMetadata- the StackMetadata just before this instruction is executed.- Returns:
- a new List, the same size as
Opcode.getPossibleNextBytecodeIndexList(), containing the StackMetadata after this instruction is executed for the given branch inOpcode.getPossibleNextBytecodeIndexList().
-
implement
Description copied from interface:OpcodeImplements the opcode. -
isJumpTarget
public boolean isJumpTarget()- Specified by:
isJumpTargetin interfaceOpcode- Returns:
- true if this opcode the target of a jump
-