asmtools `ldc Dynamic` syntax
Maxim Degtyarev
mdegtyarev at gmail.com
Wed Apr 21 22:53:45 UTC 2021
Hello,
I have 2 questions regarding `ldc Dynamic` syntax:
1) Consider the following example:
ldc Dynamic
REF_newInvokeSpecial
:LdcConDyTwice."<init>"
:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)V"
:LdcConDyTwice
:"LLdcConDyTwice;";
Being assembled with `asmtools jasm` and then disassembled with
`asmtools jdis` above instruction turns to:
ldc Dynamic
REF_newInvokeSpecial
:Method LdcConDyTwice."<init>"
:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)V"
:LdcConDyTwice
:"LLdcConDyTwice;";
I assume "Method" in front of the constructor reference is a
disassembler bug (it's even didn't assemble back).
Could anyone confirm my assumption?
2) Is there a way to reference the same Dynamic constant more than
once with the current jasm syntax?
Right now two syntactically equal ldc Dynamic instructions create two
different entries in BootstrapMethods attribute.
More information about the code-tools-dev
mailing list