[foreign] RFR 8218669: Flatten Reference hierarchy
Jorn Vernee
jbvernee at xs4all.nl
Fri Feb 8 16:41:10 UTC 2019
Hi Maurizio,
The OfDouble reference no longer checks the size of the type to
determine how to get/set the value. It looks like that case was already
handled by LayoutType.ofDouble by using References.OfLongDouble?
Should AbstractReference and Reference be merged as well? (and then use
pass up 'null' in OfGrumpy, since getter()/setter() throws any ways)
What about profile pollution in the case of struct & array types? It
looks like at least OfStruct could benefit from some specialization per
carrier type.
Jorn
Maurizio Cimadamore schreef op 2019-02-08 13:12:
> Hi,
> this is a simple change which makes the Reference hierarchy in
> References.java flatter and 1-1 with respect to the carrier it models.
>
> Some internal testing of linkToNative pointed at profile pollution
> because of multiple carriers using the same reference class (e.g.
> OfPrimitive).
>
> This patch does 3 things:
>
> 1) Remove the intermediate AbstractReference class
> 2) Create one reference class per carrier, and make all getter/setter
> MH static constants
> 3) Consolidate the code my moving the Reference interface inside
> References.
>
> Webrev:
>
> http://cr.openjdk.java.net/~mcimadamore/panama/8218669/
>
> Cheers
> Maurizio
More information about the panama-dev
mailing list