rt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: Apache-2.0 Imports: 5 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
)

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 GrowSlice

func GrowSlice(s interface{}, cap int)

func IsPtr

func IsPtr(t *GoType) bool

func MapClear

func MapClear(m interface{})

func NoEscape

func NoEscape(p unsafe.Pointer) unsafe.Pointer

NoEscape hides a pointer from escape analysis. NoEscape is the identity function but escape analysis doesn't think the output depends on the input. NoEscape is inlined and currently compiles down to zero instructions. USE CAREFULLY!

func StringFrom

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

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{}) (r 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 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 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        int32
	PtrToSelf  int32
}

func PtrElem

func PtrElem(t *GoType) *GoType

func SliceElem

func SliceElem(t *GoType) *GoType

func UnpackType

func UnpackType(t reflect.Type) *GoType

func (*GoType) IsIndirect

func (self *GoType) IsIndirect() bool

func (*GoType) Kind

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

func (*GoType) Pack

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

func (*GoType) String

func (self *GoType) String() string

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