diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2018-03-15 13:40:57 -0700 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2018-03-15 21:56:08 +0000 |
| commit | 86a338960df4ffd88f49aa96a4ad4c14fee51432 (patch) | |
| tree | cb0319858942ea75d216fc33179c770a472f1eb5 /src/runtime/type.go | |
| parent | 91bbe5388d44e485275a8f5892255fdef66d708b (diff) | |
| download | go-86a338960df4ffd88f49aa96a4ad4c14fee51432.tar.xz | |
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>
Diffstat (limited to 'src/runtime/type.go')
| -rw-r--r-- | src/runtime/type.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/type.go b/src/runtime/type.go index b3df3353ce..b72f5c06d6 100644 --- a/src/runtime/type.go +++ b/src/runtime/type.go @@ -329,7 +329,7 @@ type method struct { type uncommontype struct { pkgpath nameOff mcount uint16 // number of methods - _ uint16 // unused + xcount uint16 // number of exported methods moff uint32 // offset from this uncommontype to [mcount]method _ uint32 // unused } |
