[foreign-jextract] Integrated: 8253307: Simplify code in RuntimeHelper::lookupGlobalVariable
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Fri Sep 18 10:09:45 UTC 2020
On Thu, 17 Sep 2020 20:37:07 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> Earlier today, I added a workaround on RuntimeHelper when I tweaked it to use the new
> MemoryAddress::asSegmentRestricted API. The old code was adding the lookup symbol as an attachment to the returned
> segment, so I did a workaround to do just that under the new API.
> Turns out that the workaround wasn't needed (I think). Upon more thinking, I realized that we always store an array of
> LibraryLookup inside the very constant holder class - either as a static field, or as a dynamically loaded constant.
> I think in both cases that should be enough to prevent the lookup object from going unreachable.
This pull request has now been integrated.
Changeset: 62cd8666
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.java.net/panama-foreign/commit/62cd8666
Stats: 34 lines in 2 files changed: 30 ins; 0 del; 4 mod
8253307: Simplify code in RuntimeHelper::lookupGlobalVariable
Reviewed-by: henryjen, jvernee, sundar
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/339
More information about the panama-dev
mailing list