From 4c213cbf29048bb3df0065c17e82084a4afafc85 Mon Sep 17 00:00:00 2001 From: Orion Hodson Date: Mon, 26 Feb 2018 10:25:41 +0000 Subject: ART: More refactoring of invoke-custom tests Moves 952-invoke-custom-kinds into 952-invoke-custom using ASM annotations to generate the necessary bootstrap metadata. Simplify the annotations used by the transformer by replacing MethodHandleKind, LinkerFieldHandle, and LinkerMethodHandle annotations with BootstrapMethod annotation. Bug: 73807070 Test: art/test/run-test --host 952 Change-Id: Ia85e79dea105d84ceaac7c6634b74a7eb232d0ee --- .../src/TestLinkerMethodMinimalArguments.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'test/952-invoke-custom/src/TestLinkerMethodMinimalArguments.java') diff --git a/test/952-invoke-custom/src/TestLinkerMethodMinimalArguments.java b/test/952-invoke-custom/src/TestLinkerMethodMinimalArguments.java index 74ac3cd15e..ff598bb24f 100644 --- a/test/952-invoke-custom/src/TestLinkerMethodMinimalArguments.java +++ b/test/952-invoke-custom/src/TestLinkerMethodMinimalArguments.java @@ -14,9 +14,8 @@ * limitations under the License. */ +import annotations.BootstrapMethod; import annotations.CalledByIndy; -import annotations.LinkerMethodHandle; -import annotations.MethodHandleKind; import java.lang.invoke.CallSite; import java.lang.invoke.ConstantCallSite; import java.lang.invoke.MethodHandle; @@ -32,16 +31,15 @@ public class TestLinkerMethodMinimalArguments extends TestBase { static final int FAILURE_TYPE_TARGET_METHOD_THROWS = 3; @CalledByIndy( - invokeMethodHandle = - @LinkerMethodHandle( - kind = MethodHandleKind.INVOKE_STATIC, + bootstrapMethod = + @BootstrapMethod( enclosingType = TestLinkerMethodMinimalArguments.class, - argumentTypes = {MethodHandles.Lookup.class, String.class, MethodType.class}, + parameterTypes = {MethodHandles.Lookup.class, String.class, MethodType.class}, name = "linkerMethod" ), - name = "_add", + fieldOrMethodName = "_add", returnType = int.class, - argumentTypes = {int.class, int.class} + parameterTypes = {int.class, int.class} ) private static int add(int a, int b) { assertNotReached(); -- cgit v1.2.3-59-g8ed1b