public class IRClosure extends IRExecutionScope
Modifier and Type | Field and Description |
---|---|
int |
closureId |
Label |
endLabel |
Label |
startLabel |
optionalArgs, requiredArgs, restArg
Constructor and Description |
---|
IRClosure(IRScope lexicalParent,
StaticScope staticScope,
Arity arity,
int argumentType) |
Modifier and Type | Method and Description |
---|---|
protected StaticScope |
constructStaticScope(StaticScope parent)
Closures and Methods have different static scopes.
|
BlockBody |
getBlockBody() |
Label |
getNewLabel()
Get a new label using a generic prefix
|
Variable |
getNewTemporaryVariable()
create a new temporary variable
|
int |
getNextClosureId()
Get the next available unique closure id for closures in this scope
|
java.lang.String |
getScopeName() |
int |
getTemporaryVariableSize()
How many temporary variables are in this scope?
|
java.lang.String |
toStringBody() |
addClosure, addInstr, allocateStaticScope, buildCFG, calculateParameterCounts, canCaptureCallersBinding, computeExecutionScopeFlags, endLoop, getCFG, getClosestMethodAncestor, getClosures, getCurrentLoop, getInstrs, getLiveLocalVariables, getLocalVariable, getLocalVariablesCount, getSelf, modifiesCode, requiresBinding, runCompilerPassOnNestedScopes, setCodeModificationFlag, startLoop, toStringInstrs, toStringVariables
getContainer, getContainerModule, getLexicalParent, getName, getNearestModule, getNewInlineVariable, getNewLabel, getNewTemporaryClosureVariable, getPrefixCountSize, getRenamedVariableSize, getStaticScope, prepareForInterpretation, recordMethodAlias, runCompilerPass, setContainer, setName, toString, unaliasMethodName
public final Label startLabel
public final Label endLabel
public final int closureId
public IRClosure(IRScope lexicalParent, StaticScope staticScope, Arity arity, int argumentType)
public int getNextClosureId()
IRScope
getNextClosureId
in interface IRScope
getNextClosureId
in class IRScopeImpl
public int getTemporaryVariableSize()
IRScope
getTemporaryVariableSize
in interface IRScope
getTemporaryVariableSize
in class IRScopeImpl
public Variable getNewTemporaryVariable()
IRScope
getNewTemporaryVariable
in interface IRScope
getNewTemporaryVariable
in class IRScopeImpl
public Label getNewLabel()
IRScope
getNewLabel
in interface IRScope
getNewLabel
in class IRScopeImpl
public java.lang.String getScopeName()
getScopeName
in class IRScopeImpl
public java.lang.String toStringBody()
protected StaticScope constructStaticScope(StaticScope parent)
IRExecutionScope
constructStaticScope
in class IRExecutionScope
parent
- scope should be non-null for all closures and null for methodspublic BlockBody getBlockBody()
Copyright © 2002-2009 JRuby Team. All Rights Reserved.