public abstract class ThreadSafeSymbolTable extends Object implements ISymbolTable
START_POS, SUPER_POS, THIS_POS| Constructor and Description |
|---|
ThreadSafeSymbolTable(boolean bDefineCommonSymbols) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearDefaultSymbolTable() |
ISymbolTable |
copy()
Perform a semi-deep copy of this symbol table.
|
void |
defineCommonSymbols()
Define symbols that are considered ubiquitous.
|
protected ISymbolTable |
getDefaultSymbolTable() |
int |
getNextStackIndex()
For compile-time assignment of stack indexes.
|
int |
getNextStackIndexForScope(IScope scope)
For compile-time assignment of stack indexes at a particular scope.
|
int |
getPrivateGlobalScopeCount() |
int |
getScopeCount() |
ISymbol |
getSymbol(CharSequence name) |
Map |
getSymbols() |
Map |
getSymbols(int iScopeOffset,
int iPrivateGlobalIndex) |
ISymbolTable |
getTargetSymbolTable() |
ISymbol |
getThisSymbolFromStackOrMap()
Get the 'this' symbol from either the stack or the table.
|
protected abstract ISymbolTable |
getThreadLocalSymbolTable()
Get a thread-local symbol table.
|
int |
getTotalSymbolCount() |
boolean |
hasIsolatedScope()
For compile-time use.
|
boolean |
isSymbolWithinScope(ISymbol sym,
IScope scope) |
IScope |
peekIsolatedScope() |
IScope |
peekScope() |
IScope |
peekScope(int iPos) |
void |
popGlobalScope(IScope scope)
Pops a global scope previously pushed via
pushGlobalScope( IScope )
or pushPrivateGlobalScope( IScope ). |
IScope |
popScope()
Pop a local scope context from the symbol table.
|
IScope |
popScope(IScope scope) |
IScope |
pushIsolatedScope(IActivationContext activationCtx)
Push a scope that demarcates an activation record.
|
void |
pushPrivateGlobalScope(IScope scope)
Push a global scope you specify onto the private global scope space.
|
IScope |
pushScope()
Push a local scope context onto the symbol table.
|
IScope |
pushScope(IScope scope)
Push a local scope context onto the symbol table.
|
void |
putSymbol(ISymbol symbol)
Maps a name to a symbol in the table.
|
ISymbol |
removeSymbol(CharSequence name)
Removes a previously mapped symbol.
|
public ISymbolTable copy()
ISymbolTablecopy in interface ISymbolTablepublic ISymbol getSymbol(CharSequence name)
getSymbol in interface ISymbolTablepublic void putSymbol(ISymbol symbol)
ISymbolTableputSymbol in interface ISymbolTablepublic ISymbol removeSymbol(CharSequence name)
ISymbolTableremoveSymbol in interface ISymbolTablename - The name mapped to the symbol to remove.public Map getSymbols()
getSymbols in interface ISymbolTablepublic Map getSymbols(int iScopeOffset, int iPrivateGlobalIndex)
getSymbols in interface ISymbolTableiScopeOffset - Scopes positioned on the stack at an index greater than
this number are not included. Very useful for examining a specific scope
e.g., for a debugger. Note an index < 0 indicates that all scopes are
included.public int getTotalSymbolCount()
getTotalSymbolCount in interface ISymbolTablepublic int getScopeCount()
getScopeCount in interface ISymbolTableISymbolTable.getSymbols(int,int)public int getPrivateGlobalScopeCount()
getPrivateGlobalScopeCount in interface ISymbolTableISymbolTable.getSymbols(int,int)public IScope pushScope()
ISymbolTablepushScope in interface ISymbolTablepublic IScope pushScope(IScope scope)
ISymbolTablepushScope in interface ISymbolTablescope - the scope to pushpublic void pushPrivateGlobalScope(IScope scope)
ISymbolTablepushIsolatedScope() instead.pushPrivateGlobalScope in interface ISymbolTableISymbolTable.pushScope(),
ISymbolTable.pushIsolatedScope(IActivationContext)public void popGlobalScope(IScope scope)
ISymbolTablepushGlobalScope( IScope )
or pushPrivateGlobalScope( IScope ).
You probably shouldn't call this method.popGlobalScope in interface ISymbolTableISymbolTable.pushPrivateGlobalScope(IScope),
ISymbolTable.popScope()public IScope popScope()
ISymbolTablepopScope in interface ISymbolTablepublic IScope peekScope()
peekScope in interface ISymbolTablepublic IScope peekScope(int iPos)
peekScope in interface ISymbolTablepublic IScope popScope(IScope scope)
popScope in interface ISymbolTablepublic IScope pushIsolatedScope(IActivationContext activationCtx)
ISymbolTablepushIsolatedScope in interface ISymbolTableactivationCtx - The context for the activation record.public void defineCommonSymbols()
ISymbolTabledefineCommonSymbols in interface ISymbolTablepublic int getNextStackIndex()
IStackProvidergetNextStackIndex in interface IStackProviderpublic int getNextStackIndexForScope(IScope scope)
IStackProvidergetNextStackIndexForScope in interface IStackProviderpublic boolean hasIsolatedScope()
IStackProviderhasIsolatedScope in interface IStackProviderpublic ISymbol getThisSymbolFromStackOrMap()
ISymbolTablegetThisSymbolFromStackOrMap in interface ISymbolTablepublic ISymbolTable getTargetSymbolTable()
public boolean isSymbolWithinScope(ISymbol sym, IScope scope)
isSymbolWithinScope in interface ISymbolTablepublic IScope peekIsolatedScope()
peekIsolatedScope in interface ISymbolTableprotected ISymbolTable getDefaultSymbolTable()
public void clearDefaultSymbolTable()
protected abstract ISymbolTable getThreadLocalSymbolTable()
Copyright © 2016. All rights reserved.