diff options
Diffstat (limited to 'sources/scalac')
-rw-r--r-- | sources/scalac/Global.java | 4 | ||||
-rw-r--r-- | sources/scalac/symtab/Definitions.java | 6 | ||||
-rw-r--r-- | sources/scalac/symtab/classfile/ClassfileParser.java | 4 | ||||
-rw-r--r-- | sources/scalac/symtab/classfile/UnPickle.java | 11 |
4 files changed, 24 insertions, 1 deletions
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java index e164dec350..66d8d76506 100644 --- a/sources/scalac/Global.java +++ b/sources/scalac/Global.java @@ -119,6 +119,10 @@ public abstract class Global { */ public final Map/*<Symbol, String>*/ mapSymbolComment = new HashMap(); + /** attributes of symbols + */ + public final Map/*<Symbol, Pair<Symbol, AConstant[]>>*/ mapSymbolAttr = new HashMap(); + /** views associated with (upper-bounded) type parameters */ public final Map/*<Symbol, Symbol>*/ viewOfTypeParam = new HashMap(); diff --git a/sources/scalac/symtab/Definitions.java b/sources/scalac/symtab/Definitions.java index 9f4ff9cbe0..17fa1a5802 100644 --- a/sources/scalac/symtab/Definitions.java +++ b/sources/scalac/symtab/Definitions.java @@ -116,6 +116,7 @@ public class Definitions { public final Symbol DOUBLE_CLASS; public final Type DOUBLE_TYPE() {return DOUBLE_CLASS.staticType();} + //######################################################################## // Public Fields & Methods - Scala reference classes @@ -123,6 +124,10 @@ public class Definitions { public final Symbol SCALAOBJECT_CLASS; public final Type SCALAOBJECT_TYPE() {return SCALAOBJECT_CLASS.staticType();} + /** The scala.Attribute class */ + public final Symbol ATTRIBUTE_CLASS; + public final Type ATTRIBUTE_TYPE() {return ATTRIBUTE_CLASS.staticType();} + /** The scala.Ref class */ public final Symbol REF_CLASS; public final Type REF_TYPE(Type element) { @@ -660,6 +665,7 @@ public class Definitions { // the scala reference classes SCALAOBJECT_CLASS = getClass("scala.ScalaObject"); + ATTRIBUTE_CLASS = getClass("scala.Attribute"); REF_CLASS = getClass("scala.Ref"); for (int i = 1; i < TUPLE_COUNT; i++) { TUPLE_CLASS[i] = getClass("scala.Tuple" + i); diff --git a/sources/scalac/symtab/classfile/ClassfileParser.java b/sources/scalac/symtab/classfile/ClassfileParser.java index 073df39e90..f7186b886d 100644 --- a/sources/scalac/symtab/classfile/ClassfileParser.java +++ b/sources/scalac/symtab/classfile/ClassfileParser.java @@ -147,7 +147,9 @@ public class ClassfileParser implements ClassfileConstants { int savedFlags = c.flags; c.flags |= Modifiers.INITIALIZED; // hack to make memberType in addInheritedOverloaded work - addInheritedOverloaded(); + if (global.currentPhase.id <= global.PHASE.REFCHECK.id() && + !c.name.toString().endsWith("$class")) + addInheritedOverloaded(); //if (global.debug) { // Symbol[] elems = c.members().elements(); diff --git a/sources/scalac/symtab/classfile/UnPickle.java b/sources/scalac/symtab/classfile/UnPickle.java index fe11fced85..aa88139ad2 100644 --- a/sources/scalac/symtab/classfile/UnPickle.java +++ b/sources/scalac/symtab/classfile/UnPickle.java @@ -154,6 +154,17 @@ public class UnPickle implements Kinds, Modifiers, EntryTags, TypeTags { else return "value " + NameTransformer.decode(name); } + /* + void enterSymbol(Symbol sym) { + Symbol owner = sym.owner(); + if (owner.kind == CLASS && + !sym.isConstructor() && !sym.isModuleClass()) { + Scope scope = owner.info().members(); + scope.enterOrOverload(sym); + } + } + */ + void enterSymbol(Symbol sym) { /* if (global.debug) { |