]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types2: add debugging support for delayed actions
authorRobert Griesemer <gri@golang.org>
Thu, 14 Oct 2021 01:50:06 +0000 (18:50 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 15 Oct 2021 17:05:16 +0000 (17:05 +0000)
commit8c99421f01aca303240a8f809bc65fa0c56db861
tree5208c6e54a6f84c9411280658db56b262763ccdc
parenta80e53ec43d6ab925bb34d62dd8597a4227af363
cmd/compile/internal/types2: add debugging support for delayed actions

Add a simple mechanism to provide formatted descriptions for
delayed actions. The comment strings are printed when tracing
is enabled and the delayed action is executed. This results
in more easily decipherable tracing output.

Requires debug mode in order to minimize the overhead during normal
execution. Use the mechanism in a few places to show typical use.

Also cleaned up a few unrelated comments.

Change-Id: Ic273c380c3963341500396ec62b694d143c25de2
Reviewed-on: https://go-review.googlesource.com/c/go/+/355871
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/types2/check.go
src/cmd/compile/internal/types2/decl.go
src/cmd/compile/internal/types2/instantiate.go
src/cmd/compile/internal/types2/interface.go
src/cmd/compile/internal/types2/struct.go
src/cmd/compile/internal/types2/typexpr.go