RFR: 7903597: Slim down RuntimeHelper [v4]

Jorn Vernee jvernee at openjdk.org
Mon Dec 4 15:16:26 UTC 2023


> Remove some of the helper methods in RuntimeHelper. They can be moved inline in the generated code.
> 
> Also: I've elected to move the `System.load(Library)` directives we generated inside RuntimeHelper into the first header class, in order to have it more localized to the actual code that a user sees. That also makes RuntimeHelper more 'dumb'. Only the package declaration is now injected into the template, which makes it easier for users to combined multiple extraction runs (they can just discard one of the generated RuntimeHelpers).

Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits:

 - Merge branch 'panama' into TrimRuntimeHelper
 - drop unused method
 - add back downcallHandleVariadic
 - remove RuntimeHelper. Emit helper methods in first header instead
 - remove LINKER field
 - rename emitLoadLibrary
 - Remove requireNonNull & CONSTANT_ALLOCATOR
 - drop upcallStub helper
 - remove spurious imports
 - clean up test name
 - ... and 1 more: https://git.openjdk.org/jextract/compare/48741c04...0ee83e58

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

Changes: https://git.openjdk.org/jextract/pull/150/files
 Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=150&range=03
  Stats: 485 lines in 14 files changed: 172 ins; 265 del; 48 mod
  Patch: https://git.openjdk.org/jextract/pull/150.diff
  Fetch: git fetch https://git.openjdk.org/jextract.git pull/150/head:pull/150

PR: https://git.openjdk.org/jextract/pull/150


More information about the jextract-dev mailing list