Operators Module
Functions and values
| Function or value |
Description
|
Full Usage:
value &&&& mask
Parameters:
uint32<'role>
mask : uint32<MeasureProduct<mask, MeasureOne>>
Returns: uint32<'role>
Modifiers: inline Type parameters: 'role |
Masks a value, keeping its role: masking a `word` yields a `word`. Deliberately asymmetric, so the mask has to be the right-hand operand.
|
Full Usage:
value >>>> count
Parameters:
uint32<'role>
count : int<MeasureProduct<bits, MeasureOne>>
Returns: uint32<'role>
Modifiers: inline Type parameters: 'role |
Right-shifts a value, keeping its role. The distance is a bit count, not a mask.
|
Full Usage:
hasAll mask value
Parameters:
uint32<MeasureProduct<mask, MeasureOne>>
value : uint32<'role>
Returns: bool
Modifiers: inline Type parameters: 'role |
True when every bit of `mask` is set in `value`.
|
Full Usage:
hasAny mask value
Parameters:
uint32<MeasureProduct<mask, MeasureOne>>
value : uint32<'role>
Returns: bool
Modifiers: inline Type parameters: 'role |
True when any bit of `mask` is set in `value`.
|
Full Usage:
reinterpret value
Parameters:
uint32<'from>
Returns: uint32<'into>
Modifiers: inline Type parameters: 'from, 'into |
Re-tags a value whose role has changed because bits were taken out of it - masking the string index out of a data word makes it a string index. Explicit, because this is the one operation the measures cannot check.
|
Full Usage:
slotBit slot
Parameters:
int<MeasureProduct<astSlot, MeasureOne>>
Returns: uint32<MeasureProduct<mask, MeasureOne>>
Modifiers: inline |
The single-bit mask selecting `slot`.
|
Full Usage:
slotsBelow slot
Parameters:
int<MeasureProduct<astSlot, MeasureOne>>
Returns: uint32<MeasureProduct<mask, MeasureOne>>
Modifiers: inline |
The mask of every slot below `slot`, for counting the slots that precede it.
|