Types
LowerByte = distinct LowerByteImpl
-
uses last byte as tag, shifts pointer left by a byte, sign extends when converting to pointer
tag byte is addressable
Source Edit LowerByteImpl = byte
- Source Edit
LowerByteTagged[T] = Tagged[T, LowerByte]
- Source Edit
Procs
proc splitTagMut(tagged: var Tagged[uint, LowerByte]): var LowerByte {.inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
proc splitTagMut[T: PointerLike](tagged: var Tagged[T, LowerByte]): var LowerByte
- Source Edit
proc tagLowerByte[T](val: T; tag: LowerByteImpl): LowerByteTagged[T] {.inline.}
- Source Edit
Templates
template getTag[T](tagged: LowerByteTagged[T]): LowerByteImpl
- Source Edit
template getTagMut[T](tagged: LowerByteTagged[T]): LowerByteImpl
- Source Edit
template splitTagInline[T: PointerLike](tagged: Tagged[T, LowerByte]): LowerByte
- Source Edit
template splitTagMutInline[T: PointerLike](tagged: var Tagged[T, LowerByte]): var LowerByte
- Source Edit
template untagInline(tagged: Tagged[uint, LowerByte]): uint
- Source Edit
template untagInline[T: PointerLike](tagged: Tagged[T, LowerByte]): T
- Source Edit
template withTagInline[T: PointerLike](val: T; t: LowerByte): Tagged[T, LowerByte]
- Source Edit