]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: simplify function/interface/struct typechecking
authorMatthew Dempsky <mdempsky@google.com>
Wed, 23 Dec 2020 10:48:57 +0000 (02:48 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 23 Dec 2020 11:59:32 +0000 (11:59 +0000)
commit31267f82e16249a1d9065099c615a936dc32688b
tree7227733a0811275095087c3fe745050769ce7c23
parentaddade2cce83fb0019ad8394311c51466d4042cf
[dev.regabi] cmd/compile: simplify function/interface/struct typechecking

After the previous CL, the only callers to NewFuncType, tointerface,
or NewStructType are the functions for type-checking the type literal
ASTs. So just inline the code there.

While here, refactor the Field type-checking logic a little bit, to
reduce some duplication.

Passes toolstash -cmp.

Change-Id: Ie12d14b87ef8b6e528ac9dccd609604bd09b98ec
Reviewed-on: https://go-review.googlesource.com/c/go/+/279956
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/typecheck/dcl.go
src/cmd/compile/internal/typecheck/type.go