Skip to content

Instantly share code, notes, and snippets.

@Maccimo
Last active April 30, 2021 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maccimo/a71b16e0c0282e8159866decf8b8cd21 to your computer and use it in GitHub Desktop.
Save Maccimo/a71b16e0c0282e8159866decf8b8cd21 to your computer and use it in GitHub Desktop.
TestLdcMethodHandle.class

TestLdcMethodHandle

  • Successfully assembled with asmtools built from branch pull/15
  • Failed to be assembled with asmtools built from branch pull/17

The error message is:

TestLdcMethodHandle.jasm (17:42) Error: Wrong tag: Either Method or InterfaceMethod expected.
                ldc     MethodHandle REF_invokeStatic:Method TestLdcMethodHandle.main:"([Ljava/lang/String;)V";
                                                            ^
1 error
super public class TestLdcMethodHandle
version 52:0
{
public Method "<init>":"()V"
stack 1 locals 1
{
aload_0;
invokespecial Method java/lang/Object."<init>":"()V";
return;
}
public static varargs Method main:"([Ljava/lang/String;)V"
stack 3 locals 1
{
// CONSTANT_MethodHandle
getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
ldc MethodHandle REF_invokeStatic:Method TestLdcMethodHandle.main:"([Ljava/lang/String;)V";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/Object;)V";
return;
}
} // end Class TestLdcMethodHandle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment