diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-02-15 16:56:48 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-02-16 16:43:34 +0100 |
commit | b7626d998ee415271105450f125c507629b8eae2 (patch) | |
tree | fd201d898e7d67dbdabdd116f1f27710718b98d6 /test | |
parent | ce3a8030fa59e5a9082528bf6f1ffc12a9277bc9 (diff) | |
download | scala-b7626d998ee415271105450f125c507629b8eae2.tar.gz scala-b7626d998ee415271105450f125c507629b8eae2.tar.bz2 scala-b7626d998ee415271105450f125c507629b8eae2.zip |
Remove -Y settings that are no longer used in 2.12
Added a deprecation warning for `-optimize`.
Later we'll also graduate `-Yopt` to `-opt`, probably for 2.12.0-M5.
Diffstat (limited to 'test')
45 files changed, 50 insertions, 111 deletions
diff --git a/test/files/neg/case-collision2.flags b/test/files/neg/case-collision2.flags index bea46902c9..85d8eb2ba2 100644 --- a/test/files/neg/case-collision2.flags +++ b/test/files/neg/case-collision2.flags @@ -1 +1 @@ --Ybackend:GenBCode -Xfatal-warnings +-Xfatal-warnings diff --git a/test/files/neg/incompatibleSettings.check b/test/files/neg/incompatibleSettings.check deleted file mode 100644 index 0f28d41825..0000000000 --- a/test/files/neg/incompatibleSettings.check +++ /dev/null @@ -1,6 +0,0 @@ -warning: Conflicting compiler settings were detected. Some settings will be ignored. -Compiler settings for the 2.11 optimizer (-optimise) are incompatible with -Ybackend:GenBCode (which is the default in 2.12). -The optimizer settings are ignored. See -Yopt:help for enabling the new optimizer in 2.12. -error: No warnings can be incurred under -Xfatal-warnings. -one warning found -one error found diff --git a/test/files/neg/incompatibleSettings.flags b/test/files/neg/incompatibleSettings.flags deleted file mode 100644 index 00dd9c1c24..0000000000 --- a/test/files/neg/incompatibleSettings.flags +++ /dev/null @@ -1 +0,0 @@ --optimise -Ybackend:GenBCode -Xfatal-warnings diff --git a/test/files/neg/inlineMaxSize.flags b/test/files/neg/inlineMaxSize.flags index 9c6b811622..18b474e797 100644 --- a/test/files/neg/inlineMaxSize.flags +++ b/test/files/neg/inlineMaxSize.flags @@ -1 +1 @@ --Ybackend:GenBCode -Ydelambdafy:method -Yopt:l:classpath -Yopt-warnings -Xfatal-warnings
\ No newline at end of file +-Ydelambdafy:method -Yopt:l:classpath -Yopt-warnings -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/neg/optimiseDeprecated.check b/test/files/neg/optimiseDeprecated.check new file mode 100644 index 0000000000..d51d48f023 --- /dev/null +++ b/test/files/neg/optimiseDeprecated.check @@ -0,0 +1,4 @@ +warning: -optimise is deprecated: In 2.12, -optimise enables -Yopt:l:classpath. Check -Yopt:help for using the Scala 2.12 optimizer. +error: No warnings can be incurred under -Xfatal-warnings. +one warning found +one error found diff --git a/test/files/neg/optimiseDeprecated.flags b/test/files/neg/optimiseDeprecated.flags new file mode 100644 index 0000000000..42fca6d836 --- /dev/null +++ b/test/files/neg/optimiseDeprecated.flags @@ -0,0 +1 @@ +-optimise -deprecation -Xfatal-warnings diff --git a/test/files/neg/incompatibleSettings.scala b/test/files/neg/optimiseDeprecated.scala index 826a1a5bc2..826a1a5bc2 100644 --- a/test/files/neg/incompatibleSettings.scala +++ b/test/files/neg/optimiseDeprecated.scala diff --git a/test/files/pos/t9111-inliner-workaround.flags b/test/files/pos/t9111-inliner-workaround.flags index 63b5558cfd..422d6be431 100644 --- a/test/files/pos/t9111-inliner-workaround.flags +++ b/test/files/pos/t9111-inliner-workaround.flags @@ -1 +1 @@ --Ybackend:GenBCode -Yopt:l:classpath
\ No newline at end of file +-Yopt:l:classpath
\ No newline at end of file diff --git a/test/files/run/bcodeInlinerMixed.flags b/test/files/run/bcodeInlinerMixed.flags index 63b5558cfd..422d6be431 100644 --- a/test/files/run/bcodeInlinerMixed.flags +++ b/test/files/run/bcodeInlinerMixed.flags @@ -1 +1 @@ --Ybackend:GenBCode -Yopt:l:classpath
\ No newline at end of file +-Yopt:l:classpath
\ No newline at end of file diff --git a/test/files/run/nothingTypeDce.flags b/test/files/run/nothingTypeDce.flags index fde52cc7df..8785c036f6 100644 --- a/test/files/run/nothingTypeDce.flags +++ b/test/files/run/nothingTypeDce.flags @@ -1 +1 @@ --Ybackend:GenBCode -Yopt:unreachable-code +-Yopt:unreachable-code diff --git a/test/files/run/nothingTypeDce.scala b/test/files/run/nothingTypeDce.scala index 92d3ca6f89..5c3a0731fd 100644 --- a/test/files/run/nothingTypeDce.scala +++ b/test/files/run/nothingTypeDce.scala @@ -1,6 +1,6 @@ // See comment in BCodeBodyBuilder -// -Ybackend:GenBCode -Yopt:unreachable-code +// -Yopt:unreachable-code class C { // can't just emit a call to ???, that returns value of type Nothing$ (not Int). diff --git a/test/files/run/nothingTypeNoOpt.flags b/test/files/run/nothingTypeNoOpt.flags index d3e4d61e19..bc22511cff 100644 --- a/test/files/run/nothingTypeNoOpt.flags +++ b/test/files/run/nothingTypeNoOpt.flags @@ -1 +1 @@ --Ybackend:GenBCode -Yopt:l:none +-Yopt:l:none diff --git a/test/files/run/nothingTypeNoOpt.scala b/test/files/run/nothingTypeNoOpt.scala index 454539a4b1..33b20ba851 100644 --- a/test/files/run/nothingTypeNoOpt.scala +++ b/test/files/run/nothingTypeNoOpt.scala @@ -1,6 +1,6 @@ // See comment in BCodeBodyBuilder -// -target:jvm-1.6 -Ybackend:GenBCode -Yopt:l:none +// -target:jvm-1.6 -Yopt:l:none // target enables stack map frame generation class C { diff --git a/test/files/run/t3452b-bcode.check b/test/files/run/t3452b-bcode.check deleted file mode 100644 index 204c3d0437..0000000000 --- a/test/files/run/t3452b-bcode.check +++ /dev/null @@ -1,2 +0,0 @@ -Search received: test -SearchC received: test diff --git a/test/files/run/t3452b-bcode.flags b/test/files/run/t3452b-bcode.flags deleted file mode 100644 index c30091d3de..0000000000 --- a/test/files/run/t3452b-bcode.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenBCode diff --git a/test/files/run/t3452b-bcode/J_2.java b/test/files/run/t3452b-bcode/J_2.java deleted file mode 100644 index 839f334508..0000000000 --- a/test/files/run/t3452b-bcode/J_2.java +++ /dev/null @@ -1,6 +0,0 @@ -public class J_2 { - public static void j() { - StringSearch.search("test"); - StringSearch.searchC("test"); - } -} diff --git a/test/files/run/t3452b-bcode/S_1.scala b/test/files/run/t3452b-bcode/S_1.scala deleted file mode 100644 index a209f12035..0000000000 --- a/test/files/run/t3452b-bcode/S_1.scala +++ /dev/null @@ -1,17 +0,0 @@ -trait Search[M] { - def search(input: M): C[Int] = { - println("Search received: " + input) - null - } -} - -class SearchC[M] { - def searchC(input: M): C[Int] = { - println("SearchC received: " + input) - null - } -} - -object StringSearch extends SearchC[String] with Search[String] - -trait C[T] diff --git a/test/files/run/t3452b-bcode/S_3.scala b/test/files/run/t3452b-bcode/S_3.scala deleted file mode 100644 index 102b433f47..0000000000 --- a/test/files/run/t3452b-bcode/S_3.scala +++ /dev/null @@ -1,5 +0,0 @@ -object Test { - def main(args: Array[String]): Unit = { - J_2.j() - } -} diff --git a/test/files/run/t7407.flags b/test/files/run/t7407.flags index ffc65f4b81..bc22511cff 100644 --- a/test/files/run/t7407.flags +++ b/test/files/run/t7407.flags @@ -1 +1 @@ --Yopt:l:none -Ybackend:GenBCode +-Yopt:l:none diff --git a/test/files/run/t7407b.flags b/test/files/run/t7407b.flags deleted file mode 100644 index c30091d3de..0000000000 --- a/test/files/run/t7407b.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenBCode diff --git a/test/files/run/t8233-bcode.flags b/test/files/run/t8233-bcode.flags deleted file mode 100644 index c30091d3de..0000000000 --- a/test/files/run/t8233-bcode.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenBCode diff --git a/test/files/run/t8233-bcode.scala b/test/files/run/t8233-bcode.scala deleted file mode 100644 index 72d013e553..0000000000 --- a/test/files/run/t8233-bcode.scala +++ /dev/null @@ -1,31 +0,0 @@ -object Test { - def bar(s: String) = s; - val o: Option[Null] = None - def nullReference { - val a: Null = o.get - bar(a) // Was: VerifyError under GenICode - } - - def literal { - val a: Null = null - bar(a) - } - - /** Check SI-8330 for details */ - def expectedUnitInABranch(b: Boolean): Boolean = { - if (b) { - val x = 12 - () - } else { - // here expected type is (unboxed) Unit - null - } - true - } - - def main(args: Array[String]): Unit = { - try { nullReference } catch { case _: NoSuchElementException => } - literal - expectedUnitInABranch(true) - } -} diff --git a/test/files/run/t8845.flags b/test/files/run/t8845.flags deleted file mode 100644 index c30091d3de..0000000000 --- a/test/files/run/t8845.flags +++ /dev/null @@ -1 +0,0 @@ --Ybackend:GenBCode diff --git a/test/files/run/t8925.flags b/test/files/run/t8925.flags index ffc65f4b81..bc22511cff 100644 --- a/test/files/run/t8925.flags +++ b/test/files/run/t8925.flags @@ -1 +1 @@ --Yopt:l:none -Ybackend:GenBCode +-Yopt:l:none diff --git a/test/files/run/t9097.scala b/test/files/run/t9097.scala index 2b5cf66a75..49c0bbe79a 100644 --- a/test/files/run/t9097.scala +++ b/test/files/run/t9097.scala @@ -6,7 +6,6 @@ object Test extends StoreReporterDirectTest { override def extraSettings: String = List( "-usejavacp", "-Xfatal-warnings", - "-Ybackend:GenBCode", "-Ydelambdafy:method", "-Xprint:delambdafy", s"-d ${testOutput.path}" diff --git a/test/junit/scala/issues/OptimizedBytecodeTest.scala b/test/junit/scala/issues/OptimizedBytecodeTest.scala index 58ab6c2134..0e1a52b1c8 100644 --- a/test/junit/scala/issues/OptimizedBytecodeTest.scala +++ b/test/junit/scala/issues/OptimizedBytecodeTest.scala @@ -380,4 +380,11 @@ class OptimizedBytecodeTest extends ClearAfterClass { val List(c, f) = compileClasses(compiler)(code) assertInvoke(getSingleMethod(c, "crash"), "C", "map") } + + @Test + def optimiseEnablesNewOpt(): Unit = { + val code = """class C { def t = (1 to 10) foreach println }""" + val List(c) = readAsmClasses(compile(newCompiler(extraArgs = "-optimise -deprecation"))(code, allowMessage = _.msg.contains("is deprecated"))) + assertInvoke(getSingleMethod(c, "t"), "C", "C$$$anonfun$1") // range-foreach inlined from classpath + } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala b/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala index 6ada0e20fb..8b8e2b36de 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala @@ -12,7 +12,7 @@ import scala.tools.testing.ClearAfterClass object BTypesTest extends ClearAfterClass.Clearable { var compiler = { - val comp = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") + val comp = newCompiler(extraArgs = "-Yopt:l:none") new comp.Run() // initializes some of the compiler comp.exitingDelambdafy(comp.scalaPrimitives.init()) // needed: it's only done when running the backend, and we don't actually run the compiler comp.exitingDelambdafy(comp.genBCode.bTypes.initializeCoreBTypes()) diff --git a/test/junit/scala/tools/nsc/backend/jvm/DefaultMethodTest.scala b/test/junit/scala/tools/nsc/backend/jvm/DefaultMethodTest.scala index e57e95bac4..2ce9d21331 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/DefaultMethodTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/DefaultMethodTest.scala @@ -11,7 +11,7 @@ import JavaConverters._ import scala.tools.testing.ClearAfterClass object DefaultMethodTest extends ClearAfterClass.Clearable { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode") + var compiler = newCompiler() def clear(): Unit = { compiler = null } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala b/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala index 240d3523f1..0cdc6ead10 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala @@ -10,7 +10,7 @@ import scala.tools.partest.ASMConverters._ import scala.tools.testing.ClearAfterClass object DirectCompileTest extends ClearAfterClass.Clearable { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:method") + var compiler = newCompiler(extraArgs = "-Yopt:l:method") def clear(): Unit = { compiler = null } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala b/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala index f5f93fef5c..758566fe53 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala @@ -11,7 +11,7 @@ import scala.tools.testing.ClearAfterClass import scala.collection.JavaConverters._ object IndyLambdaTest extends ClearAfterClass.Clearable { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode") + var compiler = newCompiler() def clear(): Unit = { compiler = null diff --git a/test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala index daff6fc223..78dbab82f4 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala @@ -20,7 +20,7 @@ import AsmUtils._ import scala.collection.convert.decorateAsScala._ object NullnessAnalyzerTest extends ClearAfterClass.Clearable { - var noOptCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") + var noOptCompiler = newCompiler(extraArgs = "-Yopt:l:none") def clear(): Unit = { noOptCompiler = null diff --git a/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala index 4835eb3cdf..d54b8ac563 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala @@ -15,7 +15,7 @@ import CodeGenTools._ import AsmUtils._ object ProdConsAnalyzerTest extends ClearAfterClass.Clearable { - var noOptCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") + var noOptCompiler = newCompiler(extraArgs = "-Yopt:l:none") def clear(): Unit = { noOptCompiler = null diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala index 1b6c080234..9e6a148dba 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala @@ -22,7 +22,7 @@ import scala.collection.convert.decorateAsScala._ @RunWith(classOf[JUnit4]) class BTypesFromClassfileTest { // inliner enabled -> inlineInfos are collected (and compared) in ClassBTypes - val compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:inline-global") + val compiler = newCompiler(extraArgs = "-Yopt:inline-global") import compiler._ import definitions._ diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala index 3857d3e8ce..6e1ac3ba9f 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala @@ -25,7 +25,7 @@ import scala.collection.convert.decorateAsScala._ import scala.tools.testing.ClearAfterClass object CallGraphTest extends ClearAfterClass.Clearable { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:inline-global -Yopt-warnings") + var compiler = newCompiler(extraArgs = "-Yopt:inline-global -Yopt-warnings") def clear(): Unit = { compiler = null } // allows inspecting the caches after a compilation run diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala index cd298f822a..ac1b759fe2 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala @@ -17,8 +17,8 @@ class CompactLocalVariablesTest { // recurse-unreachable-jumps is required for eliminating catch blocks, in the first dce round they // are still live.only after eliminating the empty handler the catch blocks become unreachable. - val methodOptCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:unreachable-code,compact-locals") - val noCompactVarsCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:unreachable-code") + val methodOptCompiler = newCompiler(extraArgs = "-Yopt:unreachable-code,compact-locals") + val noCompactVarsCompiler = newCompiler(extraArgs = "-Yopt:unreachable-code") @Test def compactUnused(): Unit = { diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala index cb01f3d164..22aed4207f 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala @@ -14,8 +14,8 @@ import ASMConverters._ import scala.tools.testing.ClearAfterClass object EmptyExceptionHandlersTest extends ClearAfterClass.Clearable { - var noOptCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") - var dceCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:unreachable-code") + var noOptCompiler = newCompiler(extraArgs = "-Yopt:l:none") + var dceCompiler = newCompiler(extraArgs = "-Yopt:unreachable-code") def clear(): Unit = { noOptCompiler = null dceCompiler = null diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala index c25933e63e..036816605b 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala @@ -19,7 +19,7 @@ import BackendReporting._ import scala.collection.convert.decorateAsScala._ object InlineInfoTest extends ClearAfterClass.Clearable { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:classpath") + var compiler = newCompiler(extraArgs = "-Yopt:l:classpath") def clear(): Unit = { compiler = null } def notPerRun: List[Clearable] = List( diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala index 5f7a6d0633..84d3d71964 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala @@ -28,7 +28,7 @@ import scala.collection.convert.decorateAsScala._ import scala.tools.testing.ClearAfterClass object InlineWarningTest extends ClearAfterClass.Clearable { - val argsNoWarn = "-Ybackend:GenBCode -Yopt:l:classpath" + val argsNoWarn = "-Yopt:l:classpath" val args = argsNoWarn + " -Yopt-warnings" var compiler = newCompiler(extraArgs = args) var compilerWarnAll = newCompiler(extraArgs = argsNoWarn + " -Yopt-warnings:_") diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala index f1be44a094..884027cd90 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala @@ -20,7 +20,7 @@ import scala.collection.convert.decorateAsScala._ import scala.tools.testing.ClearAfterClass object InlinerIllegalAccessTest extends ClearAfterClass.Clearable { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") + var compiler = newCompiler(extraArgs = "-Yopt:l:none") def clear(): Unit = { compiler = null } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala index 44b6c7ca9e..63c743b075 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala @@ -16,7 +16,7 @@ import AsmUtils._ import scala.collection.convert.decorateAsScala._ object InlinerSeparateCompilationTest { - val args = "-Ybackend:GenBCode -Yopt:l:classpath" + val args = "-Yopt:l:classpath" } @RunWith(classOf[JUnit4]) diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala index c07d1fe3c4..d141c48811 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala @@ -17,7 +17,7 @@ import scala.collection.convert.decorateAsScala._ import scala.tools.testing.ClearAfterClass object ScalaInlineInfoTest extends ClearAfterClass.Clearable { - var compiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") + var compiler = newCompiler(extraArgs = "-Yopt:l:none") def clear(): Unit = { compiler = null } } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala index 62ee09e9de..902709e041 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala @@ -18,9 +18,9 @@ import scala.tools.testing.ClearAfterClass object UnreachableCodeTest extends ClearAfterClass.Clearable { // jvm-1.6 enables emitting stack map frames, which impacts the code generation wrt dead basic blocks, // see comment in BCodeBodyBuilder - var methodOptCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:method") - var dceCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:unreachable-code") - var noOptCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") + var methodOptCompiler = newCompiler(extraArgs = "-Yopt:l:method") + var dceCompiler = newCompiler(extraArgs = "-Yopt:unreachable-code") + var noOptCompiler = newCompiler(extraArgs = "-Yopt:l:none") def clear(): Unit = { methodOptCompiler = null diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala index 769736669b..4f71df1822 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala @@ -15,7 +15,7 @@ import ASMConverters._ import scala.tools.testing.ClearAfterClass object UnusedLocalVariablesTest extends ClearAfterClass.Clearable { - var dceCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:unreachable-code") + var dceCompiler = newCompiler(extraArgs = "-Yopt:unreachable-code") def clear(): Unit = { dceCompiler = null } } diff --git a/test/junit/scala/tools/nsc/settings/SettingsTest.scala b/test/junit/scala/tools/nsc/settings/SettingsTest.scala index a0015f4465..01a2351011 100644 --- a/test/junit/scala/tools/nsc/settings/SettingsTest.scala +++ b/test/junit/scala/tools/nsc/settings/SettingsTest.scala @@ -26,16 +26,16 @@ class SettingsTest { assertThrows[IllegalArgumentException](check("-Ytest-setting:rubbish")) } - @Test def userSettingsHavePrecedenceOverOptimize() { + @Test def userSettingsHavePrecedenceOverExperimental() { def check(args: String*): MutableSettings#BooleanSetting = { val s = new MutableSettings(msg => throw new IllegalArgumentException(msg)) val (ok, residual) = s.processArguments(args.toList, processAll = true) assert(residual.isEmpty) - s.inline // among -optimize + s.YmethodInfer // among -Xexperimental } - assertTrue(check("-optimise").value) - assertFalse(check("-optimise", "-Yinline:false").value) - assertFalse(check("-Yinline:false", "-optimise").value) + assertTrue(check("-Xexperimental").value) + assertFalse(check("-Xexperimental", "-Yinfer-argument-types:false").value) + assertFalse(check("-Yinfer-argument-types:false", "-Xexperimental").value) } // for the given args, select the desired setting diff --git a/test/junit/scala/tools/nsc/transform/delambdafy/DelambdafyTest.scala b/test/junit/scala/tools/nsc/transform/delambdafy/DelambdafyTest.scala index 010078e28a..e4bf038f32 100644 --- a/test/junit/scala/tools/nsc/transform/delambdafy/DelambdafyTest.scala +++ b/test/junit/scala/tools/nsc/transform/delambdafy/DelambdafyTest.scala @@ -52,7 +52,7 @@ object Delambdafy { val srcFile = makeSourceFile(codeForMultiOutput, "delambdafyTest.scala") val outDir = AbstractFile.getDirectory(TempDir.createTempDir()) val outDirPath = outDir.canonicalPath - val extraArgs = "-Ybackend:GenBCode -Ydelambdafy:method" + val extraArgs = "-Ydelambdafy:method" val argsWithOutDir = extraArgs + s" -d $outDirPath -cp $outDirPath" val compiler = newCompilerWithoutVirtualOutdir(extraArgs = argsWithOutDir) compiler.settings.outputDirs.add(srcFile.file, outDir) @@ -63,7 +63,7 @@ object Delambdafy { outDir.delete() classfiles } - + @Test def shouldFindOutputFoldersForAllPromotedLambdasAsMethod(): Unit = { val actual = compileToMultipleOutputWithDelamdbafyMethod() |