Types
UpperBits = distinct UpperBitsImpl
- shifts pointer 3 bits to the right, shifts 3 bit tag 61 bits to the left Source Edit
UpperBitsImpl = range[0 .. 7]
- Source Edit
UpperBitsTagged[T] = Tagged[T, UpperBits]
- Source Edit
Procs
proc tagUpperBits[T](val: T; tag: UpperBitsImpl): UpperBitsTagged[T] {.inline.}
- Source Edit
Templates
template getTag[T](tagged: UpperBitsTagged[T]): UpperBitsImpl
- Source Edit
template splitTagInline[T: PointerLike](tagged: Tagged[T, UpperBits]): UpperBits
- Source Edit
template untagInline(tagged: Tagged[uint, UpperBits]): uint
- Source Edit
template untagInline[T: PointerLike](tagged: Tagged[T, UpperBits]): T
- Source Edit
template withTagInline[T: PointerLike](val: T; t: UpperBits): Tagged[T, UpperBits]
- Source Edit