package org.jruby.ir.instructions;
import org.jruby.ir.Operation;
import org.jruby.ir.operands.Variable;
import org.jruby.ir.persistence.IRWriterEncoder;
public abstract class ResultBaseInstr extends Instr implements ResultInstr {
protected transient Variable result;
public ResultBaseInstr(Operation operation, Variable result) {
super(operation);
this.result = result;
}
@Override
public void encode(IRWriterEncoder e) {
super.encode(e);
e.encode(getResult());
}
public Variable getResult() {
return result;
}
public void updateResult(Variable result) {
this.result = result;
}
}