Integrated: 8332176: Refactor ClassListParser::parse()

Ioi Lam iklam at openjdk.org
Wed May 15 23:04:05 UTC 2024


On Tue, 14 May 2024 01:44:02 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.

This pull request has now been integrated.

Changeset: b687aa55
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/b687aa550837830b38f0f0faa69c353b1e85219c
Stats:     154 lines in 3 files changed: 34 ins; 45 del; 75 mod

8332176: Refactor ClassListParser::parse()

Reviewed-by: matsaave, ccheung

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

PR: https://git.openjdk.org/jdk/pull/19225


More information about the hotspot-runtime-dev mailing list