-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
-
b08
jdis includes unnecessary FIeld's reference in MethodHandle parameter while printing static parameters of a bsm and skips the method tag in ldc* instructions:
ldc Dynamic REF_invokeStatic:CondyIndy.condy_bsm:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object;":invoke:"Ljava/lang/Object;" {
int 0
};
invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ObjectMethods.bootstrap:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;":toString:"(Ljavasoft/sqe/tests/api/java/lang/invoke/MethodHandles/Lookup/utils/TestRecord01p01;)Ljava/lang/String;" {
class TestRecord01p01,
String "x;y",
MethodHandle REF_getField:Field TestRecord01p01.x:"I",
MethodHandle REF_getField:Field TestRecord01p01.y:"I"
};
There should be:
1> ldc Dynamic REF_invokeStatic:Method CondyIndy.condy_bsm:
invokedynamic InvokeDynamic REF_invokeStatic:Method ... {
2> MethodHandle REF_getField:TestRecord01p01.x:"I",
3> MethodHandle REF_getField:TestRecord01p01.y:"I"
}
ldc Dynamic REF_invokeStatic:CondyIndy.condy_bsm:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object;":invoke:"Ljava/lang/Object;" {
int 0
};
invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ObjectMethods.bootstrap:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;":toString:"(Ljavasoft/sqe/tests/api/java/lang/invoke/MethodHandles/Lookup/utils/TestRecord01p01;)Ljava/lang/String;" {
class TestRecord01p01,
String "x;y",
MethodHandle REF_getField:Field TestRecord01p01.x:"I",
MethodHandle REF_getField:Field TestRecord01p01.y:"I"
};
There should be:
1> ldc Dynamic REF_invokeStatic:Method CondyIndy.condy_bsm:
invokedynamic InvokeDynamic REF_invokeStatic:Method ... {
2> MethodHandle REF_getField:TestRecord01p01.x:"I",
3> MethodHandle REF_getField:TestRecord01p01.y:"I"
}
- relates to
-
CODETOOLS-7902648 jasm has no clues about how to interpret CONSTANT_MethodHandle_info:reference_kind in an invokedynamic instruction
-
- Resolved
-