Documentation
¶
Index ¶
- Constants
- Variables
- 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
- 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
- type Bitmap
- type GoEface
- type GoIface
- type GoInterfaceMethod
- type GoInterfaceType
- type GoItab
- type GoMap
- type GoMapIterator
- type GoMapType
- type GoPtrType
- type GoSlice
- type GoString
- type GoStructField
- type GoStructType
- type GoType
- type StackMap
- type StackMapBuilder
Constants ¶
View Source
const ( F_direct = 1 << 5 F_kind_mask = (1 << 5) - 1 )
GoType.KindFlags const
View Source
const ( MinInt48 = -(1 << 47) MaxInt48 = +(1 << 47) - 1 )
Variables ¶
View Source
var StopProfiling = os.Getenv("SONIC_STOP_PROFILING") != ""
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.
Functions ¶
func GuardSlice ¶ added in v1.6.1
func NoEscape ¶ added in v1.10.0
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 Ptr2SlicePtr ¶ added in v1.7.1
Types ¶
type Bitmap ¶ added in v1.7.1
func (*Bitmap) AppendMany ¶ added in v1.7.1
type GoEface ¶
func UnpackEface ¶
func UnpackEface(v interface{}) GoEface
type GoIface ¶
func UnpackIface ¶ added in v1.1.0
func UnpackIface(v interface{}) GoIface
type GoInterfaceMethod ¶
type GoInterfaceType ¶
type GoInterfaceType struct {
GoType
PkgPath *byte
Methods []GoInterfaceMethod
}
func IfaceType ¶
func IfaceType(t *GoType) *GoInterfaceType
type GoMapIterator ¶
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 (*GoMapType) IndirectElem ¶
type GoStructField ¶
type GoStructType ¶
type GoStructType struct {
GoType
Pkg *byte
Fields []GoStructField
}
type GoType ¶
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 UnpackType ¶
type StackMap ¶ added in v1.7.1
func (*StackMap) MarshalBinary ¶ added in v1.7.1
type StackMapBuilder ¶ added in v1.7.1
type StackMapBuilder struct {
// contains filtered or unexported fields
}
func (*StackMapBuilder) AddField ¶ added in v1.7.1
func (self *StackMapBuilder) AddField(ptr bool)
func (*StackMapBuilder) AddFields ¶ added in v1.7.1
func (self *StackMapBuilder) AddFields(n int, ptr bool)
func (*StackMapBuilder) Build ¶ added in v1.7.1
func (self *StackMapBuilder) Build() (p *StackMap)
Click to show internal directories.
Click to hide internal directories.