]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: remove unused code from typecheckdef
authorMatthew Dempsky <mdempsky@google.com>
Wed, 16 Mar 2022 06:07:41 +0000 (23:07 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 16 Mar 2022 18:34:31 +0000 (18:34 +0000)
commit81d3c25c6cf39a76b17ab4eda97e8ad7b92a21e9
tree3e066b0ae0adb70638800f921b344b1171f070ac
parentd661bdeabf479c39fe98c6fc598a6d8114047914
cmd/compile: remove unused code from typecheckdef

typecheckdef used to be used to handle references to package-level
declarations that hadn't yet been typechecked yet. It's no longer
needed, as the current IR frontends construct package-level
declarations with proper types upfront.

Exception: this code is still used for compiler-generated function
declarations, so that code needs to be kept. Eventually that code can
be moved elsewhere, but for now this CL makes it obvious that the rest
of the code paths really are unused.

Updates #51691.

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