Class SelfOpcodeWithoutSource

java.lang.Object
ai.timefold.jpyinterpreter.opcodes.SelfOpcodeWithoutSource
All Implemented Interfaces:
Opcode

public class SelfOpcodeWithoutSource extends Object implements Opcode
  • Constructor Details

    • SelfOpcodeWithoutSource

      public SelfOpcodeWithoutSource()
  • Method Details

    • getBytecodeIndex

      public int getBytecodeIndex()
      Description copied from interface: Opcode
      Return the bytecode index of the instruction, which can be used to identify the instruction as the target of a jump.
      Specified by:
      getBytecodeIndex in interface Opcode
      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: Opcode
      Return a list of StackMetadata corresponding to each branch returned by Opcode.getPossibleNextBytecodeIndexList().
      Specified by:
      getStackMetadataAfterInstructionForBranches in interface Opcode
      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 in Opcode.getPossibleNextBytecodeIndexList().
    • implement

      public void implement(FunctionMetadata functionMetadata, StackMetadata stackMetadata)
      Description copied from interface: Opcode
      Implements the opcode.
      Specified by:
      implement in interface Opcode
      Parameters:
      functionMetadata - Metadata about the function being compiled.
      stackMetadata - Metadata about the state of the stack when this instruction is executed.
    • isJumpTarget

      public boolean isJumpTarget()
      Specified by:
      isJumpTarget in interface Opcode
      Returns:
      true if this opcode the target of a jump