Top Description Fields Constructors Methods
org.jruby.ir.transformations.inlining

public Class InlineCloneInfo

extends CloneInfo
Class Inheritance
Imports
java.util.ArrayList, .HashMap, .List, .Map, java.util.concurrent.atomic.AtomicInteger, org.jruby.ir.IRScope, .Tuple, org.jruby.ir.instructions.CallBase, .ResultInstr, .ToAryInstr, .YieldInstr, org.jruby.ir.operands.Array, .Label, .LocalVariable, .Operand, .Splat, .UndefinedValue, .Variable, org.jruby.ir.representations.BasicBlock, .CFG, org.jruby.util.ByteList

Context object when performing an inline.

Field Summary

Modifier and TypeField and Description
private Variable
private final Map<BasicBlock, BasicBlock>
private CallBase
private Operand[]
private Variable
private boolean
private static final AtomicInteger
private final CFG
private ByteList
private final boolean
private final IRScope
private Operand
private Variable
private final List<Tuple<BasicBlock, YieldInstr>>
Inherited from org.jruby.ir.transformations.inlining.CloneInfo:
labelRenameMapscopevariableRenameMap

Constructor Summary

AccessConstructor and Description
public
InlineCloneInfo(CFG cfg, IRScope scope, IRScope scopeBeingInlined)

public
InlineCloneInfo(CallBase call, CFG c, Variable callReceiver, IRScope scopeBeingInlined)

Method Summary

Modifier and TypeMethod and Description
public boolean
public InlineCloneInfo
cloneForInliningClosure(IRScope scopeBeingInlined)

private static boolean
public Operand
getArg(int index)

public Operand
getArg(int argIndex, boolean restOfArgArray)

public Operand
public int
public Operand
public Variable
public IRScope
public BasicBlock
public BasicBlock
protected Label
public Variable
protected Variable
getRenamedVariableSimple(Variable
to be renamed
v
)

Implements abstract org.jruby.ir.transformations.inlining.CloneInfo.getRenamedVariableSimple.

How are typical variables renamed if they were not yet found in the variable renaming map?

public IRScope
public Variable
public List<Tuple<BasicBlock, YieldInstr>>
public boolean
public void
public void
setupYieldArgsAndYieldResult(YieldInstr yi, BasicBlock yieldBB, int blockArityValue)

Inherited from org.jruby.ir.transformations.inlining.CloneInfo:
cloneForCloningClosuregetRenamedLabelgetRenamedVariablegetScope

Field Detail

argsArrayback to summary
private Variable argsArray
bbRenameMapback to summary
private final Map<BasicBlock, BasicBlock> bbRenameMap
callback to summary
private CallBase call
callArgsback to summary
private Operand[] callArgs
callReceiverback to summary
private Variable callReceiver
canMapArgsStaticallyback to summary
private boolean canMapArgsStatically
globalInlineCountback to summary
private static final AtomicInteger globalInlineCount
hostCFGback to summary
private final CFG hostCFG
inlineVarPrefixback to summary
private ByteList inlineVarPrefix
isClosureback to summary
private final boolean isClosure
scopeBeingInlinedback to summary
private final IRScope scopeBeingInlined
yieldArgback to summary
private Operand yieldArg
yieldResultback to summary
private Variable yieldResult
yieldSitesback to summary
private final List<Tuple<BasicBlock, YieldInstr>> yieldSites

Constructor Detail

InlineCloneInfoback to summary
public InlineCloneInfo(CFG cfg, IRScope scope, IRScope scopeBeingInlined)
InlineCloneInfoback to summary
public InlineCloneInfo(CallBase call, CFG c, Variable callReceiver, IRScope scopeBeingInlined)

Method Detail

canMapArgsStaticallyback to summary
public boolean canMapArgsStatically()
cloneForInliningClosureback to summary
public InlineCloneInfo cloneForInliningClosure(IRScope scopeBeingInlined)
containsSplatback to summary
private static boolean containsSplat(Operand[] args)
getArgback to summary
public Operand getArg(int index)
getArgback to summary
public Operand getArg(int argIndex, boolean restOfArgArray)
getArgsback to summary
public Operand getArgs()
getArgsCountback to summary
public int getArgsCount()
getCallClosureback to summary
public Operand getCallClosure()
getCallResultVariableback to summary
public Variable getCallResultVariable()
getHostScopeback to summary
public IRScope getHostScope()
getOrCreateRenamedBBback to summary
public BasicBlock getOrCreateRenamedBB(BasicBlock bb)
getRenamedBBback to summary
public BasicBlock getRenamedBB(BasicBlock bb)
getRenamedLabelSimpleback to summary
protected Label getRenamedLabelSimple(Label l)

Implements abstract org.jruby.ir.transformations.inlining.CloneInfo.getRenamedLabelSimple.

getRenamedSelfVariableback to summary
public Variable getRenamedSelfVariable(Variable self)

Implements abstract org.jruby.ir.transformations.inlining.CloneInfo.getRenamedSelfVariable.

Doc from org.jruby.ir.transformations.inlining.CloneInfo.getRenamedSelfVariable.

How do we rename %self?

Parameters
self:Variable

to be renamed

Returns:Variable

the new self or itself

getRenamedVariableSimpleback to summary
protected Variable getRenamedVariableSimple(Variable v)

Implements abstract org.jruby.ir.transformations.inlining.CloneInfo.getRenamedVariableSimple.

Doc from org.jruby.ir.transformations.inlining.CloneInfo.getRenamedVariableSimple.

How are typical variables renamed if they were not yet found in the variable renaming map?

Parameters
v:Variable

to be renamed

Returns:Variable

the new variable

getScopeBeingInlinedback to summary
public IRScope getScopeBeingInlined()
getYieldResultback to summary
public Variable getYieldResult()
getYieldSitesback to summary
public List<Tuple<BasicBlock, YieldInstr>> getYieldSites()
isClosureback to summary
public boolean isClosure()
recordYieldSiteback to summary
public void recordYieldSite(BasicBlock bb, YieldInstr i)
setupYieldArgsAndYieldResultback to summary
public void setupYieldArgsAndYieldResult(YieldInstr yi, BasicBlock yieldBB, int blockArityValue)