toolshonnef.co/go/tools/gcsizes Index | Files

package gcsizes

import "honnef.co/go/tools/gcsizes"

Package gcsizes provides a types.Sizes implementation that adheres to the rules used by the gc compiler.

Index

Types

type Sizes

type Sizes struct {
	WordSize int64
	MaxAlign int64
}

func ForArch

func ForArch(arch string) *Sizes

ForArch returns a correct Sizes for the given architecture.

func (*Sizes) Alignof

func (s *Sizes) Alignof(T types.Type) int64

func (*Sizes) Offsetsof

func (s *Sizes) Offsetsof(fields []*types.Var) []int64

func (*Sizes) Sizeof

func (s *Sizes) Sizeof(T types.Type) int64

Source Files

sizes.go

Version
v0.0.1-2019.2.2
Published
Jul 29, 2019
Platform
js/wasm
Imports
2 packages
Last checked
4 minutes ago

Tools for package owners.