if (name == moduleroot.name && owner == moduleroot.owner()) {
if (moduleroot != null && name == moduleroot.name && owner == moduleroot.owner()) {
    Symbol getSymbol(int n) {	if (entries[n] == null) {	    int savedBp = bp;	    bp = index[n];	    int tag = bytes[bp++];	    int end = readNat() + bp;	    Symbol sym;	    Symbol owner;	    switch (tag) {	    case NONEsym:		entries[n] = sym = Symbol.NONE;		break;	    case EXTref:	    case EXTMODCLASSref:		Name name = readNameRef();		if (bp == end) {		    owner = global.definitions.ROOT_CLASS;		} else {		    assert bp < end;		    owner = readSymbolRef();		}		if (name == Names.ROOT && owner == Symbol.NONE) {		    sym = global.definitions.ROOT_CLASS;                    if (tag == EXTref) sym = sym;                    // !!! line above is usefull for the transition                    // !!! after some time, replace it by the following line:                    // !!! assert tag != EXTref;		} else {		    sym = owner.info().lookup(name);		    if (tag == EXTMODCLASSref) {			/*			if (sym.kind == VAL)			    switch (sym.type()) {			    case OverloadedType(Symbol[] alts, _):				for (int i = 0; i < alts.length; i++)				    if (alts[i].isModule()) sym = alts[i];			    }			*/			assert sym.isModule();			sym = sym.moduleClass();		    }		}		entries[n] = sym;		if (sym.kind == NONE) {		    if (global.debug)			global.log(owner.info().members().toString());		    throw new BadSignature(this,			"reference " + decode(name) + " of " + owner + 			" refers to nonexisting symbol.");		}		break;	    default:		assert isSymbolEntry(n) : n;		Name name = readNameRef();		if (global.debug) 		    global.log("reading " + name + " at " + n);		owner = readSymbolRef();		if (entries[n] == null) {		    int flags = readNat();		    int inforef = readNat();		    switch (tag) {		    case TYPEsym:			entries[n] = sym = owner.newAbstractType(			    Position.NOPOS, flags, name);			if ((flags & VIEWBOUND) != 0) {			    sym.setInfo(global.definitions.ANY_TYPE());			    sym.setVuBound(getType(inforef, sym));			} else {			    sym.setInfo(getType(inforef, sym));			}			sym.setLoBound(readTypeRef(sym));			break;					    case ALIASsym:			entries[n] = sym = owner.newTypeAlias(			    Position.NOPOS, flags, name);			sym.setInfo(getType(inforef, sym));			Symbol constr = readSymbolRef(); 			break;		    case CLASSsym:                        if ((flags & MODUL) != 0) {                            Symbol modulesym = readSymbolRef();                            entries[n] = sym = modulesym.moduleClass();                            sym.flags = flags;                        } else if (name == classroot.name && owner == classroot.owner()) {			    if (global.debug)                                global.log("overwriting " + classroot);			    entries[n] = sym = classroot;			    sym.flags = flags;                        } else {                            entries[n] = sym = owner.newClass(                                Position.NOPOS, flags, name);                        }			sym.setInfo(getType(inforef, sym));			sym.setTypeOfThis(readTypeRef(sym));			Symbol constr = readSymbolRef();			assert constr == sym.allConstructors();			break;				    case VALsym:			if (name == moduleroot.name && owner == moduleroot.owner()) {			    if (global.debug)				global.log("overwriting " + moduleroot);			    entries[n] = sym = moduleroot;                            sym.flags = flags;                        } else if ((flags & MODUL) != 0) {                            entries[n] = sym = owner.newModule(                                Position.NOPOS, flags, name);                        } else if (name == Names.CONSTRUCTOR) {                            Symbol tsym = bp < end ? readSymbolRef() : null;                            if (tsym == null) {                                entries[n] = sym = owner.newConstructor(                                    Position.NOPOS, flags);                            } else {                                entries[n] = sym = tsym.allConstructors();                                sym.flags = flags;                            }                        } else {                            entries[n] = sym = owner.newTerm(                                Position.NOPOS, flags, name);                        }                        if (sym.isModule()) {                            Symbol clasz = readSymbolRef();                            assert clasz == sym.moduleClass(): Debug.show(sym);                        }			sym.setInfo(getType(inforef, sym));			break;		    default:			throw new BadSignature(this);		    }		    enterSymbol(sym);		}	    }	    bp = savedBp;	}	return (Symbol) entries[n];    }