diff options
author | paltherr <paltherr@epfl.ch> | 2004-03-04 01:29:53 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-03-04 01:29:53 +0000 |
commit | 95146d1ee59c97899f6c807019bb3359d8c7884b (patch) | |
tree | 2e3f9686cddba4988884faac684f282e0f62114f /sources/scalac | |
parent | 3d5478d4e16815bbb353eb718d5a1c5e712706d4 (diff) | |
download | scala-95146d1ee59c97899f6c807019bb3359d8c7884b.tar.gz scala-95146d1ee59c97899f6c807019bb3359d8c7884b.tar.bz2 scala-95146d1ee59c97899f6c807019bb3359d8c7884b.zip |
- Removed Type.localThisType
Diffstat (limited to 'sources/scalac')
-rw-r--r-- | sources/scalac/symtab/Definitions.java | 2 | ||||
-rw-r--r-- | sources/scalac/symtab/Symbol.java | 2 | ||||
-rw-r--r-- | sources/scalac/symtab/Type.java | 8 | ||||
-rw-r--r-- | sources/scalac/transformer/ExplicitOuterClassesPhase.java | 8 |
4 files changed, 7 insertions, 13 deletions
diff --git a/sources/scalac/symtab/Definitions.java b/sources/scalac/symtab/Definitions.java index f5b61ad79a..505c6b14f2 100644 --- a/sources/scalac/symtab/Definitions.java +++ b/sources/scalac/symtab/Definitions.java @@ -464,8 +464,6 @@ public class Definitions { public Definitions(Global global) { // make definitions accessible earlier to other components global.definitions = this; - // force initialization of class Type - Type.localThisType.symbol(); // create attributed tree typer atyper = new ATreeTyper(global, this); diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java index 9d6bf4cf0a..86152ca1b4 100644 --- a/sources/scalac/symtab/Symbol.java +++ b/sources/scalac/symtab/Symbol.java @@ -1003,7 +1003,7 @@ public abstract class Symbol implements Modifiers, Kinds { /** Get this.type corresponding to this symbol */ public Type thisType() { - return Type.localThisType; + return Type.NoPrefix; } /** Get type of `this' in current class. diff --git a/sources/scalac/symtab/Type.java b/sources/scalac/symtab/Type.java index fed9d8055e..6e89ef88d8 100644 --- a/sources/scalac/symtab/Type.java +++ b/sources/scalac/symtab/Type.java @@ -135,10 +135,6 @@ public class Type implements Modifiers, Kinds, TypeTags, EntryTags { // Creators --------------------------------------------------------------------- - /** An owner-less ThisType - */ - public static Type localThisType = NoPrefix; - /** An empty Type array */ public static final Type[] EMPTY_ARRAY = new Type[0]; @@ -3089,11 +3085,11 @@ public class Type implements Modifiers, Kinds, TypeTags, EntryTags { if (sym == definitions.JAVA_OBJECT_CLASS || sym == definitions.ALL_CLASS || sym == definitions.ALLREF_CLASS) - return Type.typeRef(localThisType, definitions.ANY_CLASS, EMPTY_ARRAY); + return Type.typeRef(NoPrefix, definitions.ANY_CLASS, EMPTY_ARRAY); else { Type this1 = unbox(); if (this1 != this) return this1; - else return Type.typeRef(localThisType, sym, EMPTY_ARRAY); + else return Type.typeRef(NoPrefix, sym, EMPTY_ARRAY); } default: throw new ApplicationError(sym + " has wrong kind: " + sym.kind); diff --git a/sources/scalac/transformer/ExplicitOuterClassesPhase.java b/sources/scalac/transformer/ExplicitOuterClassesPhase.java index e23807983c..e1e4293919 100644 --- a/sources/scalac/transformer/ExplicitOuterClassesPhase.java +++ b/sources/scalac/transformer/ExplicitOuterClassesPhase.java @@ -260,7 +260,7 @@ public class ExplicitOuterClassesPhase extends Phase { public Type getTypeLink(int level) { if (level == outers.length - 1) { assert outers[level].clasz.isRoot(): level + " - " + this; // !!! remove - return Type.localThisType; + return Type.NoPrefix; } if (tlinks[level] != null) return tlinks[level].type(); return Type.singleType(getTypeLink(level + 1), outers[level].clasz.module()); @@ -299,19 +299,19 @@ public class ExplicitOuterClassesPhase extends Phase { switch (type) { case TypeRef(Type prefix, Symbol symbol, Type[] args): if (symbol.isParameter() && symbol.owner().isConstructor()) { - assert prefix.equals(Type.localThisType): type; + assert prefix == Type.NoPrefix: type; assert args.length == 0: type; Object value = tparams.get(symbol); return value != null ? (Type)value : type; } if (symbol.isClass()) { args = map(getNewArgsOf(context, prefix, symbol, args)); - prefix = Type.localThisType; + prefix = Type.NoPrefix; return Type.typeRef(prefix, symbol, args); } if (symbol.isPackage()) { args = Type.EMPTY_ARRAY; - prefix = Type.localThisType; + prefix = Type.NoPrefix; return Type.typeRef(prefix, symbol, args); } return Type.typeRef(apply(prefix), symbol, map(args)); |