RFR: 8332176: Refactor ClassListParser::parse() [v2]
Ioi Lam
iklam at openjdk.org
Wed May 15 03:29:28 UTC 2024
> 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()
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/19225/files
- new: https://git.openjdk.org/jdk/pull/19225/files/11d8e5b6..43e3eee5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=19225&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=19225&range=00-01
Stats: 2248 lines in 97 files changed: 1581 ins; 348 del; 319 mod
Patch: https://git.openjdk.org/jdk/pull/19225.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19225/head:pull/19225
PR: https://git.openjdk.org/jdk/pull/19225
More information about the hotspot-runtime-dev
mailing list