mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
0fcb94895f
commit
d6d2ebb7b8
14 changed files with 162 additions and 667 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue