froth/uppershort

Search:
Group by:
Source   Edit  

Types

UpperShort = distinct UpperShortImpl

uses first 2 bytes as tag, sign extends when converting to pointer

tag bytes are addressable

Source   Edit  
UpperShortImpl = uint16
Source   Edit  

Procs

proc splitTag(tagged: Tagged[uint, UpperShort]): UpperShort {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc splitTag[T: PointerLike](tagged: Tagged[T, UpperShort]): UpperShort {.
    inline.}
Source   Edit  
proc splitTagMut(tagged: var Tagged[uint, UpperShort]): var UpperShort {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc splitTagMut[T: PointerLike](tagged: var Tagged[T, UpperShort]): var UpperShort
Source   Edit  
proc tagUpperShort[T](val: T; tag: UpperShortImpl): UpperShortTagged[T] {.inline.}
Source   Edit  
proc untag(tagged: Tagged[uint, UpperShort]): uint {.inline, ...raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc untag[T: PointerLike](tagged: Tagged[T, UpperShort]): T {.inline.}
Source   Edit  
proc withTag(val: uint; tag: UpperShort): Tagged[uint, UpperShort] {.inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc withTag[T: PointerLike](val: T; t: UpperShort): Tagged[T, UpperShort] {.
    inline.}
Source   Edit  

Templates

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