abi

package
v1.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2026 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

View Source
var JsObjectPtr = ReflectType(js.Global.Get("$jsObjectPtr"))

Functions

func (*Type) Comparable

func (t *Type) Comparable() bool

func CopyStruct

func CopyStruct(dst, src *js.Object, typ *Type)

func (*Type) GcSlice

func (t *Type) GcSlice(begin, end uintptr) []byte

func IfaceE2I

func IfaceE2I(t *Type, src any, dst unsafe.Pointer)

func (*Type) IsWrapped

func (typ *Type) IsWrapped() bool

func (*Type) JsPtrTo

func (typ *Type) JsPtrTo() *js.Object

func (*Type) JsType

func (typ *Type) JsType() *js.Object

func (*Type) NameOff

func (typ *Type) NameOff(off NameOff) Name

GOPHERJS: Added to mirror the rtype's nameOff method to keep how the nameOff is created and read in one spot of the code.

func (*Type) PtrTo

func (typ *Type) PtrTo() *Type

func ReflectType

func ReflectType(typ *js.Object) *Type

func (*Type) String

func (t *Type) String() string

func (*Type) TextOff

func (typ *Type) TextOff(off TextOff) unsafe.Pointer

GOPHERJS: Added to mirror the rtype's textOff method to keep how the textOff is created and read in one spot of the code.

func (*Type) TypeOff

func (typ *Type) TypeOff(off TypeOff) *Type

GOPHERJS: Added to mirror the rtype's typeOff method to keep how the typeOff is created and read in one spot of the code.

func TypedMemMove

func TypedMemMove(t *Type, dst, src unsafe.Pointer)

func (*Type) Uncommon

func (t *Type) Uncommon() *UncommonType

func UnsafeNew

func UnsafeNew(typ *Type) unsafe.Pointer

func UnwrapJsObject

func UnwrapJsObject(typ *Type, val *js.Object) *js.Object

func WrapJsObject

func WrapJsObject(typ *Type, val *js.Object) *js.Object

Types

type FuncType

type FuncType struct {
	Type
	InCount  uint16
	OutCount uint16

	// GOPHERJS: Add references to in and out args
	In_  []*Type
	Out_ []*Type
}

func (*FuncType) InSlice

func (t *FuncType) InSlice() []*Type

func (*FuncType) OutSlice

func (t *FuncType) OutSlice() []*Type

type Name

type Name struct {
	// contains filtered or unexported fields
}

func NewName

func NewName(n, tag string, exported, embedded bool) Name

func (Name) Data

func (n Name) Data(off int) *byte

func (Name) DataChecked

func (n Name) DataChecked(off int, whySafe string) *byte

func (Name) HasTag

func (n Name) HasTag() bool

func (Name) IsBlank

func (n Name) IsBlank() bool

func (Name) IsEmbedded

func (n Name) IsEmbedded() bool

func (Name) IsExported

func (n Name) IsExported() bool

func (Name) Name

func (n Name) Name() string

func (Name) PkgPath

func (n Name) PkgPath() string

func (Name) ReadVarint

func (n Name) ReadVarint(off int) (int, int)

func (*Name) SetPkgPath

func (n *Name) SetPkgPath(pkgpath string)

func (Name) Tag

func (n Name) Tag() string

type NameOff

type NameOff *Name

GOPHERJS: Instead of using this as an offset from a pointer to look up a name, just store the name as a pointer.

func ResolveReflectName

func ResolveReflectName(n Name) NameOff

GOPHERJS: Added to mirror the resolveReflectName method in reflect

type TextOff

type TextOff unsafe.Pointer

GOPHERJS: Instead of using this as an offset from a pointer to look up a pointer, just store the paointer itself.

func ResolveReflectText

func ResolveReflectText(ptr unsafe.Pointer) TextOff

GOPHERJS: Added to mirror the resolveReflectText method in reflect

type TypeOff

type TypeOff *Type

GOPHERJS: Instead of using this as an offset from a pointer to look up a type, just store the type as a pointer.

func ResolveReflectType

func ResolveReflectType(t *Type) TypeOff

GOPHERJS: Added to mirror the resolveReflectType method in reflect

type UncommonType

type UncommonType struct {
	PkgPath NameOff // import path
	Mcount  uint16  // method count
	Xcount  uint16  // exported method count

	// GOPHERJS: Added access to methods
	Methods_ []Method
}

func (*UncommonType) ExportedMethods

func (t *UncommonType) ExportedMethods() []Method

func (*UncommonType) Methods

func (t *UncommonType) Methods() []Method

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL