mirror of
https://github.com/golang/go
synced 2024-11-23 03:30:02 -07:00
cmd/compile/internal/types: unexport Type.widthCalculated
It's not needed outside of package types anymore. Change-Id: Idadf915fc254920ca778b5f5f8de8a1300da1953 Reviewed-on: https://go-review.googlesource.com/c/go/+/345794 Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
21d0b306af
commit
56c3856d52
@ -357,7 +357,7 @@ func CalcSize(t *Type) {
|
||||
return
|
||||
}
|
||||
|
||||
if t.WidthCalculated() {
|
||||
if t.widthCalculated() {
|
||||
return
|
||||
}
|
||||
|
||||
@ -570,6 +570,10 @@ func RecalcSize(t *Type) {
|
||||
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
|
||||
//
|
||||
|
@ -1060,7 +1060,7 @@ func (t *Type) SetFields(fields []*Field) {
|
||||
// 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)
|
||||
@ -1084,10 +1084,6 @@ func (t *Type) SetInterface(methods []*Field) {
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user