Unbreaking the plugin.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@18678 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
extempore 2009-09-09 23:34:26 +00:00
parent 17c42e2232
commit a18a4ff50c
2 changed files with 4 additions and 1 deletions

View File

@ -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")

View File

@ -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)) {