All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jruby.compiler.ir.instructions.BranchInstr Maven / Gradle / Ivy

There is a newer version: 9.4.7.0
Show newest version
package org.jruby.compiler.ir.instructions;

import org.jruby.compiler.ir.Operation;
import org.jruby.compiler.ir.operands.Label;
import org.jruby.compiler.ir.operands.Operand;

public abstract class BranchInstr extends TwoOperandInstr {
    Label target;

    public BranchInstr(Operation op, Operand v1, Operand v2, Label jmpTarget) {
        super(op, null, v1, v2);
        target = jmpTarget;
    }

    public Label getJumpTarget() {
        return target;
    }

    // Can this instruction raise exceptions?
    @Override
    public boolean canRaiseException() { return false; }

    @Override
    public String toString() {
        return "\t" + operation + "(" + operand1 + ", " + operand2 + ", " + target + ")";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy