rt

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	F_direct    = 1 << 5
	F_kind_mask = (1 << 5) - 1
)
View Source
const (
	GoItabFuncBase = unsafe.Offsetof(GoItab{}.fn)
)
View Source
const (
	MaxFastMap = 128
)
View Source
const (
	T_uncommon = 1 << 0
)

Variables

This section is empty.

Functions

func BytesFrom

func BytesFrom(p unsafe.Pointer, n int, c int) (r []byte)

func FuncAddr

func FuncAddr(f interface{}) unsafe.Pointer

func FuncName

func FuncName(p unsafe.Pointer) string

func IsPtr

func IsPtr(t *GoType) bool

func MapClear

func MapClear(m interface{})

func StringFrom

func StringFrom(p unsafe.Pointer, n int) (r string)

func StringPtr

func StringPtr(s string) unsafe.Pointer

Types

type BitVec

type BitVec struct {
	N uintptr
	B unsafe.Pointer
}

func (BitVec) Bit

func (self BitVec) Bit(i uintptr) byte

func (BitVec) String

func (self BitVec) String() string

type Bitmap

type Bitmap struct {
	N int
	B []byte
}

func (*Bitmap) Append

func (self *Bitmap) Append(bv int)

func (*Bitmap) AppendMany

func (self *Bitmap) AppendMany(n int, bv int)

func (*Bitmap) Set

func (self *Bitmap) Set(i int, bv int)

type Frame

type Frame struct {
	SpTab     []Stack
	ArgSize   uintptr
	ArgPtrs   *StackMap
	LocalPtrs *StackMap
}

type GoEface

type GoEface struct {
	Type  *GoType
	Value unsafe.Pointer
}

func UnpackEface

func UnpackEface(v interface{}) GoEface

type GoIface

type GoIface struct {
	Itab  *GoItab
	Value unsafe.Pointer
}

type GoItab

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

type GoMap

type GoMap struct {
	Count      int
	Flags      uint8
	B          uint8
	Overflow   uint16
	Hash0      uint32
	Buckets    unsafe.Pointer
	OldBuckets unsafe.Pointer
	Evacuate   uintptr
	Extra      unsafe.Pointer
}

type GoMapIterator

type GoMapIterator struct {
	K           unsafe.Pointer
	V           unsafe.Pointer
	T           *GoMapType
	H           *GoMap
	Buckets     unsafe.Pointer
	Bptr        *unsafe.Pointer
	Overflow    *[]unsafe.Pointer
	OldOverflow *[]unsafe.Pointer
	StartBucket uintptr
	Offset      uint8
	Wrapped     bool
	B           uint8
	I           uint8
	Bucket      uintptr
	CheckBucket uintptr
}

func (*GoMapIterator) Next

func (self *GoMapIterator) Next() bool

type GoMapType

type GoMapType struct {
	GoType
	Key        *GoType
	Elem       *GoType
	Bucket     *GoType
	Hasher     func(unsafe.Pointer, uintptr) uintptr
	KeySize    uint8
	ElemSize   uint8
	BucketSize uint16
	Flags      uint32
}

func MapType

func MapType(t *GoType) *GoMapType

func (*GoMapType) IsFastMap

func (self *GoMapType) IsFastMap() bool

type GoMethod

type GoMethod struct {
	Name  GoNameOffset
	Type  GoTypeOffset
	IFunc GoTextOffset
	TFunc GoTextOffset
}

type GoName

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

func (GoName) IsExported

func (self GoName) IsExported() bool

func (GoName) Name

func (self GoName) Name() string

type GoNameOffset

type GoNameOffset int32

func (GoNameOffset) Resolve

func (self GoNameOffset) Resolve(vt *GoType) GoName

type GoPtrType

type GoPtrType struct {
	GoType
	Elem *GoType
}

type GoSlice

type GoSlice struct {
	Ptr unsafe.Pointer
	Len int
	Cap int
}

func (GoSlice) Set

func (self GoSlice) Set(i int, v byte)

type GoSliceType

type GoSliceType struct {
	GoType
	Elem *GoType
}

type GoString

type GoString struct {
	Ptr unsafe.Pointer
	Len int
}

type GoStructField

type GoStructField struct {
	Name        GoName
	Type        *GoType
	OffsetEmbed uintptr
}

type GoStructType

type GoStructType struct {
	GoType
	PkgPath GoName
	Fields  []GoStructField
}

type GoTextOffset

type GoTextOffset int32

func (GoTextOffset) Resolve

func (self GoTextOffset) Resolve(vt *GoType) unsafe.Pointer

type GoType

type GoType struct {
	Size       uintptr
	PtrData    uintptr
	Hash       uint32
	Flags      uint8
	Align      uint8
	FieldAlign uint8
	KindFlags  uint8
	Equal      func(unsafe.Pointer, unsafe.Pointer) bool
	GCData     *byte
	Str        GoNameOffset
	PtrToSelf  GoTypeOffset
}

func Dereference

func Dereference(t *GoType) *GoType

func PtrElem

func PtrElem(t *GoType) *GoType

func UnpackType

func UnpackType(t reflect.Type) *GoType

func (*GoType) IsIndirect

func (self *GoType) IsIndirect() bool

func (*GoType) IsUncommon

func (self *GoType) IsUncommon() bool

func (*GoType) Kind

func (self *GoType) Kind() reflect.Kind

func (*GoType) Methods

func (self *GoType) Methods() []GoMethod

func (*GoType) Pack

func (self *GoType) Pack() (t reflect.Type)

func (*GoType) String

func (self *GoType) String() string

type GoTypeOffset

type GoTypeOffset int32

func (GoTypeOffset) Resolve

func (self GoTypeOffset) Resolve(vt *GoType) *GoType

type GoUncommonType

type GoUncommonType struct {
	PkgPath      int32
	NumMethod    uint16
	NumExported  uint16
	MethodOffset uint32
	// contains filtered or unexported fields
}

func (*GoUncommonType) Methods

func (self *GoUncommonType) Methods() []GoMethod

type Method

type Method struct {
	Id int
	Vt *GoType
}

func AsMethod

func AsMethod(id int, vt *GoType) Method

func GetMethod

func GetMethod(tp interface{}, name string) Method

type Stack

type Stack struct {
	Sp uintptr
	Nb uintptr
}

type StackMap

type StackMap struct {
	N int32
	L int32
	B [1]byte
}

func (*StackMap) Get

func (self *StackMap) Get(i int32) BitVec

func (*StackMap) Pin

func (self *StackMap) Pin() uintptr

func (*StackMap) String

func (self *StackMap) String() string

type StackMapBuilder

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

func (*StackMapBuilder) AddField

func (self *StackMapBuilder) AddField(ptr bool)

func (*StackMapBuilder) AddFields

func (self *StackMapBuilder) AddFields(n int, ptr bool)

func (*StackMapBuilder) Build

func (self *StackMapBuilder) Build() (p *StackMap)

Jump to

Keyboard shortcuts

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