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, toStringVariablesgetContainer, getContainerModule, getLexicalParent, getName, getNearestModule, getNewInlineVariable, getNewLabel, getNewTemporaryClosureVariable, getPrefixCountSize, getRenamedVariableSize, getStaticScope, prepareForInterpretation, recordMethodAlias, runCompilerPass, setContainer, setName, toString, unaliasMethodNamepublic final Label startLabel
public final Label endLabel
public final int closureId
public IRClosure(IRScope lexicalParent, StaticScope staticScope, Arity arity, int argumentType)
public int getNextClosureId()
IRScopegetNextClosureId in interface IRScopegetNextClosureId in class IRScopeImplpublic int getTemporaryVariableSize()
IRScopegetTemporaryVariableSize in interface IRScopegetTemporaryVariableSize in class IRScopeImplpublic Variable getNewTemporaryVariable()
IRScopegetNewTemporaryVariable in interface IRScopegetNewTemporaryVariable in class IRScopeImplpublic Label getNewLabel()
IRScopegetNewLabel in interface IRScopegetNewLabel in class IRScopeImplpublic java.lang.String getScopeName()
getScopeName in class IRScopeImplpublic java.lang.String toStringBody()
protected StaticScope constructStaticScope(StaticScope parent)
IRExecutionScopeconstructStaticScope in class IRExecutionScopeparent - scope should be non-null for all closures and null for methodspublic BlockBody getBlockBody()
Copyright © 2002-2009 JRuby Team. All Rights Reserved.