RFR: 7903595: Leverage String templates [v2]
Jorn Vernee
jvernee at openjdk.org
Mon Nov 27 18:24:51 UTC 2023
> Leverage string templates for source code generation. This makes it much easier to see at a glance what the code that is being generated looks like. It's also a very convenient way of writing this kind of code going forward, and is a good test for the new language feature.
>
> Note that I didn't touch the `Constants::emitLayoutField` and `Constants::emitFunctionDescField`, since they do some pretty complex inline generation to render layouts. I didn't feel like this was worth messing with since we are planning to replace the separate constant classes nay way. Though, I did re-write some of the other methods in `Constants` since they were low-hanging fruits.
Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
use string templates in SourceFileBuilder too
-------------
Changes:
- all: https://git.openjdk.org/jextract/pull/144/files
- new: https://git.openjdk.org/jextract/pull/144/files/7fcb8c1c..8dba2f20
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jextract&pr=144&range=01
- incr: https://webrevs.openjdk.org/?repo=jextract&pr=144&range=00-01
Stats: 18 lines in 1 file changed: 2 ins; 3 del; 13 mod
Patch: https://git.openjdk.org/jextract/pull/144.diff
Fetch: git fetch https://git.openjdk.org/jextract.git pull/144/head:pull/144
PR: https://git.openjdk.org/jextract/pull/144
More information about the jextract-dev
mailing list