summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2016-02-24 18:06:32 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2016-02-24 18:06:32 -0800
commitd375334c26c625da345c5e77bca2975f21b8bd10 (patch)
tree834c9358874468c3bfef2c636392cd241d6e8833 /test
parent1421e3c66c7bc50c54759e48a7492923e391d186 (diff)
parentb7626d998ee415271105450f125c507629b8eae2 (diff)
downloadscala-d375334c26c625da345c5e77bca2975f21b8bd10.tar.gz
scala-d375334c26c625da345c5e77bca2975f21b8bd10.tar.bz2
scala-d375334c26c625da345c5e77bca2975f21b8bd10.zip
Merge pull request #4968 from lrytz/oldOptCleanup
Remove -Y settings that are no longer used in 2.12
Diffstat (limited to 'test')
-rw-r--r--test/files/jvm/unreachable.check0
-rw-r--r--test/files/jvm/unreachable/Foo_1.flags2
-rw-r--r--test/files/neg/case-collision2.flags2
-rw-r--r--test/files/neg/incompatibleSettings.check6
-rw-r--r--test/files/neg/incompatibleSettings.flags1
-rw-r--r--test/files/neg/inlineMaxSize.flags2
-rw-r--r--test/files/neg/optimiseDeprecated.check4
-rw-r--r--test/files/neg/optimiseDeprecated.flags1
-rw-r--r--test/files/neg/optimiseDeprecated.scala (renamed from test/files/neg/incompatibleSettings.scala)0
-rw-r--r--test/files/neg/sealed-final-neg.flags2
-rw-r--r--test/files/pos/SI-7060.flags1
-rw-r--r--test/files/pos/SI-7060.scala11
-rw-r--r--test/files/pos/inline-access-levels.flags2
-rw-r--r--test/files/pos/t3234.flags2
-rw-r--r--test/files/pos/t8315.flags1
-rw-r--r--test/files/pos/t8315.scala12
-rw-r--r--test/files/pos/t8315b.flags1
-rw-r--r--test/files/pos/t8315b.scala11
-rw-r--r--test/files/pos/t8410.flags2
-rw-r--r--test/files/pos/t9111-inliner-workaround.flags2
-rw-r--r--test/files/run/bcodeInlinerMixed.flags2
-rw-r--r--test/files/run/nothingTypeDce.flags2
-rw-r--r--test/files/run/nothingTypeDce.scala2
-rw-r--r--test/files/run/nothingTypeNoOpt.flags2
-rw-r--r--test/files/run/nothingTypeNoOpt.scala2
-rw-r--r--test/files/run/t2106.flags2
-rw-r--r--test/files/run/t3452b-bcode.check2
-rw-r--r--test/files/run/t3452b-bcode.flags1
-rw-r--r--test/files/run/t3452b-bcode/J_2.java6
-rw-r--r--test/files/run/t3452b-bcode/S_1.scala17
-rw-r--r--test/files/run/t3452b-bcode/S_3.scala5
-rw-r--r--test/files/run/t7407.flags2
-rw-r--r--test/files/run/t7407b.flags1
-rw-r--r--test/files/run/t7817-tree-gen.flags1
-rw-r--r--test/files/run/t8233-bcode.flags1
-rw-r--r--test/files/run/t8233-bcode.scala31
-rw-r--r--test/files/run/t8845.flags1
-rw-r--r--test/files/run/t8925.flags2
-rw-r--r--test/files/run/t9097.scala1
-rw-r--r--test/junit/scala/issues/OptimizedBytecodeTest.scala59
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/BTypesTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/DefaultMethodTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/DirectCompileTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/IndyLambdaTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/analysis/NullnessAnalyzerTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/BTypesFromClassfileTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/CallGraphTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/CompactLocalVariablesTest.scala4
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/EmptyExceptionHandlersTest.scala4
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/InlineInfoTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/InlineWarningTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/InlinerIllegalAccessTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/InlinerSeparateCompilationTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/ScalaInlineInfoTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/UnreachableCodeTest.scala6
-rw-r--r--test/junit/scala/tools/nsc/backend/jvm/opt/UnusedLocalVariablesTest.scala2
-rw-r--r--test/junit/scala/tools/nsc/settings/SettingsTest.scala10
-rw-r--r--test/junit/scala/tools/nsc/transform/delambdafy/DelambdafyTest.scala4
59 files changed, 108 insertions, 155 deletions
diff --git a/test/files/jvm/unreachable.check b/test/files/jvm/unreachable.check
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/test/files/jvm/unreachable.check
diff --git a/test/files/jvm/unreachable/Foo_1.flags b/test/files/jvm/unreachable/Foo_1.flags
index ce6e93b3da..ac9438e8d0 100644
--- a/test/files/jvm/unreachable/Foo_1.flags
+++ b/test/files/jvm/unreachable/Foo_1.flags
@@ -1 +1 @@
--Ynooptimise \ No newline at end of file
+-Yopt:l:default \ No newline at end of file
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/neg/sealed-final-neg.flags b/test/files/neg/sealed-final-neg.flags
index 01bd79154a..673aca8931 100644
--- a/test/files/neg/sealed-final-neg.flags
+++ b/test/files/neg/sealed-final-neg.flags
@@ -1 +1 @@
--Xfatal-warnings -Yopt:l:project -Yinline-warnings \ No newline at end of file
+-Xfatal-warnings -Yopt:l:project -Yopt-warnings \ No newline at end of file
diff --git a/test/files/pos/SI-7060.flags b/test/files/pos/SI-7060.flags
deleted file mode 100644
index c926ad6493..0000000000
--- a/test/files/pos/SI-7060.flags
+++ /dev/null
@@ -1 +0,0 @@
--Yinline -Ydead-code
diff --git a/test/files/pos/SI-7060.scala b/test/files/pos/SI-7060.scala
deleted file mode 100644
index c87620e020..0000000000
--- a/test/files/pos/SI-7060.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-object Test {
-
- @inline final def mbarray_apply_minibox(array: Any, tag: Byte): Long =
- if (tag == 0) {
- array.asInstanceOf[Array[Long]](0)
- } else
- array.asInstanceOf[Array[Byte]](0).toLong
-
- def crash_method(): Unit =
- mbarray_apply_minibox(null, 0)
-}
diff --git a/test/files/pos/inline-access-levels.flags b/test/files/pos/inline-access-levels.flags
index d34387c651..9af9168a20 100644
--- a/test/files/pos/inline-access-levels.flags
+++ b/test/files/pos/inline-access-levels.flags
@@ -1 +1 @@
--Yopt:l:classpath -Xfatal-warnings -Yinline-warnings
+-Yopt:l:classpath -Xfatal-warnings -Yopt-warnings
diff --git a/test/files/pos/t3234.flags b/test/files/pos/t3234.flags
index 78726f64f7..13878e00a9 100644
--- a/test/files/pos/t3234.flags
+++ b/test/files/pos/t3234.flags
@@ -1 +1 @@
--Yopt:l:project -Yinline-warnings -Xfatal-warnings
+-Yopt:l:project -Yopt-warnings -Xfatal-warnings
diff --git a/test/files/pos/t8315.flags b/test/files/pos/t8315.flags
deleted file mode 100644
index c926ad6493..0000000000
--- a/test/files/pos/t8315.flags
+++ /dev/null
@@ -1 +0,0 @@
--Yinline -Ydead-code
diff --git a/test/files/pos/t8315.scala b/test/files/pos/t8315.scala
deleted file mode 100644
index 2f7742ed67..0000000000
--- a/test/files/pos/t8315.scala
+++ /dev/null
@@ -1,12 +0,0 @@
-object Test {
- def crash(as: Listt): Unit = {
- map(as, (_: Any) => return)
- }
-
- final def map(x: Listt, f: Any => Any): Any = {
- if (x eq Nill) "" else f("")
- }
-}
-
-object Nill extends Listt
-class Listt
diff --git a/test/files/pos/t8315b.flags b/test/files/pos/t8315b.flags
deleted file mode 100644
index c926ad6493..0000000000
--- a/test/files/pos/t8315b.flags
+++ /dev/null
@@ -1 +0,0 @@
--Yinline -Ydead-code
diff --git a/test/files/pos/t8315b.scala b/test/files/pos/t8315b.scala
deleted file mode 100644
index d7a2bf565f..0000000000
--- a/test/files/pos/t8315b.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-object Test extends Object {
- def crash: Unit = {
- val key = ""
- try map(new F(key))
- catch { case _: Throwable => }
- };
- final def map(f: F): Any = f.apply("");
-};
-final class F(key: String) {
- final def apply(a: Any): Any = throw new RuntimeException(key);
-}
diff --git a/test/files/pos/t8410.flags b/test/files/pos/t8410.flags
index 01fc9cd3ac..c3065096cf 100644
--- a/test/files/pos/t8410.flags
+++ b/test/files/pos/t8410.flags
@@ -1 +1 @@
--Yopt:l:project -Xfatal-warnings -deprecation:false -Yinline-warnings:false
+-Yopt:l:project -Xfatal-warnings -deprecation:false -Yopt-warnings:none
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/t2106.flags b/test/files/run/t2106.flags
index 5d6ee831df..b0139685fa 100644
--- a/test/files/run/t2106.flags
+++ b/test/files/run/t2106.flags
@@ -1 +1 @@
--Yinline-warnings -Yopt:l:classpath
+-Yopt-warnings -Yopt:l:classpath
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/t7817-tree-gen.flags b/test/files/run/t7817-tree-gen.flags
deleted file mode 100644
index ce6e93b3da..0000000000
--- a/test/files/run/t7817-tree-gen.flags
+++ /dev/null
@@ -1 +0,0 @@
--Ynooptimise \ No newline at end of file
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 03c0c64442..1555e8945a 100644
--- a/test/junit/scala/issues/OptimizedBytecodeTest.scala
+++ b/test/junit/scala/issues/OptimizedBytecodeTest.scala
@@ -313,4 +313,63 @@ class OptimizedBytecodeTest extends ClearAfterClass {
assertInvoke(getSingleMethod(c, "f2a"), "C", "C$$$anonfun$3")
assertInvoke(getSingleMethod(c, "f2b"), "C", "wrapper2")
}
+
+ @Test
+ def t7060(): Unit = {
+ val code =
+ """class C {
+ | @inline final def mbarray_apply_minibox(array: Any, tag: Byte): Long =
+ | if (tag == 0) array.asInstanceOf[Array[Long]](0)
+ | else array.asInstanceOf[Array[Byte]](0).toLong
+ |
+ | def t = mbarray_apply_minibox(null, 0)
+ |}
+ """.stripMargin
+ val List(c) = compileClasses(compiler)(code)
+ assertNoInvoke(getSingleMethod(c, "t"))
+ }
+
+ @Test
+ def t8315(): Unit = {
+ val code =
+ """class C {
+ | def t(as: Listt): Unit = {
+ | map(as, (_: Any) => return)
+ | }
+ | final def map(x: Listt, f: Any => Any): Any = {
+ | if (x eq Nill) "" else f("")
+ | }
+ |}
+ |object Nill extends Listt
+ |class Listt
+ """.stripMargin
+ val List(c, nil, nilMod, listt) = compileClasses(compiler)(code)
+ assertInvoke(getSingleMethod(c, "t"), "C", "C$$$anonfun$1")
+ }
+
+ @Test
+ def t8315b(): Unit = {
+ val code =
+ """class C {
+ | def crash: Unit = {
+ | val key = ""
+ | try map(new F(key))
+ | catch { case _: Throwable => }
+ | }
+ | final def map(f: F): Any = f.apply("")
+ |}
+ |final class F(key: String) {
+ | final def apply(a: Any): Any = throw new RuntimeException(key)
+ |}
+ """.stripMargin
+ 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 9634517e28..0021a1784d 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()