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, wait
getLocalVariable
public IRScopeImpl(IRScope lexicalParent, Operand container, java.lang.String name, StaticScope staticScope)
public void setContainer(Operand o)
public Operand getContainer()
IRScope
getContainer
in interface IRScope
public RubyModule getContainerModule()
public IRScope getLexicalParent()
IRScope
getLexicalParent
in interface IRScope
public IRModule getNearestModule()
IRScope
getNearestModule
in interface IRScope
public int getNextClosureId()
IRScope
getNextClosureId
in interface IRScope
public Variable getNewTemporaryClosureVariable(int closureId)
public Variable getNewTemporaryVariable()
IRScope
getNewTemporaryVariable
in interface IRScope
public Variable getNewInlineVariable()
public int getTemporaryVariableSize()
IRScope
getTemporaryVariableSize
in interface IRScope
public int getRenamedVariableSize()
IRScope
getRenamedVariableSize
in interface IRScope
public void setName(java.lang.String name)
public abstract java.lang.String getScopeName()
public Label getNewLabel(java.lang.String prefix)
IRScope
getNewLabel
in interface IRScope
public Label getNewLabel()
IRScope
getNewLabel
in interface IRScope
protected int getPrefixCountSize(java.lang.String prefix)
public StaticScope getStaticScope()
getStaticScope
in interface IRScope
public void addInstr(Instr i)
IRScope
public void recordMethodAlias(java.lang.String newName, java.lang.String oldName)
IRScope
recordMethodAlias
in interface IRScope
public java.lang.String unaliasMethodName(java.lang.String name)
IRScope
unaliasMethodName
in interface IRScope
public java.util.List<Instr> getInstrs()
public java.lang.String toString()
toString
in class java.lang.Object
public void runCompilerPassOnNestedScopes(CompilerPass p)
public void runCompilerPass(CompilerPass p)
IRScope
runCompilerPass
in interface IRScope
public void prepareForInterpretation()
prepareForInterpretation
in interface IRScope
public java.lang.String toStringInstrs()
public java.lang.String toStringVariables()
Copyright © 2002-2009 JRuby Team. All Rights Reserved.