Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.ir.instructions;
 
public class LoadLocalVarInstr extends Instr implements ResultInstr {
    private IRScope scope;
    private TemporaryVariable result;

    
This is the variable that is being loaded from the scope. This variable doesn't participate in the computation itself. We just use it as a proxy for its (a) name (b) offset (c) scope-depth.
    private LocalVariable lvar;
    public LoadLocalVarInstr(IRScope scopeTemporaryVariable resultLocalVariable lvar) {
        super(.);
        assert result != null"LoadLocalVarInstr result is null";
        this. = lvar;
        this. = result;
        this. = scope;
    }
    public Operand[] getOperands() {
        return .;
    }
    public Variable getResult() {
        return ;
    }
    public void updateResult(Variable v) {
        this. = (TemporaryVariable)v;
    }
    public String toString() {
        return  + " = load_lvar(" + .getName() + ", " +  + ")";
    }
    @Override
    public Instr cloneForInlining(InlinerInfo ii) {
        // SSS FIXME: Do we need to rename lvar really?  It is just a name-proxy!
    }
    @Interp
    @Override
    public Object interpret(ThreadContext contextDynamicScope currDynScopeIRubyObject selfObject[] tempBlock block) {
        return .retrieve(contextselfcurrDynScopetemp);
    }
    @Override
    public void visit(IRVisitor visitor) {
        visitor.LoadLocalVarInstr(this);
    }
    public LocalVariable getLocalVar() {
        return ;
    }
New to GrepCode? Check out our FAQ X