Documentation
¶
Index ¶
- Constants
- func BasicKind(t *types.Basic) abi.Kind
- func BasicName(t *types.Basic) string
- func ChanDir(dir types.ChanDir) (abi.ChanDir, string)
- func FullName(pkg *types.Package, name string) string
- func HasPtrData(t types.Type) bool
- func IsClosure(raw *types.Struct) bool
- func IsClosureFields(fields []*types.Var) bool
- func IsReflexive(t types.Type) bool
- func MapTypeFlags(t *types.Map, sizes types.Sizes) (flags int)
- func NamedName(t *types.Named) string
- func PathOf(pkg *types.Package) string
- func PublicType(t types.Type) types.Type
- func TypeArgs(typeArgs []types.Type) string
- func UnderlyingKind(t types.Type) abi.Kind
- type Builder
- func (b *Builder) Align(t types.Type) uintptr
- func (b *Builder) EqualName(t types.Type) string
- func (b *Builder) FieldAlign(t types.Type) uintptr
- func (b *Builder) FuncName(t *types.Signature) string
- func (b *Builder) Init(ptrSize uintptr, sizes types.Sizes)
- func (b *Builder) InterfaceName(t *types.Interface) (ret string, pub bool)
- func (b *Builder) IsRegularMemory(t types.Type) bool
- func (b *Builder) Kind(t types.Type) abi.Kind
- func (b *Builder) MapBucket(t *types.Map) types.Type
- func (b *Builder) MapFlags(t *types.Map) (flags int)
- func (b *Builder) PtrBytes(t types.Type) uintptr
- func (b *Builder) RuntimeName(t types.Type) string
- func (b *Builder) Size(t types.Type) uintptr
- func (b *Builder) Str(t types.Type) string
- func (b *Builder) StructName(t *types.Struct) (ret string, pub bool)
- func (b *Builder) TFlag(t types.Type) (flag abi.TFlag)
- func (b *Builder) TypeName(t types.Type) (ret string, pub bool)
- type DataKind
Constants ¶
const ( PatchPathPrefix = env.LLGoRuntimePkg + "/internal/lib/" ForTestMarker = "@ForTest" )
const ( BUCKETSIZE = abi.MapBucketCount MAXKEYSIZE = abi.MapMaxKeyBytes MAXELEMSIZE = abi.MapMaxElemBytes )
Builds a type representing a Bucket structure for the given map type. This type is not visible to users - we include only enough information to generate a correct GC program for it. Make sure this stays in sync with runtime/map.go.
A "bucket" is a "struct" {
tophash [BUCKETSIZE]uint8
keys [BUCKETSIZE]keyType
elems [BUCKETSIZE]elemType
overflow *bucket
}
const ( TFlagUncommon = abi.TFlagUncommon KindDirectIface = abi.KindDirectIface )
Variables ¶
This section is empty.
Functions ¶
func HasPtrData ¶
PtrDataSize returns the length in bytes of the prefix of t containing pointer data. Anything after this offset is scalar data.
PtrDataSize is only defined for actual Go types. It's an error to use it on compiler-internal types (e.g., TSSA, TRESULTS).
func IsClosureFields ¶
func IsReflexive ¶
IsReflexive reports whether t has a reflexive equality operator. That is, if x==x for all x of type t.
func PublicType ¶
PublicType maps LLGo's internal closure representation back to the source function type when emitting reflected type names and type references. It must not be used for physical layout computations such as size, align, or offsets.
Types ¶
type Builder ¶
Builder is a helper for constructing ABI types.
func (*Builder) InterfaceName ¶
InterfaceName returns the ABI type name for the specified interface type.
func (*Builder) StructName ¶
StructName returns the ABI type name for the specified struct type.