mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: clean up Name and Func uses
Now that we have specific types for ONAME and ODCLFUNC nodes (*Name and *Func), use them throughout the compiler to be more precise about what data is being operated on. This is a somewhat large CL, but once you start applying the types in a few places, you end up needing to apply them to many other places to keep everything type-checking. A lot of code also melts away as types are added. Passes buildall w/ toolstash -cmp. Change-Id: I21dd9b945d701c470332bac5394fca744a5b232d Reviewed-on: https://go-review.googlesource.com/c/go/+/274097 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
c4bd0b7474
commit
e84b27bec5
34 changed files with 627 additions and 633 deletions
|
|
@ -22,6 +22,12 @@ package main_test
|
|||
var knownFormats = map[string]string{
|
||||
"*bytes.Buffer %s": "",
|
||||
"*cmd/compile/internal/gc.EscLocation %v": "",
|
||||
"*cmd/compile/internal/ir.Func %+v": "",
|
||||
"*cmd/compile/internal/ir.Func %L": "",
|
||||
"*cmd/compile/internal/ir.Func %v": "",
|
||||
"*cmd/compile/internal/ir.Name %#v": "",
|
||||
"*cmd/compile/internal/ir.Name %+v": "",
|
||||
"*cmd/compile/internal/ir.Name %L": "",
|
||||
"*cmd/compile/internal/ir.Name %v": "",
|
||||
"*cmd/compile/internal/ir.node %v": "",
|
||||
"*cmd/compile/internal/ssa.Block %s": "",
|
||||
|
|
@ -54,6 +60,7 @@ var knownFormats = map[string]string{
|
|||
"*math/big.Float %f": "",
|
||||
"*math/big.Int %s": "",
|
||||
"[16]byte %x": "",
|
||||
"[]*cmd/compile/internal/ir.Name %v": "",
|
||||
"[]*cmd/compile/internal/ssa.Block %v": "",
|
||||
"[]*cmd/compile/internal/ssa.Value %v": "",
|
||||
"[][]string %q": "",
|
||||
|
|
@ -77,7 +84,6 @@ var knownFormats = map[string]string{
|
|||
"cmd/compile/internal/ir.Class %d": "",
|
||||
"cmd/compile/internal/ir.Class %v": "",
|
||||
"cmd/compile/internal/ir.FmtMode %d": "",
|
||||
"cmd/compile/internal/ir.Node %#v": "",
|
||||
"cmd/compile/internal/ir.Node %+S": "",
|
||||
"cmd/compile/internal/ir.Node %+v": "",
|
||||
"cmd/compile/internal/ir.Node %L": "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue