On Mon, 22 Sep 2025 22:21:25 GMT, David Beaumont <[email protected]> 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

Reply via email to