From b13b249f43d4d38b145cd01135026286052bbc88 Mon Sep 17 00:00:00 2001 From: Frits van Bommel Date: Sat, 30 Apr 2016 11:13:29 +0200 Subject: [PATCH] cmd/compile: Improve readability of HTML produced by GOSSAFUNC Factor out the Aux/AuxInt handling in (*Value).LongString() and use it in (*Value).LongHTML() as well. This especially improves readability of auxFloat32, auxFloat64, and auxSymValAndOff values which would otherwise be printed as opaque integers. This change also makes LongString() slightly less verbose by eliding offsets that are zero (as is very often the case). Additionally, ensure the HTML is interpreted as UTF-8 so that non-ASCII characters (especially the "middle dots" in some symbols) show up correctly. Change-Id: Ie26221df876faa056d322b3e423af63f33cd109d Reviewed-on: https://go-review.googlesource.com/22641 Reviewed-by: Josh Bleecher Snyder Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Frits van Bommel --- src/cmd/compile/internal/ssa/html.go | 13 +------ src/cmd/compile/internal/ssa/value.go | 56 ++++++++++++++++----------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/src/cmd/compile/internal/ssa/html.go b/src/cmd/compile/internal/ssa/html.go index bb88a3ebde..fee092519b 100644 --- a/src/cmd/compile/internal/ssa/html.go +++ b/src/cmd/compile/internal/ssa/html.go @@ -33,6 +33,7 @@ func (w *HTMLWriter) start(name string) { } w.WriteString("") w.WriteString(` +