summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-09-09 23:34:26 +0000
committerPaul Phillips <paulp@improving.org>2009-09-09 23:34:26 +0000
commitc3a56da40a790d252dbfbfa50783f73bdd45ecaa (patch)
tree8a76debae9b725fd79d8ce3a15afffae24b843ff
parentc71af41d6ae8dd156ffbb9e5d82890047c33bb7f (diff)
downloadscala-c3a56da40a790d252dbfbfa50783f73bdd45ecaa.tar.gz
scala-c3a56da40a790d252dbfbfa50783f73bdd45ecaa.tar.bz2
scala-c3a56da40a790d252dbfbfa50783f73bdd45ecaa.zip
Unbreaking the plugin.
-rw-r--r--src/compiler/scala/tools/nsc/Settings.scala1
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala
index 2452b3adbf..45da880c7c 100644
--- a/src/compiler/scala/tools/nsc/Settings.scala
+++ b/src/compiler/scala/tools/nsc/Settings.scala
@@ -749,6 +749,7 @@ trait ScalacSettings {
val assemrefs = StringSetting ("-Xassem-path", "path", "List of assemblies referenced by the program (only relevant with -target:msil)", ".").dependsOn(target, "msil")
val Xchecknull = BooleanSetting ("-Xcheck-null", "Emit warning on selection of nullable reference")
val checkInit = BooleanSetting ("-Xcheckinit", "Add runtime checks on field accessors. Uninitialized accesses result in an exception being thrown.")
+ val noassertions = BooleanSetting ("-Xdisable-assertions", "Generate no assertions and assumptions")
val elideLevel = IntSetting ("-Xelide-level", "Generate calls to @elidable-marked methods only method priority is greater than argument.",
elidable.ASSERTION, None, elidable.byName.get(_))
val Xexperimental = BooleanSetting ("-Xexperimental", "Enable experimental extensions")
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
index 32a66c321f..d1c06cd87a 100644
--- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala
+++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
@@ -543,9 +543,11 @@ abstract class UnCurry extends InfoTransform with TypingTransformers {
treeCopy.UnApply(tree, fn1, args1)
case Apply(fn, args) =>
+ // XXX settings.noassertions.value temporarily retained to avoid
+ // breakage until a reasonable interface is settled upon.
def elideFunctionCall(sym: Symbol) =
sym != null && (sym.elisionLevel match {
- case Some(x) => x < settings.elideLevel.value
+ case Some(x) => (x < settings.elideLevel.value) || settings.noassertions.value
case _ => false
})
if (elideFunctionCall(fn.symbol)) {