diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-04 23:08:44 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-04 23:08:44 +0000 |
commit | 28837470cb6225437eb915c983da4dc8f8420e4c (patch) | |
tree | 2902165f42cf17ee7e692fcc7a1a583c1fa7748d | |
parent | e979241c0eec11ac28667aa8fc1ed50182841ff3 (diff) | |
download | scala-28837470cb6225437eb915c983da4dc8f8420e4c.tar.gz scala-28837470cb6225437eb915c983da4dc8f8420e4c.tar.bz2 scala-28837470cb6225437eb915c983da4dc8f8420e4c.zip |
Taking a swing at fixing -optimise. No review.
-rw-r--r-- | src/compiler/scala/tools/nsc/Settings.scala | 3 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/ICodes.scala | 7 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala index c5261f8c10..e61f7dc11e 100644 --- a/src/compiler/scala/tools/nsc/Settings.scala +++ b/src/compiler/scala/tools/nsc/Settings.scala @@ -836,7 +836,8 @@ trait ScalacSettings { val make = ChoiceSetting ("-make", "Specify recompilation detection strategy", List("all", "changed", "immediate", "transitive", "transitivenocp"), "all") . withHelpSyntax("-make:<strategy>") val nowarnings = BooleanSetting ("-nowarn", "Generate no warnings") - val XO = BooleanSetting ("-optimise", "Generates faster bytecode by applying optimisations to the program").withAbbreviation("-optimize") + val XO = BooleanSetting ("-optimise", "Generates faster bytecode by applying optimisations to the program").withAbbreviation("-optimize") . + withPostSetHook(() => List(inline, Xcloselim, Xdce) foreach (_.value = true)) val printLate = BooleanSetting ("-print", "Print program with all Scala-specific features removed") val sourcepath = StringSetting ("-sourcepath", "path", "Specify where to find input source files", "") val target = ChoiceSetting ("-target", "Specify for which target object files should be built", List("jvm-1.5", "msil"), "jvm-1.5") diff --git a/src/compiler/scala/tools/nsc/backend/icode/ICodes.scala b/src/compiler/scala/tools/nsc/backend/icode/ICodes.scala index d2c803b397..b3285fa967 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/ICodes.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/ICodes.scala @@ -72,13 +72,6 @@ abstract class ICodes extends AnyRef lazy val AnyRefReference: TypeKind = REFERENCE(global.definitions.ObjectClass) - import global.settings - if (settings.XO.value) { - settings.inline.value = true - settings.Xcloselim.value = true - settings.Xdce.value = true - } - object icodeReader extends ICodeReader { lazy val global: ICodes.this.global.type = ICodes.this.global } |