]> Cypherpunks repositories - gostls13.git/commit
cmd/compile, etc: use name for type pkgPath
authorDavid Crawshaw <crawshaw@golang.org>
Thu, 31 Mar 2016 14:02:10 +0000 (10:02 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Wed, 13 Apr 2016 20:48:26 +0000 (20:48 +0000)
commitf120936dfffa3ac935730699587e6957f2d5ea61
treec7415fc534e0ef9bbf4ac4afb1a562b6255adadc
parent73e2ad20220050f88b1ea79bf5a2e4c4fbee0533
cmd/compile, etc: use name for type pkgPath

By replacing the *string used to represent pkgPath with a
reflect.name everywhere, the embedded *string for package paths
inside the reflect.name can be replaced by an offset, nameOff.
This reduces the number of pointers in the type information.

This also moves all reflect.name types into the same section, making
it possible to use nameOff more widely in later CLs.

No significant binary size change for normal binaries, but:

linux/amd64 PIE:
cmd/go: -440KB (3.7%)
jujud:  -2.6MB (3.2%)

For #6853.

Change-Id: I3890b132a784a1090b1b72b32febfe0bea77eaee
Reviewed-on: https://go-review.googlesource.com/21395
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/reflect.go
src/cmd/internal/obj/data.go
src/reflect/type.go
src/runtime/heapdump.go
src/runtime/iface.go
src/runtime/type.go