Documentation
¶
Index ¶
- Constants
- func AlignTo(ptr, alignment uint32) (uint32, error)
- func Alignment(t types.ValType) (uint32, error)
- func AlignmentFlags(f types.Flags) (uint32, error)
- func AlignmentRecord(r types.Record) (uint32, error)
- func AlignmentVariant(v types.Variant) (uint32, error)
- func CanonLift(opts *types.CanonicalOptions, inst *types.ComponentInstance, ...) ([]any, types.PostReturnFunc, error)
- func CanonLower(opts *types.CanonicalOptions, inst *types.ComponentInstance, ...) ([]any, error)
- func CanonResourceDrop(inst *types.ComponentInstance, rt types.ResourceType, i uint32) error
- func CanonResourceNew(inst *types.ComponentInstance, rt types.ResourceType, rep uint32) (any, error)
- func CanonResourceRep(inst *types.ComponentInstance, rt types.ResourceType, rep uint32) (uint32, error)
- func CanonicalizeFloat32(f float32) float32
- func CanonicalizeFloat64(f float64) float64
- func CaseLabelWithRefinements(c types.Case, cases []types.Case) string
- func ConvertU32ToRune(u32 uint32) (rune, error)
- func Despecialize(t types.ValType) types.ValType
- func DiscriminantType(cases []types.Case) (types.ValType, error)
- func FindCaseIndex(cases []types.Case, label string) int
- func FlattenFuncTypeLift(ft types.FuncType, maxFlatParams int, maxFlatResults int) (types.CoreFuncType, error)
- func FlattenFuncTypeLower(ft types.FuncType, maxFlatParams int, maxFlatResults int) (types.CoreFuncType, error)
- func FlattenRecord(r types.Record) ([]kind.Kind, error)
- func FlattenType(t types.ValType) ([]kind.Kind, error)
- func FlattenTypes(ts []types.ValType) ([]kind.Kind, error)
- func FlattenVariant(v types.Variant) ([]kind.Kind, error)
- func LiftBorrow(cx *types.CallContext, i uint32, borrow types.Borrow) (uint32, error)
- func LiftFlat(cx *types.CallContext, vi values.ValueIterator, t types.ValType) (any, error)
- func LiftFlatBool(vi values.ValueIterator) (bool, error)
- func LiftFlatChar(vi values.ValueIterator) (rune, error)
- func LiftFlatFlags(vi values.ValueIterator, f types.Flags) (any, error)
- func LiftFlatFloat32(vi values.ValueIterator) (float32, error)
- func LiftFlatFloat64(vi values.ValueIterator) (float64, error)
- func LiftFlatList(cx *types.CallContext, vi values.ValueIterator, t types.ValType) (any, error)
- func LiftFlatRecord(cx *types.CallContext, vi values.ValueIterator, fields []types.Field) (any, error)
- func LiftFlatS16(vi values.ValueIterator) (int16, error)
- func LiftFlatS32(vi values.ValueIterator) (int32, error)
- func LiftFlatS64(vi values.ValueIterator) (int64, error)
- func LiftFlatS8(vi values.ValueIterator) (int8, error)
- func LiftFlatString(cx *types.CallContext, vi values.ValueIterator) (any, error)
- func LiftFlatU16(vi values.ValueIterator) (uint16, error)
- func LiftFlatU32(vi values.ValueIterator) (uint32, error)
- func LiftFlatU64(vi values.ValueIterator) (uint64, error)
- func LiftFlatU8(vi values.ValueIterator) (uint8, error)
- func LiftFlatVariant(cx *types.CallContext, vi values.ValueIterator, variant types.Variant) (any, error)
- func LiftOwn(cx *types.CallContext, i uint32, own types.Own) (uint32, error)
- func LiftValues(cx *types.CallContext, maxFlat int, vi values.ValueIterator, ...) ([]any, error)
- func Load(cx *types.CallContext, t types.ValType, ptr uint32) (any, error)
- func LoadBool(cx *types.CallContext, ptr uint32) (bool, error)
- func LoadChar(cx *types.CallContext, ptr uint32, t types.ValType) (any, error)
- func LoadFlags(cx *types.CallContext, ptr uint32, flags types.Flags) (map[string]any, error)
- func LoadFloat(cx *types.CallContext, ptr uint32, t types.ValType) (any, error)
- func LoadInt(c *types.CallContext, ptr uint32, t types.ValType) (any, error)
- func LoadIntWithSize(c *types.CallContext, ptr uint32, nbytes uint32, sign bool) (any, error)
- func LoadList(cx *types.CallContext, ptr uint32, elementType types.ValType) ([]any, error)
- func LoadListFromRange(cx *types.CallContext, ptr uint32, length uint32, elementType types.ValType) ([]any, error)
- func LoadRecord(cx *types.CallContext, ptr uint32, fields []types.Field) (map[string]any, error)
- func LoadString(cx *types.CallContext, ptr uint32) (string, error)
- func LoadStringFromRange(cx *types.CallContext, ptr, taggedCodeUnits uint32) (string, error)
- func LoadUInt32(cx *types.CallContext, ptr uint32) (uint32, error)
- func LoadUInt64(cx *types.CallContext, ptr uint32) (uint64, error)
- func LoadVariant(cx *types.CallContext, ptr uint32, v types.Variant) (map[string]any, error)
- func LowerBool(v any) ([]values.Value, error)
- func LowerBorrow(cx *types.CallContext, rep any, t types.Borrow) (uint32, error)
- func LowerChar(v any) ([]values.Value, error)
- func LowerFlat(cx *types.CallContext, v any, t types.ValType) ([]values.Value, error)
- func LowerFlatFlags(cx *types.CallContext, v any, f types.Flags) ([]values.Value, error)
- func LowerFlatList(cx *types.CallContext, v any, t types.ValType) ([]values.Value, error)
- func LowerFlatRecord(cx *types.CallContext, v any, r types.Record) ([]values.Value, error)
- func LowerFlatVariant(cx *types.CallContext, v any, variant types.Variant) ([]values.Value, error)
- func LowerFloat32(v any) ([]values.Value, error)
- func LowerFloat64(v any) ([]values.Value, error)
- func LowerOwn(cx *types.CallContext, rep any, t types.Own) (uint32, error)
- func LowerS16(v any) ([]values.Value, error)
- func LowerS32(v any) ([]values.Value, error)
- func LowerS64(v any) ([]values.Value, error)
- func LowerS8(v any) ([]values.Value, error)
- func LowerString(cx *types.CallContext, v any) ([]values.Value, error)
- func LowerU16(v any) ([]values.Value, error)
- func LowerU32(v any) ([]values.Value, error)
- func LowerU64(v any) ([]values.Value, error)
- func LowerU8(v any) ([]values.Value, error)
- func LowerValues(cx *types.CallContext, maxFlat int, vs []any, ts []types.ValType, ...) ([]any, error)
- func LowerValuesToTuple(ts []types.ValType, vs []any, outParam values.ValueIterator, ...) ([]any, error)
- func MatchCase(v any, cases []types.Case) (uint32, any, error)
- func MaxCaseAlignment(cases []types.Case) (uint32, error)
- func NumI32Flags(labels []string) uint32
- func PackFlagsIntoInt(v map[string]any, flags types.Flags) (uint64, error)
- func Size(vt types.ValType) (uint32, error)
- func SizeFlags(f types.Flags) (uint32, error)
- func SizeRecord(r types.Record) (uint32, error)
- func SizeVariant(v types.Variant) (uint32, error)
- func Store(c *types.CallContext, val any, t types.ValType, ptr uint32) error
- func StoreFlags(c *types.CallContext, val any, ptr uint32, f types.Flags) error
- func StoreFloat(c *types.CallContext, val any, ptr uint32, nbytes uint32) error
- func StoreInt(c *types.CallContext, val any, ptr uint32, nbytes uint32, signed bool) error
- func StoreList(cx *types.CallContext, v any, ptr uint32, elementType types.ValType) error
- func StoreListIntoRange(cx *types.CallContext, v any, elementType types.ValType) (uint32, uint32, error)
- func StoreRecord(cx *types.CallContext, val any, ptr uint32, r types.Record) error
- func StoreString(c *types.CallContext, str string, ptr uint32) error
- func StoreStringCopy(cx *types.CallContext, src string, srcCodeUnits uint32, dstCodeUnitSize uint32, ...) (uint32, uint32, error)
- func StoreStringDynamic(cx *types.CallContext, str string, codec encoding.Codec) (uint32, uint32, error)
- func StoreStringIntoRange(cx *types.CallContext, str string) (uint32, uint32, error)
- func StoreUInt32(c *types.CallContext, val uint32, ptr uint32) error
- func StoreUtf8ToUtf16(cx *types.CallContext, src string, srcCodeUnits uint32) (uint32, uint32, error)
- func StoreValidate(c *types.CallContext, t types.ValType, ptr uint32) error
- func StoreVariant(cx *types.CallContext, val any, ptr uint32, v types.Variant) error
- func ToMapStringAny(val any) (map[string]any, error)
- func ToSlice(val any) ([]any, error)
- func UnpackFlagsFromInt(i uint64, labels []string) map[string]any
- type TaggedCodeUnits
Constants ¶
View Source
const ( SizeOfBool = SizeOfU8 SizeOfU8 uint32 = 1 SizeOfU16 uint32 = 2 SizeOfU32 uint32 = 4 SizeOfU64 uint32 = 8 SizeOfS8 = SizeOfU8 SizeOfS16 = SizeOfU16 SizeOfS32 = SizeOfU32 SizeOfS64 = SizeOfU64 SizeOfFloat32 = SizeOfU32 SizeOfFloat64 = SizeOfU64 SizeOfChar = SizeOfU32 )
View Source
const UTF16Tag = 1 << 31
Variables ¶
This section is empty.
Functions ¶
func CanonLower ¶
func CanonResourceDrop ¶
func CanonResourceDrop(inst *types.ComponentInstance, rt types.ResourceType, i uint32) error
func CanonResourceNew ¶
func CanonResourceNew(inst *types.ComponentInstance, rt types.ResourceType, rep uint32) (any, error)
func CanonResourceRep ¶
func CanonResourceRep(inst *types.ComponentInstance, rt types.ResourceType, rep uint32) (uint32, error)
func CanonicalizeFloat32 ¶
func CanonicalizeFloat64 ¶
func ConvertU32ToRune ¶
func FlattenFuncTypeLift ¶
func FlattenFuncTypeLower ¶
func LiftBorrow ¶
func LiftFlat ¶
func LiftFlat(cx *types.CallContext, vi values.ValueIterator, t types.ValType) (any, error)
func LiftFlatBool ¶
func LiftFlatBool(vi values.ValueIterator) (bool, error)
func LiftFlatChar ¶
func LiftFlatChar(vi values.ValueIterator) (rune, error)
func LiftFlatFlags ¶
func LiftFlatFloat32 ¶
func LiftFlatFloat32(vi values.ValueIterator) (float32, error)
func LiftFlatFloat64 ¶
func LiftFlatFloat64(vi values.ValueIterator) (float64, error)
func LiftFlatList ¶
func LiftFlatList(cx *types.CallContext, vi values.ValueIterator, t types.ValType) (any, error)
func LiftFlatRecord ¶
func LiftFlatRecord(cx *types.CallContext, vi values.ValueIterator, fields []types.Field) (any, error)
func LiftFlatS16 ¶
func LiftFlatS16(vi values.ValueIterator) (int16, error)
func LiftFlatS32 ¶
func LiftFlatS32(vi values.ValueIterator) (int32, error)
func LiftFlatS64 ¶
func LiftFlatS64(vi values.ValueIterator) (int64, error)
func LiftFlatS8 ¶
func LiftFlatS8(vi values.ValueIterator) (int8, error)
func LiftFlatString ¶
func LiftFlatString(cx *types.CallContext, vi values.ValueIterator) (any, error)
func LiftFlatU16 ¶
func LiftFlatU16(vi values.ValueIterator) (uint16, error)
func LiftFlatU32 ¶
func LiftFlatU32(vi values.ValueIterator) (uint32, error)
func LiftFlatU64 ¶
func LiftFlatU64(vi values.ValueIterator) (uint64, error)
func LiftFlatU8 ¶
func LiftFlatU8(vi values.ValueIterator) (uint8, error)
func LiftFlatVariant ¶
func LiftFlatVariant(cx *types.CallContext, vi values.ValueIterator, variant types.Variant) (any, error)
func LiftValues ¶
func LiftValues(cx *types.CallContext, maxFlat int, vi values.ValueIterator, ts []types.ValType) ([]any, error)
func LoadIntWithSize ¶
func LoadListFromRange ¶
func LoadRecord ¶
func LoadString ¶
func LoadString(cx *types.CallContext, ptr uint32) (string, error)
func LoadStringFromRange ¶
func LoadStringFromRange(cx *types.CallContext, ptr, taggedCodeUnits uint32) (string, error)
func LoadUInt32 ¶
func LoadUInt32(cx *types.CallContext, ptr uint32) (uint32, error)
func LoadUInt64 ¶
func LoadUInt64(cx *types.CallContext, ptr uint32) (uint64, error)
func LoadVariant ¶
LoadVariant loads the variant from the context at the ptr
func LowerBorrow ¶
func LowerFlatFlags ¶
func LowerFlatList ¶
func LowerFlatRecord ¶
func LowerFlatVariant ¶
func LowerString ¶
func LowerValues ¶
func LowerValues(cx *types.CallContext, maxFlat int, vs []any, ts []types.ValType, outParam values.ValueIterator) ([]any, error)
func LowerValuesToTuple ¶
func LowerValuesToTuple(ts []types.ValType, vs []any, outParam values.ValueIterator, cx *types.CallContext) ([]any, error)
func NumI32Flags ¶
func StoreFlags ¶
func StoreFloat ¶
func StoreListIntoRange ¶
func StoreRecord ¶
func StoreString ¶
func StoreString(c *types.CallContext, str string, ptr uint32) error
StoreString stores the string to linear memory using the context encoding All strings in go are assumed to be utf8 encoded
func StoreStringCopy ¶
func StoreStringDynamic ¶
func StoreStringDynamic( cx *types.CallContext, str string, codec encoding.Codec) (uint32, uint32, error)
StoreStringDynamic assumes the incoming string is in utf8 and stores the string to the given codec's encoding at the end of the context memory
func StoreStringIntoRange ¶
func StoreUInt32 ¶
func StoreUInt32(c *types.CallContext, val uint32, ptr uint32) error
func StoreUtf8ToUtf16 ¶
func StoreValidate ¶
func StoreVariant ¶
Types ¶
type TaggedCodeUnits ¶
func UInt32ToTaggedCodeUnits ¶
func UInt32ToTaggedCodeUnits(i uint32) TaggedCodeUnits
func (TaggedCodeUnits) ToUInt32 ¶
func (tcu TaggedCodeUnits) ToUInt32() uint32
Click to show internal directories.
Click to hide internal directories.