Class PopJumpIfTrueOpcode

java.lang.Object
ai.timefold.jpyinterpreter.opcodes.controlflow.AbstractControlFlowOpcode
ai.timefold.jpyinterpreter.opcodes.controlflow.PopJumpIfTrueOpcode
All Implemented Interfaces:
Opcode

public class PopJumpIfTrueOpcode extends AbstractControlFlowOpcode
  • Constructor Details

  • Method Details

    • getPossibleNextBytecodeIndexList

      public List<Integer> getPossibleNextBytecodeIndexList()
      Description copied from interface: Opcode
      Return the possible next bytecode index after this instruction is executed. The default simply return [getBytecodeIndex() + 1], but is typically overwritten in jump instructions.
      Returns:
      the possible next bytecode index after this instruction is executed
    • 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().
      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.
      Parameters:
      functionMetadata - Metadata about the function being compiled.
      stackMetadata - Metadata about the state of the stack when this instruction is executed.