summaryrefslogtreecommitdiff
path: root/test/files/run/t8601-closure-elim.scala
diff options
context:
space:
mode:
authorSimon Ochsenreither <simon@ochsenreither.de>2015-09-16 17:31:02 +0200
committerSimon Ochsenreither <simon@ochsenreither.de>2015-10-27 15:43:08 +0100
commit1a8daa2d6cbf46a7cdd9180c11c641adabcf6d92 (patch)
treeb7014fdfe397864c621322bfe00ff3307df5017e /test/files/run/t8601-closure-elim.scala
parent4321ea458ad1258f273ee22a4c6a7606ab054501 (diff)
downloadscala-1a8daa2d6cbf46a7cdd9180c11c641adabcf6d92.tar.gz
scala-1a8daa2d6cbf46a7cdd9180c11c641adabcf6d92.tar.bz2
scala-1a8daa2d6cbf46a7cdd9180c11c641adabcf6d92.zip
Remove GenASM, merge remaining common code snippets
With GenBCode being the default and only supported backend for Java 8, we can get rid of GenASM. This commit also fixes/migrates/moves to pending/deletes tests which depended on GenASM before.
Diffstat (limited to 'test/files/run/t8601-closure-elim.scala')
-rw-r--r--test/files/run/t8601-closure-elim.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/files/run/t8601-closure-elim.scala b/test/files/run/t8601-closure-elim.scala
index ebeb16e0c7..40fbf1fe0e 100644
--- a/test/files/run/t8601-closure-elim.scala
+++ b/test/files/run/t8601-closure-elim.scala
@@ -1,4 +1,5 @@
import scala.tools.partest.BytecodeTest
+import scala.tools.partest.ASMConverters.instructionsFromMethod
import scala.tools.asm
import scala.tools.asm.util._
import scala.collection.JavaConverters._
@@ -10,8 +11,9 @@ object Test extends BytecodeTest {
def test(methodName: String) {
val classNode = loadClassNode("Foo")
val methodNode = getMethod(classNode, "b")
+ val instrs = instructionsFromMethod(methodNode)
val ops = methodNode.instructions.iterator.asScala.map(_.getOpcode).toList
- assert(!ops.contains(asm.Opcodes.NEW), ops)// should be allocation free if the closure is eliminated
+ assert(!ops.contains(asm.Opcodes.NEW), instrs)// should be allocation free if the closure is eliminated
}
test("b")
}