summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-06-04 20:05:47 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2015-06-04 20:55:10 +0200
commita112422e91018b7f01add6c9d40bec5eb010c321 (patch)
tree13d9df355cfba3b0fb00873298be8169ece8c778 /src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
parent460e10cdb2fdfb9becaed5590ec77c7d5324a4db (diff)
downloadscala-a112422e91018b7f01add6c9d40bec5eb010c321.tar.gz
scala-a112422e91018b7f01add6c9d40bec5eb010c321.tar.bz2
scala-a112422e91018b7f01add6c9d40bec5eb010c321.zip
Compiler option for disabling nullness analysis
Diffstat (limited to 'src/compiler/scala/tools/nsc/settings/ScalaSettings.scala')
-rw-r--r--src/compiler/scala/tools/nsc/settings/ScalaSettings.scala8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
index 35ee889c58..953e43eaca 100644
--- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
@@ -234,15 +234,16 @@ trait ScalaSettings extends AbsScalaSettings
val emptyLineNumbers = Choice("empty-line-numbers", "Eliminate unnecessary line number information.")
val emptyLabels = Choice("empty-labels", "Eliminate and collapse redundant labels in the bytecode.")
val compactLocals = Choice("compact-locals", "Eliminate empty slots in the sequence of local variables.")
- val inlineProject = Choice("inline-project", "Inline only methods defined in the files being compiled")
- val inlineGlobal = Choice("inline-global", "Inline methods from any source, including classfiles on the compile classpath")
+ val nullnessTracking = Choice("nullness-tracking", "Track nullness / non-nullness of local variables and apply optimizations.")
+ val inlineProject = Choice("inline-project", "Inline only methods defined in the files being compiled.")
+ val inlineGlobal = Choice("inline-global", "Inline methods from any source, including classfiles on the compile classpath.")
val lNone = Choice("l:none", "Don't enable any optimizations.")
private val defaultChoices = List(unreachableCode)
val lDefault = Choice("l:default", "Enable default optimizations: "+ defaultChoices.mkString(","), expandsTo = defaultChoices)
- private val methodChoices = List(unreachableCode, simplifyJumps, emptyLineNumbers, emptyLabels, compactLocals)
+ private val methodChoices = List(unreachableCode, simplifyJumps, emptyLineNumbers, emptyLabels, compactLocals, nullnessTracking)
val lMethod = Choice("l:method", "Enable intra-method optimizations: "+ methodChoices.mkString(","), expandsTo = methodChoices)
private val projectChoices = List(lMethod, inlineProject)
@@ -264,6 +265,7 @@ trait ScalaSettings extends AbsScalaSettings
def YoptEmptyLineNumbers = Yopt.contains(YoptChoices.emptyLineNumbers)
def YoptEmptyLabels = Yopt.contains(YoptChoices.emptyLabels)
def YoptCompactLocals = Yopt.contains(YoptChoices.compactLocals)
+ def YoptNullnessTracking = Yopt.contains(YoptChoices.nullnessTracking)
def YoptInlineProject = Yopt.contains(YoptChoices.inlineProject)
def YoptInlineGlobal = Yopt.contains(YoptChoices.inlineGlobal)