summaryrefslogtreecommitdiff
path: root/src/continuations
diff options
context:
space:
mode:
Diffstat (limited to 'src/continuations')
-rw-r--r--src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSPlugin.scala10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSPlugin.scala b/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSPlugin.scala
index c16cce2f2c..d3b02d74f4 100644
--- a/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSPlugin.scala
+++ b/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSPlugin.scala
@@ -11,22 +11,18 @@ class SelectiveCPSPlugin(val global: Global) extends Plugin {
val name = "continuations"
val description = "applies selective cps conversion"
- val anfPhase = new SelectiveANFTransform() {
- val global = SelectiveCPSPlugin.this.global
+ val anfPhase = new {val global = SelectiveCPSPlugin.this.global } with SelectiveANFTransform() {
val runsAfter = List("pickler")
}
- val cpsPhase = new SelectiveCPSTransform() {
- val global = SelectiveCPSPlugin.this.global
+ val cpsPhase = new {val global = SelectiveCPSPlugin.this.global } with SelectiveCPSTransform() {
val runsAfter = List("selectiveanf")
override val runsBefore = List("uncurry")
}
val components = List[PluginComponent](anfPhase, cpsPhase)
- val checker = new CPSAnnotationChecker {
- val global: SelectiveCPSPlugin.this.global.type = SelectiveCPSPlugin.this.global
- }
+ val checker = new { val global: SelectiveCPSPlugin.this.global.type = SelectiveCPSPlugin.this.global } with CPSAnnotationChecker
global.addAnnotationChecker(checker.checker)
global.analyzer.addAnalyzerPlugin(checker.plugin)