[foreign-abi] RFR: 8253796: Consider making CValueLayout public.

Maurizio Cimadamore mcimadamore at openjdk.java.net
Tue Sep 29 16:30:20 UTC 2020


On Tue, 29 Sep 2020 16:17:08 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java line 794:
>> 
>>> 792:         }
>>> 793:
>>> 794:         public final Kind kind() {
>> 
>> Same here - should this exposed?
>
> Yes, kind should be exposed. The classification logic needs to access it, and if we don't expose it it's not possible
> to extend this class, since the kind is a constructor argument and we need to call the constructor from the subclass.

I guess the fact that classification logic needs it can be handle by reorganizing the code so that the impl private.
But your concern about subclasses needing to pass a kind is true.

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

PR: https://git.openjdk.java.net/panama-foreign/pull/359


More information about the panama-dev mailing list