Commit 8a17db2
authored
[mojo] Update the codebase to Mojo v25.5 nightly (#113)
This pull request updates the codebase to Mojo v25.5 (nightly).
### Dependency and Configuration Updates:
* Updated the `pixi.toml` file to increment the version from `0.4.1` to
`0.5.0`, switch the `max` dependency to a more flexible version
constraint (`>25.4`), and include the `max-nightly` channel in the
`channels` list.
### Enhancements to `BigDecimal`:
* Added new traits (`AnyType`, `Copyable`, `Movable`, `Representable`)
to the `BigDecimal` struct to enhance compatibility and functionality.
* Updated various methods in `BigDecimal` to use `Self` instead of
`BigDecimal`, improving type consistency and reducing redundancy. This
includes methods like `extend_precision`, `normalize`, and comparison
operators (`__gt__`, `__lt__`, etc.).
### Enhancements to `BigInt`:
* Added new traits (`AnyType`, `Comparable`, `Copyable`, `Movable`) to
the `BigInt` struct, aligning it with the enhancements made to
`BigDecimal`.
* Updated initialization methods (`from_list`, `__init__`) to use `var`
for input parameters, reflecting a safer and more flexible approach to
handling ownership and mutability.
### Optimizations in `BigUInt` Arithmetic:
* Replaced `data` with `_data` for internal word storage in SIMD-based
arithmetic methods (e.g., `add_slices_simd`, `subtract_simd`), improving
encapsulation and clarity.
* Removed unnecessary imports (`time`, `testing`) across multiple files
to streamline the codebase.
### Other Improvements:
* Changed the `@value` decorator to `@fieldwise_init` in the `Rational`
struct to reflect a more appropriate initialization strategy.1 parent 431d993 commit 8a17db2
File tree
15 files changed
+145
-130
lines changed- src
- decimojo
- bigdecimal
- bigint
- biguint
- decimal128
- tomlmojo
15 files changed
+145
-130
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
| 45 | + | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
170 | | - | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
| |||
617 | 620 | | |
618 | 621 | | |
619 | 622 | | |
620 | | - | |
| 623 | + | |
621 | 624 | | |
622 | 625 | | |
623 | 626 | | |
624 | 627 | | |
625 | | - | |
| 628 | + | |
626 | 629 | | |
627 | 630 | | |
628 | 631 | | |
629 | 632 | | |
630 | | - | |
| 633 | + | |
631 | 634 | | |
632 | 635 | | |
633 | 636 | | |
634 | 637 | | |
635 | | - | |
| 638 | + | |
636 | 639 | | |
637 | 640 | | |
638 | 641 | | |
639 | 642 | | |
640 | | - | |
| 643 | + | |
641 | 644 | | |
642 | 645 | | |
643 | 646 | | |
644 | 647 | | |
645 | | - | |
| 648 | + | |
646 | 649 | | |
647 | 650 | | |
648 | 651 | | |
| |||
728 | 731 | | |
729 | 732 | | |
730 | 733 | | |
731 | | - | |
| 734 | + | |
732 | 735 | | |
733 | 736 | | |
734 | 737 | | |
| |||
914 | 917 | | |
915 | 918 | | |
916 | 919 | | |
917 | | - | |
| 920 | + | |
918 | 921 | | |
919 | 922 | | |
920 | 923 | | |
| |||
933 | 936 | | |
934 | 937 | | |
935 | 938 | | |
| 939 | + | |
936 | 940 | | |
937 | | - | |
938 | | - | |
939 | | - | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
940 | 944 | | |
941 | 945 | | |
942 | 946 | | |
| |||
949 | 953 | | |
950 | 954 | | |
951 | 955 | | |
952 | | - | |
| 956 | + | |
953 | 957 | | |
954 | 958 | | |
955 | 959 | | |
| |||
974 | 978 | | |
975 | 979 | | |
976 | 980 | | |
977 | | - | |
978 | | - | |
979 | | - | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
980 | 984 | | |
981 | 985 | | |
982 | 986 | | |
| |||
1107 | 1111 | | |
1108 | 1112 | | |
1109 | 1113 | | |
1110 | | - | |
| 1114 | + | |
1111 | 1115 | | |
1112 | 1116 | | |
1113 | 1117 | | |
1114 | 1118 | | |
1115 | 1119 | | |
1116 | 1120 | | |
1117 | 1121 | | |
1118 | | - | |
| 1122 | + | |
1119 | 1123 | | |
1120 | 1124 | | |
1121 | 1125 | | |
| |||
1146 | 1150 | | |
1147 | 1151 | | |
1148 | 1152 | | |
1149 | | - | |
| 1153 | + | |
1150 | 1154 | | |
1151 | 1155 | | |
1152 | 1156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
| |||
38 | 35 | | |
39 | 36 | | |
40 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| |||
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
| |||
126 | 139 | | |
127 | 140 | | |
128 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
129 | 146 | | |
130 | 147 | | |
131 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| |||
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
40 | | - | |
41 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
109 | | - | |
| 116 | + | |
110 | 117 | | |
111 | 118 | | |
112 | 119 | | |
| |||
175 | 182 | | |
176 | 183 | | |
177 | 184 | | |
178 | | - | |
| 185 | + | |
179 | 186 | | |
180 | 187 | | |
181 | 188 | | |
| |||
0 commit comments