From 51c487b1269daa98bcf114dbab8fd5f5f03d4d3f Mon Sep 17 00:00:00 2001 From: michelou Date: Tue, 3 Mar 2009 13:17:47 +0000 Subject: updated detach phase --- src/compiler/scala/tools/nsc/Global.scala | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 31f3c03963..218f991d56 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -365,6 +365,13 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable val runsRightAfter = None } with LambdaLift + // phaseName = "detach" +// object detach extends { +// val global: Global.this.type = Global.this +// val runsAfter = List("lambdalift") +// val runsRightAfter = Some("lambdalift") +// } with Detach + // phaseName = "constructors" object constructors extends { val global: Global.this.type = Global.this @@ -379,10 +386,6 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable val runsRightAfter = None } with Flatten -// object detach extends { -// val global: Global.this.type = Global.this -// } with Detach - // phaseName = "mixin" object mixer extends { val global: Global.this.type = Global.this @@ -511,6 +514,8 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable phasesSet += erasure // erase generic types to Java 1.4 types, add interfaces for traits phasesSet += lazyVals // phasesSet += lambdaLift // move nested functions to top level +// if (forJVM && settings.Xdetach.value) +// phasesSet += detach // convert detached closures phasesSet += constructors // move field definitions into constructors phasesSet += mixer // do mixin composition phasesSet += cleanup // some platform-specific cleanups -- cgit v1.2.3