/** * Enter symbol sym in this scope, but mark that it comes from * given scope `s' accessed through `origin'. The last two * arguments are only used in import scopes. */ public void enter(Symbol sym, Scope s, Scope origin) { assert shared == 0; // Temporarily disabled (bug 6460352): // if (nelems * 3 >= hashMask * 2) dble(); int hash = sym.name.index & hashMask; Entry e = makeEntry(sym, table[hash], elems, s, origin); table[hash] = e; elems = e; nelems++; }
/** * Enter symbol sym in this scope, but mark that it comes from * given scope `s' accessed through `origin'. The last two * arguments are only used in import scopes. */ public void enter(Symbol sym, Scope s, Scope origin) { assert shared == 0; // Temporarily disabled (bug 6460352): // if (nelems * 3 >= hashMask * 2) dble(); int hash = sym.name.index & hashMask; Entry e = makeEntry(sym, table[hash], elems, s, origin); table[hash] = e; elems = e; nelems++; }
/** * Enter symbol sym in this scope, but mark that it comes from * given scope `s' accessed through `origin'. The last two * arguments are only used in import scopes. */ public void enter(Symbol sym, Scope s, Scope origin, boolean staticallyImported) { Assert.check(shared == 0); if (nelems * 3 >= hashMask * 2) dble(); int hash = getIndex(sym.name); Entry old = table[hash]; if (old == null) { old = sentinel; nelems++; } Entry e = makeEntry(sym, old, elems, s, origin, staticallyImported); table[hash] = e; elems = e; //notify listeners for (List<ScopeListener> l = listeners; l.nonEmpty(); l = l.tail) { l.head.symbolAdded(sym, this); } }
/** * Enter symbol sym in this scope, but mark that it comes from * given scope `s' accessed through `origin'. The last two * arguments are only used in import scopes. */ public void enter(Symbol sym, Scope s, Scope origin, boolean staticallyImported) { Assert.check(shared == 0); if (nelems * 3 >= hashMask * 2) dble(); int hash = getIndex(sym.name); Entry old = table[hash]; if (old == null) { old = sentinel; nelems++; } Entry e = makeEntry(sym, old, elems, s, origin, staticallyImported); table[hash] = e; elems = e; //notify listeners for (List<ScopeListener> l = listeners; l.nonEmpty(); l = l.tail) { l.head.symbolAdded(sym, this); } }