Remove Num.bytesTo___ functions

These may be reintroduced in some form later,
but they don't handle endianness and it's not
clear builtins are the right place for them.
This commit is contained in:
Richard Feldman 2024-01-23 12:52:34 -05:00
parent ef634ba8e4
commit 9518d76cd8
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
13 changed files with 15 additions and 530 deletions

View file

@ -88,10 +88,6 @@ pub enum LowLevel {
NumAtan,
NumAcos,
NumAsin,
NumBytesToU16,
NumBytesToU32,
NumBytesToU64,
NumBytesToU128,
NumBitwiseAnd,
NumBitwiseXor,
NumBitwiseOr,
@ -330,10 +326,6 @@ map_symbol_to_lowlevel! {
NumAtan <= NUM_ATAN;
NumAcos <= NUM_ACOS;
NumAsin <= NUM_ASIN;
NumBytesToU16 <= NUM_BYTES_TO_U16_LOWLEVEL;
NumBytesToU32 <= NUM_BYTES_TO_U32_LOWLEVEL;
NumBytesToU64 <= NUM_BYTES_TO_U64_LOWLEVEL;
NumBytesToU128 <= NUM_BYTES_TO_U128_LOWLEVEL;
NumBitwiseAnd <= NUM_BITWISE_AND;
NumBitwiseXor <= NUM_BITWISE_XOR;
NumBitwiseOr <= NUM_BITWISE_OR;

View file

@ -1198,13 +1198,13 @@ define_builtins! {
86 NUM_IS_MULTIPLE_OF: "isMultipleOf"
87 NUM_DECIMAL: "Decimal" exposed_type=true
88 NUM_DEC: "Dec" exposed_type=true // the Num.Dectype alias
89 NUM_BYTES_TO_U16: "bytesToU16"
90 NUM_BYTES_TO_U32: "bytesToU32"
91 NUM_BYTES_TO_U64: "bytesToU64"
92 NUM_BYTES_TO_U128: "bytesToU128"
93 NUM_CAST_TO_NAT: "#castToNat"
94 NUM_DIV_CEIL: "divCeil"
95 NUM_DIV_CEIL_CHECKED: "divCeilChecked"
89 NUM_COUNT_ONE_BITS: "countOneBits"
90 NUM_ABS_DIFF: "absDiff"
91 NUM_IS_NAN: "isNaN"
92 NUM_IS_INFINITE: "isInfinite"
93 NUM_IS_FINITE: "isFinite"
94 NUM_COUNT_LEADING_ZERO_BITS: "countLeadingZeroBits"
95 NUM_COUNT_TRAILING_ZERO_BITS: "countTrailingZeroBits"
96 NUM_TO_STR: "toStr"
97 NUM_MIN_I8: "minI8"
98 NUM_MAX_I8: "maxI8"
@ -1246,8 +1246,8 @@ define_builtins! {
134 NUM_TO_U64_CHECKED: "toU64Checked"
135 NUM_TO_U128: "toU128"
136 NUM_TO_U128_CHECKED: "toU128Checked"
137 NUM_TO_NAT: "toNat"
138 NUM_TO_NAT_CHECKED: "toNatChecked"
137 NUM_DIV_CEIL: "divCeil"
138 NUM_DIV_CEIL_CHECKED: "divCeilChecked"
139 NUM_TO_F32: "toF32"
140 NUM_TO_F32_CHECKED: "toF32Checked"
141 NUM_TO_F64: "toF64"
@ -1257,22 +1257,11 @@ define_builtins! {
145 NUM_ADD_CHECKED_LOWLEVEL: "addCheckedLowlevel"
146 NUM_SUB_CHECKED_LOWLEVEL: "subCheckedLowlevel"
147 NUM_MUL_CHECKED_LOWLEVEL: "mulCheckedLowlevel"
148 NUM_BYTES_TO_U16_LOWLEVEL: "bytesToU16Lowlevel"
149 NUM_BYTES_TO_U32_LOWLEVEL: "bytesToU32Lowlevel"
150 NUM_BYTES_TO_U64_LOWLEVEL: "bytesToU64Lowlevel"
151 NUM_BYTES_TO_U128_LOWLEVEL: "bytesToU128Lowlevel"
152 NUM_COUNT_LEADING_ZERO_BITS: "countLeadingZeroBits"
153 NUM_COUNT_TRAILING_ZERO_BITS: "countTrailingZeroBits"
154 NUM_COUNT_ONE_BITS: "countOneBits"
155 NUM_ABS_DIFF: "absDiff"
156 NUM_IS_NAN: "isNaN"
157 NUM_IS_INFINITE: "isInfinite"
158 NUM_IS_FINITE: "isFinite"
159 NUM_MIN: "min"
160 NUM_MAX: "max"
161 NUM_BITWISE_NOT: "bitwiseNot"
162 NUM_INT_CAST: "intCast"
163 NUM_IS_APPROX_EQ: "isApproxEq"
148 NUM_MIN: "min"
149 NUM_MAX: "max"
150 NUM_BITWISE_NOT: "bitwiseNot"
151 NUM_INT_CAST: "intCast"
152 NUM_IS_APPROX_EQ: "isApproxEq"
}
4 BOOL: "Bool" => {
0 BOOL_BOOL: "Bool" exposed_type=true // the Bool.Bool type alias
@ -1313,7 +1302,7 @@ define_builtins! {
20 STR_TO_DEC: "toDec"
21 STR_TO_F64: "toF64"
22 STR_TO_F32: "toF32"
23 STR_TO_NAT: "toNat"
24 STR_TO_U128: "toU128"
25 STR_TO_I128: "toI128"
26 STR_TO_U64: "toU64"