mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile, etc: handle many struct fields
This adds 8 bytes of binary size to every type that has methods. It is the smallest change I could come up with for 1.7. Fixes #16037 Change-Id: Ibe15c3165854a21768596967757864b880dbfeed Reviewed-on: https://go-review.googlesource.com/24070 Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
53242e49b1
commit
af0fc83985
5 changed files with 85 additions and 9 deletions
|
|
@ -323,7 +323,9 @@ type method struct {
|
|||
type uncommontype struct {
|
||||
pkgpath nameOff
|
||||
mcount uint16 // number of methods
|
||||
moff uint16 // offset from this uncommontype to [mcount]method
|
||||
_ uint16 // unused
|
||||
moff uint32 // offset from this uncommontype to [mcount]method
|
||||
_ uint32 // unused
|
||||
}
|
||||
|
||||
type imethod struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue