The last miles

John Rose john.r.rose at oracle.com
Wed Aug 23 15:00:38 UTC 2023


Yes, that’s not a loophole. We just need a new dynamic check on putfield against the larval state to exclude fieldwrites in init methods for values that are frozen. No new verifier or linkage rule is needed for putfield. It’s a surprise. 

> On Aug 22, 2023, at 1:37 PM, Dan Smith <daniel.smith at oracle.com> wrote:
> 
> 
>> 
>>> On Aug 22, 2023, at 1:33 PM, Dan Smith <daniel.smith at oracle.com> wrote:
>>> 
>>>> On Aug 22, 2023, at 1:02 PM, John Rose <john.r.rose at oracle.com> wrote:
>>> 
>>>> - putfield is a verifier error on non-identity class types, it only works on uninitializedThis
>>> Alternatively, we don’t need to touch the verifier if we use a dynamic
>>> larval-bit check on putfield.
>> 
>> Okay, but FWIW, we need verification to restrict putfield anyway: outside of <init>, putfield on a value class field is a verification error.
> 
> 
> Err, spoke too soon, please ignore. I checked the spec and actually this is enforced via the 'final' linkage check, not anything in verification.


More information about the valhalla-spec-observers mailing list