mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: only access Func method on concrete types
Sets up for removing Func from Node interface. That means that once the Name reorg is done, which will let us remove Name, Sym, and Val, Node will be basically a minimal interface. Passes buildall w/ toolstash -cmp. Change-Id: I6e87897572debd7f8e29b4f5167763dc2792b408 Reviewed-on: https://go-review.googlesource.com/c/go/+/279484 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
51ba53f5c2
commit
280e7fd1ee
14 changed files with 63 additions and 25 deletions
|
|
@ -1189,6 +1189,7 @@ func dumpNode(w io.Writer, n Node, depth int) {
|
|||
case ODCLFUNC:
|
||||
// Func has many fields we don't want to print.
|
||||
// Bypass reflection and just print what we want.
|
||||
n := n.(*Func)
|
||||
fmt.Fprintf(w, "%+v", n.Op())
|
||||
dumpNodeHeader(w, n)
|
||||
fn := n.Func()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue