From 8e59e56216f0d8ed7513eb980a002899f2473483 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 19 Jan 2011 15:33:57 +0000 Subject: Fixed First/Second dependency problem in presen... Fixed First/Second dependency problem in presentation compiler. --- src/compiler/scala/tools/nsc/interactive/Global.scala | 4 ++-- .../scala/tools/nsc/interactive/PresentationCompilerThread.scala | 3 +-- src/compiler/scala/tools/nsc/symtab/Types.scala | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index 7637eaff7e..0787142c9a 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -197,12 +197,12 @@ self => logreplay("atnode", nodeWithWork()) match { case Some(id) => debugLog("some work at node "+id+" current = "+nodesSeen) - assert(id >= nodesSeen) +// assert(id >= nodesSeen) moreWorkAtNode = id case None => } - if (nodesSeen == moreWorkAtNode) { + if (nodesSeen >= moreWorkAtNode) { if (logreplay("cancelled", pendingResponse.isCancelled)) { throw CancelException } diff --git a/src/compiler/scala/tools/nsc/interactive/PresentationCompilerThread.scala b/src/compiler/scala/tools/nsc/interactive/PresentationCompilerThread.scala index 499f0712b0..cf013be7b8 100644 --- a/src/compiler/scala/tools/nsc/interactive/PresentationCompilerThread.scala +++ b/src/compiler/scala/tools/nsc/interactive/PresentationCompilerThread.scala @@ -17,7 +17,6 @@ class PresentationCompilerThread(var compiler: Global, threadId: Int) extends Th while (true) { compiler.log.logreplay("wait for more work", { compiler.scheduler.waitForMoreWork(); true }) compiler.pollForWork(compiler.NoPosition) - compiler.debugLog("got more work") while (compiler.outOfDate) { try { compiler.backgroundCompile() @@ -50,4 +49,4 @@ class PresentationCompilerThread(var compiler: Global, threadId: Int) extends Th compiler = null } } -} \ No newline at end of file +} diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index a8f42cb552..f302f5c6ea 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -3777,7 +3777,7 @@ A type's typeSymbol should never be inspected directly. if (rebind0 == NoSymbol) { if (sym.isAliasType) throw missingAliasException if (settings.debug.value) println(pre+"."+sym+" does no longer exist, phase = "+phase) - throw new MissingTypeControl // For build manager purposes + throw new MissingTypeControl // For build manager and presentation compiler purposes //assert(false, pre+"."+sym+" does no longer exist, phase = "+phase) } /** The two symbols have the same fully qualified name */ @@ -3816,7 +3816,7 @@ A type's typeSymbol should never be inspected directly. if (sym1 == sym) tp else ThisType(sym1) } catch { case ex: MissingTypeControl => - NoType + tp } case SingleType(pre, sym) => if (sym.isPackage) tp @@ -3839,7 +3839,7 @@ A type's typeSymbol should never be inspected directly. case ex: MissingAliasControl => apply(tp.dealias) case _: MissingTypeControl => - NoType + tp } } case MethodType(params, restp) => -- cgit v1.2.3