[lworld] RFR: 8366093: [lworld] Add preview mode to C++ classloader
David Beaumont
duke at openjdk.org
Fri Oct 10 10:23:23 UTC 2025
On Fri, 10 Oct 2025 08:54:21 GMT, Paul Hübner <phubner at openjdk.org> wrote:
>> C++ changes for supporting preview mode when preview mode resources (with new location flags) are available.
>>
>> At the moment, this code will operate on non-preview jimage files (1.0) and act as if no preview resources are available by virtue of the default value for missing attributes being zero (which matches location flags for "normal" entries).
>
> src/hotspot/share/runtime/arguments.cpp line 2088:
>
>> 2086:
>> 2087: bool Arguments::disable_preview_patching() {
>> 2088: const char* prop = get_property("DISABLE_PREVIEW_PATCHING");
>
> Nitpick, feel free to ignore, esp. since this is temporary. I think it would make the code easier to follow if this was enable preview patching, defaulting to true. It stands in contrast to`EnableValhalla` and `enable_preview()`. But as said, not a huge thing.
The naming was Roger's, I'm mostly happy with anything really if it's temporary.
I have a similar preference for positive naming ("enable" rather than "disable") to avoid double negatives, but in this case it's probably more work to do that (since it'll cause a rebase of 3 other PRs in progress) than just live with it for a few weeks.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1618#discussion_r2419257085
More information about the valhalla-dev
mailing list