return
}
- if t.WidthCalculated() {
+ if t.widthCalculated() {
return
}
CalcSize(t)
}
+func (t *Type) widthCalculated() bool {
+ return t.align > 0
+}
+
// when a type's width should be known, we call CheckSize
// to compute it. during a declaration like
//
// Rather than try to track and invalidate those,
// enforce that SetFields cannot be called once
// t's width has been calculated.
- if t.WidthCalculated() {
+ if t.widthCalculated() {
base.Fatalf("SetFields of %v: width previously calculated", t)
}
t.wantEtype(TSTRUCT)
t.Methods().Set(methods)
}
-func (t *Type) WidthCalculated() bool {
- return t.align > 0
-}
-
// ArgWidth returns the total aligned argument size for a function.
// It includes the receiver, parameters, and results.
func (t *Type) ArgWidth() int64 {