]> Cypherpunks repositories - gostls13.git/commit
Separate the alignment of a field from the alignment of the
authorIan Lance Taylor <iant@golang.org>
Tue, 31 Mar 2009 06:19:31 +0000 (23:19 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 31 Mar 2009 06:19:31 +0000 (23:19 -0700)
commit4e8417481689214e388c3e978bf6af156e117de9
treec95278a94df0d40d67c27de962d1f826cdb38022
parentaacdc25399ed44ef3a2398e8ce2bfc26e1b46c4c
Separate the alignment of a field from the alignment of the
type of the field.  Use the field alignment to compute the
size of a structure.

This may help 8g but is mainly for gccgo.  gccgo maintains the
standard C/C++ ABI for structure field alignment.  For the
i386, this requires that a float64 field in a struct be
aligned on a 32-bit boundary, although for efficiency a
variable of type float64 or []float64 should be aligned on a
64-bit boundary.

I also removed the unused size field from structField.

R=r
DELTA=117  (75 added, 2 deleted, 40 changed)
OCL=26842
CL=26936
src/lib/reflect/type.go