mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: remove trailing empty arrays in structs
The ones at the end of M and G are just used to compute their size for use in assembly. Generate the size explicitly. The one at the end of itab is variable-sized, and at least one. The ones at the end of interfacetype and uncommontype are not needed, as the preceding slice references them (the slice was originally added for use by reflect?). The one at the end of stackmap is already accessed correctly, and the runtime never allocates one. Update #9401 Change-Id: Ia75e3aaee38425f038c506868a17105bd64c712f Reviewed-on: https://go-review.googlesource.com/2420 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
ce5cb037d1
commit
1dd0163ce3
7 changed files with 18 additions and 22 deletions
|
|
@ -47,7 +47,6 @@ type uncommontype struct {
|
|||
name *string
|
||||
pkgpath *string
|
||||
mhdr []method
|
||||
m [0]method
|
||||
}
|
||||
|
||||
type imethod struct {
|
||||
|
|
@ -59,7 +58,6 @@ type imethod struct {
|
|||
type interfacetype struct {
|
||||
typ _type
|
||||
mhdr []imethod
|
||||
m [0]imethod
|
||||
}
|
||||
|
||||
type maptype struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue