public class NameLookup extends GeneralHashTable<java.lang.Object,Declaration>
DEFAULT_INITIAL_SIZE, mask, num_bindings, table
Constructor and Description |
---|
NameLookup(Language language) |
Modifier and Type | Method and Description |
---|---|
boolean |
doSaveTopLevelRedefs()
When true, top-level defs should push rather then replace old ones.
|
void |
getCompletingSymbols(java.lang.String initialPart,
int namespace,
java.util.List<? super java.lang.String> candidates) |
static NameLookup |
getInstance(Environment env,
Language language)
Get or create a NameLookup instance for a given Environment.
|
Language |
getLanguage() |
Declaration |
lookup(java.lang.Object symbol,
boolean function) |
Declaration |
lookup(java.lang.Object symbol,
int namespace) |
boolean |
pop(Declaration decl) |
void |
pop(ScopeExp exp) |
void |
popSaveTopLevelRedefs() |
void |
push(Declaration decl) |
void |
push(ScopeExp exp) |
void |
pushSaveTopLevelRedefs() |
void |
removeSubsumed(Declaration decl)
Remove visible declarations subsumed (hidden) by a given declaration.
|
static void |
setInstance(Environment env,
NameLookup instance) |
void |
setLanguage(Language language) |
protected boolean |
subsumedBy(Declaration decl,
Declaration other)
True if decl subsumes (hides) other.
|
allocEntries, getEntryHashCode, getEntryNext, getNode, makeEntry, setEntryNext
clear, entrySet, get, get, getOrDefault, hash, hashToIndex, matches, matches, put, put, rehash, remove, size
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, values
public NameLookup(Language language)
public Language getLanguage()
public void setLanguage(Language language)
public static NameLookup getInstance(Environment env, Language language)
public static void setInstance(Environment env, NameLookup instance)
public boolean doSaveTopLevelRedefs()
public void pushSaveTopLevelRedefs()
public void popSaveTopLevelRedefs()
public void push(Declaration decl)
public boolean pop(Declaration decl)
public void push(ScopeExp exp)
public void pop(ScopeExp exp)
public void removeSubsumed(Declaration decl)
protected boolean subsumedBy(Declaration decl, Declaration other)
public Declaration lookup(java.lang.Object symbol, int namespace)
public Declaration lookup(java.lang.Object symbol, boolean function)
public void getCompletingSymbols(java.lang.String initialPart, int namespace, java.util.List<? super java.lang.String> candidates)