[foreign-jextract] RFR: 8263018: Improve API for lifecycle of native resources [v2]

Jorn Vernee jvernee at openjdk.java.net
Wed Mar 24 15:04:50 UTC 2021


On Wed, 24 Mar 2021 12:42:55 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 98 commits:
>> 
>>  - Merge branch 'foreign-jextract' into jextract+resourceScope
>>  - Merge branch 'foreign-memaccess+abi' into jextract+resourceScope
>>  - Merge branch 'foreign-jextract' into jextract+resourceScope
>>  - Add overloads accepting ResourceScope parameter
>>  - Merge branch 'resourceScope' into jextract+resourceScope
>>  - Add ResourceScope overloads in CLinker
>>    Rewrite StdLib test not to use NativeScope
>>    Tweak names of allocator factories
>>    Fix javadoc
>>  - All tests pass
>>    * Fix upcall overload taking NativeScope
>>    * Generate NativeScope in output package
>>    * Add overload for functions returning a struct so than a NativeScope can be passed
>>    * Removed some now unused features from RuntimeHelper (ti make scope non-transferrable)
>>    * Fixup vararg invoker to deal with allocator parameters
>>    * Fixup tests to (a) depend on the generated NativeScope and (b) not to use TWR with segments directly
>>    Notes:
>>    * the internal libclang probably needs to be re-generated
>>  - Merge branch 'resourceScope' into jextract+resourceScope
>>  - Fix javadoc of SegmentAllocator
>>  - Address rest of review comments from Paul
>>  - ... and 88 more: https://git.openjdk.java.net/panama-foreign/compare/4e696684...6316ddca
>
> src/jdk.incubator.jextract/share/classes/jdk/internal/clang/libclang/RuntimeHelper.java line 97:
> 
>> 95:     }
>> 96: 
>> 97:     static final MethodHandle downcallHandle(LibraryLookup[] LIBRARIES, String name, String desc, FunctionDescriptor fdesc, boolean variadic, NativeScope scope) {
> 
> This seems unused. Should this have gone into the template file instead maybe?

What do you think of this? This method still seems unused in the latest version

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

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


More information about the panama-dev mailing list