froth/upperbyte

Search:
Group by:
Source   Edit  

Types

UpperByte = distinct UpperByteImpl

uses first byte as tag, sign extends when converting to pointer

tag byte is addressable

Source   Edit  
UpperByteImpl = byte
Source   Edit  

Procs

proc splitTag(tagged: Tagged[uint, UpperByte]): UpperByte {.inline, ...raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc splitTag[T: PointerLike](tagged: Tagged[T, UpperByte]): UpperByte {.inline.}
Source   Edit  
proc splitTagMut(tagged: var Tagged[uint, UpperByte]): var UpperByte {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc splitTagMut[T: PointerLike](tagged: var Tagged[T, UpperByte]): var UpperByte
Source   Edit  
proc tagUpperByte[T](val: T; tag: UpperByteImpl): UpperByteTagged[T] {.inline.}
Source   Edit  
proc untag(tagged: Tagged[uint, UpperByte]): uint {.inline, ...raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc untag[T: PointerLike](tagged: Tagged[T, UpperByte]): T {.inline.}
Source   Edit  
proc withTag(val: uint; tag: UpperByte): Tagged[uint, UpperByte] {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc withTag[T: PointerLike](val: T; t: UpperByte): Tagged[T, UpperByte] {.
    inline.}
Source   Edit  

Templates

template `[]`[T: PointerLike](tagged: Tagged[T, UpperByte]): untyped
Source   Edit  
template getTag[T](tagged: UpperByteTagged[T]): UpperByteImpl
Source   Edit  
template getTagMut[T](tagged: UpperByteTagged[T]): UpperByteImpl
Source   Edit  
template isNil[T: PointerLike](tagged: Tagged[T, UpperByte]): bool
Source   Edit  
template splitTagInline(tagged: Tagged[uint, UpperByte]): UpperByte
Source   Edit  
template splitTagInline[T: PointerLike](tagged: Tagged[T, UpperByte]): UpperByte
Source   Edit  
template splitTagMutInline(tagged: var Tagged[uint, UpperByte]): var UpperByte
Source   Edit  
template splitTagMutInline[T: PointerLike](tagged: var Tagged[T, UpperByte]): var UpperByte
Source   Edit  
template untagInline(tagged: Tagged[uint, UpperByte]): uint
Source   Edit  
template untagInline[T: PointerLike](tagged: Tagged[T, UpperByte]): T
Source   Edit  
template withTagInline(val: uint; tag: UpperByte): Tagged[uint, UpperByte]
Source   Edit  
template withTagInline[T: PointerLike](val: T; t: UpperByte): Tagged[T,
    UpperByte]
Source   Edit