org.jruby.compiler.ir
Class IRClosure
java.lang.Object
org.jruby.compiler.ir.IRScopeImpl
org.jruby.compiler.ir.IRExecutionScope
org.jruby.compiler.ir.IRClosure
- All Implemented Interfaces:
- IRScope
public class IRClosure
- extends IRExecutionScope
Methods inherited from class org.jruby.compiler.ir.IRExecutionScope |
addClosure, addInstr, allocateStaticScope, buildCFG, calculateParameterCounts, canCaptureCallersBinding, computeExecutionScopeFlags, endLoop, getCFG, getClosestMethodAncestor, getClosures, getCurrentLoop, getInstrs, getLiveLocalVariables, getLocalVariable, getLocalVariablesCount, getSelf, modifiesCode, requiresBinding, runCompilerPassOnNestedScopes, setCodeModificationFlag, startLoop, toStringInstrs, toStringVariables |
Methods inherited from class org.jruby.compiler.ir.IRScopeImpl |
getContainer, getContainerModule, getLexicalParent, getName, getNearestModule, getNewInlineVariable, getNewLabel, getNewTemporaryClosureVariable, getPrefixCountSize, getRenamedVariableSize, getStaticScope, prepareForInterpretation, recordMethodAlias, runCompilerPass, setContainer, setName, toString, unaliasMethodName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
startLabel
public final Label startLabel
endLabel
public final Label endLabel
closureId
public final int closureId
IRClosure
public IRClosure(IRScope lexicalParent,
StaticScope staticScope,
Arity arity,
int argumentType)
getNextClosureId
public int getNextClosureId()
- Description copied from interface:
IRScope
- Get the next available unique closure id for closures in this scope
- Specified by:
getNextClosureId
in interface IRScope
- Overrides:
getNextClosureId
in class IRScopeImpl
getTemporaryVariableSize
public int getTemporaryVariableSize()
- Description copied from interface:
IRScope
- How many temporary variables are in this scope?
- Specified by:
getTemporaryVariableSize
in interface IRScope
- Overrides:
getTemporaryVariableSize
in class IRScopeImpl
getNewTemporaryVariable
public Variable getNewTemporaryVariable()
- Description copied from interface:
IRScope
- create a new temporary variable
- Specified by:
getNewTemporaryVariable
in interface IRScope
- Overrides:
getNewTemporaryVariable
in class IRScopeImpl
getNewLabel
public Label getNewLabel()
- Description copied from interface:
IRScope
- Get a new label using a generic prefix
- Specified by:
getNewLabel
in interface IRScope
- Overrides:
getNewLabel
in class IRScopeImpl
getScopeName
public java.lang.String getScopeName()
- Specified by:
getScopeName
in class IRScopeImpl
toStringBody
public java.lang.String toStringBody()
constructStaticScope
protected StaticScope constructStaticScope(StaticScope parent)
- Description copied from class:
IRExecutionScope
- Closures and Methods have different static scopes. This returns the
correct instance.
- Specified by:
constructStaticScope
in class IRExecutionScope
- Parameters:
parent
- scope should be non-null for all closures and null for methods
- Returns:
- a newly allocated static scope
getBlockBody
public BlockBody getBlockBody()
Copyright © 2002-2009 JRuby Team. All Rights Reserved.