...
Source file
src/runtime/tagptr_32bit.go
Documentation: runtime
1
2
3
4
5
6
7 package runtime
8
9 import "unsafe"
10
11
12 const taggedPointerBits = 32
13
14
15
16
17
18 func taggedPointerPack(ptr unsafe.Pointer, tag uintptr) taggedPointer {
19 return taggedPointer(uintptr(ptr))<<32 | taggedPointer(tag)
20 }
21
22
23 func (tp taggedPointer) pointer() unsafe.Pointer {
24 return unsafe.Pointer(uintptr(tp >> 32))
25 }
26
27
28 func (tp taggedPointer) tag() uintptr {
29 return uintptr(tp)
30 }
31
View as plain text