Top Fields Constructors Methods
org.jruby.ir.instructions

public Class StoreLocalVarInstr

extends TwoOperandInstr
implements FixedArityInstr
Class Inheritance
All Implemented Interfaces
org.jruby.ir.instructions.FixedArityInstr
Imports
java.util.Map, org.jruby.ir.IRScope, .IRVisitor, .Operation, org.jruby.ir.operands.LocalVariable, .Operand, org.jruby.ir.persistence.IRReaderDecoder, .IRWriterEncoder, org.jruby.ir.transformations.inlining.CloneInfo, org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope, .ThreadContext, org.jruby.runtime.builtin.IRubyObject

Field Summary

Modifier and TypeField and Description
private final IRScope

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Instr
clone(CloneInfo
This object manages renaming of variables and labels, handles args and return values.
ii
)

Implements abstract org.jruby.ir.instructions.Instr.clone.

Clone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope).

public static StoreLocalVarInstr
public void
public void
public LocalVariable
getLocalVar()

This is the variable that is being stored into in this scope.

public IRScope
public Operand
public Object
protected void
simplifyOperands(Map<Operand, Operand> valueMap, boolean force)

Overrides org.jruby.ir.instructions.Instr.simplifyOperands.

getLocalVar is saved for location and should not be simplified so we still know its original depth/offset.

public String[]
public void
Inherited from org.jruby.ir.instructions.TwoOperandInstr:
getOperand1getOperand2getOperandssetOperandsetOperand1setOperand2

Field Detail

scopeback to summary
private final IRScope scope

Constructor Detail

StoreLocalVarInstrback to summary
public StoreLocalVarInstr(IRScope scope, Operand value, LocalVariable lvar)

Method Detail

cloneback to summary
public Instr clone(CloneInfo ii)

Implements abstract org.jruby.ir.instructions.Instr.clone.

Doc from org.jruby.ir.instructions.Instr.clone.

Clone the instruction for use in an inlining context (either when a scope is inlined into another scope, or when a block has to be cloned because its associated call belongs to an inlined scope). This might renaming variables and labels to eliminate naming conflicts. The implementation might vary on the cloning mode.

Parameters
ii:CloneInfo

This object manages renaming of variables and labels, handles args and return values.

Returns:Instr

a new instruction that can be used in the target scope.

Annotations
@Override
decodeback to summary
public static StoreLocalVarInstr decode(IRReaderDecoder d)
decrementLVarScopeDepthback to summary
public void decrementLVarScopeDepth()
encodeback to summary
public void encode(IRWriterEncoder e)

Overrides org.jruby.ir.instructions.Instr.encode.

Annotations
@Override
getLocalVarback to summary
public LocalVariable getLocalVar()

This is the variable that is being stored into in this 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.

getScopeback to summary
public IRScope getScope()
getValueback to summary
public Operand getValue()
interpretback to summary
public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp)

Overrides org.jruby.ir.instructions.Instr.interpret.

Annotations
@Override
simplifyOperandsback to summary
protected void simplifyOperands(Map<Operand, Operand> valueMap, boolean force)

Overrides org.jruby.ir.instructions.Instr.simplifyOperands.

getLocalVar is saved for location and should not be simplified so we still know its original depth/offset.

Annotations
@Override
toStringNonOperandArgsback to summary
public String[] toStringNonOperandArgs()

Overrides org.jruby.ir.instructions.Instr.toStringNonOperandArgs.

Annotations
@Override
visitback to summary
public void visit(IRVisitor visitor)

Overrides org.jruby.ir.instructions.Instr.visit.

Annotations
@Override