]> Cypherpunks repositories - gostls13.git/commit
runtime: remove trailing empty arrays in structs
authorKeith Randall <khr@golang.org>
Wed, 7 Jan 2015 04:38:44 +0000 (20:38 -0800)
committerKeith Randall <khr@golang.org>
Wed, 7 Jan 2015 16:05:16 +0000 (16:05 +0000)
commit1dd0163ce3993192171149c9ee7e4cd538b36b8a
tree61a5b0c6cf66c6668ea61e125d80f817380a726b
parentce5cb037d171273f1a5294723234be5495c9d336
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>
src/cmd/gc/export.c
src/runtime/iface.go
src/runtime/malloc2.go
src/runtime/runtime2.go
src/runtime/sys_windows_386.s
src/runtime/sys_windows_amd64.s
src/runtime/type.go