RFR: 8304069: ClassFileParser has ad-hoc hashtables [v2]
David Holmes
dholmes at openjdk.org
Thu Mar 23 06:31:41 UTC 2023
On Wed, 22 Mar 2023 19:52:21 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> The ClassFileParser has ad-hoc hash tables for checking for duplicate names for fields, methods and interfaces. ResourceHashtable will now be used instead. Verified with tier1-4 tests.
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
>
> Coleen comments
This conversion looks good but I was confused by the way the original code was doing things. Once we have this conversion I think we could clean things up further:
1. Interfaces don't need `NameSigHash`, all we need is a map of names, so we should be able to directly have a RHT of `Symbol*` for the `interface_name_table`.
2. `NameSigHash` is the wrong terminology - we are checking names and descriptors [JVMS 4.3], not names and signatures [JVMS4.7.9.1]! (And a Java Language "signature" is something different again [JLS 8.4.2]!
Unfortunately I think we misuse "signature" throughout the VM, so maybe fixing it here will serve little purpose.
-------------
PR Review: https://git.openjdk.org/jdk/pull/13141#pullrequestreview-1353927021
More information about the hotspot-runtime-dev
mailing list