mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-25 05:33:14 +00:00
add Num.count*Bits functions
This commit is contained in:
parent
fbaa257cef
commit
785da377c8
11 changed files with 207 additions and 8 deletions
|
|
@ -101,6 +101,9 @@ pub enum LowLevel {
|
|||
NumToIntChecked,
|
||||
NumToFloatChecked,
|
||||
NumToStr,
|
||||
NumCountLeadingZeroBits,
|
||||
NumCountTrailingZeroBits,
|
||||
NumCountOneBits,
|
||||
Eq,
|
||||
NotEq,
|
||||
And,
|
||||
|
|
@ -312,6 +315,9 @@ map_symbol_to_lowlevel! {
|
|||
NumShiftRightBy <= NUM_SHIFT_RIGHT,
|
||||
NumShiftRightZfBy <= NUM_SHIFT_RIGHT_ZERO_FILL,
|
||||
NumToStr <= NUM_TO_STR,
|
||||
NumCountLeadingZeroBits <= NUM_COUNT_LEADING_ZERO_BITS,
|
||||
NumCountTrailingZeroBits <= NUM_COUNT_TRAILING_ZERO_BITS,
|
||||
NumCountOneBits <= NUM_COUNT_ONE_BITS,
|
||||
Eq <= BOOL_STRUCTURAL_EQ,
|
||||
NotEq <= BOOL_STRUCTURAL_NOT_EQ,
|
||||
And <= BOOL_AND,
|
||||
|
|
|
|||
|
|
@ -1246,6 +1246,9 @@ define_builtins! {
|
|||
145 NUM_MUL_CHECKED_LOWLEVEL: "mulCheckedLowlevel"
|
||||
146 NUM_BYTES_TO_U16_LOWLEVEL: "bytesToU16Lowlevel"
|
||||
147 NUM_BYTES_TO_U32_LOWLEVEL: "bytesToU32Lowlevel"
|
||||
148 NUM_COUNT_LEADING_ZERO_BITS: "countLeadingZeroBits"
|
||||
149 NUM_COUNT_TRAILING_ZERO_BITS: "countTrailingZeroBits"
|
||||
150 NUM_COUNT_ONE_BITS: "countOneBits"
|
||||
}
|
||||
4 BOOL: "Bool" => {
|
||||
0 BOOL_BOOL: "Bool" exposed_type=true // the Bool.Bool type alias
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue