]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.regabi] cmd/compile: two small fixes
authorRuss Cox <rsc@golang.org>
Mon, 7 Dec 2020 20:26:24 +0000 (15:26 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 9 Dec 2020 17:04:54 +0000 (17:04 +0000)
Addressing comments from CL 275434 and CL 275444.
I forgot to run "git rw" to rebase the fixup CLs down before
running "git submit".

Change-Id: Ideaa2340a81511491c096555c6834cd9bdb267d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/275881
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>
src/cmd/compile/internal/ir/mknode.go
src/cmd/compile/internal/ir/stmt.go

index 978b2de5a524739737e0d6b46acba9885c4658b1..72034022cbdf65511a9bc514071b609dab1d38df 100644 (file)
@@ -144,7 +144,7 @@ func forNodeFields(typName string, typ *types.Struct, f func(name string, is fun
                        if strings.ToLower(strings.TrimSuffix(v.Name(), "_")) != "body" {
                                continue
                        }
-               case "Name", "Pack":
+               case "Name":
                        continue
                }
                switch v.Name() {
index ccf46dfa73a274f40d62ef22245cfa2426ea8729..68f9b0bd7c5dbedaff000082416a1a0971dae635 100644 (file)
@@ -33,7 +33,12 @@ func (n *Decl) Left() Node     { return n.X }
 func (n *Decl) SetLeft(x Node) { n.X = x }
 
 // A Stmt is a Node that can appear as a statement.
-// This includes statement-like expressions such as <-c and f().
+// This includes statement-like expressions such as f().
+//
+// (It's possible it should include <-c, but that would require
+// splitting ORECV out of UnaryExpr, which hasn't yet been
+// necessary. Maybe instead we will introduce ExprStmt at
+// some point.)
 type Stmt interface {
        Node
        isStmt()