RFR: 8257600: [type-restrictions] Implement RestrictedField in C1

Rémi Forax github.com+828220+forax at openjdk.java.net
Wed Dec 2 14:44:03 UTC 2020


On Wed, 2 Dec 2020 14:15:09 GMT, Frederic Parain <fparain at openjdk.org> wrote:

> Please review theses changes adding RestrictedField support to C1.
> Tests have been added using the annotation added by JDK-8255856.
> Tests revealed some issues with the support of RestrictedField in the interpreter, fixes are included in this patch.
> The changes also includes some renaming after discussions with Dan.
> 
> Thank you,
> 
> Fred

Hi,
the requirement that a restricted type must be an inline type is too strong,
the restricted type should be able to be at least the same as the field descriptor too otherwise you can not using it in a template class if the argument type is not an inline class.

And for other languages than Java that may want to support full reification, it's better to support any subtypes.

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

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


More information about the valhalla-dev mailing list