RFR: 7903595: Leverage String templates [v3]

Jorn Vernee jvernee at openjdk.org
Mon Nov 27 22:46:09 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:

  more interpolation

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

Changes:
  - all: https://git.openjdk.org/jextract/pull/144/files
  - new: https://git.openjdk.org/jextract/pull/144/files/8dba2f20..46306a9f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jextract&pr=144&range=02
 - incr: https://webrevs.openjdk.org/?repo=jextract&pr=144&range=01-02

  Stats: 12 lines in 1 file changed: 0 ins; 6 del; 6 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