RFR: 8309751: Duplicate constant pool entries added during default method processing [v2]
Coleen Phillimore
coleenp at openjdk.org
Tue Apr 2 22:10:10 UTC 2024
On Tue, 2 Apr 2024 22:06:16 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/classfile/bytecodeAssembler.hpp line 77:
>>
>>> 75: u2 name_and_type_index;
>>> 76: } methodref;
>>> 77: uintptr_t value;
>>
>> Now you have drawn attention to this by renaming it, what exactly is it? The rest of the union I can understand as they are different kinds of CP entries but what is a "value"??
>
> Value is essentially (uintptr_t)utf8, or (uintptr_t)u2klass|u4name_and_type, or (uintptr_t)u2klass|u4methodref; ie the value of the fields that are in the union.
Look at equals:
static bool equals(BytecodeCPEntry const& e0, BytecodeCPEntry const& e1) {
return e0._tag == e1._tag && e0._u.value == e1._u.value;
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18548#discussion_r1548672388
More information about the hotspot-runtime-dev
mailing list