Skip to content

Commit

Permalink
std: fix misc bugs (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjjfvi authored Mar 9, 2025
1 parent 437cc7e commit b275935
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 95 deletions.
2 changes: 1 addition & 1 deletion tests/snaps/vine/aoc_2024/day_21/compiled.iv
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@

::std::unicode::String::split_once::23 { x(tup(@n32_add(n0 n1) tup(n2 n3)) x(tup(n0 tup(n3 n4)) tup(tup(n1 tup(n2 n4)) ::std::logical::Option::None))) }

::std::unicode::String::repeat::2 { x(dup3220(tup(n0 tup(n1 n2)) n3) x(@n32_sub(1 dup138(n4 @n32_ne(0 ?(::std::unicode::String::repeat::3 ::std::unicode::String::repeat::2 x(n3 x(n4 x(tup(n5 tup(n6 n2)) n7))))))) x(tup(@n32_add(n0 n5) tup(n6 n1)) n7))) }
::std::unicode::String::repeat::2 { x(dup3222(tup(n0 tup(n1 n2)) n3) x(@n32_sub(1 dup138(n4 @n32_ne(0 ?(::std::unicode::String::repeat::3 ::std::unicode::String::repeat::2 x(n3 x(n4 x(tup(n5 tup(n6 n2)) n7))))))) x(tup(@n32_add(n0 n5) tup(n6 n1)) n7))) }

::std::unicode::String::repeat::3 { x(_ x(_ x(n0 n0))) }

Expand Down
58 changes: 29 additions & 29 deletions tests/snaps/vine/aoc_2024/day_24/compiled.iv

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions tests/snaps/vine/lambda/compiled.iv

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions tests/snaps/vine/map_test/compiled.iv

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions tests/snaps/vine/map_test/stats.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

Interactions
Total 26_493_565
Annihilate 13_795_168
Total 26_454_023
Annihilate 13_839_310
Commute 27_678
Copy 2_841_697
Erase 3_339_227
Copy 2_797_555
Erase 3_299_685
Expand 1_956_035
Call 2_812_622
Branch 1_721_138

Memory
Heap 1_032_736 B
Allocated 568_461_008 B
Freed 568_461_008 B
Allocated 569_167_280 B
Freed 569_167_280 B
8 changes: 4 additions & 4 deletions vine/std/data/List.vi
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ pub mod List {
let ord = loop {
match (a.next(), b.next()) {
(None, None) { break Ord::Eq }
(None, Some(_)) { break Ord::Lt }
(Some(_), None) { break Ord::Gt }
(Some(a), Some(b)) {
match a.*.cmp(b) {
(None, Some(&_)) { break Ord::Lt }
(Some(&_), None) { break Ord::Gt }
(Some(&a), Some(&b)) {
match a.cmp(&b) {
Ord::Lt { break Ord::Lt }
Ord::Eq {}
Ord::Gt { break Ord::Gt }
Expand Down
2 changes: 1 addition & 1 deletion vine/std/data/Map.vi
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub mod Map {
balance_left(&data);
}
Ord::Eq {
old = Some(cur_value);
old = Some(move cur_value);
len -= 1;
data = merge_balanced(move left, move right);
}
Expand Down

0 comments on commit b275935

Please sign in to comment.