Documentation
¶
Index ¶
- Constants
- Variables
- func AddPtr(a unsafe.Pointer, b uintptr) unsafe.Pointer
- func BytesFrom(p unsafe.Pointer, n int, c int) (r []byte)
- func Get16(v []byte) int16
- func Get32(v []byte) int32
- func Get64(v []byte) int64
- func GetBytePtr(b []byte) unsafe.Pointer
- func GuardSlice(buf *[]byte, n int)
- func IndexByte(ptr *[]byte, index int) unsafe.Pointer
- func IndexChar(src string, index int) unsafe.Pointer
- func IndexCharUint(src string, index int) uintptr
- func IndexPtr(ptr unsafe.Pointer, size uintptr, index int) unsafe.Pointer
- func IndexSlice(slice unsafe.Pointer, size uintptr, index int) unsafe.Pointer
- func Mem2Str(v []byte) (s string)
- func NoEscape(p unsafe.Pointer) unsafe.Pointer
- func PackInt(v int) uint64
- func PtrOffset(a uintptr, b uintptr) int
- func Str2Mem(s string) (v []byte)
- func StrBoundary(src string) uintptr
- func StringFrom(p unsafe.Pointer, n int) (r string)
- func SubPtr(a unsafe.Pointer, b uintptr) unsafe.Pointer
- func UnpackInt(v uint64) int
- 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
Constants ¶
View Source
const ( F_direct = 1 << 5 F_kind_mask = (1 << 5) - 1 )
View Source
const ( MinInt48 = -(1 << 47) MaxInt48 = +(1 << 47) - 1 )
Variables ¶
View Source
var Hex = "0123456789abcdef"
View Source
var SafeSet = [utf8.RuneSelf]bool{ ' ': true, '!': true, '"': false, '#': true, '$': true, '%': true, '&': true, '\'': true, '(': true, ')': true, '*': true, '+': true, ',': true, '-': true, '.': true, '/': true, '0': true, '1': true, '2': true, '3': true, '4': true, '5': true, '6': true, '7': true, '8': true, '9': true, ':': true, ';': true, '<': true, '=': true, '>': true, '?': true, '@': true, 'A': true, 'B': true, 'C': true, 'D': true, 'E': true, 'F': true, 'G': true, 'H': true, 'I': true, 'J': true, 'K': true, 'L': true, 'M': true, 'N': true, 'O': true, 'P': true, 'Q': true, 'R': true, 'S': true, 'T': true, 'U': true, 'V': true, 'W': true, 'X': true, 'Y': true, 'Z': true, '[': true, '\\': false, ']': true, '^': true, '_': true, '`': true, 'a': true, 'b': true, 'c': true, 'd': true, 'e': true, 'f': true, 'g': true, 'h': true, 'i': true, 'j': true, 'k': true, 'l': true, 'm': true, 'n': true, 'o': true, 'p': true, 'q': true, 'r': true, 's': true, 't': true, 'u': true, 'v': true, 'w': true, 'x': true, 'y': true, 'z': true, '{': true, '|': true, '}': true, '~': true, '\u007f': true, }
Functions ¶
func GetBytePtr ¶
func GuardSlice ¶
func IndexCharUint ¶ added in v0.5.2
func NoEscape ¶
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 StrBoundary ¶ added in v0.5.2
Types ¶
type GoEface ¶
func UnpackEface ¶
func UnpackEface(v interface{}) GoEface
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 }
Click to show internal directories.
Click to hide internal directories.