From e619b033350a3378d650db4c3e5b1bfc83b73d81 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Wed, 20 Jul 2016 17:36:54 +0200 Subject: Upgrade asm to 5.1 The constructor of scala.tools.asm.Handle now takes an additional boolean parameter to denote whether the owner is an interface. --- test/files/run/classfile-format-51.scala | 2 +- test/files/run/noInlineUnknownIndy/Test.scala | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'test/files') diff --git a/test/files/run/classfile-format-51.scala b/test/files/run/classfile-format-51.scala index 3a6c4861f1..40eebee198 100644 --- a/test/files/run/classfile-format-51.scala +++ b/test/files/run/classfile-format-51.scala @@ -80,7 +80,7 @@ object Test extends DirectTest { val test = cw.visitMethod(ACC_PUBLIC + ACC_FINAL, "test", s"()Ljava/lang/String;", null, null) test.visitCode() - val bootstrapHandle = new Handle(H_INVOKESTATIC, invokerClassName, bootstrapMethodName, bootStrapMethodType) + val bootstrapHandle = new Handle(H_INVOKESTATIC, invokerClassName, bootstrapMethodName, bootStrapMethodType, /* itf = */ false) test.visitInvokeDynamicInsn("invoke", targetMethodType, bootstrapHandle) test.visitInsn(ARETURN) test.visitMaxs(1, 1) diff --git a/test/files/run/noInlineUnknownIndy/Test.scala b/test/files/run/noInlineUnknownIndy/Test.scala index c6d227b6f2..a666146f15 100644 --- a/test/files/run/noInlineUnknownIndy/Test.scala +++ b/test/files/run/noInlineUnknownIndy/Test.scala @@ -15,7 +15,12 @@ object Test extends DirectTest { } def show(): Unit = { - val unknownBootstrapMethod = new Handle(Opcodes.H_INVOKESTATIC, "not/java/lang/SomeLambdaMetafactory", "notAMetaFactoryMethod", "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;") + val unknownBootstrapMethod = new Handle( + Opcodes.H_INVOKESTATIC, + "not/java/lang/SomeLambdaMetafactory", + "notAMetaFactoryMethod", + "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;", + /* itf = */ false) modifyClassFile(new File(testOutput.toFile, "A_1.class"))((cn: ClassNode) => { val testMethod = cn.methods.iterator.asScala.find(_.name == "test").head val indy = testMethod.instructions.iterator.asScala.collect({ case i: InvokeDynamicInsnNode => i }).next() -- cgit v1.2.3