Updated specifications
Dan Smith
daniel.smith at oracle.com
Wed Jun 5 17:42:05 UTC 2024
> On Jun 5, 2024, at 9:21 AM, Dan Heidinga <dan.heidinga at oracle.com> wrote:
>
> Thanks for making the update from Preload to LoadableDescriptors. It cleans up the spec a lot.
>
> I have concerns about the changes to 5.4 related to loading classes. As discussed at the offsite meeting, from an implementation perspective, we don’t want to introduce new rules that allow loading of arbitrary classes at any point during linking. There are already rules in place about further execution being driven by the invocation of the main method (JVMS 5.2) and the linking activities driven by its execution. Introducing new rules that legitimize other loading strategies are outside the remit of Valhalla and are unnecessary for our purposes.
Not the intent—I did leave in these rephrasings that, on review, didn't look like they were weighing in on this issue.
> The original 5.4 states “Linking also involves resolution of symbolic references in the class or interface, though not necessarily at the same time as the class or interface is verified and prepared.” which already allows for loading of necessary classes. The new sentence “All of these linking activities may involve the loading of other classes and interfaces mentioned in the constant pool of the current class or interface.” unnecessary widens what and when loading can occur and opens doors I don’t think we need or want opened.
The clarification I wanted to make, in particular, is that verification can lead to loading, independently from resolution.
Would it help to say "the **specified** loading of other classes and interfaces"?
> I think this change should also be reverted: “, (and, because of recursion, loading) including the loading of other classes,” as it broadens the loading behaviour beyond what the original struck thru clause meant.
I just thought the "because of recursion" felt very tailored to constant resolution, again ignoring verification-time loading.
Given the previous sentence, I'd actually be happy to just delete this aside about loading entirely. This paragraph and bulleted list really doesn't need to be concerned with loading (of other classes) at all.
More information about the valhalla-spec-observers
mailing list