froth/lowerbits

Source   Edit  

Types

LowerBits = distinct LowerBitsImpl
tags the last 3 bits of the pointer in place Source   Edit  
LowerBitsImpl = range[0 .. 7]
Source   Edit  

Procs

proc splitTag(tagged: Tagged[uint, LowerBits]): LowerBits {.inline, ...raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc splitTag[T: PointerLike](tagged: Tagged[T, LowerBits]): LowerBits {.inline.}
Source   Edit  
proc tagLowerBits[T](val: T; tag: LowerBitsImpl): LowerBitsTagged[T] {.inline.}
Source   Edit  
proc untag(tagged: Tagged[uint, LowerBits]): uint {.inline, ...raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc untag[T: PointerLike](tagged: Tagged[T, LowerBits]): T {.inline.}
Source   Edit  
proc withTag(val: uint; tag: LowerBits): Tagged[uint, LowerBits] {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc withTag[T: PointerLike](val: T; t: LowerBits): Tagged[T, LowerBits] {.
    inline.}
Source   Edit  

Templates

template `[]`[T: PointerLike](tagged: Tagged[T, LowerBits]): untyped
Source   Edit  
template getTag[T](tagged: LowerBitsTagged[T]): LowerBitsImpl
Source   Edit  
template isNil[T: PointerLike](tagged: Tagged[T, LowerBits]): bool
Source   Edit  
template splitTagInline(tagged: Tagged[uint, LowerBits]): LowerBits
Source   Edit  
template splitTagInline[T: PointerLike](tagged: Tagged[T, LowerBits]): LowerBits
Source   Edit  
template untagInline(tagged: Tagged[uint, LowerBits]): uint
Source   Edit  
template untagInline[T: PointerLike](tagged: Tagged[T, LowerBits]): T
Source   Edit  
template withTagInline(val: uint; tag: LowerBits): Tagged[uint, LowerBits]
Source   Edit  
template withTagInline[T: PointerLike](val: T; t: LowerBits): Tagged[T,
    LowerBits]
Source   Edit