]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: remove CommStmt.List
authorMatthew Dempsky <mdempsky@google.com>
Sun, 27 Dec 2020 07:03:25 +0000 (23:03 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 28 Dec 2020 08:02:30 +0000 (08:02 +0000)
commit3bdafb0d82c9908ae04d2765847754df0646df35
tree58ace2f281109e01ec8a80eea335b29a9c72fc7d
parent2ecf52b841cd48e76df1fe721d29a972c22bf93f
[dev.regabi] cmd/compile: remove CommStmt.List

Package syntax's parser already ensures that select communication
clauses only have one statement, so there's no need for ir's CommStmt
to need to represent more than one. Instead, noder can just directly
populate Comm in the first place.

Incidentally, this also revealed a latent issue in the inline-body
exporter: we were exporting List (where the case statement is before
type-checking), rather than Comm (where the case statement would be
after type-checking, when export happens).

Passes toolstash -cmp.

Change-Id: Ib4eb711527bed297c7332c79ed6e6562a1db2cfa
Reviewed-on: https://go-review.googlesource.com/c/go/+/280444
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/ir/node_gen.go
src/cmd/compile/internal/ir/stmt.go
src/cmd/compile/internal/noder/noder.go
src/cmd/compile/internal/typecheck/iexport.go
src/cmd/compile/internal/typecheck/iimport.go
src/cmd/compile/internal/typecheck/stmt.go