From 2a309487c5cdc3bafb52b6e9ebcb084cf9849b2f Mon Sep 17 00:00:00 2001 From: paltherr Date: Fri, 9 Apr 2004 01:38:50 +0000 Subject: - Replaced Symbol.dualClass by Symbol.linkedCla... - Replaced Symbol.dualClass by Symbol.linkedClass and Symbol.linkedModule --- sources/scalac/symtab/classfile/UnPickle.java | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'sources/scalac/symtab/classfile/UnPickle.java') diff --git a/sources/scalac/symtab/classfile/UnPickle.java b/sources/scalac/symtab/classfile/UnPickle.java index ba27cbbf60..5f6997b7a3 100644 --- a/sources/scalac/symtab/classfile/UnPickle.java +++ b/sources/scalac/symtab/classfile/UnPickle.java @@ -55,16 +55,10 @@ public class UnPickle implements Kinds, Modifiers, EntryTags, TypeTags { private UnPickle(Global global, byte[] data, Symbol root) { this.global = global; - if (root.isConstructor()) { - this.classroot = root.constructorClass(); - this.moduleroot = classroot.dualClass().module(); - } else if (root.isType()) { - this.classroot = root; - this.moduleroot = classroot.dualClass().module(); - } else { - this.moduleroot = root; - this.classroot = root.owner().lookup(root.name.toTypeName()); - } + this.classroot = root.linkedClass(); + this.moduleroot = root.linkedModule(); + assert !classroot.isNone(): Debug.show(root); + assert !moduleroot.isNone(): Debug.show(root); if (root != moduleroot && moduleroot.isModule()) { moduleroot.moduleClass().setInfo(Type.NoType); } @@ -267,9 +261,13 @@ public class UnPickle implements Kinds, Modifiers, EntryTags, TypeTags { if (global.debug) global.log("overwriting " + clr); entries[n] = sym = clr; sym.flags = flags; - } else { + } else if ((flags & MODUL) == 0) { 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)); -- cgit v1.2.3