[foreign-memaccess+abi] RFR: 8311594: Avoid GlobalSession liveness check [v2]
Brian S. O'Neill
duke at openjdk.org
Tue Jul 11 01:12:18 UTC 2023
On Mon, 10 Jul 2023 21:24:59 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> IMHO, the only sane way to add support for this is to have a well-known constant - e.g. MemorySegment::allNative (which should be a restricted factory of course). Then special case this constant w.r.t. bound checks and temporal checks (since there's a well-known constant to compare against, I'm confident that pollution will not rear its ugly head). But that brings in a lot of API questions: for instance, if this segment is unbounded, what happens if you slice (of course one possible answer might be to throw). While we *might* add something like that in the future, I don't think we have enough evidence yet that something like this is really required.
>
> I suppose that is not too much different from the instanceof check I tried. The issue I see is that, while when the segment/scope are constant, everything folds away, in every other case we now have to do an additional identity check.
So what's the next step?
-------------
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/844#discussion_r1259052106
More information about the panama-dev
mailing list