diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2010-04-09 17:10:33 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2010-04-09 17:10:33 +0000 |
commit | 0dbc3ea559200c7bc85f5de90fd6a64d921dab63 (patch) | |
tree | e2cc4f6bb6d7143b1a30d6feb94a1fc7e4a8fb94 /src | |
parent | f1044e136b067ad303b21c14b24f44ca62ca1977 (diff) | |
download | scala-0dbc3ea559200c7bc85f5de90fd6a64d921dab63.tar.gz scala-0dbc3ea559200c7bc85f5de90fd6a64d921dab63.tar.bz2 scala-0dbc3ea559200c7bc85f5de90fd6a64d921dab63.zip |
Turn on specialization by default. No review.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/settings/ScalaSettings.scala | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 15da6f6fec..3e54b68daf 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -512,7 +512,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable phasesSet += uncurry // uncurry, translate function values to anonymous classes phasesSet += tailCalls // replace tail calls by jumps - if (settings.specialize.value) + if (!settings.nospecialization.value) phasesSet += specializeTypes phasesSet += explicitOuter // replace C.this by explicit outer pointers, eliminate pattern matching phasesSet += erasure // erase types, add interfaces for traits diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala index f9fd996add..fda0097226 100644 --- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala @@ -45,6 +45,8 @@ trait ScalaSettings extends AbsScalaSettings with StandardScalaSettings { val optimise = BooleanSetting ("-optimise", "Generates faster bytecode by applying optimisations to the program") . withAbbreviation("-optimize") . withPostSetHook(_ => List(inline, Xcloselim, Xdce) foreach (_.value = true)) + val nospecialization = BooleanSetting ("-no-specialization", "Ignore @specialize annotations.") + /** * -X "Advanced" settings @@ -126,7 +128,6 @@ trait ScalaSettings extends AbsScalaSettings with StandardScalaSettings { ChoiceSetting ("-Ystruct-dispatch", "Selects dispatch method for structural refinement method calls", List("no-cache", "mono-cache", "poly-cache", "invoke-dynamic"), "poly-cache") . withHelpSyntax("-Ystruct-dispatch:<method>") - val specialize = BooleanSetting ("-Yspecialize", "Specialize generic code on types.") val Yrangepos = BooleanSetting ("-Yrangepos", "Use range positions for syntax trees.") val Yidedebug = BooleanSetting ("-Yide-debug", "Generate, validate and output trees using the interactive compiler.") val Ybuilderdebug = ChoiceSetting ("-Ybuilder-debug", "Compile using the specified build manager", List("none", "refined", "simple"), "none") . |