RFR: 8257600: [type-restrictions] Implement RestrictedField in C1
    Lois Foltan 
    lfoltan at openjdk.java.net
       
    Wed Dec  2 15:10:09 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
The interpreter and class file parsing changes look good.  I left a few minor comments to consider.  I did not review in depth the c1 changes.
Thanks,
Lois
src/hotspot/share/classfile/classFileParser.cpp line 1790:
> 1788:     // as the normal signature for this field (for instance in field access bytecodes) but it also
> 1789:     // has a restricted type that will be used internally by the VM as the real type of the field.
> 1790:     // Current constrains are that the restricted type must be an inline type and the descriptor
Small nit - contrains --> contraints
src/hotspot/share/classfile/classFileParser.cpp line 6778:
> 6776:                                                    Handle(THREAD, _loader_data->class_loader()),
> 6777:                                                    _protection_domain, CHECK);
> 6778:         if (desc_klass == NULL || !klass->is_subtype_of(desc_klass)) {
Consider if using a ResolvingSignatureStream & a call to ResolvingSignatureStream::as_klass() might be a more JVM consistent way to obtain the Klass from the descriptor signature.
-------------
Marked as reviewed by lfoltan (Committer).
PR: https://git.openjdk.java.net/valhalla/pull/288
    
    
More information about the valhalla-dev
mailing list