RFR: 8340131: Refactor internal makeHiddenClassDefiner to take ClassOption ... instead of Set [v5]
Claes Redestad
redestad at openjdk.org
Mon Sep 16 07:58:44 UTC 2024
On Sun, 15 Sep 2024 12:59:21 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> Simple internal refactor to load a few classes less on startup. Arguably cleaner and avoids some iterator allocations.
>
> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>
> Improve edge invariant checks
How about this: We add validation to `ClassOption::optionsToFlag` and translate at the public API entry points, then use `int flags` in all internal and private methods. This keeps validation sane and TOCTOU-free and reduces overhead for internal callers even further since we just pass a constant flag mask.
Also avoids loading `ClassOption` on startup tests since we don't go through the public API for internal code generators.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21002#issuecomment-2352235785
More information about the core-libs-dev
mailing list