Class SimpleCloneInfo
java.lang.Object
org.jruby.ir.transformations.inlining.CloneInfo
org.jruby.ir.transformations.inlining.SimpleCloneInfo
Context info for simple cloning operation.
-
Field Summary
Fields inherited from class org.jruby.ir.transformations.inlining.CloneInfo
labelRenameMap, scope, variableRenameMap
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleCloneInfo
(IRScope scope, boolean isEnsureBlock) SimpleCloneInfo
(IRScope scope, boolean isEnsureBlock, boolean cloneIPC) -
Method Summary
Modifier and TypeMethodDescriptionprotected Label
How do we rename %self?getRenamedVariable
(Variable variable) Return a new instance of a variable for the newly cloned scope.protected Variable
How are typical variables renamed if they were not yet found in the variable renaming map?boolean
void
renameLabel
(Label l) boolean
Methods inherited from class org.jruby.ir.transformations.inlining.CloneInfo
cloneForCloningClosure, getRenamedLabel, getScope
-
Constructor Details
-
SimpleCloneInfo
-
SimpleCloneInfo
-
-
Method Details
-
isEnsureBlockCloneMode
public boolean isEnsureBlockCloneMode() -
shouldCloneIPC
public boolean shouldCloneIPC() -
getRenamedVariable
Description copied from class:CloneInfo
Return a new instance of a variable for the newly cloned scope. Maps are maintained because Variables typically share the same instance across a CFG (of the same lexical depth).- Overrides:
getRenamedVariable
in classCloneInfo
- Parameters:
variable
- to be renamed- Returns:
- the new Variable
-
getRenamedLabelSimple
- Specified by:
getRenamedLabelSimple
in classCloneInfo
-
getRenamedSelfVariable
Description copied from class:CloneInfo
How do we rename %self?- Specified by:
getRenamedSelfVariable
in classCloneInfo
- Parameters:
self
- to be renamed- Returns:
- the new self or itself
-
getRenamedVariableSimple
Description copied from class:CloneInfo
How are typical variables renamed if they were not yet found in the variable renaming map?- Specified by:
getRenamedVariableSimple
in classCloneInfo
- Parameters:
v
- to be renamed- Returns:
- the new variable
-
renameLabel
-