|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRScope
IRScope is the interface for all lexically scoped constructs: Script, Module, Class, Method, and Closure. It is important to understand that a single class (e.g. MyFoo) may be opened lexically in several locations in source code. Each one of these locations will have their own instance of an IRScope.
Method Summary | |
---|---|
void |
addInstr(Instr i)
methods and closures |
Operand |
getContainer()
Returns the containing parent scope |
IRScope |
getLexicalParent()
Returns the lexical scope that contains this scope definition |
LocalVariable |
getLocalVariable(java.lang.String name)
Get Local Variable from this scope |
java.lang.String |
getName()
|
IRModule |
getNearestModule()
Returns the nearest module/class from this scope which may be itself. |
Label |
getNewLabel()
Get a new label using a generic prefix |
Label |
getNewLabel(java.lang.String lblPrefix)
Get a new label using the provided label prefix |
Variable |
getNewTemporaryVariable()
create a new temporary variable |
int |
getNextClosureId()
Get the next available unique closure id for closures in this scope |
int |
getRenamedVariableSize()
How many renamed variables are in this scope? |
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 opt)
Run the passed in compiler pass on this scope! |
java.lang.String |
unaliasMethodName(java.lang.String name)
Unalias 'name' and return new name |
Method Detail |
---|
Operand getContainer()
IRScope getLexicalParent()
IRModule getNearestModule()
void addInstr(Instr i)
void recordMethodAlias(java.lang.String newName, java.lang.String oldName)
java.lang.String unaliasMethodName(java.lang.String name)
int getNextClosureId()
Variable getNewTemporaryVariable()
StaticScope getStaticScope()
int getTemporaryVariableSize()
int getRenamedVariableSize()
LocalVariable getLocalVariable(java.lang.String name)
java.lang.String getName()
Label getNewLabel(java.lang.String lblPrefix)
Label getNewLabel()
void runCompilerPass(CompilerPass opt)
void prepareForInterpretation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |