mirror of
https://github.com/golang/go
synced 2024-11-24 05:30:24 -07:00
cmd/compiler/internal/gc: make Type.Copyto a []*Node
Passes go build -a -toolexec 'toolstash -cmp' std cmd Change-Id: Ief4613cfb341172a85e3a894f44fb2bb308c7b55 Reviewed-on: https://go-review.googlesource.com/14554 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
This commit is contained in:
parent
b07a51b3d4
commit
b9dbb030d5
@ -210,7 +210,7 @@ type Type struct {
|
||||
Embedlineno int32 // first use of TFORW as embedded type
|
||||
|
||||
// for TFORW, where to copy the eventual value to
|
||||
Copyto *NodeList
|
||||
Copyto []*Node
|
||||
|
||||
Lastfn *Node // for usefield
|
||||
}
|
||||
|
@ -3544,7 +3544,7 @@ var mapqueue *NodeList
|
||||
func copytype(n *Node, t *Type) {
|
||||
if t.Etype == TFORW {
|
||||
// This type isn't computed yet; when it is, update n.
|
||||
t.Copyto = list(t.Copyto, n)
|
||||
t.Copyto = append(t.Copyto, n)
|
||||
|
||||
return
|
||||
}
|
||||
@ -3569,8 +3569,8 @@ func copytype(n *Node, t *Type) {
|
||||
t.Copyto = nil
|
||||
|
||||
// Update nodes waiting on this type.
|
||||
for ; l != nil; l = l.Next {
|
||||
copytype(l.N, t)
|
||||
for _, n := range l {
|
||||
copytype(n, t)
|
||||
}
|
||||
|
||||
// Double-check use of type as embedded type.
|
||||
|
Loading…
Reference in New Issue
Block a user