summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/settings
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/settings')
-rw-r--r--src/compiler/scala/tools/nsc/settings/ScalaSettings.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
index 794c0ba324..42ed9ef935 100644
--- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
@@ -229,6 +229,7 @@ trait ScalaSettings extends AbsScalaSettings
val simplifyJumps = Choice("simplify-jumps", "Simplify branching instructions, eliminate unnecessary ones.")
val compactLocals = Choice("compact-locals", "Eliminate empty slots in the sequence of local variables.")
val copyPropagation = Choice("copy-propagation", "Eliminate redundant local variables and unused values (including closures). Enables unreachable-code.")
+ val boxUnbox = Choice("box-unbox", "Eliminate box-unbox pairs within the same method (also tuples, xRefs, value class instances). Enables unreachable-code.")
val nullnessTracking = Choice("nullness-tracking", "Track nullness / non-nullness of local variables and apply optimizations.")
val closureInvocations = Choice("closure-invocations" , "Rewrite closure invocations to the implementation method.")
val inlineProject = Choice("inline-project", "Inline only methods defined in the files being compiled. Enables unreachable-code.")
@@ -239,7 +240,7 @@ trait ScalaSettings extends AbsScalaSettings
private val defaultChoices = List(unreachableCode)
val lDefault = Choice("l:default", "Enable default optimizations: "+ defaultChoices.mkString(","), expandsTo = defaultChoices)
- private val methodChoices = List(unreachableCode, simplifyJumps, compactLocals, copyPropagation, nullnessTracking, closureInvocations)
+ private val methodChoices = List(unreachableCode, simplifyJumps, compactLocals, copyPropagation, boxUnbox, nullnessTracking, closureInvocations)
val lMethod = Choice("l:method", "Enable intra-method optimizations: "+ methodChoices.mkString(","), expandsTo = methodChoices)
private val projectChoices = List(lMethod, inlineProject)
@@ -260,6 +261,7 @@ trait ScalaSettings extends AbsScalaSettings
def YoptSimplifyJumps = Yopt.contains(YoptChoices.simplifyJumps)
def YoptCompactLocals = Yopt.contains(YoptChoices.compactLocals)
def YoptCopyPropagation = Yopt.contains(YoptChoices.copyPropagation)
+ def YoptBoxUnbox = Yopt.contains(YoptChoices.boxUnbox)
def YoptNullnessTracking = Yopt.contains(YoptChoices.nullnessTracking)
def YoptClosureInvocations = Yopt.contains(YoptChoices.closureInvocations)