]> Cypherpunks repositories - gostls13.git/commit
reflect: sort exported methods first
authorMatthew Dempsky <mdempsky@google.com>
Thu, 15 Mar 2018 20:40:57 +0000 (13:40 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 15 Mar 2018 21:56:08 +0000 (21:56 +0000)
commit86a338960df4ffd88f49aa96a4ad4c14fee51432
treecb0319858942ea75d216fc33179c770a472f1eb5
parent91bbe5388d44e485275a8f5892255fdef66d708b
reflect: sort exported methods first

By moving exported methods to the front of method lists, filtering
down to only the exported methods just needs a count of how many
exported methods exist, which the compiler can statically
provide. This allows getting rid of the exported method cache.

For #22075.

Change-Id: I8eeb274563a2940e1347c34d673f843ae2569064
Reviewed-on: https://go-review.googlesource.com/100846
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/reflect.go
src/cmd/compile/internal/gc/reflect_test.go
src/cmd/compile/internal/gc/subr.go
src/reflect/type.go
src/runtime/type.go