]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/gc: simplify typechecking definitions
authorMatthew Dempsky <mdempsky@google.com>
Tue, 16 Oct 2018 18:58:00 +0000 (11:58 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 16 Oct 2018 20:54:04 +0000 (20:54 +0000)
commit62c52a5ee19279a2151bdf178eee11b95c188a91
tree173965d0c7f995d02641199f494659bdeee7ea9b
parent39fa301bdc5cd99e4f71d7da5f6f38a6f313d611
cmd/compile/internal/gc: simplify typechecking definitions

There are only a handful of nodes that we need to pass to
typecheckdef (OLITERAL, ONAME, OTYPE, and ONONAME), but typecheck1
takes the awkward approach of calling typecheckdef on every node with
Sym != nil, and then excluding a long list of uninteresting Ops that
have a non-nil Sym.

Passes toolstash-check.

Change-Id: I0271d2faff0208ad57ddc1f1a540a5fbed870234
Reviewed-on: https://go-review.googlesource.com/c/142657
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/gc/typecheck.go