]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile/internal: better AST line highlight in ssa.html
authorZheng Xu <zheng.xu@arm.com>
Wed, 1 Sep 2021 05:48:48 +0000 (13:48 +0800)
committerCherry Mui <cherryyz@google.com>
Fri, 10 Sep 2021 14:03:35 +0000 (14:03 +0000)
commit96ab854ab03f6a21c676c2a7aa9c4ad933892a42
tree7a347434ac936a64c36c5223f54f29eb5c70abca
parent90c5660616d7f006ca62adfec49310bf40e3b354
cmd/compile/internal: better AST line highlight in ssa.html

We tend to set div class with the line number in HTML AST nodes. So that
the AST nodes can be highlighted with corresponding source and ssa ir.

The pure AST text dump is created first. And then it is parsed and
written to the HTML file.

CL 275785 changed the format of the line information in AST node dump,
which makes the HTMLWriter fail to parse the line information.

This CL updates the code in HTMLWriter to align with the format of AST
node dump.

Fix #48133

Change-Id: I2b56fc5e3e9771456d91f22caf23a427c235eb12
Reviewed-on: https://go-review.googlesource.com/c/go/+/347269
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Than McIntosh <thanm@google.com>
src/cmd/compile/internal/ir/fmt.go
src/cmd/compile/internal/ssa/html.go