Updated JEP: nestmates

forax at univ-mlv.fr forax at univ-mlv.fr
Thu Apr 13 22:21:48 UTC 2017


[...]

>>> The membership is validated
>>> during class loading if <i>D</i> also lists <i>C</i> in its
>>> `NestMembers` attribute. This may require loading of nest-top types
>>> earlier than might otherwise occur."
>>>
>>> Also note that "loading" is being used to allow some flexibility. What I
>>> currently do is validate during class linking, prior to verification (if
>>> enabled). But specifying it to happen at that exact point may be too
>>> constraining.
>>
>> yes agree about what "loading" means here,
>> in term of implementation, i think it should be validated the first time you
>> need the nestmate relationship, it will be less disruptive (see below)
> 
> Note that may be during verification of another class. Any way the
> details here can be further explored. I don't think lazier than
> link-time buys you anything when you may need it earlier anyway.
> 

sorry, i was not clear enough here.
Being lazier than linking time in my mind means doing the check at runtime the first time you access to the member.
i.e. during link time (at any phase) you mark that you can not do the full access check but because you have a nest-top, and you delay a part of the access check at runtime.

that is what i was thinking when i write 'the first time you need'.

regards,
Rémi


More information about the valhalla-dev mailing list