RFR: 8332176: Refactor ClassListParser::parse() [v2]

Calvin Cheung ccheung at openjdk.org
Wed May 15 16:09:31 UTC 2024


On Wed, 15 May 2024 03:29:28 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> The handling of `@` tags in `ClassListParser::parse()` is quite convoluted. As we expect to add more `@` tags in Project Leyden, we should refactor this code to make it more maintainable.
>> 
>> It's easier to review the changes by ignoring the whitespace changes.
>> 
>> - I refactored the parsing to two parts -- `parse_at_tags()` and `parse_class_name_and_attributes()`
>> - I changed  the `ClassListParser::parse()` to no longer return the number of classes loaded -- some `@` tags can cause many classes to be loaded as a side effect (e.g., `@lambda-form-invoker`), so the number returned by `ClassListParser::parse()` is not accurate. There are other CDS logs that print out the exact number of classes stored in the archive.
>
> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
> 
>  - @calvinccheung and @matias9927 comments
>  - Merge branch 'master' into 8332176-refactor-class-list-parser-parse
>  - 8332176: Refactoring ClassListParser::parse()

Marked as reviewed by ccheung (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/19225#pullrequestreview-2058457316


More information about the hotspot-runtime-dev mailing list