RFR: 7903637: Use holder classes for string constants [v2]

Jorn Vernee jvernee at openjdk.org
Mon Jan 22 19:02:06 UTC 2024


> Use holder class idiom for string constants (See JBS issue for motivation).
> 
> The code in `emitConstant` is a bit copy-pasty. We need to strike a balance between giving a clear picture of the generated code by using a single string template as much as possible, and reducing duplication by splitting the templates up and weaving in more control flow.
> 
> I went with the repeated, but clearer approach here of having 2 separate templates. Let me know if you'd like me to change that.

Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:

  review comments

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

Changes:
  - all: https://git.openjdk.org/jextract/pull/191/files
  - new: https://git.openjdk.org/jextract/pull/191/files/acb16e27..51d3e11a

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

  Stats: 7 lines in 1 file changed: 1 ins; 3 del; 3 mod
  Patch: https://git.openjdk.org/jextract/pull/191.diff
  Fetch: git fetch https://git.openjdk.org/jextract.git pull/191/head:pull/191

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


More information about the jextract-dev mailing list