diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-05-25 16:42:19 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-05-25 16:42:19 +0200 |
commit | b85c9a722ce56ebfb6e41cea7a7387126286b187 (patch) | |
tree | 8ecb848df6c1455de3f2f2ce1d7cc970a09c0058 /test/junit | |
parent | 65642d9f5ca6abc4836811fd0db0fc7d7b4dcb1c (diff) | |
download | scala-b85c9a722ce56ebfb6e41cea7a7387126286b187.tar.gz scala-b85c9a722ce56ebfb6e41cea7a7387126286b187.tar.bz2 scala-b85c9a722ce56ebfb6e41cea7a7387126286b187.zip |
Rename -Yopt to -opt, -Yopt-warnings to -opt-warnings
Keep -Yopt-inline-heuristics and -Yopt-trace unchanged
Diffstat (limited to 'test/junit')
21 files changed, 33 insertions, 33 deletions
diff --git a/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala b/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala index 0144fa7366..58df4691e4 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala @@ -11,7 +11,7 @@ import scala.tools.testing.BytecodeTesting @RunWith(classOf[JUnit4]) class BTypesTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:none" + override def compilerArgs = "-opt:l:none" import compiler.global locally { new global.Run() // initializes some of the compiler diff --git a/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala b/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala index 7fdfb31577..f835e9b140 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala @@ -12,7 +12,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class DirectCompileTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:method" + override def compilerArgs = "-opt:l:method" import compiler._ @Test diff --git a/test/junit/scala/tools/nsc/backend/jvm/OptimizedBytecodeTest.scala b/test/junit/scala/tools/nsc/backend/jvm/OptimizedBytecodeTest.scala index 003162c1ad..8cf6a655d2 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/OptimizedBytecodeTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/OptimizedBytecodeTest.scala @@ -11,7 +11,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class OptimizedBytecodeTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:classpath -Yopt-warnings" + override def compilerArgs = "-opt:l:classpath -opt-warnings" import compiler._ @Test 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 b0a86dfd28..1de5aa28ca 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala @@ -17,7 +17,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class NullnessAnalyzerTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:none" + override def compilerArgs = "-opt:l:none" import compiler._ import global.genBCode.bTypes.backendUtils._ 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 fc26785237..8cb04822de 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala @@ -16,7 +16,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class ProdConsAnalyzerTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:none" + override def compilerArgs = "-opt:l:none" import compiler._ import global.genBCode.bTypes.backendUtils._ diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/AnalyzerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/AnalyzerTest.scala index 025248ac28..33ca6a5fd2 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/AnalyzerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/AnalyzerTest.scala @@ -15,7 +15,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class AnalyzerTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:none" + override def compilerArgs = "-opt:l:none" import compiler._ @Test 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 e7aea71e72..c23c60f7ad 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala @@ -14,7 +14,7 @@ import scala.tools.testing.BytecodeTesting @RunWith(classOf[JUnit4]) class BTypesFromClassfileTest extends BytecodeTesting { // inliner enabled -> inlineInfos are collected (and compared) in ClassBTypes - override def compilerArgs = "-Yopt:inline-global" + override def compilerArgs = "-opt:inline-global" import compiler.global._ 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 630416a925..80fbba133e 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala @@ -18,7 +18,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class CallGraphTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:inline-global -Yopt-warnings" + override def compilerArgs = "-opt:inline-global -opt-warnings" import compiler._ import global.genBCode.bTypes val notPerRun: List[Clearable] = List( diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/ClosureOptimizerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/ClosureOptimizerTest.scala index 218b02f822..2da2ecdb72 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/ClosureOptimizerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/ClosureOptimizerTest.scala @@ -13,7 +13,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class ClosureOptimizerTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:classpath -Yopt-warnings:_" + override def compilerArgs = "-opt:l:classpath -opt-warnings:_" import compiler._ @Test 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 c3748a05bd..6f54f170b5 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala @@ -15,8 +15,8 @@ import scala.tools.testing.ClearAfterClass class CompactLocalVariablesTest extends ClearAfterClass { // 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 = cached("methodOptCompiler", () => newCompiler(extraArgs = "-Yopt:unreachable-code,compact-locals")) - val noCompactVarsCompiler = cached("noCompactVarsCompiler", () => newCompiler(extraArgs = "-Yopt:unreachable-code")) + val methodOptCompiler = cached("methodOptCompiler", () => newCompiler(extraArgs = "-opt:unreachable-code,compact-locals")) + val noCompactVarsCompiler = cached("noCompactVarsCompiler", () => newCompiler(extraArgs = "-opt: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 3324058cb7..77215304fd 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala @@ -15,10 +15,10 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class EmptyExceptionHandlersTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:unreachable-code" + override def compilerArgs = "-opt:unreachable-code" def dceCompiler = compiler - val noOptCompiler = cached("noOptCompiler", () => newCompiler(extraArgs = "-Yopt:l:none")) + val noOptCompiler = cached("noOptCompiler", () => newCompiler(extraArgs = "-opt:l:none")) val exceptionDescriptor = "java/lang/Exception" 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 e45d7139a3..a691d63471 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala @@ -16,7 +16,7 @@ class InlineInfoTest extends BytecodeTesting { import compiler.global import global.genBCode.bTypes - override def compilerArgs = "-Yopt:l:classpath" + override def compilerArgs = "-opt:l:classpath" def notPerRun: List[Clearable] = List( bTypes.classBTypeFromInternalName, 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 f0913f3631..6161dc7b73 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala @@ -11,12 +11,12 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class InlineWarningTest extends BytecodeTesting { - def optCp = "-Yopt:l:classpath" - override def compilerArgs = s"$optCp -Yopt-warnings" + def optCp = "-opt:l:classpath" + override def compilerArgs = s"$optCp -opt-warnings" import compiler._ - val compilerWarnAll = cached("compilerWarnAll", () => newCompiler(extraArgs = s"$optCp -Yopt-warnings:_")) + val compilerWarnAll = cached("compilerWarnAll", () => newCompiler(extraArgs = s"$optCp -opt-warnings:_")) @Test def nonFinal(): Unit = { @@ -87,10 +87,10 @@ class InlineWarningTest extends BytecodeTesting { assert(c == 1, c) // no warnings here - newCompiler(extraArgs = s"$optCp -Yopt-warnings:none").compileToBytes(scalaCode, List((javaCode, "A.java"))) + newCompiler(extraArgs = s"$optCp -opt-warnings:none").compileToBytes(scalaCode, List((javaCode, "A.java"))) c = 0 - newCompiler(extraArgs = s"$optCp -Yopt-warnings:no-inline-mixed").compileToBytes(scalaCode, List((javaCode, "A.java")), allowMessage = i => {c += 1; warns.exists(i.msg contains _)}) + newCompiler(extraArgs = s"$optCp -opt-warnings:no-inline-mixed").compileToBytes(scalaCode, List((javaCode, "A.java")), allowMessage = i => {c += 1; warns.exists(i.msg contains _)}) assert(c == 2, c) } 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 c2ada8afec..3cb1fbdae6 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala @@ -14,7 +14,7 @@ import scala.tools.testing.BytecodeTesting @RunWith(classOf[JUnit4]) class InlinerIllegalAccessTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:none" + override def compilerArgs = "-opt:l:none" import compiler._ import global.genBCode.bTypes._ 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 b196f1a9ba..a2513cacdc 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala @@ -10,7 +10,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class InlinerSeparateCompilationTest { - val args = "-Yopt:l:classpath" + val args = "-opt:l:classpath" @Test def inlnieMixedinMember(): Unit = { @@ -32,7 +32,7 @@ class InlinerSeparateCompilationTest { """.stripMargin val warn = "T::f()I is annotated @inline but cannot be inlined: the method is not final and may be overridden" - val List(c, o, oMod, t) = compileClassesSeparately(List(codeA, codeB), args + " -Yopt-warnings", _.msg contains warn) + val List(c, o, oMod, t) = compileClassesSeparately(List(codeA, codeB), args + " -opt-warnings", _.msg contains warn) assertInvoke(getMethod(c, "t1"), "T", "f") assertNoInvoke(getMethod(c, "t2")) assertNoInvoke(getMethod(c, "t3")) diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala index fd020c7d93..f1e3e9b9e1 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/InlinerTest.scala @@ -19,9 +19,9 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class InlinerTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:classpath -Yopt-warnings" + override def compilerArgs = "-opt:l:classpath -opt-warnings" - val inlineOnlyCompiler = cached("inlineOnlyCompiler", () => newCompiler(extraArgs = "-Yopt:inline-project")) + val inlineOnlyCompiler = cached("inlineOnlyCompiler", () => newCompiler(extraArgs = "-opt:inline-project")) import compiler._ import global.genBCode.bTypes @@ -825,7 +825,7 @@ class InlinerTest extends BytecodeTesting { var c = 0 - newCompiler(extraArgs = compilerArgs + " -Yopt-warnings:_").compileClasses( + newCompiler(extraArgs = compilerArgs + " -opt-warnings:_").compileClasses( scalaCode, List((javaCode, "A.java")), allowMessage = i => {c += 1; i.msg contains warn}) @@ -1459,7 +1459,7 @@ class InlinerTest extends BytecodeTesting { val codeA = "final class A { @inline def f = 1 }" val codeB = "class B { def t(a: A) = a.f }" // tests that no warning is emitted - val List(a, b) = compileClassesSeparately(List(codeA, codeB), extraArgs = "-Yopt:l:project -Yopt-warnings") + val List(a, b) = compileClassesSeparately(List(codeA, codeB), extraArgs = "-opt:l:project -opt-warnings") assertInvoke(getMethod(b, "t"), "A", "f") } diff --git a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala index fa76c0d930..9675e2e445 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/MethodLevelOptsTest.scala @@ -17,7 +17,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class MethodLevelOptsTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:method" + override def compilerArgs = "-opt:l:method" import compiler._ def wrapInDefault(code: Instruction*) = List(Label(0), LineNumber(1, Label(0))) ::: code.toList ::: List(Label(1)) 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 5bd285f97f..4791a29bfb 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala @@ -14,7 +14,7 @@ import scala.tools.testing.BytecodeTesting @RunWith(classOf[JUnit4]) class ScalaInlineInfoTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:l:none" + override def compilerArgs = "-opt:l:none" import compiler._ def inlineInfo(c: ClassNode): InlineInfo = c.attrs.asScala.collect({ case a: InlineInfoAttribute => a.inlineInfo }).head 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 63bbcc396b..68ce61b48a 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala @@ -17,9 +17,9 @@ import scala.tools.testing.ClearAfterClass class UnreachableCodeTest extends ClearAfterClass { // jvm-1.6 enables emitting stack map frames, which impacts the code generation wrt dead basic blocks, // see comment in BCodeBodyBuilder - val methodOptCompiler = cached("methodOptCompiler", () => newCompiler(extraArgs = "-Yopt:l:method")) - val dceCompiler = cached("dceCompiler", () => newCompiler(extraArgs = "-Yopt:unreachable-code")) - val noOptCompiler = cached("noOptCompiler", () => newCompiler(extraArgs = "-Yopt:l:none")) + val methodOptCompiler = cached("methodOptCompiler", () => newCompiler(extraArgs = "-opt:l:method")) + val dceCompiler = cached("dceCompiler", () => newCompiler(extraArgs = "-opt:unreachable-code")) + val noOptCompiler = cached("noOptCompiler", () => newCompiler(extraArgs = "-opt:l:none")) def assertEliminateDead(code: (Instruction, Boolean)*): Unit = { val method = genMethod()(code.map(_._1): _*) 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 c9c98b403b..7ca09ff41d 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala @@ -14,7 +14,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class UnusedLocalVariablesTest extends BytecodeTesting { - override def compilerArgs = "-Yopt:unreachable-code" + override def compilerArgs = "-opt:unreachable-code" import compiler._ @Test diff --git a/test/junit/scala/tools/nsc/transform/patmat/PatmatBytecodeTest.scala b/test/junit/scala/tools/nsc/transform/patmat/PatmatBytecodeTest.scala index b6e8d4fbf2..de18dec344 100644 --- a/test/junit/scala/tools/nsc/transform/patmat/PatmatBytecodeTest.scala +++ b/test/junit/scala/tools/nsc/transform/patmat/PatmatBytecodeTest.scala @@ -12,7 +12,7 @@ import scala.tools.testing.BytecodeTesting._ @RunWith(classOf[JUnit4]) class PatmatBytecodeTest extends BytecodeTesting { - val optCompiler = cached("optCompiler", () => newCompiler(extraArgs = "-Yopt:l:project")) + val optCompiler = cached("optCompiler", () => newCompiler(extraArgs = "-opt:l:project")) import compiler._ |