downcalls, fixed-sized ABI types
Ty Young
youngty1997 at gmail.com
Mon Jan 20 09:20:38 UTC 2020
On 1/19/20 10:01 PM, Michael Zucchi wrote:
>
> Hi guys,
>
(snip)
>
> If you know all this information already, the ABI stuff just seems
> redundant. And the way the abi definitions are accessed also seems
> counter to creating dynamic cross-platform code, at least without a
> bunch of extra scaffolding.
ABI can be ignored if you want. ABI/ValueLayouts APIs were created to
work around all the hard-coded byte sizes which could (potentially)
cause bugs[1].
As I see it, unless you defensively hard code every platform type, it's
impossible to write cross-platform code. There needs to be a way to
determine the underlying running platform and to swap and compare
layouts as well as a safe way to work with platform differences. That's
basically what I'm trying to do in Crosspoint[2].
For something Number abstract class implementations that's easy because,
well, they extend the Number class. For everything else? Not so much.
[1] https://www.youtube.com/watch?v=r4dNRVWYaZI
[2]
https://github.com/BlueGoliath/Crosspoint/blob/master/src/main/java/org/goliath/crosspoint/enums/PlatformTypeLayouts.java
>
> Thanks,
> Michael
>
More information about the panama-dev
mailing list