]> Cypherpunks repositories - gostls13.git/commit
cmd/link: when pruning methods also prune funcType
authorDavid Crawshaw <crawshaw@golang.org>
Mon, 14 Mar 2016 19:08:22 +0000 (15:08 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Tue, 15 Mar 2016 19:41:17 +0000 (19:41 +0000)
commitd06b0db5bd4c898bd162e16ab603081ab62a527c
treef54d7b900bf3ec7cfcdd25a38384c6958fa3e3c4
parent41f9f6f47118d8c2546a1534240e0eca6baa1829
cmd/link: when pruning methods also prune funcType

Remove method type information for pruned methods from any program
that does not reflect on methods. This can be a significant saving:

addr2line: -310KB (8.8%)

A future update might want to consider a more aggressive variant of
this: setting the Type and Func fields of reflect.Method to nil for
unexported methods. That would shrink cmd/go by 2% and jujud by 2.6%
but could be considered an API change. So this CL sticks to the
uncontroversial change.

For #6853.

Change-Id: I5d186d9f822dc118ee89dc572c4912a3b3c72577
Reviewed-on: https://go-review.googlesource.com/20701
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/reflect.go
src/cmd/link/internal/ld/deadcode.go