RFR: JDK-8298277: Replace "session" with "scope" for FFM access
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Dec 8 14:41:07 UTC 2022
On Thu, 8 Dec 2022 14:33:01 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> This PR proposes changing variable names and text from "session" to "scope". The proposed changes are only for the FFM API and not other parts like the Vector API and test classes.
>
> src/java.base/share/classes/jdk/internal/foreign/abi/Binding.java line 255:
>
>> 253: * the context's allocator is accessed.
>> 254: */
>> 255: public static Context ofScope() {
>
> I think `ofArena` seems more apt here?
More generally, I think that now that we can subclass Arena, Binding.Context can just become a subclass of Arena. Then we might have several implementations, some of which throw on allocate(), some other will throw on scope() and close(). Seems a more direct approach.
-------------
PR: https://git.openjdk.org/jdk/pull/11593
More information about the core-libs-dev
mailing list