froth/lowerbyte

Search:
Group by:
Source   Edit  

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  

Procs

proc splitTag(tagged: Tagged[uint, LowerByte]): LowerByte {.inline, ...raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc splitTag[T: PointerLike](tagged: Tagged[T, LowerByte]): LowerByte {.inline.}
Source   Edit  
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  
proc untag(tagged: Tagged[uint, LowerByte]): uint {.inline, ...raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc untag[T: PointerLike](tagged: Tagged[T, LowerByte]): T {.inline.}
Source   Edit  
proc withTag(val: uint; tag: LowerByte): Tagged[uint, LowerByte] {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc withTag[T: PointerLike](val: T; t: LowerByte): Tagged[T, LowerByte] {.
    inline.}
Source   Edit  

Templates

template `[]`[T: PointerLike](tagged: Tagged[T, LowerByte]): untyped
Source   Edit  
template getTag[T](tagged: LowerByteTagged[T]): LowerByteImpl
Source   Edit  
template getTagMut[T](tagged: LowerByteTagged[T]): LowerByteImpl
Source   Edit  
template isNil[T: PointerLike](tagged: Tagged[T, LowerByte]): bool
Source   Edit  
template splitTagInline(tagged: Tagged[uint, LowerByte]): LowerByte
Source   Edit  
template splitTagInline[T: PointerLike](tagged: Tagged[T, LowerByte]): LowerByte
Source   Edit  
template splitTagMutInline(tagged: var Tagged[uint, LowerByte]): var 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(val: uint; tag: LowerByte): Tagged[uint, LowerByte]
Source   Edit  
template withTagInline[T: PointerLike](val: T; t: LowerByte): Tagged[T,
    LowerByte]
Source   Edit