Package org.jruby.ir.operands
Class Scope
java.lang.Object
org.jruby.ir.operands.Operand
org.jruby.ir.operands.Scope
Reference a StaticScope/IRScope. This could be used wherever we know a staticscope will
be used but we initially favor CurrentScope as it is a single instance and it reduces an
object allocation for every scope in the system. Note: we store IRScope because JIT can
easily store IRScopes vs making new JIT infrastructure for StaticScope (and from a scoping
standpoint these two types are 1:1).
However, once we inline we are migrating things referencing a currentscope which
no longer exists. In this case, we need replace CurrentScope with a Scope.
-
Field Summary
Fields inherited from class org.jruby.ir.operands.Operand
EMPTY_ARRAY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Append the list of variables used in this operand to the input list -- force every operand to implement this because a missing implementation can cause bad failures.getScope()
retrieve
(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) void
Methods inherited from class org.jruby.ir.operands.Operand
canCopyPropagate, encode, getSimplifiedOperand, getValue, hasKnownValue, isFalseyImmediate, isTruthyImmediate
-
Constructor Details
-
Scope
-
-
Method Details
-
getOperandType
- Specified by:
getOperandType
in classOperand
-
addUsedVariables
Description copied from class:Operand
Append the list of variables used in this operand to the input list -- force every operand to implement this because a missing implementation can cause bad failures.- Specified by:
addUsedVariables
in classOperand
-
getScope
-
visit
-
cloneForInlining
- Specified by:
cloneForInlining
in classOperand
-
retrieve
public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp)
-