[foreign-abi] [Rev 02] RFR: 8237585: Dismantle ForeignUnsafe (foreign-abi part)

Jorn Vernee jvernee at openjdk.java.net
Wed Feb 26 12:04:21 UTC 2020


On Tue, 25 Feb 2020 17:24:22 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> The code moves look fine, but I'd like to consolidate everything under a single flag instead of using two. 
>> 
>> I'd also like to see something similar to what was done for illegal access in modules, where we can specify different behavior - e.g. permit, warn, error.
>> 
>> Let's just use a single flag `jdk.incubator.foreign.restrictedMethods=permit/deny/warn/debug`
> 
> Thanks for the comments.
> 
> I've uploaded another revision that incorporates the suggested changes.

I've uploaded another revision. This removes the `getUnsafeBase` method and renames `getUnsafeOffset` to `asLong`. I've left to method `static` to hint that it does something special (the access check). It will also throw an exception when passed a heap address.

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

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


More information about the panama-dev mailing list