[code-reflection] RFR: OpWriter.ColoringOption proposal [v2]
Adam Sotona
asotona at openjdk.org
Thu Sep 4 12:54:20 UTC 2025
> I propose OpWriter.ColoringOption, with NONE, ANSI and HTML implementations:
> - `OpWriter.toText(op, OpWriter.ColoringOption.ANSI))` will color the op with ANSI codes for terminal debug print
> - `OpWriter.toText(op, OpWriter.ColoringOption.HTML))` will render the op with colors when dropped into an html `pre` block.
>
> ANSI coloring sample:
> <img width="989" height="746" alt="ansi-coloring" src="https://github.com/user-attachments/assets/2025bcbe-6c6c-48ab-8ed5-67ff88b47fe6" />
>
> HTML coloring sample:
> <img width="914" height="657" alt="html-coloring" src="https://github.com/user-attachments/assets/77f62787-68c1-4b12-b16d-e7a526570ad3" />
Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
Added OpWriter.ColoringOption.ANSI_HI
-------------
Changes:
- all: https://git.openjdk.org/babylon/pull/546/files
- new: https://git.openjdk.org/babylon/pull/546/files/0d3dadca..095a11c7
Webrevs:
- full: https://webrevs.openjdk.org/?repo=babylon&pr=546&range=01
- incr: https://webrevs.openjdk.org/?repo=babylon&pr=546&range=00-01
Stats: 8 lines in 1 file changed: 7 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/babylon/pull/546.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/546/head:pull/546
PR: https://git.openjdk.org/babylon/pull/546
More information about the babylon-dev
mailing list