]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ir: remove unused -G=0 node types
authorMatthew Dempsky <mdempsky@google.com>
Mon, 28 Feb 2022 23:31:35 +0000 (15:31 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 1 Mar 2022 19:46:09 +0000 (19:46 +0000)
commitd6d2ebb7b8194eb20d95b84bae39f7a5837e9f72
treebec3a10b32da3210bf10e697089bdfc976766e32
parent0fcb94895fa3efd9733e5ab66f5634f92cee9aa3
cmd/compile/internal/ir: remove unused -G=0 node types

ir.PkgName was only used by the old -G=0 frontend for representing
identifiers that refer to a package name. The new types2-based
frontends directly resolve the qualified identifier to the respective
object during IR construction.

Similarly, most of the ir.*Type nodes were only needed for
representing types in the IR prior to type checking. The new
types2-based frontends directly construct the corresponding types.Type
instead.

Exception: The internal typecheck.DeclFunc API used for
compiler-generated functions still depends on ir.FuncType, so that IR
node type is retained for now. (Eventually, we should update
typecheck.DeclFunc and callers to not depend on it, but it's not
urgent.)

Change-Id: I982f1bbd41eef5b42ce0f32676c7dc4a8ab6d0ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/388538
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>
14 files changed:
src/cmd/compile/internal/ir/copy.go
src/cmd/compile/internal/ir/fmt.go
src/cmd/compile/internal/ir/name.go
src/cmd/compile/internal/ir/node.go
src/cmd/compile/internal/ir/node_gen.go
src/cmd/compile/internal/ir/op_string.go
src/cmd/compile/internal/ir/sizeof_test.go
src/cmd/compile/internal/ir/type.go
src/cmd/compile/internal/noder/noder.go
src/cmd/compile/internal/noder/reader.go
src/cmd/compile/internal/staticinit/sched.go
src/cmd/compile/internal/typecheck/expr.go
src/cmd/compile/internal/typecheck/type.go
src/cmd/compile/internal/typecheck/typecheck.go