public static InstructionNode jumpIfObjectNotSame(LabelNode label) { return new JumpInstruction(IF_ACMPNE, label); }
public static InstructionNode jumpIfIntGreaterThanOrEqualZero(LabelNode label) { return new JumpInstruction(IFGE, label); }
public static InstructionNode jumpIfNotEqualZero(LabelNode label) { return new JumpInstruction(IFNE, label); }
public static InstructionNode jumpIfIntLessThan(LabelNode label) { return new JumpInstruction(IF_ICMPLT, label); }
public static InstructionNode jumpIfNull(LabelNode label) { return new JumpInstruction(IFNULL, label); }
public static InstructionNode jumpIfNotNull(LabelNode label) { return new JumpInstruction(IFNONNULL, label); }
public static InstructionNode jump(LabelNode label) { return new JumpInstruction(GOTO, label); }
public static InstructionNode jumpIfLessThanZero(LabelNode label) { return new JumpInstruction(IFLT, label); }
public static InstructionNode jumpIfLessThanOrEqualZero(LabelNode label) { return new JumpInstruction(IFLE, label); }
public static InstructionNode jumpIfIntEqual(LabelNode label) { return new JumpInstruction(IF_ICMPEQ, label); }
public static InstructionNode jumpIfObjectSame(LabelNode label) { return new JumpInstruction(IF_ACMPEQ, label); }
public static InstructionNode jumpIfEqualZero(LabelNode label) { return new JumpInstruction(IFEQ, label); }
public static InstructionNode jumpIfGreaterThanZero(LabelNode label) { return new JumpInstruction(IFGT, label); }
public static InstructionNode jumpIfIntNotEqual(LabelNode label) { return new JumpInstruction(IF_ICMPNE, label); }
public static InstructionNode jumpIfIntGreaterThan(LabelNode label) { return new JumpInstruction(IF_ICMPGT, label); }
public static InstructionNode jumpIfIntLessThanOrEqual(LabelNode label) { return new JumpInstruction(IF_ICMPLE, label); }
@Override public BytecodeNode getBytecode(MethodGenerationContext generationContext) { BytecodeBlock block = new BytecodeBlock() .append(left) .append(right); if (comparisonInstruction != null) { block.append(comparisonInstruction); } LabelNode noMatch = new LabelNode("no_match"); LabelNode end = new LabelNode("end"); return block .append(new JumpInstruction(noMatchJumpInstruction, noMatch)) .push(true) .gotoLabel(end) .append(noMatch) .push(false) .append(end); }