]> Cypherpunks repositories - gostls13.git/commit
[dev.regabi] cmd/compile: add NewBasic and cleanup universe
authorMatthew Dempsky <mdempsky@google.com>
Tue, 1 Dec 2020 10:58:41 +0000 (02:58 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 1 Dec 2020 17:16:39 +0000 (17:16 +0000)
commita17c5e2fce9340ec19d4019490b38a7645f244df
tree104f9a32021d30d8cf1dfed0ad0b2b40c9e11377
parentf37aa5e4e26a7212b6300e2021b8e6ea7000979b
[dev.regabi] cmd/compile: add NewBasic and cleanup universe

This CL introduces types.NewBasic, for creating the predeclared
universal types, and reorganizes how the universe is initialized so
that all predeclared types are uniformly constructed.

There are now a bunch of Type fields that are no longer assigned
outside of the package, so this CL also introduces some new accessor
methods that a subsequent CL will mechanically introduce uses of.

Change-Id: Ie7996c3d5f1ca46cd5bfe45ecc91ebfa6a7b6c7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/274435
Trust: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/compile/internal/gc/universe.go
src/cmd/compile/internal/types/type.go