-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: asm_tools_7.0
-
Component/s: tools
-
None
-
b01
Syntactically equal ldc Dynamic instructions create different entries in BootstrapMethods attribute.
jasm:
....
public static varargs Method main:"([Ljava/lang/String;)V"
stack 2 locals 1
{
ldc Dynamic REF_newInvokeSpecial:Method LdcConDyTwice."<init>":"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)V":LdcConDyTwice:"LLdcConDyTwice;";
pop;
ldc Dynamic REF_newInvokeSpecial:Method LdcConDyTwice."<init>":"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)V":LdcConDyTwice:"LLdcConDyTwice;";
pop;
ldc Dynamic REF_newInvokeSpecial:Method LdcConDyTwice."<init>":"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)V":LdcConDyTwice:"LLdcConDyTwice;";
pop;
getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
ldc String "Executed normally.";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
return;
}
....
jasm -> class -> jcod produces:
.....
Attr(#29) { // BootstrapMethods
[] { // bootstrap_methods
{ // bootstrap_method
#17; // bootstrap_method_ref
[] { // bootstrap_arguments
} // bootstrap_arguments
} // bootstrap_method
;
{ // bootstrap_method
#17; // bootstrap_method_ref
[] { // bootstrap_arguments
} // bootstrap_arguments
} // bootstrap_method
;
{ // bootstrap_method
#17; // bootstrap_method_ref
[] { // bootstrap_arguments
} // bootstrap_arguments
} // bootstrap_method
}
} // end BootstrapMethods
......
jasm:
....
public static varargs Method main:"([Ljava/lang/String;)V"
stack 2 locals 1
{
ldc Dynamic REF_newInvokeSpecial:Method LdcConDyTwice."<init>":"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)V":LdcConDyTwice:"LLdcConDyTwice;";
pop;
ldc Dynamic REF_newInvokeSpecial:Method LdcConDyTwice."<init>":"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)V":LdcConDyTwice:"LLdcConDyTwice;";
pop;
ldc Dynamic REF_newInvokeSpecial:Method LdcConDyTwice."<init>":"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;)V":LdcConDyTwice:"LLdcConDyTwice;";
pop;
getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
ldc String "Executed normally.";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
return;
}
....
jasm -> class -> jcod produces:
.....
Attr(#29) { // BootstrapMethods
[] { // bootstrap_methods
{ // bootstrap_method
#17; // bootstrap_method_ref
[] { // bootstrap_arguments
} // bootstrap_arguments
} // bootstrap_method
;
{ // bootstrap_method
#17; // bootstrap_method_ref
[] { // bootstrap_arguments
} // bootstrap_arguments
} // bootstrap_method
;
{ // bootstrap_method
#17; // bootstrap_method_ref
[] { // bootstrap_arguments
} // bootstrap_arguments
} // bootstrap_method
}
} // end BootstrapMethods
......
- blocks
-
CODETOOLS-7903458 Umbrella: Preparations for switching to Asmtools 8.0
-
- Resolved
-
- links to
-
Review
openjdk/asmtools/47