rt

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 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 added in v0.1.2

func FuncName(p unsafe.Pointer) string

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)

func StringPtr added in v0.1.2

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 added in v0.1.2

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

type GoName added in v0.1.2

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

func (GoName) IsExported added in v0.1.2

func (self GoName) IsExported() bool

func (GoName) Name added in v0.1.2

func (self GoName) Name() string

type GoNameOffset added in v0.1.2

type GoNameOffset int32

func (GoNameOffset) Resolve added in v0.1.2

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 added in v0.1.2

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

type GoStructType added in v0.1.2

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

type GoTextOffset added in v0.1.2

type GoTextOffset int32

func (GoTextOffset) Resolve added in v0.1.2

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 added in v0.1.4

func Dereference(t *GoType) *GoType

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) IsUncommon added in v0.1.2

func (self *GoType) IsUncommon() bool

func (*GoType) Kind

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

func (*GoType) Methods added in v0.1.2

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 added in v0.1.2

type GoTypeOffset int32

func (GoTypeOffset) Resolve added in v0.1.2

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

type GoUncommonType added in v0.1.2

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

func (*GoUncommonType) Methods added in v0.1.2

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