• Ian Lance Taylor's avatar
    Separate the alignment of a field from the alignment of the · 4e841748
    Ian Lance Taylor authored
    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
    4e841748
type.go 25.1 KB