summaryrefslogtreecommitdiff
path: root/sources/scalac/symtab/classfile/UnPickle.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-04-13 18:50:44 +0000
committerpaltherr <paltherr@epfl.ch>2004-04-13 18:50:44 +0000
commit483f42e9ab225b4f3d0e2aee412e5b1a91fbb97b (patch)
treefc38b259fd392614f41447e6923a3cb0b9b59721 /sources/scalac/symtab/classfile/UnPickle.java
parent82a62ec95a6ee537af3c82521397f63be132dfbc (diff)
downloadscala-483f42e9ab225b4f3d0e2aee412e5b1a91fbb97b.tar.gz
scala-483f42e9ab225b4f3d0e2aee412e5b1a91fbb97b.tar.bz2
scala-483f42e9ab225b4f3d0e2aee412e5b1a91fbb97b.zip
- Removed usage of Symbol.module() in Pickle/Un...
- Removed usage of Symbol.module() in Pickle/UnPickle
Diffstat (limited to 'sources/scalac/symtab/classfile/UnPickle.java')
-rw-r--r--sources/scalac/symtab/classfile/UnPickle.java46
1 files changed, 23 insertions, 23 deletions
diff --git a/sources/scalac/symtab/classfile/UnPickle.java b/sources/scalac/symtab/classfile/UnPickle.java
index 5f6997b7a3..61c62dc63f 100644
--- a/sources/scalac/symtab/classfile/UnPickle.java
+++ b/sources/scalac/symtab/classfile/UnPickle.java
@@ -255,19 +255,18 @@ public class UnPickle implements Kinds, Modifiers, EntryTags, TypeTags {
break;
case CLASSsym:
- Symbol clr = ((flags & MODUL) == 0) ? classroot
- : moduleroot.moduleClass();
- if (name == clr.name && owner == clr.owner()) {
- if (global.debug) global.log("overwriting " + clr);
- entries[n] = sym = clr;
+ 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 if ((flags & MODUL) == 0) {
+ } else {
entries[n] = sym = owner.newClass(
Position.NOPOS, flags, name);
- } else {
- entries[n] = sym = owner.newModule(
- Position.NOPOS, flags, name.toTermName())
- .moduleClass();
}
sym.setInfo(getType(inforef, sym));
sym.setTypeOfThis(readTypeRef(sym));
@@ -276,29 +275,30 @@ public class UnPickle implements Kinds, Modifiers, EntryTags, TypeTags {
break;
case VALsym:
- Symbol tsym = bp < end ? readSymbolRef() : null;
if (name == moduleroot.name && owner == moduleroot.owner()) {
if (global.debug)
global.log("overwriting " + moduleroot);
entries[n] = sym = moduleroot;
sym.flags = flags;
- } else if (tsym == null) {
- if (name == Names.CONSTRUCTOR) {
+ } 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 = owner.newTerm(
- Position.NOPOS, flags, name);
- }
- } else {
- if (name == Names.CONSTRUCTOR) {
entries[n] = sym = tsym.allConstructors();
- } else {
- assert (flags & MODUL) != 0: name;
- assert tsym.isModuleClass(): Debug.show(tsym);
- entries[n] = sym = tsym.module();
+ sym.flags = flags;
}
- 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;