diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2022-02-28 15:31:35 -0800 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2022-03-01 19:46:09 +0000 |
| commit | d6d2ebb7b8194eb20d95b84bae39f7a5837e9f72 (patch) | |
| tree | bec3a10b32da3210bf10e697089bdfc976766e32 /src/cmd/compile/internal/noder/reader.go | |
| parent | 0fcb94895fa3efd9733e5ab66f5634f92cee9aa3 (diff) | |
| download | go-d6d2ebb7b8194eb20d95b84bae39f7a5837e9f72.tar.xz | |
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>
Diffstat (limited to 'src/cmd/compile/internal/noder/reader.go')
| -rw-r--r-- | src/cmd/compile/internal/noder/reader.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/noder/reader.go b/src/cmd/compile/internal/noder/reader.go index e97cf4e6b6..2b1636588e 100644 --- a/src/cmd/compile/internal/noder/reader.go +++ b/src/cmd/compile/internal/noder/reader.go @@ -1687,7 +1687,7 @@ func wrapName(pos src.XPos, x ir.Node) ir.Node { break } fallthrough - case ir.ONAME, ir.ONONAME, ir.OPACK, ir.ONIL: + case ir.ONAME, ir.ONONAME, ir.ONIL: p := ir.NewParenExpr(pos, x) p.SetImplicit(true) return p |
