summaryrefslogtreecommitdiff
path: root/sources/scalac
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scalac')
-rw-r--r--sources/scalac/symtab/EntryTags.java3
-rw-r--r--sources/scalac/symtab/classfile/Pickle.java9
-rw-r--r--sources/scalac/symtab/classfile/UnPickle.java16
3 files changed, 23 insertions, 5 deletions
diff --git a/sources/scalac/symtab/EntryTags.java b/sources/scalac/symtab/EntryTags.java
index 4c6fe9d737..ca6f0bd294 100644
--- a/sources/scalac/symtab/EntryTags.java
+++ b/sources/scalac/symtab/EntryTags.java
@@ -29,7 +29,8 @@ public interface EntryTags {
* | 13 SINGLEtpe len_Nat type_Ref sym_Ref
* | 14 CONSTANTtpe len_Nat type_Ref constant_Ref
* | 15 TYPEREFtpe len_Nat type_Ref sym_Ref {targ_Ref}
- * | 16 COMPOUNDtpe len_Nat classsym_Ref {tpe_Ref}
+ * | 16 COMPOUNDtpe len_Nat
+ * iscompoundsym_Byte [owner_Ref] classsym_Ref {tpe_Ref}
* | 17 METHODtpe len_Nat tpe_Ref {tpe_Ref}
* | 18 POLYTtpe len_Nat tpe_Ref {sym_Ref}
* | 19 OVERLOADEDtpe len_Nat {sym_Ref} {tpe_Ref}
diff --git a/sources/scalac/symtab/classfile/Pickle.java b/sources/scalac/symtab/classfile/Pickle.java
index 17245a7eec..8b64b2e61a 100644
--- a/sources/scalac/symtab/classfile/Pickle.java
+++ b/sources/scalac/symtab/classfile/Pickle.java
@@ -191,7 +191,9 @@ public class Pickle implements Kinds, Modifiers, EntryTags {
putTypes(args);
break;
case CompoundType(Type[] parents, Scope members):
- putSymbol(tp.symbol());
+ Symbol clazz = tp.symbol();
+ if (clazz.isCompoundSym()) putSymbol(clazz.owner());
+ putSymbol(clazz);
putTypes(parents);
break;
case MethodType(Symbol[] vparams, Type result):
@@ -437,7 +439,10 @@ public class Pickle implements Kinds, Modifiers, EntryTags {
case CompoundType(Type[] parents, Scope members):
writeByte(COMPOUNDtpe);
writeByte(0); // space for length
- writeRef(tp.symbol());
+ Symbol clazz = tp.symbol();
+ writeByte(clazz.isCompoundSym() ? 1 : 0);
+ if (clazz.isCompoundSym()) writeRef(clazz.owner());
+ writeRef(clazz);
writeRefs(parents);
break;
diff --git a/sources/scalac/symtab/classfile/UnPickle.java b/sources/scalac/symtab/classfile/UnPickle.java
index aa88139ad2..f3a715b480 100644
--- a/sources/scalac/symtab/classfile/UnPickle.java
+++ b/sources/scalac/symtab/classfile/UnPickle.java
@@ -399,9 +399,21 @@ public class UnPickle implements Kinds, Modifiers, EntryTags, TypeTags {
readTypeRef(owner), readSymbolRef(), readTypeRefs(end, owner));
break;
case COMPOUNDtpe:
- Symbol clazz = readSymbolRef();
+ boolean isCompoundSym = readByte() != 0;
+ Symbol ctOwner = isCompoundSym
+ ? readSymbolRef()
+ : null;
+ int ctClassRef = readNat();
+ Symbol ctClass = isCompoundSym
+ ? (Symbol)entries[ctClassRef]
+ : getSymbol(ctClassRef);
Type[] parents = readTypeRefs(end, owner);
- tpe = Type.compoundType(parents, new Scope(), clazz);
+ if (ctClass == null) {
+ tpe = Type.compoundTypeWithOwner(ctOwner, parents, new Scope());
+ entries[ctClassRef] = tpe.symbol();
+ } else {
+ tpe = Type.compoundType(parents, new Scope(), ctClass);
+ }
break;
case METHODtpe:
Type restype = readTypeRef(owner);