| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectpublic abstract class ScopeExpextends ExpressionField Summary | |
protected int |
|
int |
|
ScopeExp |
|
Fields inherited from class gnu.expr.Expression | |
NEXT_AVAIL_FLAG, flags, noExpressions | |
Constructor Summary | |
| |
Method Summary | |
void |
|
void |
|
Declaration |
|
Declaration |
|
void |
|
int | |
LambdaExp | |
ModuleExp | |
static void |
|
Declaration | |
Declaration |
|
Declaration |
|
Scope | |
Declaration |
|
Declaration | |
static int | |
void | |
void |
|
void |
|
void |
|
protected void |
|
String |
|
protected Expression | |
Methods inherited from class gnu.expr.Expression | |
apply, apply0, compile, compile, compile, compileButFirst, compileNotePosition, compileWithPosition, compileWithPosition, eval, eval, getColumnNumber, getFileName, getFlag, getFlags, getLineNumber, getPublicId, getSystemId, getType, inline, isStableSourceLocation, makeWhile, match0, mustCompile, print, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, setLocation, side_effects, toString, valueIfConstant, walk, walkChildren | |
Methods inherited from class gnu.mapping.Procedure0 | |
apply0, apply1, apply2, apply3, apply4, applyN, numArgs | |
Methods inherited from class gnu.mapping.Procedure | |
apply, apply, apply0, apply1, apply2, apply3, apply4, applyN, check0, check1, check2, check3, check4, checkArgCount, checkN, getSetter, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, numArgs, set0, set1, setN, setSetter, setSourceLocation, toString | |
Methods inherited from class gnu.mapping.PropertySet | |
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol | |
protected int frameSize
Size of evalFrame to allocate in interpreter.
public int id
Unique id number, to ease print-outs and debugging.
public final Declaration addDeclaration(Object name)
Create a new declaration in the current Scope.
- Parameters:
name- name (interned) to give to the new Declaration.
public final Declaration addDeclaration(Object name, Type type)
Create a new declaration in the current Scope.
- Parameters:
name- name (interned) to give to the new Declaration.type- type of the new Declaration.
public final void addDeclaration(Declaration decl)
Add a Declaration to the current Scope.
public int countDecls()
public static void duplicateDeclarationError(Declaration oldDecl, Declaration newDecl, Compilation comp)
public Declaration getDefine(Object name, char severity, Compilation parser)
Add a new Declaration, with a message if there is an existing one.
public Declaration getNoDefine(Object name)
Lookup a declaration, create a non-defining declaration if needed.
public Declaration lookup(Object sym)
Find a Declaration by name.
- Parameters:
sym- the (interned) name of the Declaration sought
- Returns:
- the matching Declaration, if found; otherwise null
public void popScope(CodeAttr code)
Clear bytecode resources for the ScopeExp. This potentially allows Kawa to generate code for the same (inlined, shared) ScopeExp multiple times - though we're not making use of that yet.
public void replaceFollowing(Declaration prev, Declaration newDecl)
Replace theprev.nextbynewDecl. Ifprev==null, replace the first decl.
protected void setIndexes()
Calculate offset and frameSize needed by interpreter.