GoType.KindFlags const
const (
F_direct = 1 << 5
F_kind_mask = (1 << 5) - 1
)
const (
MinInt48 int64 = -(1 << 47)
MaxInt48 int64 = +(1 << 47) - 1
)
StopProfiling is used to stop traceback introduced by SIGPROF while native code is running. WARN: this option is only a workaround for traceback issue (https://github.com/bytedance/sonic/issues/310), and will be dropped when the issue is fixed.
var StopProfiling = os.Getenv("SONIC_STOP_PROFILING") != ""
func BytesFrom(p unsafe.Pointer, n int, c int) (r []byte)
func FuncAddr(f interface{}) unsafe.Pointer
func GcwbAddr() uintptr
func Get16(v []byte) int16
func Get32(v []byte) int32
func Get64(v []byte) int64
func GuardSlice(buf *[]byte, n int)
func IndexByte(ptr []byte, index int) unsafe.Pointer
func IndexChar(src string, index int) unsafe.Pointer
func Mem2Str(v []byte) (s string)
func MoreStack(size uintptr)
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 PackInt(v int) uint64
func Ptr2SlicePtr(s unsafe.Pointer, l int, c int) unsafe.Pointer
func StartProf()
func StopProf()
func Str2Mem(s string) (v []byte)
func StrFrom(p unsafe.Pointer, n int64) (s string)
func StrPtr(s string) unsafe.Pointer
func UnpackInt(v uint64) int
type BitVec struct {
N uintptr
B unsafe.Pointer
}
func (self BitVec) Bit(i uintptr) byte
func (self BitVec) String() string
type Bitmap struct {
N int
B []byte
}
func (self *Bitmap) Append(bv int)
func (self *Bitmap) AppendMany(n int, bv int)
func (self *Bitmap) Set(i int, bv int)
type GoEface struct {
Type *GoType
Value unsafe.Pointer
}
func UnpackEface(v interface{}) GoEface
func (self GoEface) Pack() (v interface{})
type GoIface struct {
Itab *GoItab
Value unsafe.Pointer
}
func AssertI2I2(t *GoType, i GoIface) (r GoIface)
func UnpackIface(v interface{}) GoIface
type GoInterfaceMethod struct {
Name int32
Type int32
}
type GoInterfaceType struct {
GoType
PkgPath *byte
Methods []GoInterfaceMethod
}
func IfaceType(t *GoType) *GoInterfaceType
type GoItab struct {
Vt *GoType
// contains filtered or unexported fields
}
func Getitab(inter *GoInterfaceType, typ *GoType, canfail bool) *GoItab
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 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
}
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(t *GoType) *GoMapType
func (self *GoMapType) IndirectElem() bool
type GoPtrType struct {
GoType
Elem *GoType
}
type GoSlice struct {
Ptr unsafe.Pointer
Len int
Cap int
}
type GoString struct {
Ptr unsafe.Pointer
Len int
}
type GoStructField struct {
Name *byte
Type *GoType
OffEmbed uintptr
}
type GoStructType struct {
GoType
Pkg *byte
Fields []GoStructField
}
type GoType struct {
Size uintptr
PtrData uintptr
Hash uint32
Flags uint8
Align uint8
FieldAlign uint8
KindFlags uint8
Traits unsafe.Pointer
GCData *byte
Str int32
PtrToSelf int32
}
func PtrElem(t *GoType) *GoType
func UnpackType(t reflect.Type) *GoType
func (self *GoType) Indirect() bool
func (self *GoType) IsNamed() bool
func (self *GoType) Kind() reflect.Kind
func (self *GoType) Pack() (t reflect.Type)
func (self *GoType) String() string
type StackMap struct {
N int32
L int32
B [1]byte
}
func (self *StackMap) Get(i int32) BitVec
func (self *StackMap) MarshalBinary() ([]byte, error)
func (self *StackMap) Pin() uintptr
func (self *StackMap) String() string
type StackMapBuilder struct {
// contains filtered or unexported fields
}
func (self *StackMapBuilder) AddField(ptr bool)
func (self *StackMapBuilder) AddFields(n int, ptr bool)
func (self *StackMapBuilder) Build() (p *StackMap)