]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: do not emit a few more basic types from every compilation
authorRuss Cox <rsc@golang.org>
Sat, 12 Nov 2022 17:27:33 +0000 (12:27 -0500)
committerGopher Robot <gobot@golang.org>
Wed, 16 Nov 2022 02:02:26 +0000 (02:02 +0000)
commitcb5534c1c6d80727cb38a602f3ad5ba1a8b693d5
tree4181e6914d11de74008d23e63389fe63d11a6469
parentc085c6cbff448830913d8e7e9b1141475eeda59e
cmd/compile: do not emit a few more basic types from every compilation

We already emit types for any and func(error) string in runtime.a
but unlike the other pre-emitted types, we don't then exclude them
from being emitted in other packages. Fix that.

Also add slices of non-func types that we already emit.

Saves 0.3% of .a files in std cmd deps, computed by adding sizes from:

ls -l $(go list -export -f '{{.Export}}' -deps std cmd

The effect is small and not worth doing on its own.
The real improvement is making “what to write always in runtime”
and “what not to write in other packages” more obviously aligned.

Change-Id: Ie5cb5fd7e5a3025d2776d9b4cece775fdf92d3b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/450135
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/link/internal/ld/dwarf.go