[foreign] RFR: Port clang-ffi source code to new API
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Thu May 31 14:56:50 UTC 2018
Some comments
* to instantiate the SystemABI in a platform agnostic way, see the
static factory SystemABI.getInstance (right now it just creates SysV
ABI, but I think you don't want to call 'new' on that yourself)
* I think you can remove some cruft for Void handling, now that I've
pushed the related patch
* The changes in ABI go in the opposite direction of what I'd like to
see - e.g. I'd like ABI impl to be layout-centric, not CType centric.
So, I'm ok with having some kind of enum for common c types, but I think
this enum should give you back the corresponding layout under given ABI
- e.g.
Layout layoutFor(CType) { ... }
And leave definedAlignment and definedSize alone. This will allow you to
reduce changes in the System ABI classes.
Maurizio
On 31/05/18 06:46, Henry Jen wrote:
> Hi,
>
> Please review the webrev[1] to allow build clang-ffi source code with foreign branch. The test still fail as jextract cannot handle libclang header file, we will address that in upcoming fixes.
>
> The patch include NativeTypes for ABI-dependent C types, which I think is right idea but we may have different idea on how to implement that. But for now, stick into ABI make it clear that those types size is ABI dependent.
>
> The change to adapt new pointer API is relative small. The get() seems less accurate than deref(), as it feels to get or set the address for me instead of the value pointed to. But there is always bike shed opportunity before release. :)
>
> [1] http://cr.openjdk.java.net/~henryjen/panama/foreign/jclang-ffi/webrev/
>
> Cheers,
> Henry
>
More information about the panama-dev
mailing list