mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile/internal: named types for Etype and Op in struct Node
Type Op is enfored now. Type EType will need further CLs. Added TODOs where Node.EType is used as a union type. The TODOs have the format `TODO(marvin): Fix Node.EType union type.`. Furthermore: -The flag of Econv function in fmt.go is removed, since unused. -Some cleaning along the way, e.g. declare vars first when getting initialized. Passes go build -toolexec 'toolstash -cmp' -a std. Fixes #11846 Change-Id: I908b955d5a78a195604970983fb9194bd9e9260b Reviewed-on: https://go-review.googlesource.com/14956 Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Marvin Stenger <marvin.stenger94@gmail.com>
This commit is contained in:
parent
f5f480e1df
commit
8e7a3ea11e
36 changed files with 1927 additions and 1729 deletions
|
|
@ -1012,7 +1012,7 @@ func componentgen_wb(nr, nl *Node, wb bool) bool {
|
|||
numPtr := 0
|
||||
visitComponents(nl.Type, 0, func(t *Type, offset int64) bool {
|
||||
n++
|
||||
if int(Simtype[t.Etype]) == Tptr && t != itable {
|
||||
if Simtype[t.Etype] == Tptr && t != itable {
|
||||
numPtr++
|
||||
}
|
||||
return n <= maxMoves && (!wb || numPtr <= 1)
|
||||
|
|
@ -1129,7 +1129,7 @@ func componentgen_wb(nr, nl *Node, wb bool) bool {
|
|||
ptrOffset int64
|
||||
)
|
||||
visitComponents(nl.Type, 0, func(t *Type, offset int64) bool {
|
||||
if wb && int(Simtype[t.Etype]) == Tptr && t != itable {
|
||||
if wb && Simtype[t.Etype] == Tptr && t != itable {
|
||||
if ptrType != nil {
|
||||
Fatalf("componentgen_wb %v", Tconv(nl.Type, 0))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue