1
0
mirror of https://github.com/golang/go synced 2024-10-05 05:11:25 -06:00
go/src
David Crawshaw cc158403d6 cmd/compile: track reflect.Type.Method in deadcode
In addition to reflect.Value.Call, exported methods can be invoked
by the Func value in the reflect.Method struct. This CL has the
compiler track what functions get access to a legitimate reflect.Method
struct by looking for interface calls to either of:

	Method(int) reflect.Method
	MethodByName(string) (reflect.Method, bool)

This is a little overly conservative. If a user implements a type
with one of these methods without using the underlying calls on
reflect.Type, the linker will assume the worst and include all
exported methods. But it's cheap.

No change to any of the binary sizes reported in cl/20483.

For #14740

Change-Id: Ie17786395d0453ce0384d8b240ecb043b7726137
Reviewed-on: https://go-review.googlesource.com/20489
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-03-11 21:19:20 +00:00
..
archive all: single space after period. 2016-03-02 00:13:47 +00:00
bufio bufio: Reader.Peek returns partial results on ErrBufferFull 2016-03-04 03:51:22 +00:00
builtin
bytes bytes: correct comment about usage of bytes.Buffer by Printf 2016-03-10 15:54:08 +00:00
cmd cmd/compile: track reflect.Type.Method in deadcode 2016-03-11 21:19:20 +00:00
compress compress/flate: optimize huffman bit encoder 2016-03-11 17:40:52 +00:00
container all: single space after period. 2016-03-02 00:13:47 +00:00
crypto crypto/x509/pkix: make 'v1' the default CRL version. 2016-03-10 23:48:16 +00:00
database/sql all: single space after period. 2016-03-02 00:13:47 +00:00
debug Rewrite leftover references to plan9.bell-labs.com to 9p.io. 2016-03-06 07:07:01 +00:00
encoding all: single space after period. 2016-03-02 00:13:47 +00:00
errors all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
expvar all: single space after period. 2016-03-02 00:13:47 +00:00
flag all: single space after period. 2016-03-02 00:13:47 +00:00
fmt fmt: refactor pointer formatting and improve tests 2016-03-09 20:59:50 +00:00
go testing: implement 'Unordered Output' in Examples. 2016-03-09 04:34:41 +00:00
hash hash/crc32: use slicing by 8 for Castagnoli and smaller sizes 2016-03-08 16:46:24 +00:00
html all: single space after period. 2016-03-02 00:13:47 +00:00
image Rewrite leftover references to plan9.bell-labs.com to 9p.io. 2016-03-06 07:07:01 +00:00
index/suffixarray
internal all: make copyright headers consistent with one space after period 2016-03-01 23:34:33 +00:00
io all: single space after period. 2016-03-02 00:13:47 +00:00
log all: single space after period. 2016-03-02 00:13:47 +00:00
math math: improve sqrt for ppc64le,ppc64 2016-03-10 15:01:21 +00:00
mime mime/multipart: don't call Read on io.Reader after an error is seen 2016-03-07 19:50:16 +00:00
net net/http: defer idleMu.Unlock() in tryPutIdleConn + minor typo fixes. 2016-03-11 06:12:28 +00:00
os os/user: make OS-specific getgrouplist calls 2016-03-08 20:58:00 +00:00
path Rewrite leftover references to plan9.bell-labs.com to 9p.io. 2016-03-06 07:07:01 +00:00
reflect cmd/compile: remove slices from rtype.funcType 2016-03-09 01:25:18 +00:00
regexp all: single space after period. 2016-03-02 00:13:47 +00:00
runtime cmd/compile: track reflect.Type.Method in deadcode 2016-03-11 21:19:20 +00:00
sort all: single space after period. 2016-03-02 00:13:47 +00:00
strconv all: single space after period. 2016-03-02 00:13:47 +00:00
strings all: single space after period. 2016-03-02 00:13:47 +00:00
sync all: single space after period. 2016-03-02 00:13:47 +00:00
syscall syscall: add NO_LOCAL_POINTERS to syscall.exit in plan9_arm 2016-03-09 16:32:02 +00:00
testing testing: implement 'Unordered Output' in Examples. 2016-03-09 04:34:41 +00:00
text all: single space after period. 2016-03-02 00:13:47 +00:00
time all: single space after period. 2016-03-02 00:13:47 +00:00
unicode all: single space after period. 2016-03-02 00:13:47 +00:00
unsafe all: single space after period. 2016-03-02 00:13:47 +00:00
vendor net/http: update http2 to check header values, move from vendor to internal 2016-01-21 00:19:02 +00:00
all.bash
all.bat
all.rc
androidtest.bash
bootstrap.bash build: use consistent shebang line 2016-01-14 03:16:20 +00:00
buildall.bash build: use go tool dist list 2016-02-26 03:58:58 +00:00
clean.bash
clean.bat
clean.rc
iostest.bash
make.bash cmd/go, go/build: add support for Fortran 2016-02-24 15:06:38 +00:00
make.bat cmd/go, go/build: add support for Fortran 2016-02-24 15:06:38 +00:00
Make.dist
make.rc
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc