RFR: 8339167: Remove AbstractPoolEntry.PrimitiveEntry to reduce boxing overheads
Claes Redestad
redestad at openjdk.org
Wed Aug 28 16:05:48 UTC 2024
On Wed, 28 Aug 2024 14:33:38 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Removing PrimitiveEntry reduces boxing/unboxing and removes a class.
>
> src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPoolEntry.java line 1044:
>
>> 1042: @Override
>> 1043: void writeTo(BufWriterImpl pool) {
>> 1044: pool.writeU1(ClassFile.TAG_INTEGER);
>
> Please either remove this change or propagate this change to all primitive number entries.
Fixed. This one was unintended, but as you suggested offline perhaps we should rethink storing `tag` and `hash` in `AbstractPoolEntry` and let implementations decide on whether storing or calculating is best. Future work.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20749#discussion_r1734939430
More information about the core-libs-dev
mailing list