Class JumpImplementor

java.lang.Object
ai.timefold.jpyinterpreter.implementors.JumpImplementor

public class JumpImplementor extends Object
Implementations of jump opcodes
  • Constructor Details

    • JumpImplementor

      public JumpImplementor()
  • Method Details

    • jumpAbsolute

      public static void jumpAbsolute(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int jumpTarget)
      Set the bytecode counter to the instruction argument.
    • popAndJumpIfTrue

      public static void popAndJumpIfTrue(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int jumpTarget)
      Pops TOS. If TOS is true, set the bytecode counter to the instruction argument.
    • popAndJumpIfFalse

      public static void popAndJumpIfFalse(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int jumpTarget)
      Pops TOS. If TOS is false, set the bytecode counter to the instruction argument.
    • popAndJumpIfIsNotNone

      public static void popAndJumpIfIsNotNone(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int jumpTarget)
      Pops TOS. If TOS is not None, set the bytecode counter to jumpTarget.
    • popAndJumpIfIsNone

      public static void popAndJumpIfIsNone(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int jumpTarget)
      Pops TOS. If TOS is None, set the bytecode counter to jumpTarget.
    • popAndJumpIfExceptionDoesNotMatch

      public static void popAndJumpIfExceptionDoesNotMatch(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int jumpTarget)
      TOS is an exception type and TOS1 is an exception. If TOS1 is not an instance of TOS, set the bytecode counter to the instruction argument. Pop TOS and TOS1 off the stack.
    • jumpIfTrueElsePop

      public static void jumpIfTrueElsePop(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int jumpTarget)
      If TOS is true, keep TOS on the stack and set the bytecode counter to the instruction argument. Otherwise, pop TOS.
    • jumpIfFalseElsePop

      public static void jumpIfFalseElsePop(FunctionMetadata functionMetadata, StackMetadata stackMetadata, int jumpTarget)
      If TOS is false, keep TOS on the stack and set the bytecode counter to the instruction argument. Otherwise, pop TOS.