[foreign-abi] RFR: 8248560: Specify the behaviour of the ForeignLinker returned by CSupport::getSystemLinker [v2]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Wed Sep 16 10:27:48 UTC 2020
On Wed, 16 Sep 2020 10:05:58 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java line 144:
>>
>>> 142: * The prefix of all ABI attribute names.
>>> 143: */
>>> 144: String ABI_ATTR_PREFIX = "abi/";
>>
>> does this go here? Not sure what it buys to clients.
>
> I added this for fixing jextract. Jextract needs to filter out these attributes before making condys, since otherwise
> you get an access error when resolving. So, I thought that specifying a common name prefix would be the best way to
> make that possible, without exposing the actual attribute names that need to be filtered.
not super sure I get this. I imagine that jextact knows well when it needs to emit a layout corresponding to a
primitive type, so, if that's the case, it should just emit an access to a static constant in Clinker and be done,
rather than trying to dissect whatever intermediate layout jextract might have generated internally. I guess what I'm
saying is - let's say that jextract has some layout with 4 attributes for C_INT; then its backend should just emit an
access for CLinker.C_INT, and re-add the name attribute, which is really the only important part we need?
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/327
More information about the panama-dev
mailing list