diff options
author | paltherr <paltherr@epfl.ch> | 2004-02-01 03:15:00 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2004-02-01 03:15:00 +0000 |
commit | e4731931589d6313988337a921747f9caf6fc3e7 (patch) | |
tree | 92c7298118201c435ef42d99d6b6d6c00a70c64a /sources/scalac/symtab/Definitions.java | |
parent | c9e045f5c67d44313e9e2436ec107e514548272e (diff) | |
download | scala-e4731931589d6313988337a921747f9caf6fc3e7.tar.gz scala-e4731931589d6313988337a921747f9caf6fc3e7.tar.bz2 scala-e4731931589d6313988337a921747f9caf6fc3e7.zip |
- Generalized use of AConstant to represent con...
- Generalized use of AConstant to represent constant values
Diffstat (limited to 'sources/scalac/symtab/Definitions.java')
-rw-r--r-- | sources/scalac/symtab/Definitions.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sources/scalac/symtab/Definitions.java b/sources/scalac/symtab/Definitions.java index aaac2ee960..1cfc8995f8 100644 --- a/sources/scalac/symtab/Definitions.java +++ b/sources/scalac/symtab/Definitions.java @@ -11,6 +11,7 @@ package scalac.symtab; import ch.epfl.lamp.util.Position; import scalac.Global; +import scalac.atree.ATreeTyper; import scalac.symtab.classfile.PackageParser; import scalac.util.Debug; import scalac.util.Name; @@ -19,6 +20,12 @@ import scalac.util.Names; public class Definitions { //######################################################################## + // Public Fields - Root module + + /** The attributed tree typer */ + public final ATreeTyper atyper; + + //######################################################################## // Public Fields & Methods - Root module /** The root module */ @@ -461,6 +468,8 @@ public class Definitions { global.definitions = this; // force initialization of class Type Type.localThisType.symbol(); + // create attributed tree typer + atyper = new ATreeTyper(global, this); // the root module ROOT = TermSymbol.newJavaPackageModule( @@ -520,7 +529,6 @@ public class Definitions { initAlias(ANYREF_CLASS, JAVA_OBJECT_TYPE()); initClass(ALLREF_CLASS, new Type[]{ANYREF_TYPE()}); initClass(ALL_CLASS, new Type[]{ANY_TYPE()}); - initAlias(STRING_CLASS, JAVA_STRING_TYPE()); // create type symbols UNIT_TYPE = newTypeSymbol(Names.Unit , UNIT_CLASS.type ()); @@ -535,6 +543,9 @@ public class Definitions { ARRAY_TYPE = newTypeSymbol(Names.Array , Type.appliedType(ARRAY_CLASS.type(), new Type[]{ANYREF_TYPE()})); + // initialize generated classes and aliases + initAlias(STRING_CLASS, JAVA_STRING_TYPE()); + // add members to scala.Any ANY_EQ = newTerm(ANY_CLASS, Names.eq , 0); ANY_EQEQ = newTerm(ANY_CLASS, Names.EQEQ , Modifiers.FINAL); |