]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types: unexport New and NewBasic
authorMatthew Dempsky <mdempsky@google.com>
Fri, 27 Aug 2021 02:18:57 +0000 (19:18 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 27 Aug 2021 23:06:52 +0000 (23:06 +0000)
commita9377183d0f3ccd49631e2d927d55d91f2ab5ec6
tree35be85866e6f8ab98219bc5a07932bdab3ca9a54
parent82efc0540386dfaf78aaddfdb617ac90c7554f34
cmd/compile/internal/types: unexport New and NewBasic

Now that the universe is fully initialized within package types, we
can stop exporting New and NewBasic, which are only needed for that
purpose. So this CL renames "New" to "newType" and "NewBasic" to
"newBasic".

This CL also moves the initialization of Types[TBLANK] and Types[TNIL]
from typecheck.InitUniverse to types.InitTypes, which I missed in an
earlier CL. And a use of "New(TSTRING)" in test/abiutils_test.go,
which should just be "Types[TSTRING]" anyway.

Change-Id: I1d83f93e27b88be289d4f3f6c16357a20f570460
Reviewed-on: https://go-review.googlesource.com/c/go/+/345487
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/test/abiutils_test.go
src/cmd/compile/internal/typecheck/universe.go
src/cmd/compile/internal/types/type.go
src/cmd/compile/internal/types/universe.go