]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.unified] cmd/compile: extract nil handling from exprType
authorMatthew Dempsky <mdempsky@google.com>
Mon, 25 Jul 2022 19:21:21 +0000 (12:21 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 28 Jul 2022 07:31:36 +0000 (07:31 +0000)
commit831fdf1dff5e38c6c23922880d97ac99fe30f311
tree3a8c062895e6cdcfa34d360fb2dd034631909b6d
parent92798176e76f4ab69d4f18adf40b1a2aab4e3ea1
[dev.unified] cmd/compile: extract nil handling from exprType

Type switches are the only context where exprType was used and `nilOK`
was true. It'll simplify subsequent dictionary work somewhat if
exprType doesn't need to worry about `nil`, so extract this logic and
move it into switchStmt instead.

Change-Id: I3d810f465173f5bb2e2dee7bbc7843fff6a62ee5
Reviewed-on: https://go-review.googlesource.com/c/go/+/419474
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/noder/writer.go