[lworld] RFR: C++ preparation for preview mode
David Beaumont
duke at openjdk.org
Mon Sep 22 22:28:31 UTC 2025
On Mon, 22 Sep 2025 22:21:25 GMT, David Beaumont <duke 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/java.base/share/native/libjimage/imageFile.hpp line 248:
> 246: };
> 247:
> 248: // Flag masks for the ATTRIBUTE_PREVIEW_FLAGS attribute. Defined so
As discussed offline, there might be a neater expression for these flags with:
bit: 1 0
[0,0] 0 = normal_entry (only)
[0,1] 1 = normal_entry_with_preview_version
[1,0] 2 = preview_entry (only)
[1,1] 3 = preview_entry_with_normal_version
^-- has other version bit
^---- is preview version bit
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1609#discussion_r2370441339
More information about the valhalla-dev
mailing list