[foreign-jextract] RFR: 8260583: jextract generates redundant constant files
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Thu Jan 28 12:15:11 UTC 2021
When testing performances of jextract generated code with big headers, I noticed that jextract was emitting empty constant files. After some debugging, I realized that the issues lies in the fact that `ConstantHelper::build` is called both by `ToplevelBuilder::build` and by `HeaderFileBuilder::build` - so, for every new header file split that is generated, we trigger a new constant file, even though that is not needed.
The solution is to remove the call from `HeaderFileBuilder` and just keep the one inside `TopLevelBuilder`.
-------------
Commit messages:
- Fix issue in constant file generation
Changes: https://git.openjdk.java.net/panama-foreign/pull/440/files
Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=440&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8260583
Stats: 78 lines in 3 files changed: 75 ins; 2 del; 1 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/440.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/440/head:pull/440
PR: https://git.openjdk.java.net/panama-foreign/pull/440
More information about the panama-dev
mailing list