aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2018-11-01 13:46:50 -0700
committerRobert Griesemer <gri@golang.org>2018-11-02 22:17:47 +0000
commite25823edcea364df70b8db7462f53e7dac2b8fca (patch)
treed448d1e9abf3358569e02ac7ca8d128e25a7ae82 /src/path/filepath
parentc21ba09bcd83e58e862b1acc676dc36f31444022 (diff)
downloadgo-e25823edcea364df70b8db7462f53e7dac2b8fca.tar.xz
cmd/compile/internal/gc: add tracing support to debug type checking
The compiler must first be built with the constant enableTrace set to true (typecheck.go). After that, the -t flag becomes available which enables tracing output of type-checking functions. With enableTrace == false, the tracing code becomes dead code and won't affect the compiler. Typical output might look like this: path/y.go:4:6: typecheck 0xc00033e180 DCLTYPE <node DCLTYPE> tc=0 path/y.go:4:6: . typecheck1 0xc00033e180 DCLTYPE <node DCLTYPE> tc=2 path/y.go:4:6: . . typecheck 0xc000331a40 TYPE T tc=1 path/y.go:4:6: . . . typecheck1 0xc000331a40 TYPE T tc=2 path/y.go:4:6: . . . . typecheckdef 0xc000331a40 TYPE T tc=2 path/y.go:4:6: . . . . => 0xc000331a40 TYPE T tc=2 type=*T path/y.go:4:6: . . . => 0xc000331a40 TYPE T tc=2 type=*T path/y.go:4:6: . . => 0xc000331a40 TYPE T tc=1 type=*T path/y.go:4:6: . => 0xc00033e180 DCLTYPE <node DCLTYPE> tc=2 type=<T> path/y.go:4:6: => 0xc00033e180 DCLTYPE <node DCLTYPE> tc=1 type=<T> Disabled by default. Change-Id: Ifd8385290d1cf0d3fc5e8468b2f4ab84e8eff338 Reviewed-on: https://go-review.googlesource.com/c/146782 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/path/filepath')
0 files changed, 0 insertions, 0 deletions