public WriteableScope leave ( ) { Assert . check ( shared == 0 ) ; if ( table != next . table ) return next ; while ( elems != null ) { int hash = getIndex ( elems . sym . name ) ; Entry e = table [ hash ] ; Assert . check ( e == elems , elems . sym ) ; table [ hash ] = elems . shadowed ; elems = elems . sibling ; } Assert . check ( next . shared > 0 ) ; next . shared -- ; next . nelems = nelems ; // System.out.println("====> leaving scope " + this.hashCode() + " owned by " + this.owner + " to " + next.hashCode()); // new Error().printStackTrace(System.out); return next ; }
Remove all entries of this scope from its table if shared with next .