]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/internal: convert basic types to builtin symbols
authorThan McIntosh <thanm@google.com>
Wed, 17 Jun 2020 15:42:47 +0000 (11:42 -0400)
committerThan McIntosh <thanm@google.com>
Thu, 25 Jun 2020 11:19:16 +0000 (11:19 +0000)
commitcbfced7415f6b0ac0be0182cb929e336d5d33ea3
treeaf4f74dc7624084d97f63d54657dbe80d3c9022f
parentbe38746eb49a479118c8e7833c106687a28676e2
[dev.link] cmd/internal: convert basic types to builtin symbols

The Go compiler includes special treatment for a small set of very
commonly used type symbols (26 to be exact); for these types it
doesn't bother to emit type descriptors for "normal" compilations, and
instead only generates them for the runtime package, so as to reduce
object file bloat.

This patch moves the set of type symbols in question from the
PkgIdxNone index space (in the object file) to the PkgIdxBuiltin
space, which saves some work in the compiler and loader (reduces each
package's index space slightly).

Change-Id: I039c805e05c1aef26f035e52760fd0a0af40f7a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/239658
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/internal/goobj2/builtinlist.go
src/cmd/internal/goobj2/mkbuiltin.go
src/cmd/link/internal/loader/loader.go