]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/typecheck: remove unused -G=0 code
authorMatthew Dempsky <mdempsky@google.com>
Mon, 28 Feb 2022 23:07:56 +0000 (15:07 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 1 Mar 2022 19:46:03 +0000 (19:46 +0000)
commit0fcb94895fa3efd9733e5ab66f5634f92cee9aa3
tree8c45b06fd01a63d8b750e30b59bceb246baee87b
parentad523565369af0005c59232e5d2dd7359073f0f4
cmd/compile/internal/typecheck: remove unused -G=0 code

The typechecking code for dealing with dot imports and redeclaration
errors can be removed, as these will now always be caught by types2
instead. Even when running the typecheck on internally constructed IR,
we'll never introduce new imports or redeclare identifiers.

Also, Func.Shortname (and typecheck.addmethod) was only used by the
-G=0 frontend. The new types2-based frontends directly associate
methods with their receiver type during IR construction.

Change-Id: I6578a448412141c87a0a53a6566639d9c00eeed7
Reviewed-on: https://go-review.googlesource.com/c/go/+/388537
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/ir/sizeof_test.go
src/cmd/compile/internal/noder/transform.go
src/cmd/compile/internal/typecheck/dcl.go
src/cmd/compile/internal/typecheck/expr.go
src/cmd/compile/internal/typecheck/func.go
src/cmd/compile/internal/typecheck/subr.go
src/cmd/compile/internal/typecheck/typecheck.go