go.tools/cmd/ssadump: print packages and functions to stdout, not stderr.
And serialize the printing of each item with a mutex.
It is the formatted output of this tool, after all.
Also: minor doc tweaks.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/114620044
diff --git a/go/ssa/ssa.go b/go/ssa/ssa.go
index 99417b3..3131f84 100644
--- a/go/ssa/ssa.go
+++ b/go/ssa/ssa.go
@@ -288,6 +288,7 @@
// of the ast.FuncDecl.Name, if the function was explicit in the
// source. Synthetic wrappers, for which Synthetic != "", may share
// the same position as the function they wrap.
+// Syntax.Pos() always returns the position of the declaring "func" token.
//
// Type() returns the function's Signature.
//
@@ -1371,7 +1372,7 @@
}
// The CallInstruction interface, implemented by *Go, *Defer and *Call,
-// exposes the common parts of function calling instructions,
+// exposes the common parts of function-calling instructions,
// yet provides a way back to the Value defined by *Call alone.
//
type CallInstruction interface {