mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.regabi] cmd/compile: remove use of Initorder, Offset Node fields for initorder
The initorder pass is already making heavy use of maps, and it is concerned with relatively few nodes (only the assignments in package-level variable declarations). The tracking of init order for these nodes can be done with another map instead of storing the bits directly in the Node representations. This will let us drop Offset_ from AssignStmt and AssignListStmt and drop Initorder from all nodes. Passes buildall w/ toolstash -cmp. Change-Id: I151c64e84670292c2004da4e8e3d0660a88e3df3 Reviewed-on: https://go-review.googlesource.com/c/go/+/277917 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
114af2a044
commit
7fde0d2b50
4 changed files with 44 additions and 61 deletions
|
|
@ -102,8 +102,6 @@ type Node interface {
|
|||
SetBounded(x bool)
|
||||
Typecheck() uint8
|
||||
SetTypecheck(x uint8)
|
||||
Initorder() uint8
|
||||
SetInitorder(x uint8)
|
||||
NonNil() bool
|
||||
MarkNonNil()
|
||||
HasCall() bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue