]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix nodedump output for types of nodes
authorDan Scales <danscales@google.com>
Tue, 20 Oct 2020 22:03:33 +0000 (15:03 -0700)
committerDan Scales <danscales@google.com>
Tue, 20 Oct 2020 23:37:53 +0000 (23:37 +0000)
commitf121e0eddd64aa0084b916e94c9a540edf859539
tree403691327a0fe0573cfaf18421d58d1ef6d77449
parent3ca3ca51d70aac890fb023786db1fcbbeea139f1
cmd/compile: fix nodedump output for types of nodes

The Dbg dumping of complex types was broken, because (I think) of a
recent change to handle recursive types correctly. Before this fix,
the Dump output of a closure node (where the last thing on the line is
the type of the node) was:

.   .   CLOSURE l(8) esc(h) tc(1) FUNC-@0

after this change it is:

.   .   CLOSURE l(8) esc(h) tc(1) FUNC-func(int) int

The problem is that that the 'mode == Fdbg' code was immediately
aborting the descent into tconv2, since it was calling down with the
same node that was just entered into the hash table.

Change-Id: Iee106b967cea1856dd92d4350681401dd34a23b3
Reviewed-on: https://go-review.googlesource.com/c/go/+/264025
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/fmt.go