summaryrefslogtreecommitdiff
path: root/test/pending/jvm
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/jvm')
-rw-r--r--test/pending/jvm/patmat_opt_ignore_underscore.check1
-rw-r--r--test/pending/jvm/patmat_opt_ignore_underscore.flags1
-rw-r--r--test/pending/jvm/patmat_opt_ignore_underscore/Analyzed_1.scala29
-rw-r--r--test/pending/jvm/patmat_opt_ignore_underscore/test.scala18
-rw-r--r--test/pending/jvm/patmat_opt_no_nullcheck.check1
-rw-r--r--test/pending/jvm/patmat_opt_no_nullcheck.flags1
-rw-r--r--test/pending/jvm/patmat_opt_no_nullcheck/Analyzed_1.scala24
-rw-r--r--test/pending/jvm/patmat_opt_no_nullcheck/test.scala14
-rw-r--r--test/pending/jvm/patmat_opt_primitive_typetest.check1
-rw-r--r--test/pending/jvm/patmat_opt_primitive_typetest.flags1
-rw-r--r--test/pending/jvm/patmat_opt_primitive_typetest/Analyzed_1.scala24
-rw-r--r--test/pending/jvm/patmat_opt_primitive_typetest/test.scala8
-rw-r--r--test/pending/jvm/t7006.check29
-rw-r--r--test/pending/jvm/t7006/Foo_1.flags1
-rw-r--r--test/pending/jvm/t7006/Foo_1.scala10
-rw-r--r--test/pending/jvm/t7006/Test.scala21
16 files changed, 0 insertions, 184 deletions
diff --git a/test/pending/jvm/patmat_opt_ignore_underscore.check b/test/pending/jvm/patmat_opt_ignore_underscore.check
deleted file mode 100644
index 43f53aba12..0000000000
--- a/test/pending/jvm/patmat_opt_ignore_underscore.check
+++ /dev/null
@@ -1 +0,0 @@
-bytecode identical
diff --git a/test/pending/jvm/patmat_opt_ignore_underscore.flags b/test/pending/jvm/patmat_opt_ignore_underscore.flags
deleted file mode 100644
index 453b6b7895..0000000000
--- a/test/pending/jvm/patmat_opt_ignore_underscore.flags
+++ /dev/null
@@ -1 +0,0 @@
--Yopt:l:project \ No newline at end of file
diff --git a/test/pending/jvm/patmat_opt_ignore_underscore/Analyzed_1.scala b/test/pending/jvm/patmat_opt_ignore_underscore/Analyzed_1.scala
deleted file mode 100644
index b0506018f6..0000000000
--- a/test/pending/jvm/patmat_opt_ignore_underscore/Analyzed_1.scala
+++ /dev/null
@@ -1,29 +0,0 @@
-// this class's bytecode, compiled under -optimize is analyzed by the test
-// method a's bytecode should be identical to method b's bytecode
-// this is not the best test for shielding against regressing on this particular issue,
-// but it sets the stage for checking the bytecode emitted by the pattern matcher and
-// comparing it to manually tuned code using if/then/else etc.
-class SameBytecode {
- case class Foo(x: Any, y: String)
-
- def a =
- Foo(1, "a") match {
- case Foo(_: String, y) => y
- }
-
- // this method's body holds the tree that should be generated by the pattern matcher for method a (-Xprint:patmat)
- // the test checks that bytecode for a and b is identical (modulo line numbers)
- // we can't diff trees as they are quite different (patmat uses jumps to labels that cannot be expressed in source, for example)
- // note that the actual tree is quite bad: we do an unnecessary null check, isInstanceOf and local val (x3)
- // some of these will be fixed soon (the initial null check is for the scrutinee, which is harder to fix in patmat)
- def b: String = {
- val x1 = Foo(1, "a")
- if (x1.ne(null)) {
- if (x1.x.isInstanceOf[String]) {
- return x1.y
- }
- }
-
- throw new MatchError(x1)
- }
-} \ No newline at end of file
diff --git a/test/pending/jvm/patmat_opt_ignore_underscore/test.scala b/test/pending/jvm/patmat_opt_ignore_underscore/test.scala
deleted file mode 100644
index d6630e80a0..0000000000
--- a/test/pending/jvm/patmat_opt_ignore_underscore/test.scala
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * filter: inliner warning; re-run with
- */
-import scala.tools.partest.BytecodeTest
-
-import scala.tools.nsc.util.JavaClassPath
-import java.io.InputStream
-import scala.tools.asm
-import asm.ClassReader
-import asm.tree.{ClassNode, InsnList}
-import scala.collection.JavaConverters._
-
-object Test extends BytecodeTest {
- def show: Unit = {
- val classNode = loadClassNode("SameBytecode")
- sameBytecode(getMethod(classNode, "a"), getMethod(classNode, "b"))
- }
-}
diff --git a/test/pending/jvm/patmat_opt_no_nullcheck.check b/test/pending/jvm/patmat_opt_no_nullcheck.check
deleted file mode 100644
index 43f53aba12..0000000000
--- a/test/pending/jvm/patmat_opt_no_nullcheck.check
+++ /dev/null
@@ -1 +0,0 @@
-bytecode identical
diff --git a/test/pending/jvm/patmat_opt_no_nullcheck.flags b/test/pending/jvm/patmat_opt_no_nullcheck.flags
deleted file mode 100644
index 453b6b7895..0000000000
--- a/test/pending/jvm/patmat_opt_no_nullcheck.flags
+++ /dev/null
@@ -1 +0,0 @@
--Yopt:l:project \ No newline at end of file
diff --git a/test/pending/jvm/patmat_opt_no_nullcheck/Analyzed_1.scala b/test/pending/jvm/patmat_opt_no_nullcheck/Analyzed_1.scala
deleted file mode 100644
index 1e4d564cdf..0000000000
--- a/test/pending/jvm/patmat_opt_no_nullcheck/Analyzed_1.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-// this class's bytecode, compiled under -optimize is analyzed by the test
-// method a's bytecode should be identical to method b's bytecode
-case class Foo(x: Any)
-
-class SameBytecode {
- def a =
- (Foo(1): Any) match {
- case Foo(_: String) =>
- }
-
- // there's no null check
- def b: Unit = {
- val x1: Any = Foo(1)
- if (x1.isInstanceOf[Foo]) {
- val x3 = x1.asInstanceOf[Foo]
- if (x3.x.isInstanceOf[String]) {
- val x = ()
- return
- }
- }
-
- throw new MatchError(x1)
- }
-} \ No newline at end of file
diff --git a/test/pending/jvm/patmat_opt_no_nullcheck/test.scala b/test/pending/jvm/patmat_opt_no_nullcheck/test.scala
deleted file mode 100644
index 5a4a398b67..0000000000
--- a/test/pending/jvm/patmat_opt_no_nullcheck/test.scala
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * filter: inliner warning; re-run with
- */
-import scala.tools.partest.{ BytecodeTest, ASMConverters }
-
-object Test extends BytecodeTest {
- def show: Unit = {
- val classNode = loadClassNode("SameBytecode")
- // ASM and GenBCode assign variable slots slightly differently
- val instrsA = ASMConverters.instructionsFromMethod(getMethod(classNode, "a"))
- val instrsB = ASMConverters.instructionsFromMethod(getMethod(classNode, "b"))
- assert(ASMConverters.equivalentBytecode(instrsA, instrsB), diffInstructions(instrsA, instrsB)) // doesn't work
- }
-}
diff --git a/test/pending/jvm/patmat_opt_primitive_typetest.check b/test/pending/jvm/patmat_opt_primitive_typetest.check
deleted file mode 100644
index 43f53aba12..0000000000
--- a/test/pending/jvm/patmat_opt_primitive_typetest.check
+++ /dev/null
@@ -1 +0,0 @@
-bytecode identical
diff --git a/test/pending/jvm/patmat_opt_primitive_typetest.flags b/test/pending/jvm/patmat_opt_primitive_typetest.flags
deleted file mode 100644
index 19c578e4ad..0000000000
--- a/test/pending/jvm/patmat_opt_primitive_typetest.flags
+++ /dev/null
@@ -1 +0,0 @@
--Yopt:l:project
diff --git a/test/pending/jvm/patmat_opt_primitive_typetest/Analyzed_1.scala b/test/pending/jvm/patmat_opt_primitive_typetest/Analyzed_1.scala
deleted file mode 100644
index c961082fa7..0000000000
--- a/test/pending/jvm/patmat_opt_primitive_typetest/Analyzed_1.scala
+++ /dev/null
@@ -1,24 +0,0 @@
-// this class's bytecode, compiled under -optimize is analyzed by the test
-// method a's bytecode should be identical to method b's bytecode
-class SameBytecode {
- case class Foo(x: Int, y: String)
-
- def a =
- Foo(1, "a") match {
- case Foo(_: Int, y) => y
- }
-
- // this method's body holds the tree that should be generated by the pattern matcher for method a (-Xprint:patmat)
- // the test checks that bytecode for a and b is identical (modulo line numbers)
- // we can't diff trees as they are quite different (patmat uses jumps to labels that cannot be expressed in source, for example)
- // note that the actual tree is quite bad: we do an unnecessary null check, and local val (x3)
- // some of these will be fixed soon (the initial null check is for the scrutinee, which is harder to fix in patmat)
- def b: String = {
- val x1 = Foo(1, "a")
- if (x1.ne(null)) {
- return x1.y
- }
-
- throw new MatchError(x1)
- }
-} \ No newline at end of file
diff --git a/test/pending/jvm/patmat_opt_primitive_typetest/test.scala b/test/pending/jvm/patmat_opt_primitive_typetest/test.scala
deleted file mode 100644
index 2927e763d5..0000000000
--- a/test/pending/jvm/patmat_opt_primitive_typetest/test.scala
+++ /dev/null
@@ -1,8 +0,0 @@
-import scala.tools.partest.BytecodeTest
-
-object Test extends BytecodeTest {
- def show: Unit = {
- val classNode = loadClassNode("SameBytecode")
- sameBytecode(getMethod(classNode, "a"), getMethod(classNode, "b"))
- }
-}
diff --git a/test/pending/jvm/t7006.check b/test/pending/jvm/t7006.check
deleted file mode 100644
index 6294b14d62..0000000000
--- a/test/pending/jvm/t7006.check
+++ /dev/null
@@ -1,29 +0,0 @@
-[running phase parser on Foo_1.scala]
-[running phase namer on Foo_1.scala]
-[running phase packageobjects on Foo_1.scala]
-[running phase typer on Foo_1.scala]
-[running phase patmat on Foo_1.scala]
-[running phase superaccessors on Foo_1.scala]
-[running phase extmethods on Foo_1.scala]
-[running phase pickler on Foo_1.scala]
-[running phase refchecks on Foo_1.scala]
-[running phase uncurry on Foo_1.scala]
-[running phase tailcalls on Foo_1.scala]
-[running phase specialize on Foo_1.scala]
-[running phase explicitouter on Foo_1.scala]
-[running phase erasure on Foo_1.scala]
-[running phase posterasure on Foo_1.scala]
-[running phase lazyvals on Foo_1.scala]
-[running phase lambdalift on Foo_1.scala]
-[running phase constructors on Foo_1.scala]
-[running phase flatten on Foo_1.scala]
-[running phase mixin on Foo_1.scala]
-[running phase cleanup on Foo_1.scala]
-[running phase delambdafy on Foo_1.scala]
-[running phase icode on Foo_1.scala]
-[running phase inliner on Foo_1.scala]
-[running phase inlinehandlers on Foo_1.scala]
-[running phase closelim on Foo_1.scala]
-[running phase constopt on Foo_1.scala]
-[running phase dce on Foo_1.scala]
-[running phase jvm on icode]
diff --git a/test/pending/jvm/t7006/Foo_1.flags b/test/pending/jvm/t7006/Foo_1.flags
deleted file mode 100644
index 5d1b6b2644..0000000000
--- a/test/pending/jvm/t7006/Foo_1.flags
+++ /dev/null
@@ -1 +0,0 @@
--Yopt:l:project -Ydebug -Xfatal-warnings
diff --git a/test/pending/jvm/t7006/Foo_1.scala b/test/pending/jvm/t7006/Foo_1.scala
deleted file mode 100644
index 3985557d9f..0000000000
--- a/test/pending/jvm/t7006/Foo_1.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-class Foo_1 {
- def foo {
- try {
- val x = 3 // this will be optimized away, leaving a useless jump only block
- } finally {
- print("hello")
- }
- while(true){} // ensure infinite loop doesn't break the algorithm
- }
-}
diff --git a/test/pending/jvm/t7006/Test.scala b/test/pending/jvm/t7006/Test.scala
deleted file mode 100644
index 7b4a8c45fb..0000000000
--- a/test/pending/jvm/t7006/Test.scala
+++ /dev/null
@@ -1,21 +0,0 @@
-import scala.tools.partest.BytecodeTest
-import scala.tools.asm
-import asm.tree.InsnList
-import scala.collection.JavaConverters._
-
-object Test extends BytecodeTest {
- def show: Unit = {
- val classNode = loadClassNode("Foo_1")
- val methodNode = getMethod(classNode, "foo")
- val nopCount = count(methodNode.instructions, asm.Opcodes.NOP)
- val gotoCount = count(methodNode.instructions, asm.Opcodes.GOTO)
- assert(nopCount == 0, s"NOPs expected: 0, actual: $nopCount")
- assert(gotoCount == 1, s"GOTOs expected: 1, actual: $gotoCount")
- }
-
- def count(insnList: InsnList, opcode: Int): Int = {
- def isNop(node: asm.tree.AbstractInsnNode): Boolean =
- (node.getOpcode == opcode)
- insnList.iterator.asScala.count(isNop)
- }
-}