From 8a39160e8375dd1707f686e13a2a796aed310ef7 Mon Sep 17 00:00:00 2001 From: Edmund Noble Date: Sat, 2 Jul 2016 14:24:17 -0400 Subject: [PATCH 1/3] Implement -print as -Xprint:(last phase) --- src/dotty/tools/dotc/Run.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index 928a59214b6b..f2596e9291e2 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -62,7 +62,8 @@ class Run(comp: Compiler)(implicit ctx: Context) { units = phase.runOn(units) def foreachUnit(op: Context => Unit)(implicit ctx: Context): Unit = for (unit <- units) op(ctx.fresh.setPhase(phase.next).setCompilationUnit(unit)) - if (ctx.settings.Xprint.value.containsPhase(phase)) + if (ctx.settings.Xprint.value.containsPhase(phase) || + (ctx.settings.print.value && phase == ctx.allPhases.last)) foreachUnit(printTree) ctx.informTime(s"$phase ", start) } From e82087a085366a15384c4cdbd23e25b4b24e485a Mon Sep 17 00:00:00 2001 From: Edmund Noble Date: Wed, 6 Jul 2016 17:35:29 -0400 Subject: [PATCH 2/3] Revert "Implement -print as -Xprint:(last phase)" This reverts commit 8a39160e8375dd1707f686e13a2a796aed310ef7. --- src/dotty/tools/dotc/Run.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index f2596e9291e2..928a59214b6b 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -62,8 +62,7 @@ class Run(comp: Compiler)(implicit ctx: Context) { units = phase.runOn(units) def foreachUnit(op: Context => Unit)(implicit ctx: Context): Unit = for (unit <- units) op(ctx.fresh.setPhase(phase.next).setCompilationUnit(unit)) - if (ctx.settings.Xprint.value.containsPhase(phase) || - (ctx.settings.print.value && phase == ctx.allPhases.last)) + if (ctx.settings.Xprint.value.containsPhase(phase)) foreachUnit(printTree) ctx.informTime(s"$phase ", start) } From a1499c85fdcbeb4c923062673960376e4674c18f Mon Sep 17 00:00:00 2001 From: Edmund Noble Date: Wed, 6 Jul 2016 17:35:37 -0400 Subject: [PATCH 3/3] Remove print option from ScalaSettings --- src/dotty/tools/dotc/config/ScalaSettings.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dotty/tools/dotc/config/ScalaSettings.scala b/src/dotty/tools/dotc/config/ScalaSettings.scala index 74ff764449e5..bf56a486e56d 100644 --- a/src/dotty/tools/dotc/config/ScalaSettings.scala +++ b/src/dotty/tools/dotc/config/ScalaSettings.scala @@ -27,7 +27,6 @@ class ScalaSettings extends Settings.SettingGroup { val g = ChoiceSetting("-g", "level", "Set level of generated debugging info.", List("none", "source", "line", "vars", "notailcalls"), "vars") val help = BooleanSetting("-help", "Print a synopsis of standard options") val nowarn = BooleanSetting("-nowarn", "Generate no warnings.") - val print = BooleanSetting("-print", "Print program with Scala-specific features removed.") val color = ChoiceSetting("-color", "mode", "Colored output", List("always", "never"/*, "auto"*/), "always"/* "auto"*/) val target = ChoiceSetting("-target", "target", "Target platform for object files. All JVM 1.5 targets are deprecated.", List("jvm-1.5", "jvm-1.5-fjbg", "jvm-1.5-asm", "jvm-1.6", "jvm-1.7", "jvm-1.8", "msil"),