type Sizes … type StdSizes … func (s *StdSizes) Alignof(T Type) (result int64) { … } func IsSyncAtomicAlign64(T Type) bool { … } func (s *StdSizes) Offsetsof(fields []*Var) []int64 { … } var basicSizes … func (s *StdSizes) Sizeof(T Type) int64 { … } var gcArchSizes … // SizesFor returns the Sizes used by a compiler for an architecture. // The result is nil if a compiler/architecture pair is not known. // // Supported architectures for compiler "gc": // "386", "amd64", "amd64p32", "arm", "arm64", "loong64", "mips", "mipsle", // "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "sparc64", "wasm". func SizesFor(compiler, arch string) Sizes { … } var stdSizes … func (conf *Config) alignof(T Type) int64 { … } func (conf *Config) offsetsof(T *Struct) []int64 { … } // offsetof returns the offset of the field specified via // the index sequence relative to T. All embedded fields // must be structs (rather than pointers to structs). // If the offset is too large (because T is too large), // the result is negative. func (conf *Config) offsetof(T Type, index []int) int64 { … } // sizeof returns the size of T. // If T is too large, the result is negative. func (conf *Config) sizeof(T Type) int64 { … } // align returns the smallest y >= x such that y % a == 0. // a must be within 1 and 8 and it must be a power of 2. // The result may be negative due to overflow. func align(x, a int64) int64 { … }