On Thu, 6 Feb 2025 07:29:26 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> @DanHeidinga suggested this for my other PR as a convention that's used for 
>> the j.l.Class constructor.
>
> I am still missing what can actually set a PD here, sorry. ??

Because the field is final, it has to be initialized in the constructor in Java 
code.  My initial patch for modifiers chose to initialize to zero but that's 
not quite correct.  The constructor cannot be called nor can it be made 
accessible with setAccessible().   So the constructor for java.lang.Class is 
essentially the Hotspot code JavaClasses::create_mirror().  This is where the 
PD is assigned.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23396#discussion_r1944618468

Reply via email to