org.jruby.compiler.ir.instructions.CaseInstr Maven / Gradle / Ivy
package org.jruby.compiler.ir.instructions;
import java.util.List;
import java.util.Map;
import org.jruby.compiler.ir.Operation;
import org.jruby.compiler.ir.operands.Operand;
import org.jruby.compiler.ir.operands.Label;
import org.jruby.compiler.ir.operands.Variable;
import org.jruby.compiler.ir.representations.InlinerInfo;
import org.jruby.interpreter.InterpreterContext;
import org.jruby.runtime.builtin.IRubyObject;
// SSS NOTE: 'variables' are used only during optimizations -- they don't contribute to
// the list of inputs to the case statement during dataflow analyses.
// This is just a dummy placeholder instruction -- nothing to do during interpretation or code generation.
public class CaseInstr extends OneOperandInstr {
Label[] labels;
Operand[] variables;
Label endLabel;
Label elseLabel;
public CaseInstr(Variable result, Operand arg, Label endLabel) {
super(Operation.CASE, result, arg);
this.endLabel = endLabel;
}
public void setLabels(List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy