public abstract class IRScopeImpl extends java.lang.Object implements IRScope
| Constructor and Description |
|---|
IRScopeImpl(IRScope lexicalParent,
Operand container,
java.lang.String name,
StaticScope staticScope) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInstr(Instr i)
methods and closures
|
Operand |
getContainer()
Returns the containing parent scope
|
RubyModule |
getContainerModule() |
java.util.List<Instr> |
getInstrs() |
IRScope |
getLexicalParent()
Returns the lexical scope that contains this scope definition
|
java.lang.String |
getName() |
IRModule |
getNearestModule()
Returns the nearest module/class from this scope which may be itself.
|
Variable |
getNewInlineVariable() |
Label |
getNewLabel()
Get a new label using a generic prefix
|
Label |
getNewLabel(java.lang.String prefix)
Get a new label using the provided label prefix
|
Variable |
getNewTemporaryClosureVariable(int closureId) |
Variable |
getNewTemporaryVariable()
create a new temporary variable
|
int |
getNextClosureId()
Get the next available unique closure id for closures in this scope
|
protected int |
getPrefixCountSize(java.lang.String prefix) |
int |
getRenamedVariableSize()
How many renamed variables are in this scope?
|
abstract java.lang.String |
getScopeName() |
StaticScope |
getStaticScope() |
int |
getTemporaryVariableSize()
How many temporary variables are in this scope?
|
void |
prepareForInterpretation() |
void |
recordMethodAlias(java.lang.String newName,
java.lang.String oldName)
Record that newName is a new method name for method with oldName
This is for the 'alias' keyword which resolves method names in the
static compile/parse-time context
|
void |
runCompilerPass(CompilerPass p)
Run the passed in compiler pass on this scope!
|
void |
runCompilerPassOnNestedScopes(CompilerPass p) |
void |
setContainer(Operand o) |
void |
setName(java.lang.String name) |
java.lang.String |
toString() |
java.lang.String |
toStringInstrs() |
java.lang.String |
toStringVariables() |
java.lang.String |
unaliasMethodName(java.lang.String name)
Unalias 'name' and return new name
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLocalVariablepublic IRScopeImpl(IRScope lexicalParent, Operand container, java.lang.String name, StaticScope staticScope)
public void setContainer(Operand o)
public Operand getContainer()
IRScopegetContainer in interface IRScopepublic RubyModule getContainerModule()
public IRScope getLexicalParent()
IRScopegetLexicalParent in interface IRScopepublic IRModule getNearestModule()
IRScopegetNearestModule in interface IRScopepublic int getNextClosureId()
IRScopegetNextClosureId in interface IRScopepublic Variable getNewTemporaryClosureVariable(int closureId)
public Variable getNewTemporaryVariable()
IRScopegetNewTemporaryVariable in interface IRScopepublic Variable getNewInlineVariable()
public int getTemporaryVariableSize()
IRScopegetTemporaryVariableSize in interface IRScopepublic int getRenamedVariableSize()
IRScopegetRenamedVariableSize in interface IRScopepublic void setName(java.lang.String name)
public abstract java.lang.String getScopeName()
public Label getNewLabel(java.lang.String prefix)
IRScopegetNewLabel in interface IRScopepublic Label getNewLabel()
IRScopegetNewLabel in interface IRScopeprotected int getPrefixCountSize(java.lang.String prefix)
public StaticScope getStaticScope()
getStaticScope in interface IRScopepublic void addInstr(Instr i)
IRScopepublic void recordMethodAlias(java.lang.String newName,
java.lang.String oldName)
IRScoperecordMethodAlias in interface IRScopepublic java.lang.String unaliasMethodName(java.lang.String name)
IRScopeunaliasMethodName in interface IRScopepublic java.util.List<Instr> getInstrs()
public java.lang.String toString()
toString in class java.lang.Objectpublic void runCompilerPassOnNestedScopes(CompilerPass p)
public void runCompilerPass(CompilerPass p)
IRScoperunCompilerPass in interface IRScopepublic void prepareForInterpretation()
prepareForInterpretation in interface IRScopepublic java.lang.String toStringInstrs()
public java.lang.String toStringVariables()
Copyright © 2002-2009 JRuby Team. All Rights Reserved.