]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types: remove Type.sym and rename Type.nod to Type.obj
authorMatthew Dempsky <mdempsky@google.com>
Tue, 10 May 2022 23:26:41 +0000 (16:26 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 13 May 2022 21:29:20 +0000 (21:29 +0000)
commitaa6b75dd7d15c99368e7f51f3da2fb4b212ce33a
treeaccc04ca1491cde5625b017eed9f9be805d08387
parent53db708a1d7639f15256df14b04cf68de42803c4
cmd/compile/internal/types: remove Type.sym and rename Type.nod to Type.obj

Now that Ntype is gone, we no longer require separate sym and nod
fields for Type. It's now always the case that t.sym == t.nod.Sym(),
or that t.sym and t.nod are both nil.

While here, rename nod to obj, to better reflect that in fact it's
always an object (i.e., *ir.Name), not merely a type literal (which no
longer exists in package ir).

Change-Id: Iba4c1590ca585b816ff6b70947ad2a1109918955
Reviewed-on: https://go-review.googlesource.com/c/go/+/405656
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/types/identity.go
src/cmd/compile/internal/types/sizeof_test.go
src/cmd/compile/internal/types/type.go
src/cmd/compile/internal/types/universe.go