RFR: 8313435: Clean up unused default methods code [v4]
David Holmes
dholmes at openjdk.org
Thu Aug 3 05:07:31 UTC 2023
On Wed, 2 Aug 2023 18:30:58 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Default methods processing code has unused code (that gets -Wconversion warnings) from when it was used to create bridge (called overpass) method for an early implementation of generic reification in Hotspot.
>>
>> This change removes unused bytecodeAssembler code and adds a check for methods and constant pool overflow.
>> Tested with tier1 and runtime/lambda-features tests.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Check for constant pool overflow when appending entries from default methods error (aka overpass) methods.
Looks good except the new assert needs to be changed back I think.
src/hotspot/share/classfile/defaultMethods.cpp line 1064:
> 1062: assert(new_methods_length <= USHRT_MAX,
> 1063: "error methods for default method processing caused too many methods in class %s",
> 1064: klass->external_name());
I don't think this can be an assert. What happens if you define an interface with max(u2)-1 methods and have it implemented by a class that already has some methods? I would expect this to be a runtime exception.
-------------
Changes requested by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/15095#pullrequestreview-1560235654
PR Review Comment: https://git.openjdk.org/jdk/pull/15095#discussion_r1282645521
More information about the hotspot-runtime-dev
mailing list