diff options
author | Martin Odersky <odersky@gmail.com> | 2005-06-27 16:22:32 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2005-06-27 16:22:32 +0000 |
commit | ec061b1605db323bcb57a97ab26d78f0e565955f (patch) | |
tree | 3545ffe2874bb0fe35d2131a59468fbdcaf08dc0 /sources | |
parent | 63bb8df947ab0dfd0d85c15258e771f05e3a85db (diff) | |
download | scala-ec061b1605db323bcb57a97ab26d78f0e565955f.tar.gz scala-ec061b1605db323bcb57a97ab26d78f0e565955f.tar.bz2 scala-ec061b1605db323bcb57a97ab26d78f0e565955f.zip |
*** empty log message ***
Diffstat (limited to 'sources')
-rwxr-xr-x | sources/scala/tools/nsc/Global.scala | 6 | ||||
-rwxr-xr-x | sources/scala/tools/nsc/symtab/Symbols.scala | 9 | ||||
-rw-r--r-- | sources/scala/tools/nsc/transform/Transform.scala | 3 | ||||
-rwxr-xr-x | sources/scala/tools/nsc/typechecker/Typers.scala | 2 |
4 files changed, 16 insertions, 4 deletions
diff --git a/sources/scala/tools/nsc/Global.scala b/sources/scala/tools/nsc/Global.scala index e683b63be9..d686ca3493 100755 --- a/sources/scala/tools/nsc/Global.scala +++ b/sources/scala/tools/nsc/Global.scala @@ -136,6 +136,7 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable } val parserPhase = new syntaxAnalyzer.ParserPhase(NoPhase); val firstPhase = parserPhase; + phase = parserPhase; definitions.init; // needs firstPhase to be defined, that's why it is placed here. @@ -244,7 +245,10 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable informTime(globalPhase.description, startTime); } globalPhase = if (settings.stop contains globalPhase.name) terminalPhase else globalPhase.next; - if (settings.check contains globalPhase.name) { phase = globalPhase; checker.checkTrees; } + if (settings.check contains globalPhase.name) { + phase = globalPhase; + checker.checkTrees; + } } if (settings.Xshowcls.value != "") showDef(newTermName(settings.Xshowcls.value), false); if (settings.Xshowobj.value != "") showDef(newTermName(settings.Xshowobj.value), true); diff --git a/sources/scala/tools/nsc/symtab/Symbols.scala b/sources/scala/tools/nsc/symtab/Symbols.scala index 1c7a3cf3a9..d8a8182c07 100755 --- a/sources/scala/tools/nsc/symtab/Symbols.scala +++ b/sources/scala/tools/nsc/symtab/Symbols.scala @@ -232,8 +232,13 @@ abstract class Symbols: SymbolTable { /** Set initial info. */ def setInfo(info: Type): this.type = { - infos = new TypeHistory(phase, info, null); - limit = phase; + if (limit == NoPhase) { + assert(phase != NoPhase); + infos = new TypeHistory(phase, info, null); + limit = phase; + } else { + infos = new TypeHistory(infos.start, info, null); + } assert(info != null); rawflags = if (info.isComplete) rawflags | INITIALIZED & ~LOCKED; else rawflags & ~INITIALIZED & ~LOCKED; diff --git a/sources/scala/tools/nsc/transform/Transform.scala b/sources/scala/tools/nsc/transform/Transform.scala index bac2825028..cedc32118c 100644 --- a/sources/scala/tools/nsc/transform/Transform.scala +++ b/sources/scala/tools/nsc/transform/Transform.scala @@ -15,8 +15,9 @@ abstract class Transform extends SubComponent { class Phase(prev: scala.tools.nsc.Phase) extends global.StdPhase(prev) { def name: String = phaseName; - def apply(unit: global.CompilationUnit): unit = + def apply(unit: global.CompilationUnit): unit = { unit.body = newTransformer(unit).transform(unit.body); + } } } diff --git a/sources/scala/tools/nsc/typechecker/Typers.scala b/sources/scala/tools/nsc/typechecker/Typers.scala index 0e91a856cd..f8bb0a40bb 100755 --- a/sources/scala/tools/nsc/typechecker/Typers.scala +++ b/sources/scala/tools/nsc/typechecker/Typers.scala @@ -782,6 +782,8 @@ abstract class Typers: Analyzer { } case ErrorType => setError(tree) + case _ => + throw new Error("Matcherror at " + phase);//debug } /** The qualifying class of a this or super with prefix `qual' */ |