[lworld] Withdrawn: 8254022: [lworld] [type-restrictions] Initial support for RestrictedField

Frederic Parain fparain at openjdk.java.net
Mon Oct 5 14:57:53 UTC 2020


On Mon, 5 Oct 2020 14:36:44 GMT, Frederic Parain <fparain at openjdk.org> wrote:

> Please review these changes adding an initial support for RestrictedField.
> 
> The patch includes:
>   - recognizing and processing the new attribute during class file parsing
>   - creating new meta-data to store both the erased type and the restricted type
>   - fixing all intermediate method dealing with field types (FieldInfo, FieldStream, etc)
>   - fixing field resolution to take into the two possible signatures of the fields
>   - adding checkcast against the restricted type in the interpreter implementation of putfield
> 
> The patch doesn't include:
>   - propagating new meta-data to CI
>   - adding new type checks in JIT generated code
> 
> The main take away of this first patch is that the VM mostly cares about the sharp type (from the
> RestrictedField attribute), and the only place where it needs knowledge of the erased type is for
> field resolution. This is why the implementation of the RestrictedField in the VM is inverted compared
> to the content of the class file: the traditional FieldInfo is filled with the sharp type from the RestrictedField
> attribute, while the original erased type is moved to a new variable section of InstanceKlass.
> 
> Note: the patch includes a serious clean up of the FieldInfo data structure. It used to store the allocation
> type of the field, but this information is not used anymore after the replacement of the old field layout
> code by the field layout builder. Removing the allocation type from the data structure simplifies it a lot.
> 
> Thank you,
> 
> Fred

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.java.net/valhalla/pull/209



More information about the valhalla-dev mailing list