Documentation
¶
Index ¶
- Variables
- func Ctz64(x uint64) int
- func FirstBitIdx(in int64) int
- func Hash(bs, cs []byte) int
- func Hashx(bs []byte, cs []N) int
- func InSpaceQ(b byte) bool
- func IndexByte(bs []byte, c byte) int
- func IndexBytes(bs []byte, cs []byte) int
- func IndexBytes1(bs []byte, cs []byte) int
- func IndexBytes2(bs []byte, cs []byte) int
- func Len64(x uint64) (n int)
- func Len64_2(x uint64) (n int)
- func PrintKeys(bsList []string)
- func PrintMask(allMask string)
- func Test1(x, y int) (a, b int)
- func Test2(a int, xs []byte) (n int)
- type GoEface
- type GoIface
- type GoItab
- type GoPtrType
- type GoType
- type Mask
- type N
- type SliceHeader
- type StringHeader
- type TagInfo
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var Pick08 = [...]byte{
0x00, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
}
View Source
var SpaceBytes = [8][16]byte{
fillBytes16('\t'),
fillBytes16('\n'),
fillBytes16('\v'),
fillBytes16('\f'),
fillBytes16('\r'),
fillBytes16(' '),
fillBytes16(0x85),
fillBytes16(0xA0),
}
View Source
var SpaceQ = [8]byte{0x85, 0xA0, '\t', '\n', '\v', '\f', '\r', ' '}
asm 中读入 X0 寄存器
Functions ¶
func FirstBitIdx ¶
func IndexBytes ¶
func IndexBytes1 ¶
func IndexBytes2 ¶
Types ¶
type GoEface ¶
func UnpackEface ¶
func UnpackEface(v interface{}) GoEface
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 UnpackNonEface ¶
func UnpackType ¶
type StringHeader ¶
type TagInfo ¶
type TagInfo struct {
TagName string //
BaseType reflect.Type //
BaseKind reflect.Kind // 次成员可能是 **string,[]int 等这种复杂类型,这个 用来指示 "最里层" 的类型
Offset uintptr //偏移量
TypeSize int //
StringTag bool // `json:"field,string"`: 此情形下,需要把struct的int转成json的string
OmitemptyTag bool // `json:"some_field,omitempty"`
/*
MChildrenEnable: true 时表示使用 MChildren
Children: son 超过 128 时tagMap解析很慢,用 map 替代
ChildList: 遍历 map 性能较差,加个 list
*/
MChildrenEnable bool
Children map[string]*TagInfo
ChildList []*TagInfo // 遍历的顺序和速度
MChildren tagMap
SPool sync.Pool // TODO:slice pool 和 store.pool 放在一起吧,通过 id 来获取获取 pool,并把剩余的”垃圾“放回 sync.Pool 中共下次复用
SPoolN int32
// contains filtered or unexported fields
}
TagInfo 拥有tag的struct的成员的解析结果
func TagMapGetV ¶
func TagMapGetV4 ¶
Click to show internal directories.
Click to hide internal directories.