On Fri, 8 May 2026 20:19:42 GMT, Serguei Spitsyn <[email protected]> wrote:

>> javac will always leave `this` in slot 0, and I believe the language rules 
>> don't allow users to store it in a different local variable during early 
>> construction.
>> 
>> The verifier has no such requirement. Generated bytecode can easily do 
>> `aload_0; astore_1;`.
>
>> javac will always leave this in slot 0, and I believe the language rules 
>> don't allow users to store it in a different local variable during early 
>> construction.
> 
> Does it mean the check for slot 0 is right and we have to keep it? There are 
> no problems with `this` object stored in different slots during late object 
> construction because the value object has been fully initialized.

You understand your requirements better than I do, but I would think the 
invariants you're trying to preserve need to work on all class files, 
javac-generated or not?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2412#discussion_r3211135210

Reply via email to