summaryrefslogtreecommitdiff
path: root/sources/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2005-08-29 14:38:38 +0000
committerMartin Odersky <odersky@gmail.com>2005-08-29 14:38:38 +0000
commit184a284ccc9c842adaaec728914f11a2cad33c18 (patch)
tree25ae4ff123300b6dc24f4c1a2ec0182105e75ec6 /sources/scala/tools/nsc/Global.scala
parent7d50bd127a071b84cc3d5e6e989b5f57d5988aaf (diff)
downloadscala-184a284ccc9c842adaaec728914f11a2cad33c18.tar.gz
scala-184a284ccc9c842adaaec728914f11a2cad33c18.tar.bz2
scala-184a284ccc9c842adaaec728914f11a2cad33c18.zip
*** empty log message ***
Diffstat (limited to 'sources/scala/tools/nsc/Global.scala')
-rwxr-xr-xsources/scala/tools/nsc/Global.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/sources/scala/tools/nsc/Global.scala b/sources/scala/tools/nsc/Global.scala
index 2f6f1e6075..4186eab583 100755
--- a/sources/scala/tools/nsc/Global.scala
+++ b/sources/scala/tools/nsc/Global.scala
@@ -56,8 +56,13 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable
val copy = new LazyTreeCopier();
type AttrInfo = Pair[Type, List[Any]];
+
+ /** A map from symbols to their attributes */
val attributes = new HashMap[Symbol, List[AttrInfo]];
+ /** A map from parameter accessor symbols to their aliases */
+ val aliases = new HashMap[Symbol, Symbol];
+
// reporting -------------------------------------------------------
def error(msg: String) = reporter.error(null, msg);
@@ -144,6 +149,8 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable
def apply(unit: CompilationUnit): unit;
private val isErased = prev.name == "erasure" || prev.erasedTypes;
override def erasedTypes: boolean = isErased;
+ private val isFlat = prev.name == "flatten" || prev.flatClasses;
+ override def flatClasses: boolean = isFlat;
def applyPhase(unit: CompilationUnit): unit = {
if (settings.debug.value) inform("[running phase " + name + " on " + unit + "]");
apply(unit)
@@ -186,6 +193,14 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable
val global: Global.this.type = Global.this;
}
+ object lambdaLift extends LambdaLift {
+ val global: Global.this.type = Global.this;
+ }
+
+ object flatten extends Flatten {
+ val global: Global.this.type = Global.this;
+ }
+
object sampleTransform extends SampleTransform {
val global: Global.this.type = Global.this;
}
@@ -208,6 +223,8 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable
transMatcher,
explicitOuter,
erasure,
+ lambdaLift,
+ flatten,
if (settings.Xshowicode.value) genicode
else sampleTransform);
@@ -239,6 +256,7 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable
val namerPhase = phaseNamed("namer");
val typerPhase = phaseNamed("typer");
+ val refchecksPhase = phaseNamed("refchecks");
val erasurePhase = phaseNamed("erasure");
val typer = new analyzer.Typer(analyzer.NoContext.make(EmptyTree, definitions.RootClass, new Scope())) {