]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: replace NodeQueue with NameQueue
authorMatthew Dempsky <mdempsky@google.com>
Sun, 6 Dec 2020 20:29:42 +0000 (12:29 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Sun, 6 Dec 2020 21:05:41 +0000 (21:05 +0000)
commit1b5eed89828f41e290ae212c596ff301c5db7204
tree493ca40f32ae67d153c83042d54bcdf56c41dd6d
parent6c5967e528f1efc9dfed107c33dccf2d305f2a25
[dev.regabi] cmd/compile: replace NodeQueue with NameQueue

Similar to the previous CL, the only two users of NodeQueue only
needed it for tracking objects, not arbitrary AST nodes. So change
it's signature to use *Name instead of Node.

This does require a tweak to the nowritebarrierrec checker, because
previously it was pushing the ODCLFUNC *Func pointers into the queue,
whereas now we push the ONAME/PFUNC *Name pointers instead. However,
it's trivial and safe to flip between them.

Also, this changes a handful of export-related code from Node to
*Name, to avoid introducing type assertions within iexport.go.

Passes buildall w/ toolstash -cmp.

Updates #42982.

Change-Id: I867f9752121509fc3da753978c6a41d5015bc0ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/275753
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/gc/dcl.go
src/cmd/compile/internal/gc/export.go
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/iexport.go
src/cmd/compile/internal/ir/node.go