@salang/sa 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/sa.js +19 -1
- package/package.json +8 -7
- package/sa_std/alloc/layout.sal +12 -0
- package/sa_std/alloc/prelude.sa +1 -0
- package/sa_std/alloc/prelude.sal +1 -0
- package/sa_std/alloc/string.sa +3 -0
- package/sa_std/alloc/vec.sa +684 -0
- package/sa_std/alloc/vec.sal +4 -0
- package/sa_std/any.sa +130 -0
- package/sa_std/any.sal +23 -0
- package/sa_std/array.sa +1876 -0
- package/sa_std/ascii.sa +2 -0
- package/sa_std/ascii.sal +1 -0
- package/sa_std/async.sla +116 -0
- package/sa_std/binary_heap.sa +3003 -0
- package/sa_std/binary_heap.sal +7 -0
- package/sa_std/borrow.sa +171 -0
- package/sa_std/borrow.sal +13 -0
- package/sa_std/btree_map.sa +2210 -0
- package/sa_std/btree_map.sal +11 -0
- package/sa_std/btree_set.sa +1072 -0
- package/sa_std/btree_set.sal +6 -0
- package/sa_std/char.sa +1309 -0
- package/sa_std/char.sal +50 -0
- package/sa_std/cmp.sa +554 -0
- package/sa_std/cmp.sal +14 -0
- package/sa_std/collections/binary_heap.sa +1 -0
- package/sa_std/collections/btree_map.sa +1 -0
- package/sa_std/collections/btree_set.sa +1 -0
- package/sa_std/collections/hashmap.sa +1 -0
- package/sa_std/collections/hashset.sa +1 -0
- package/sa_std/collections/linked_list.sa +1120 -0
- package/sa_std/collections/linked_list.sal +10 -0
- package/sa_std/collections/prelude.sa +7 -0
- package/sa_std/collections/prelude.sal +1 -0
- package/sa_std/collections/vec_deque.sa +1 -0
- package/sa_std/collections.sal +13 -0
- package/sa_std/convert.sa +1115 -0
- package/sa_std/convert.sal +24 -0
- package/sa_std/core/arc.sa +233 -0
- package/sa_std/core/arc.sal +4 -0
- package/sa_std/core/ascii.sa +784 -0
- package/sa_std/core/ascii.sal +34 -0
- package/sa_std/core/bit.sa +41 -0
- package/sa_std/core/box.sa +1 -0
- package/sa_std/core/box.sal +2 -0
- package/sa_std/core/cell.sa +108 -0
- package/sa_std/core/cell.sal +5 -0
- package/sa_std/core/cleanup.sa +26 -0
- package/sa_std/core/control.sa +20 -0
- package/sa_std/core/derive.sa +60 -0
- package/sa_std/core/derive.sal +1 -0
- package/sa_std/core/dispatch.sa +7 -0
- package/sa_std/core/dispatch.sal +5 -0
- package/sa_std/core/future.sa +777 -0
- package/sa_std/core/future.sal +73 -0
- package/sa_std/core/hash.sa +48 -0
- package/sa_std/core/iter.sa +2805 -0
- package/sa_std/core/iter.sal +4 -0
- package/sa_std/core/loop.sa +60 -0
- package/sa_std/core/mem.sa +220 -0
- package/sa_std/core/option.sa +825 -0
- package/sa_std/core/option.sal +11 -0
- package/sa_std/core/panic.sa +23 -0
- package/sa_std/core/panic.sal +12 -0
- package/sa_std/core/prelude.sa +18 -0
- package/sa_std/core/prelude.sal +18 -0
- package/sa_std/core/rc.sa +225 -0
- package/sa_std/core/rc.sal +4 -0
- package/sa_std/core/refcell.sa +283 -0
- package/sa_std/core/refcell.sal +13 -0
- package/sa_std/core/result.sa +708 -0
- package/sa_std/core/result.sal +6 -0
- package/sa_std/core/rust_patterns.sal +295 -0
- package/sa_std/core/sa_core.sa +84 -0
- package/sa_std/core/slice.sa +4021 -0
- package/sa_std/core/slice.sal +7 -0
- package/sa_std/core/task.sa +112 -0
- package/sa_std/core/task.sal +15 -0
- package/sa_std/core/trait_object.sa +26 -0
- package/sa_std/core/trait_object.sal +4 -0
- package/sa_std/core/waker.sa +289 -0
- package/sa_std/core/waker.sal +31 -0
- package/sa_std/core/weak.sa +2 -0
- package/sa_std/core/weak.sal +4 -0
- package/sa_std/cow.sa +3 -0
- package/sa_std/cow.sal +2 -0
- package/sa_std/cstring.sa +3 -0
- package/sa_std/cstring.sal +2 -0
- package/sa_std/default.sa +99 -0
- package/sa_std/duration.sa +3 -0
- package/sa_std/duration.sal +2 -0
- package/sa_std/encoding/json.sa +259 -0
- package/sa_std/encoding/json.sai +54 -0
- package/sa_std/encoding/json.sal +35 -0
- package/sa_std/encoding/prelude.sa +1 -0
- package/sa_std/encoding/prelude.sal +0 -0
- package/sa_std/env.sa +390 -0
- package/sa_std/env.sai +25 -0
- package/sa_std/error.sa +253 -0
- package/sa_std/error.sal +44 -0
- package/sa_std/ffi/cstring.sa +3 -0
- package/sa_std/ffi/cstring.sal +1 -0
- package/sa_std/ffi/prelude.sa +2 -0
- package/sa_std/ffi/prelude.sal +2 -0
- package/sa_std/ffi.sa +635 -0
- package/sa_std/ffi.sal +51 -0
- package/sa_std/fmt.sa +2 -0
- package/sa_std/fmt.sai +18 -0
- package/sa_std/fmt.sal +35 -0
- package/sa_std/fs.sa +1023 -0
- package/sa_std/fs.sai +127 -0
- package/sa_std/fs.sal +51 -0
- package/sa_std/future.sa +2 -0
- package/sa_std/future.sal +1 -0
- package/sa_std/hash.sa +1486 -0
- package/sa_std/hash.sal +13 -0
- package/sa_std/hashmap.sa +1962 -0
- package/sa_std/hashmap.sal +20 -0
- package/sa_std/hashset.sa +1004 -0
- package/sa_std/hashset.sal +18 -0
- package/sa_std/http2.sa +78 -0
- package/sa_std/http2.sai +26 -0
- package/sa_std/http2.sal +36 -0
- package/sa_std/instant.sa +3 -0
- package/sa_std/instant.sal +2 -0
- package/sa_std/io/buf_reader.sa +43 -0
- package/sa_std/io/buf_writer.sa +35 -0
- package/sa_std/io/bufio.sa +4 -0
- package/sa_std/io/bufio.sal +4 -0
- package/sa_std/io/prelude.sa +1 -0
- package/sa_std/io/prelude.sal +1 -0
- package/sa_std/io/print.sa +2 -0
- package/sa_std/io/print.sai +3 -0
- package/sa_std/io.sa +925 -0
- package/sa_std/io.sai +25 -0
- package/sa_std/io.sal +84 -0
- package/sa_std/iter.sa +2 -0
- package/sa_std/iter.sal +1 -0
- package/sa_std/join_handle.sa +3 -0
- package/sa_std/join_handle.sal +2 -0
- package/sa_std/libsa_async.sa +80 -0
- package/sa_std/m_async.sa +137 -0
- package/sa_std/m_async.sal +30 -0
- package/sa_std/m_async.sla +2 -0
- package/sa_std/manually_drop.sa +3 -0
- package/sa_std/manually_drop.sal +2 -0
- package/sa_std/marker/phantom_data.sa +3 -0
- package/sa_std/marker/phantom_data.sal +1 -0
- package/sa_std/marker/prelude.sa +4 -0
- package/sa_std/marker/prelude.sal +4 -0
- package/sa_std/marker.sa +220 -0
- package/sa_std/marker.sal +15 -0
- package/sa_std/math.sa +84 -0
- package/sa_std/math.sai +10 -0
- package/sa_std/mem/manually_drop.sa +3 -0
- package/sa_std/mem/manually_drop.sal +1 -0
- package/sa_std/mem/prelude.sa +2 -0
- package/sa_std/mem/prelude.sal +2 -0
- package/sa_std/mem.sa +564 -0
- package/sa_std/mem.sal +40 -0
- package/sa_std/modstate.sai +19 -0
- package/sa_std/net.sa +4227 -0
- package/sa_std/net.sai +239 -0
- package/sa_std/net.sal +159 -0
- package/sa_std/netx.sa +85 -0
- package/sa_std/netx.sai +11 -0
- package/sa_std/netx.sal +39 -0
- package/sa_std/nonzero.sa +3 -0
- package/sa_std/nonzero.sal +2 -0
- package/sa_std/num/nonzero.sa +3 -0
- package/sa_std/num/nonzero.sal +1 -0
- package/sa_std/num/prelude.sa +3 -0
- package/sa_std/num/prelude.sal +3 -0
- package/sa_std/num.sa +17302 -0
- package/sa_std/num.sai +11 -0
- package/sa_std/num.sal +341 -0
- package/sa_std/ops.sa +1884 -0
- package/sa_std/ops.sal +68 -0
- package/sa_std/option.sa +2 -0
- package/sa_std/option.sal +1 -0
- package/sa_std/os/fd.sa +96 -0
- package/sa_std/os/fd.sai +7 -0
- package/sa_std/os/fd.sal +11 -0
- package/sa_std/os/prelude.sa +2 -0
- package/sa_std/os/prelude.sal +1 -0
- package/sa_std/os/unix_ffi.sa +271 -0
- package/sa_std/panic.sa +1 -0
- package/sa_std/panic.sal +1 -0
- package/sa_std/path.sa +3170 -0
- package/sa_std/path.sal +12 -0
- package/sa_std/phantom_data.sa +3 -0
- package/sa_std/phantom_data.sal +2 -0
- package/sa_std/pin.sa +79 -0
- package/sa_std/pin.sal +5 -0
- package/sa_std/plugin_async.sa +90 -0
- package/sa_std/plugin_async.sal +29 -0
- package/sa_std/plugin_async.sla +4 -0
- package/sa_std/plugin_http_async.sa +46 -0
- package/sa_std/plugin_http_server.sa +61 -0
- package/sa_std/plugin_http_server.sla +2 -0
- package/sa_std/plugin_sqlite.sa +106 -0
- package/sa_std/plugin_sqlite.sla +2 -0
- package/sa_std/prelude.sa +60 -0
- package/sa_std/prelude.sal +55 -0
- package/sa_std/process.sa +916 -0
- package/sa_std/process.sai +57 -0
- package/sa_std/process.sal +27 -0
- package/sa_std/ptr.sa +503 -0
- package/sa_std/ptr.sal +2 -0
- package/sa_std/result.sa +2 -0
- package/sa_std/result.sal +1 -0
- package/sa_std/rust_core.sa +51 -0
- package/sa_std/rust_core.sal +26 -0
- package/sa_std/sa.mod +7 -0
- package/sa_std/sort.sa +156 -0
- package/sa_std/str.sla +13 -0
- package/sa_std/string.sa +12240 -0
- package/sa_std/string.sai +25 -0
- package/sa_std/string.sal +17 -0
- package/sa_std/string_format.sa +269 -0
- package/sa_std/sync/atomic.sa +1500 -0
- package/sa_std/sync/atomic.sal +45 -0
- package/sa_std/sync/barrier.sa +105 -0
- package/sa_std/sync/barrier.sal +7 -0
- package/sa_std/sync/condvar.sa +240 -0
- package/sa_std/sync/condvar.sal +4 -0
- package/sa_std/sync/mpsc.sa +758 -0
- package/sa_std/sync/mpsc.sal +42 -0
- package/sa_std/sync/mpsc_list.sa +255 -0
- package/sa_std/sync/mpsc_list.sal +3 -0
- package/sa_std/sync/mutex.sa +182 -0
- package/sa_std/sync/mutex.sal +7 -0
- package/sa_std/sync/once.sa +371 -0
- package/sa_std/sync/once.sal +31 -0
- package/sa_std/sync/poison.sa +36 -0
- package/sa_std/sync/poison.sal +11 -0
- package/sa_std/sync/prelude.sa +8 -0
- package/sa_std/sync/prelude.sal +7 -0
- package/sa_std/sync/rwlock.sa +369 -0
- package/sa_std/sync/rwlock.sal +13 -0
- package/sa_std/task.sa +2 -0
- package/sa_std/task.sal +1 -0
- package/sa_std/term.sa +2 -0
- package/sa_std/term.sai +10 -0
- package/sa_std/term.sal +33 -0
- package/sa_std/testing/assert.sai +4 -0
- package/sa_std/testing/mock_io.sa +174 -0
- package/sa_std/testing/mock_io.sal +5 -0
- package/sa_std/testing/prelude.sa +2 -0
- package/sa_std/testing/prelude.sal +1 -0
- package/sa_std/text/prelude.sa +1 -0
- package/sa_std/text/prelude.sal +1 -0
- package/sa_std/text/regex.sa +2 -0
- package/sa_std/text/regex.sai +9 -0
- package/sa_std/text/regex.sal +33 -0
- package/sa_std/thread/join_handle.sa +3 -0
- package/sa_std/thread/join_handle.sal +1 -0
- package/sa_std/thread/prelude.sa +4 -0
- package/sa_std/thread/prelude.sal +3 -0
- package/sa_std/thread.sa +160 -0
- package/sa_std/thread.sai +11 -0
- package/sa_std/thread.sal +4 -0
- package/sa_std/thread_local.sa +45 -0
- package/sa_std/thread_local.sai +9 -0
- package/sa_std/time/duration.sa +3 -0
- package/sa_std/time/duration.sal +1 -0
- package/sa_std/time/instant.sa +3 -0
- package/sa_std/time/instant.sal +1 -0
- package/sa_std/time/prelude.sa +4 -0
- package/sa_std/time/prelude.sal +4 -0
- package/sa_std/time.sa +850 -0
- package/sa_std/time.sai +37 -0
- package/sa_std/time.sal +35 -0
- package/sa_std/time.sla +67 -0
- package/sa_std/tls_client.sai +39 -0
- package/sa_std/vec.sa +5754 -0
- package/sa_std/vec.sal +1 -0
- package/sa_std/vec_deque.sa +4925 -0
- package/sa_std/vec_deque.sal +8 -0
- package/sa_std/vec_runtime_macros.sa +11 -0
- package/sa_std/ws_client.sai +57 -0
|
@@ -0,0 +1,2805 @@
|
|
|
1
|
+
@import "iter.sal"
|
|
2
|
+
@import "slice.sal"
|
|
3
|
+
@import "slice.sa"
|
|
4
|
+
@import "../vec_runtime_macros.sa"
|
|
5
|
+
|
|
6
|
+
[MACRO] ITER_NEW %out_iter, %slice_reg
|
|
7
|
+
%out_iter = alloc Iter_SIZE
|
|
8
|
+
__iter_ptr_%out_iter = load %slice_reg+Slice_ptr as ptr
|
|
9
|
+
__iter_len_%out_iter = load %slice_reg+Slice_len as u64
|
|
10
|
+
store %out_iter+Iter_ptr, __iter_ptr_%out_iter as ptr
|
|
11
|
+
store %out_iter+Iter_len, __iter_len_%out_iter as u64
|
|
12
|
+
store %out_iter+Iter_index, 0 as u64
|
|
13
|
+
!__iter_ptr_%out_iter
|
|
14
|
+
!__iter_len_%out_iter
|
|
15
|
+
[END_MACRO]
|
|
16
|
+
|
|
17
|
+
[MACRO] ITER_FROM_SLICE %out_iter, %slice_reg
|
|
18
|
+
EXPAND ITER_NEW %out_iter, %slice_reg
|
|
19
|
+
[END_MACRO]
|
|
20
|
+
|
|
21
|
+
[MACRO] ITER_IS_EMPTY %out_bool, %iter_reg
|
|
22
|
+
__iter_len_%out_bool = load %iter_reg+Iter_len as u64
|
|
23
|
+
__iter_index_%out_bool = load %iter_reg+Iter_index as u64
|
|
24
|
+
__iter_done_%out_bool = eq __iter_index_%out_bool, __iter_len_%out_bool
|
|
25
|
+
%out_bool = __iter_done_%out_bool
|
|
26
|
+
!__iter_index_%out_bool
|
|
27
|
+
!__iter_len_%out_bool
|
|
28
|
+
[END_MACRO]
|
|
29
|
+
|
|
30
|
+
[MACRO] ITER_HAS_NEXT %out_bool, %iter_reg
|
|
31
|
+
__iter_len_%out_bool = load %iter_reg+Iter_len as u64
|
|
32
|
+
__iter_index_%out_bool = load %iter_reg+Iter_index as u64
|
|
33
|
+
%out_bool = lt __iter_index_%out_bool, __iter_len_%out_bool
|
|
34
|
+
!__iter_index_%out_bool
|
|
35
|
+
!__iter_len_%out_bool
|
|
36
|
+
[END_MACRO]
|
|
37
|
+
|
|
38
|
+
[MACRO] ITER_REMAINING %out_len, %iter_reg
|
|
39
|
+
__iter_len_%out_len = load %iter_reg+Iter_len as u64
|
|
40
|
+
__iter_index_%out_len = load %iter_reg+Iter_index as u64
|
|
41
|
+
%out_len = sub __iter_len_%out_len, __iter_index_%out_len
|
|
42
|
+
!__iter_index_%out_len
|
|
43
|
+
!__iter_len_%out_len
|
|
44
|
+
[END_MACRO]
|
|
45
|
+
|
|
46
|
+
[MACRO] ITER_LEN %out_len, %iter_reg
|
|
47
|
+
__iter_len_%out_len = load %iter_reg+Iter_len as u64
|
|
48
|
+
__iter_index_%out_len = load %iter_reg+Iter_index as u64
|
|
49
|
+
%out_len = sub __iter_len_%out_len, __iter_index_%out_len
|
|
50
|
+
!__iter_index_%out_len
|
|
51
|
+
!__iter_len_%out_len
|
|
52
|
+
[END_MACRO]
|
|
53
|
+
|
|
54
|
+
[MACRO] ITER_PEEK_U64 %out_value, %iter_reg
|
|
55
|
+
__iter_ptr_%out_value = load %iter_reg+Iter_ptr as ptr
|
|
56
|
+
__iter_index_%out_value = load %iter_reg+Iter_index as u64
|
|
57
|
+
__iter_off_%out_value = mul __iter_index_%out_value, 8
|
|
58
|
+
__iter_item_%out_value = ptr_add __iter_ptr_%out_value, __iter_off_%out_value
|
|
59
|
+
%out_value = load __iter_item_%out_value+0 as u64
|
|
60
|
+
!__iter_item_%out_value
|
|
61
|
+
!__iter_off_%out_value
|
|
62
|
+
!__iter_index_%out_value
|
|
63
|
+
!__iter_ptr_%out_value
|
|
64
|
+
[END_MACRO]
|
|
65
|
+
|
|
66
|
+
// Rust method-name alias over ITER_PEEK_U64.
|
|
67
|
+
[MACRO] ITER_PEEK %out_value, %iter_reg
|
|
68
|
+
EXPAND ITER_PEEK_U64 %out_value, %iter_reg
|
|
69
|
+
[END_MACRO]
|
|
70
|
+
|
|
71
|
+
[MACRO] ITER_TRY_PEEK_U64 %out_has, %out_value, %iter_reg
|
|
72
|
+
__iter_try_peek_len_%out_has = load %iter_reg+Iter_len as u64
|
|
73
|
+
__iter_try_peek_index_%out_has = load %iter_reg+Iter_index as u64
|
|
74
|
+
__iter_try_peek_done_%out_has = eq __iter_try_peek_index_%out_has, __iter_try_peek_len_%out_has
|
|
75
|
+
br __iter_try_peek_done_%out_has -> L_ITER_TRY_PEEK_NONE_%out_has, L_ITER_TRY_PEEK_SOME_%out_has
|
|
76
|
+
L_ITER_TRY_PEEK_SOME_%out_has:
|
|
77
|
+
EXPAND ITER_PEEK_U64 %out_value, %iter_reg
|
|
78
|
+
%out_has = add 0, 1
|
|
79
|
+
!__iter_try_peek_done_%out_has
|
|
80
|
+
!__iter_try_peek_index_%out_has
|
|
81
|
+
!__iter_try_peek_len_%out_has
|
|
82
|
+
jmp L_ITER_TRY_PEEK_END_%out_has
|
|
83
|
+
L_ITER_TRY_PEEK_NONE_%out_has:
|
|
84
|
+
%out_value = add 0, 0
|
|
85
|
+
%out_has = add 0, 0
|
|
86
|
+
!__iter_try_peek_done_%out_has
|
|
87
|
+
!__iter_try_peek_index_%out_has
|
|
88
|
+
!__iter_try_peek_len_%out_has
|
|
89
|
+
L_ITER_TRY_PEEK_END_%out_has:
|
|
90
|
+
[END_MACRO]
|
|
91
|
+
|
|
92
|
+
// Rust method-name alias over ITER_TRY_PEEK_U64.
|
|
93
|
+
[MACRO] ITER_TRY_PEEK %out_has, %out_value, %iter_reg
|
|
94
|
+
EXPAND ITER_TRY_PEEK_U64 %out_has, %out_value, %iter_reg
|
|
95
|
+
[END_MACRO]
|
|
96
|
+
|
|
97
|
+
[MACRO] ITER_NEXT %out_has, %out_value, %iter_reg, %elem_size
|
|
98
|
+
__iter_ptr_%out_has = load %iter_reg+Iter_ptr as ptr
|
|
99
|
+
__iter_len_%out_has = load %iter_reg+Iter_len as u64
|
|
100
|
+
__iter_index_%out_has = load %iter_reg+Iter_index as u64
|
|
101
|
+
__iter_done_%out_has = eq __iter_index_%out_has, __iter_len_%out_has
|
|
102
|
+
br __iter_done_%out_has -> L_ITER_NEXT_NONE_%out_has, L_ITER_NEXT_SOME_%out_has
|
|
103
|
+
L_ITER_NEXT_SOME_%out_has:
|
|
104
|
+
__iter_off_%out_has = mul __iter_index_%out_has, %elem_size
|
|
105
|
+
__iter_item_%out_has = ptr_add __iter_ptr_%out_has, __iter_off_%out_has
|
|
106
|
+
%out_value = load __iter_item_%out_has+0 as u64
|
|
107
|
+
__iter_next_%out_has = add __iter_index_%out_has, 1
|
|
108
|
+
store %iter_reg+Iter_index, __iter_next_%out_has as u64
|
|
109
|
+
%out_has = add 0, 1
|
|
110
|
+
!__iter_next_%out_has
|
|
111
|
+
!__iter_item_%out_has
|
|
112
|
+
!__iter_off_%out_has
|
|
113
|
+
!__iter_done_%out_has
|
|
114
|
+
!__iter_index_%out_has
|
|
115
|
+
!__iter_len_%out_has
|
|
116
|
+
!__iter_ptr_%out_has
|
|
117
|
+
jmp L_ITER_NEXT_END_%out_has
|
|
118
|
+
L_ITER_NEXT_NONE_%out_has:
|
|
119
|
+
%out_value = add 0, 0
|
|
120
|
+
%out_has = add 0, 0
|
|
121
|
+
!__iter_done_%out_has
|
|
122
|
+
!__iter_index_%out_has
|
|
123
|
+
!__iter_len_%out_has
|
|
124
|
+
!__iter_ptr_%out_has
|
|
125
|
+
L_ITER_NEXT_END_%out_has:
|
|
126
|
+
[END_MACRO]
|
|
127
|
+
|
|
128
|
+
[MACRO] ITER_NEXT_U64 %out_has, %out_value, %iter_reg
|
|
129
|
+
EXPAND ITER_NEXT %out_has, %out_value, %iter_reg, 8
|
|
130
|
+
[END_MACRO]
|
|
131
|
+
|
|
132
|
+
[MACRO] ITER_CLONE %out_iter, %iter_reg
|
|
133
|
+
%out_iter = alloc Iter_SIZE
|
|
134
|
+
__iter_clone_ptr_%out_iter = load %iter_reg+Iter_ptr as ptr
|
|
135
|
+
__iter_clone_len_%out_iter = load %iter_reg+Iter_len as u64
|
|
136
|
+
__iter_clone_index_%out_iter = load %iter_reg+Iter_index as u64
|
|
137
|
+
store %out_iter+Iter_ptr, __iter_clone_ptr_%out_iter as ptr
|
|
138
|
+
store %out_iter+Iter_len, __iter_clone_len_%out_iter as u64
|
|
139
|
+
store %out_iter+Iter_index, __iter_clone_index_%out_iter as u64
|
|
140
|
+
!__iter_clone_index_%out_iter
|
|
141
|
+
!__iter_clone_len_%out_iter
|
|
142
|
+
!__iter_clone_ptr_%out_iter
|
|
143
|
+
[END_MACRO]
|
|
144
|
+
|
|
145
|
+
[MACRO] ITER_BY_REF %out_iter, %iter_reg
|
|
146
|
+
%out_iter = ptr_add %iter_reg, 0
|
|
147
|
+
[END_MACRO]
|
|
148
|
+
|
|
149
|
+
[MACRO] ITER_AS_SLICE_U64 %out_slice, %iter_reg
|
|
150
|
+
__iter_slice_ptr_%out_slice = load %iter_reg+Iter_ptr as ptr
|
|
151
|
+
__iter_slice_len_%out_slice = load %iter_reg+Iter_len as u64
|
|
152
|
+
__iter_slice_index_%out_slice = load %iter_reg+Iter_index as u64
|
|
153
|
+
__iter_slice_off_%out_slice = mul __iter_slice_index_%out_slice, 8
|
|
154
|
+
__iter_slice_data_%out_slice = ptr_add __iter_slice_ptr_%out_slice, __iter_slice_off_%out_slice
|
|
155
|
+
__iter_slice_rem_%out_slice = sub __iter_slice_len_%out_slice, __iter_slice_index_%out_slice
|
|
156
|
+
store %out_slice+Slice_ptr, __iter_slice_data_%out_slice as ptr
|
|
157
|
+
store %out_slice+Slice_len, __iter_slice_rem_%out_slice as u64
|
|
158
|
+
!__iter_slice_rem_%out_slice
|
|
159
|
+
!__iter_slice_data_%out_slice
|
|
160
|
+
!__iter_slice_off_%out_slice
|
|
161
|
+
!__iter_slice_index_%out_slice
|
|
162
|
+
!__iter_slice_len_%out_slice
|
|
163
|
+
!__iter_slice_ptr_%out_slice
|
|
164
|
+
[END_MACRO]
|
|
165
|
+
|
|
166
|
+
// Rust method-name alias over ITER_AS_SLICE_U64.
|
|
167
|
+
[MACRO] ITER_AS_SLICE %out_slice, %iter_reg
|
|
168
|
+
EXPAND ITER_AS_SLICE_U64 %out_slice, %iter_reg
|
|
169
|
+
[END_MACRO]
|
|
170
|
+
|
|
171
|
+
[MACRO] ITER_NEXT_BACK_U64 %out_has, %out_value, %iter_reg
|
|
172
|
+
__iter_back_ptr_%out_has = load %iter_reg+Iter_ptr as ptr
|
|
173
|
+
__iter_back_len_%out_has = load %iter_reg+Iter_len as u64
|
|
174
|
+
__iter_back_index_%out_has = load %iter_reg+Iter_index as u64
|
|
175
|
+
__iter_back_has_%out_has = ult __iter_back_index_%out_has, __iter_back_len_%out_has
|
|
176
|
+
br __iter_back_has_%out_has -> L_ITER_NEXT_BACK_SOME_%out_has, L_ITER_NEXT_BACK_NONE_%out_has
|
|
177
|
+
L_ITER_NEXT_BACK_SOME_%out_has:
|
|
178
|
+
__iter_back_next_len_%out_has = sub __iter_back_len_%out_has, 1
|
|
179
|
+
__iter_back_off_%out_has = mul __iter_back_next_len_%out_has, 8
|
|
180
|
+
__iter_back_item_%out_has = ptr_add __iter_back_ptr_%out_has, __iter_back_off_%out_has
|
|
181
|
+
%out_value = load __iter_back_item_%out_has+0 as u64
|
|
182
|
+
store %iter_reg+Iter_len, __iter_back_next_len_%out_has as u64
|
|
183
|
+
%out_has = add 0, 1
|
|
184
|
+
!__iter_back_item_%out_has
|
|
185
|
+
!__iter_back_off_%out_has
|
|
186
|
+
!__iter_back_next_len_%out_has
|
|
187
|
+
!__iter_back_has_%out_has
|
|
188
|
+
!__iter_back_index_%out_has
|
|
189
|
+
!__iter_back_len_%out_has
|
|
190
|
+
!__iter_back_ptr_%out_has
|
|
191
|
+
jmp L_ITER_NEXT_BACK_END_%out_has
|
|
192
|
+
L_ITER_NEXT_BACK_NONE_%out_has:
|
|
193
|
+
%out_value = add 0, 0
|
|
194
|
+
%out_has = add 0, 0
|
|
195
|
+
!__iter_back_has_%out_has
|
|
196
|
+
!__iter_back_index_%out_has
|
|
197
|
+
!__iter_back_len_%out_has
|
|
198
|
+
!__iter_back_ptr_%out_has
|
|
199
|
+
L_ITER_NEXT_BACK_END_%out_has:
|
|
200
|
+
[END_MACRO]
|
|
201
|
+
|
|
202
|
+
// Rust method-name alias over ITER_NEXT_BACK_U64.
|
|
203
|
+
[MACRO] ITER_NEXT_BACK %out_has, %out_value, %iter_reg
|
|
204
|
+
EXPAND ITER_NEXT_BACK_U64 %out_has, %out_value, %iter_reg
|
|
205
|
+
[END_MACRO]
|
|
206
|
+
|
|
207
|
+
[MACRO] ITER_NTH_U64 %out_has, %out_value, %iter_reg, %nth
|
|
208
|
+
__iter_nth_len_%out_has = load %iter_reg+Iter_len as u64
|
|
209
|
+
__iter_nth_index_%out_has = load %iter_reg+Iter_index as u64
|
|
210
|
+
__iter_nth_remaining_%out_has = sub __iter_nth_len_%out_has, __iter_nth_index_%out_has
|
|
211
|
+
__iter_nth_ok_%out_has = ult %nth, __iter_nth_remaining_%out_has
|
|
212
|
+
br __iter_nth_ok_%out_has -> L_ITER_NTH_SOME_%out_has, L_ITER_NTH_NONE_%out_has
|
|
213
|
+
L_ITER_NTH_SOME_%out_has:
|
|
214
|
+
__iter_nth_target_%out_has = add __iter_nth_index_%out_has, %nth
|
|
215
|
+
__iter_nth_ptr_%out_has = load %iter_reg+Iter_ptr as ptr
|
|
216
|
+
__iter_nth_off_%out_has = mul __iter_nth_target_%out_has, 8
|
|
217
|
+
__iter_nth_item_%out_has = ptr_add __iter_nth_ptr_%out_has, __iter_nth_off_%out_has
|
|
218
|
+
%out_value = load __iter_nth_item_%out_has+0 as u64
|
|
219
|
+
__iter_nth_next_%out_has = add __iter_nth_target_%out_has, 1
|
|
220
|
+
store %iter_reg+Iter_index, __iter_nth_next_%out_has as u64
|
|
221
|
+
%out_has = add 0, 1
|
|
222
|
+
!__iter_nth_next_%out_has
|
|
223
|
+
!__iter_nth_item_%out_has
|
|
224
|
+
!__iter_nth_off_%out_has
|
|
225
|
+
!__iter_nth_ptr_%out_has
|
|
226
|
+
!__iter_nth_target_%out_has
|
|
227
|
+
!__iter_nth_ok_%out_has
|
|
228
|
+
!__iter_nth_remaining_%out_has
|
|
229
|
+
!__iter_nth_index_%out_has
|
|
230
|
+
!__iter_nth_len_%out_has
|
|
231
|
+
jmp L_ITER_NTH_END_%out_has
|
|
232
|
+
L_ITER_NTH_NONE_%out_has:
|
|
233
|
+
%out_value = add 0, 0
|
|
234
|
+
%out_has = add 0, 0
|
|
235
|
+
store %iter_reg+Iter_index, __iter_nth_len_%out_has as u64
|
|
236
|
+
!__iter_nth_ok_%out_has
|
|
237
|
+
!__iter_nth_remaining_%out_has
|
|
238
|
+
!__iter_nth_index_%out_has
|
|
239
|
+
!__iter_nth_len_%out_has
|
|
240
|
+
L_ITER_NTH_END_%out_has:
|
|
241
|
+
[END_MACRO]
|
|
242
|
+
|
|
243
|
+
// Rust method-name alias over ITER_NTH_U64.
|
|
244
|
+
[MACRO] ITER_NTH %out_has, %out_value, %iter_reg, %nth
|
|
245
|
+
EXPAND ITER_NTH_U64 %out_has, %out_value, %iter_reg, %nth
|
|
246
|
+
[END_MACRO]
|
|
247
|
+
|
|
248
|
+
[MACRO] ITER_TRY_NEXT_CHUNK_U64 %out_ok, %out_filled, %iter_reg, %dst_ptr, %count
|
|
249
|
+
%out_filled = add 0, 0
|
|
250
|
+
jmp L_ITER_NEXT_CHUNK_HEAD_%out_ok
|
|
251
|
+
L_ITER_NEXT_CHUNK_HEAD_%out_ok:
|
|
252
|
+
__iter_chunk_more_%out_ok = ult %out_filled, %count
|
|
253
|
+
br __iter_chunk_more_%out_ok -> L_ITER_NEXT_CHUNK_NEXT_%out_ok, L_ITER_NEXT_CHUNK_DONE_%out_ok
|
|
254
|
+
L_ITER_NEXT_CHUNK_NEXT_%out_ok:
|
|
255
|
+
EXPAND ITER_NEXT_U64 __iter_chunk_has_%out_ok, __iter_chunk_value_%out_ok, %iter_reg
|
|
256
|
+
br __iter_chunk_has_%out_ok -> L_ITER_NEXT_CHUNK_STORE_%out_ok, L_ITER_NEXT_CHUNK_SHORT_%out_ok
|
|
257
|
+
L_ITER_NEXT_CHUNK_STORE_%out_ok:
|
|
258
|
+
__iter_chunk_off_%out_ok = mul %out_filled, 8
|
|
259
|
+
__iter_chunk_slot_%out_ok = ptr_add %dst_ptr, __iter_chunk_off_%out_ok
|
|
260
|
+
store __iter_chunk_slot_%out_ok+0, __iter_chunk_value_%out_ok as u64
|
|
261
|
+
__iter_chunk_next_filled_%out_ok = add %out_filled, 1
|
|
262
|
+
!%out_filled
|
|
263
|
+
%out_filled = add __iter_chunk_next_filled_%out_ok, 0
|
|
264
|
+
!__iter_chunk_next_filled_%out_ok
|
|
265
|
+
!__iter_chunk_slot_%out_ok
|
|
266
|
+
!__iter_chunk_off_%out_ok
|
|
267
|
+
!__iter_chunk_value_%out_ok
|
|
268
|
+
!__iter_chunk_has_%out_ok
|
|
269
|
+
!__iter_chunk_more_%out_ok
|
|
270
|
+
jmp L_ITER_NEXT_CHUNK_HEAD_%out_ok
|
|
271
|
+
L_ITER_NEXT_CHUNK_SHORT_%out_ok:
|
|
272
|
+
%out_ok = add 0, 0
|
|
273
|
+
!__iter_chunk_value_%out_ok
|
|
274
|
+
!__iter_chunk_has_%out_ok
|
|
275
|
+
!__iter_chunk_more_%out_ok
|
|
276
|
+
jmp L_ITER_NEXT_CHUNK_END_%out_ok
|
|
277
|
+
L_ITER_NEXT_CHUNK_DONE_%out_ok:
|
|
278
|
+
%out_ok = add 0, 1
|
|
279
|
+
!__iter_chunk_more_%out_ok
|
|
280
|
+
L_ITER_NEXT_CHUNK_END_%out_ok:
|
|
281
|
+
[END_MACRO]
|
|
282
|
+
|
|
283
|
+
// Rust method-name alias over ITER_TRY_NEXT_CHUNK_U64.
|
|
284
|
+
[MACRO] ITER_TRY_NEXT_CHUNK %out_ok, %out_filled, %iter_reg, %dst_ptr, %count
|
|
285
|
+
EXPAND ITER_TRY_NEXT_CHUNK_U64 %out_ok, %out_filled, %iter_reg, %dst_ptr, %count
|
|
286
|
+
[END_MACRO]
|
|
287
|
+
|
|
288
|
+
[MACRO] ITER_COUNT %out_count, %iter_reg
|
|
289
|
+
__iter_count_len_%out_count = load %iter_reg+Iter_len as u64
|
|
290
|
+
__iter_count_index_%out_count = load %iter_reg+Iter_index as u64
|
|
291
|
+
%out_count = sub __iter_count_len_%out_count, __iter_count_index_%out_count
|
|
292
|
+
store %iter_reg+Iter_index, __iter_count_len_%out_count as u64
|
|
293
|
+
!__iter_count_index_%out_count
|
|
294
|
+
!__iter_count_len_%out_count
|
|
295
|
+
[END_MACRO]
|
|
296
|
+
|
|
297
|
+
[MACRO] ITER_LAST_U64 %out_has, %out_value, %iter_reg
|
|
298
|
+
EXPAND ITER_NEXT_BACK_U64 %out_has, %out_value, %iter_reg
|
|
299
|
+
__iter_last_len_%out_has = load %iter_reg+Iter_len as u64
|
|
300
|
+
store %iter_reg+Iter_index, __iter_last_len_%out_has as u64
|
|
301
|
+
!__iter_last_len_%out_has
|
|
302
|
+
[END_MACRO]
|
|
303
|
+
|
|
304
|
+
// Rust method-name alias over ITER_LAST_U64.
|
|
305
|
+
[MACRO] ITER_LAST %out_has, %out_value, %iter_reg
|
|
306
|
+
EXPAND ITER_LAST_U64 %out_has, %out_value, %iter_reg
|
|
307
|
+
[END_MACRO]
|
|
308
|
+
|
|
309
|
+
[MACRO] ITER_FIND_U64 %out_has, %out_value, %iter_reg, %pred_fn
|
|
310
|
+
jmp L_ITER_FIND_HEAD_%out_has
|
|
311
|
+
L_ITER_FIND_HEAD_%out_has:
|
|
312
|
+
EXPAND ITER_NEXT_U64 __iter_find_has_%out_has, __iter_find_value_%out_has, %iter_reg
|
|
313
|
+
br __iter_find_has_%out_has -> L_ITER_FIND_CHECK_%out_has, L_ITER_FIND_NONE_%out_has
|
|
314
|
+
L_ITER_FIND_CHECK_%out_has:
|
|
315
|
+
__iter_find_pred_%out_has = call %pred_fn(__iter_find_value_%out_has)
|
|
316
|
+
__iter_find_match_%out_has = ne __iter_find_pred_%out_has, 0
|
|
317
|
+
br __iter_find_match_%out_has -> L_ITER_FIND_SOME_%out_has, L_ITER_FIND_NEXT_%out_has
|
|
318
|
+
L_ITER_FIND_NEXT_%out_has:
|
|
319
|
+
!__iter_find_match_%out_has
|
|
320
|
+
!__iter_find_pred_%out_has
|
|
321
|
+
!__iter_find_value_%out_has
|
|
322
|
+
!__iter_find_has_%out_has
|
|
323
|
+
jmp L_ITER_FIND_HEAD_%out_has
|
|
324
|
+
L_ITER_FIND_SOME_%out_has:
|
|
325
|
+
%out_value = add __iter_find_value_%out_has, 0
|
|
326
|
+
%out_has = add 0, 1
|
|
327
|
+
!__iter_find_match_%out_has
|
|
328
|
+
!__iter_find_pred_%out_has
|
|
329
|
+
!__iter_find_value_%out_has
|
|
330
|
+
!__iter_find_has_%out_has
|
|
331
|
+
jmp L_ITER_FIND_END_%out_has
|
|
332
|
+
L_ITER_FIND_NONE_%out_has:
|
|
333
|
+
%out_value = add 0, 0
|
|
334
|
+
%out_has = add 0, 0
|
|
335
|
+
!__iter_find_value_%out_has
|
|
336
|
+
!__iter_find_has_%out_has
|
|
337
|
+
L_ITER_FIND_END_%out_has:
|
|
338
|
+
[END_MACRO]
|
|
339
|
+
|
|
340
|
+
// Rust method-name alias over ITER_FIND_U64.
|
|
341
|
+
[MACRO] ITER_FIND %out_has, %out_value, %iter_reg, %pred_fn
|
|
342
|
+
EXPAND ITER_FIND_U64 %out_has, %out_value, %iter_reg, %pred_fn
|
|
343
|
+
[END_MACRO]
|
|
344
|
+
|
|
345
|
+
[MACRO] ITER_TRY_FIND_U64 %out_ok, %out_has, %out_value, %iter_reg, %pred_fn
|
|
346
|
+
__iter_try_find_match_slot_%out_ok = stack_alloc 8
|
|
347
|
+
jmp L_ITER_TRY_FIND_HEAD_%out_ok
|
|
348
|
+
L_ITER_TRY_FIND_HEAD_%out_ok:
|
|
349
|
+
EXPAND ITER_NEXT_U64 __iter_try_find_has_%out_ok, __iter_try_find_value_%out_ok, %iter_reg
|
|
350
|
+
br __iter_try_find_has_%out_ok -> L_ITER_TRY_FIND_CHECK_%out_ok, L_ITER_TRY_FIND_NONE_%out_ok
|
|
351
|
+
L_ITER_TRY_FIND_CHECK_%out_ok:
|
|
352
|
+
__iter_try_find_ok_%out_ok = call %pred_fn(__iter_try_find_value_%out_ok, &__iter_try_find_match_slot_%out_ok)
|
|
353
|
+
__iter_try_find_continue_%out_ok = ne __iter_try_find_ok_%out_ok, 0
|
|
354
|
+
br __iter_try_find_continue_%out_ok -> L_ITER_TRY_FIND_MATCH_CHECK_%out_ok, L_ITER_TRY_FIND_FAIL_%out_ok
|
|
355
|
+
L_ITER_TRY_FIND_MATCH_CHECK_%out_ok:
|
|
356
|
+
__iter_try_find_match_value_%out_ok = load __iter_try_find_match_slot_%out_ok+0 as u64
|
|
357
|
+
__iter_try_find_match_%out_ok = ne __iter_try_find_match_value_%out_ok, 0
|
|
358
|
+
br __iter_try_find_match_%out_ok -> L_ITER_TRY_FIND_SOME_%out_ok, L_ITER_TRY_FIND_NEXT_%out_ok
|
|
359
|
+
L_ITER_TRY_FIND_NEXT_%out_ok:
|
|
360
|
+
!__iter_try_find_match_%out_ok
|
|
361
|
+
!__iter_try_find_match_value_%out_ok
|
|
362
|
+
!__iter_try_find_continue_%out_ok
|
|
363
|
+
!__iter_try_find_ok_%out_ok
|
|
364
|
+
!__iter_try_find_value_%out_ok
|
|
365
|
+
!__iter_try_find_has_%out_ok
|
|
366
|
+
jmp L_ITER_TRY_FIND_HEAD_%out_ok
|
|
367
|
+
L_ITER_TRY_FIND_SOME_%out_ok:
|
|
368
|
+
%out_value = add __iter_try_find_value_%out_ok, 0
|
|
369
|
+
%out_has = add 0, 1
|
|
370
|
+
%out_ok = add 0, 1
|
|
371
|
+
!__iter_try_find_match_%out_ok
|
|
372
|
+
!__iter_try_find_match_value_%out_ok
|
|
373
|
+
!__iter_try_find_continue_%out_ok
|
|
374
|
+
!__iter_try_find_ok_%out_ok
|
|
375
|
+
!__iter_try_find_value_%out_ok
|
|
376
|
+
!__iter_try_find_has_%out_ok
|
|
377
|
+
jmp L_ITER_TRY_FIND_END_%out_ok
|
|
378
|
+
L_ITER_TRY_FIND_FAIL_%out_ok:
|
|
379
|
+
%out_value = add 0, 0
|
|
380
|
+
%out_has = add 0, 0
|
|
381
|
+
%out_ok = add 0, 0
|
|
382
|
+
!__iter_try_find_continue_%out_ok
|
|
383
|
+
!__iter_try_find_ok_%out_ok
|
|
384
|
+
!__iter_try_find_value_%out_ok
|
|
385
|
+
!__iter_try_find_has_%out_ok
|
|
386
|
+
jmp L_ITER_TRY_FIND_END_%out_ok
|
|
387
|
+
L_ITER_TRY_FIND_NONE_%out_ok:
|
|
388
|
+
%out_value = add 0, 0
|
|
389
|
+
%out_has = add 0, 0
|
|
390
|
+
%out_ok = add 0, 1
|
|
391
|
+
!__iter_try_find_value_%out_ok
|
|
392
|
+
!__iter_try_find_has_%out_ok
|
|
393
|
+
L_ITER_TRY_FIND_END_%out_ok:
|
|
394
|
+
[END_MACRO]
|
|
395
|
+
|
|
396
|
+
// Rust method-name alias over ITER_TRY_FIND_U64.
|
|
397
|
+
[MACRO] ITER_TRY_FIND %out_ok, %out_has, %out_value, %iter_reg, %pred_fn
|
|
398
|
+
EXPAND ITER_TRY_FIND_U64 %out_ok, %out_has, %out_value, %iter_reg, %pred_fn
|
|
399
|
+
[END_MACRO]
|
|
400
|
+
|
|
401
|
+
[MACRO] ITER_FIND_MAP_U64 %out_has, %out_value, %iter_reg, %map_fn
|
|
402
|
+
__iter_find_map_slot_%out_has = stack_alloc 8
|
|
403
|
+
jmp L_ITER_FIND_MAP_HEAD_%out_has
|
|
404
|
+
L_ITER_FIND_MAP_HEAD_%out_has:
|
|
405
|
+
EXPAND ITER_NEXT_U64 __iter_find_map_has_%out_has, __iter_find_map_value_%out_has, %iter_reg
|
|
406
|
+
br __iter_find_map_has_%out_has -> L_ITER_FIND_MAP_CHECK_%out_has, L_ITER_FIND_MAP_NONE_%out_has
|
|
407
|
+
L_ITER_FIND_MAP_CHECK_%out_has:
|
|
408
|
+
__iter_find_map_found_%out_has = call %map_fn(__iter_find_map_value_%out_has, &__iter_find_map_slot_%out_has)
|
|
409
|
+
__iter_find_map_match_%out_has = ne __iter_find_map_found_%out_has, 0
|
|
410
|
+
br __iter_find_map_match_%out_has -> L_ITER_FIND_MAP_SOME_%out_has, L_ITER_FIND_MAP_NEXT_%out_has
|
|
411
|
+
L_ITER_FIND_MAP_NEXT_%out_has:
|
|
412
|
+
!__iter_find_map_match_%out_has
|
|
413
|
+
!__iter_find_map_found_%out_has
|
|
414
|
+
!__iter_find_map_value_%out_has
|
|
415
|
+
!__iter_find_map_has_%out_has
|
|
416
|
+
jmp L_ITER_FIND_MAP_HEAD_%out_has
|
|
417
|
+
L_ITER_FIND_MAP_SOME_%out_has:
|
|
418
|
+
%out_value = load __iter_find_map_slot_%out_has+0 as u64
|
|
419
|
+
%out_has = add 0, 1
|
|
420
|
+
!__iter_find_map_match_%out_has
|
|
421
|
+
!__iter_find_map_found_%out_has
|
|
422
|
+
!__iter_find_map_value_%out_has
|
|
423
|
+
!__iter_find_map_has_%out_has
|
|
424
|
+
jmp L_ITER_FIND_MAP_END_%out_has
|
|
425
|
+
L_ITER_FIND_MAP_NONE_%out_has:
|
|
426
|
+
%out_value = add 0, 0
|
|
427
|
+
%out_has = add 0, 0
|
|
428
|
+
!__iter_find_map_value_%out_has
|
|
429
|
+
!__iter_find_map_has_%out_has
|
|
430
|
+
L_ITER_FIND_MAP_END_%out_has:
|
|
431
|
+
[END_MACRO]
|
|
432
|
+
|
|
433
|
+
// Rust method-name alias over ITER_FIND_MAP_U64.
|
|
434
|
+
[MACRO] ITER_FIND_MAP %out_has, %out_value, %iter_reg, %map_fn
|
|
435
|
+
EXPAND ITER_FIND_MAP_U64 %out_has, %out_value, %iter_reg, %map_fn
|
|
436
|
+
[END_MACRO]
|
|
437
|
+
|
|
438
|
+
[MACRO] ITER_POSITION_U64 %out_has, %out_index, %iter_reg, %pred_fn
|
|
439
|
+
__iter_pos_base_%out_has = load %iter_reg+Iter_index as u64
|
|
440
|
+
jmp L_ITER_POSITION_HEAD_%out_has
|
|
441
|
+
L_ITER_POSITION_HEAD_%out_has:
|
|
442
|
+
__iter_pos_before_%out_has = load %iter_reg+Iter_index as u64
|
|
443
|
+
EXPAND ITER_NEXT_U64 __iter_pos_has_%out_has, __iter_pos_value_%out_has, %iter_reg
|
|
444
|
+
br __iter_pos_has_%out_has -> L_ITER_POSITION_CHECK_%out_has, L_ITER_POSITION_NONE_%out_has
|
|
445
|
+
L_ITER_POSITION_CHECK_%out_has:
|
|
446
|
+
__iter_pos_pred_%out_has = call %pred_fn(__iter_pos_value_%out_has)
|
|
447
|
+
__iter_pos_match_%out_has = ne __iter_pos_pred_%out_has, 0
|
|
448
|
+
br __iter_pos_match_%out_has -> L_ITER_POSITION_SOME_%out_has, L_ITER_POSITION_NEXT_%out_has
|
|
449
|
+
L_ITER_POSITION_NEXT_%out_has:
|
|
450
|
+
!__iter_pos_match_%out_has
|
|
451
|
+
!__iter_pos_pred_%out_has
|
|
452
|
+
!__iter_pos_value_%out_has
|
|
453
|
+
!__iter_pos_has_%out_has
|
|
454
|
+
!__iter_pos_before_%out_has
|
|
455
|
+
jmp L_ITER_POSITION_HEAD_%out_has
|
|
456
|
+
L_ITER_POSITION_SOME_%out_has:
|
|
457
|
+
%out_index = sub __iter_pos_before_%out_has, __iter_pos_base_%out_has
|
|
458
|
+
%out_has = add 0, 1
|
|
459
|
+
!__iter_pos_match_%out_has
|
|
460
|
+
!__iter_pos_pred_%out_has
|
|
461
|
+
!__iter_pos_value_%out_has
|
|
462
|
+
!__iter_pos_has_%out_has
|
|
463
|
+
!__iter_pos_before_%out_has
|
|
464
|
+
!__iter_pos_base_%out_has
|
|
465
|
+
jmp L_ITER_POSITION_END_%out_has
|
|
466
|
+
L_ITER_POSITION_NONE_%out_has:
|
|
467
|
+
%out_index = add 0, 0
|
|
468
|
+
%out_has = add 0, 0
|
|
469
|
+
!__iter_pos_value_%out_has
|
|
470
|
+
!__iter_pos_has_%out_has
|
|
471
|
+
!__iter_pos_before_%out_has
|
|
472
|
+
!__iter_pos_base_%out_has
|
|
473
|
+
L_ITER_POSITION_END_%out_has:
|
|
474
|
+
[END_MACRO]
|
|
475
|
+
|
|
476
|
+
// Rust method-name alias over ITER_POSITION_U64.
|
|
477
|
+
[MACRO] ITER_POSITION %out_has, %out_index, %iter_reg, %pred_fn
|
|
478
|
+
EXPAND ITER_POSITION_U64 %out_has, %out_index, %iter_reg, %pred_fn
|
|
479
|
+
[END_MACRO]
|
|
480
|
+
|
|
481
|
+
[MACRO] ITER_RPOSITION_U64 %out_has, %out_index, %iter_reg, %pred_fn
|
|
482
|
+
__iter_rpos_base_%out_has = load %iter_reg+Iter_index as u64
|
|
483
|
+
jmp L_ITER_RPOSITION_HEAD_%out_has
|
|
484
|
+
L_ITER_RPOSITION_HEAD_%out_has:
|
|
485
|
+
__iter_rpos_len_before_%out_has = load %iter_reg+Iter_len as u64
|
|
486
|
+
EXPAND ITER_NEXT_BACK_U64 __iter_rpos_has_%out_has, __iter_rpos_value_%out_has, %iter_reg
|
|
487
|
+
br __iter_rpos_has_%out_has -> L_ITER_RPOSITION_CHECK_%out_has, L_ITER_RPOSITION_NONE_%out_has
|
|
488
|
+
L_ITER_RPOSITION_CHECK_%out_has:
|
|
489
|
+
__iter_rpos_pred_%out_has = call %pred_fn(__iter_rpos_value_%out_has)
|
|
490
|
+
__iter_rpos_match_%out_has = ne __iter_rpos_pred_%out_has, 0
|
|
491
|
+
br __iter_rpos_match_%out_has -> L_ITER_RPOSITION_SOME_%out_has, L_ITER_RPOSITION_NEXT_%out_has
|
|
492
|
+
L_ITER_RPOSITION_NEXT_%out_has:
|
|
493
|
+
!__iter_rpos_match_%out_has
|
|
494
|
+
!__iter_rpos_pred_%out_has
|
|
495
|
+
!__iter_rpos_value_%out_has
|
|
496
|
+
!__iter_rpos_has_%out_has
|
|
497
|
+
!__iter_rpos_len_before_%out_has
|
|
498
|
+
jmp L_ITER_RPOSITION_HEAD_%out_has
|
|
499
|
+
L_ITER_RPOSITION_SOME_%out_has:
|
|
500
|
+
__iter_rpos_match_index_%out_has = sub __iter_rpos_len_before_%out_has, 1
|
|
501
|
+
%out_index = sub __iter_rpos_match_index_%out_has, __iter_rpos_base_%out_has
|
|
502
|
+
%out_has = add 0, 1
|
|
503
|
+
!__iter_rpos_match_index_%out_has
|
|
504
|
+
!__iter_rpos_match_%out_has
|
|
505
|
+
!__iter_rpos_pred_%out_has
|
|
506
|
+
!__iter_rpos_value_%out_has
|
|
507
|
+
!__iter_rpos_has_%out_has
|
|
508
|
+
!__iter_rpos_len_before_%out_has
|
|
509
|
+
!__iter_rpos_base_%out_has
|
|
510
|
+
jmp L_ITER_RPOSITION_END_%out_has
|
|
511
|
+
L_ITER_RPOSITION_NONE_%out_has:
|
|
512
|
+
%out_index = add 0, 0
|
|
513
|
+
%out_has = add 0, 0
|
|
514
|
+
!__iter_rpos_value_%out_has
|
|
515
|
+
!__iter_rpos_has_%out_has
|
|
516
|
+
!__iter_rpos_len_before_%out_has
|
|
517
|
+
!__iter_rpos_base_%out_has
|
|
518
|
+
L_ITER_RPOSITION_END_%out_has:
|
|
519
|
+
[END_MACRO]
|
|
520
|
+
|
|
521
|
+
// Rust method-name alias over ITER_RPOSITION_U64.
|
|
522
|
+
[MACRO] ITER_RPOSITION %out_has, %out_index, %iter_reg, %pred_fn
|
|
523
|
+
EXPAND ITER_RPOSITION_U64 %out_has, %out_index, %iter_reg, %pred_fn
|
|
524
|
+
[END_MACRO]
|
|
525
|
+
|
|
526
|
+
[MACRO] ITER_ANY_U64 %out_bool, %iter_reg, %pred_fn
|
|
527
|
+
jmp L_ITER_ANY_HEAD_%out_bool
|
|
528
|
+
L_ITER_ANY_HEAD_%out_bool:
|
|
529
|
+
EXPAND ITER_NEXT_U64 __iter_any_has_%out_bool, __iter_any_value_%out_bool, %iter_reg
|
|
530
|
+
br __iter_any_has_%out_bool -> L_ITER_ANY_CHECK_%out_bool, L_ITER_ANY_FALSE_%out_bool
|
|
531
|
+
L_ITER_ANY_CHECK_%out_bool:
|
|
532
|
+
__iter_any_pred_%out_bool = call %pred_fn(__iter_any_value_%out_bool)
|
|
533
|
+
__iter_any_match_%out_bool = ne __iter_any_pred_%out_bool, 0
|
|
534
|
+
br __iter_any_match_%out_bool -> L_ITER_ANY_TRUE_%out_bool, L_ITER_ANY_NEXT_%out_bool
|
|
535
|
+
L_ITER_ANY_NEXT_%out_bool:
|
|
536
|
+
!__iter_any_match_%out_bool
|
|
537
|
+
!__iter_any_pred_%out_bool
|
|
538
|
+
!__iter_any_value_%out_bool
|
|
539
|
+
!__iter_any_has_%out_bool
|
|
540
|
+
jmp L_ITER_ANY_HEAD_%out_bool
|
|
541
|
+
L_ITER_ANY_TRUE_%out_bool:
|
|
542
|
+
%out_bool = add 0, 1
|
|
543
|
+
!__iter_any_match_%out_bool
|
|
544
|
+
!__iter_any_pred_%out_bool
|
|
545
|
+
!__iter_any_value_%out_bool
|
|
546
|
+
!__iter_any_has_%out_bool
|
|
547
|
+
jmp L_ITER_ANY_END_%out_bool
|
|
548
|
+
L_ITER_ANY_FALSE_%out_bool:
|
|
549
|
+
%out_bool = add 0, 0
|
|
550
|
+
!__iter_any_value_%out_bool
|
|
551
|
+
!__iter_any_has_%out_bool
|
|
552
|
+
L_ITER_ANY_END_%out_bool:
|
|
553
|
+
[END_MACRO]
|
|
554
|
+
|
|
555
|
+
// Rust method-name alias over ITER_ANY_U64.
|
|
556
|
+
[MACRO] ITER_ANY %out_bool, %iter_reg, %pred_fn
|
|
557
|
+
EXPAND ITER_ANY_U64 %out_bool, %iter_reg, %pred_fn
|
|
558
|
+
[END_MACRO]
|
|
559
|
+
|
|
560
|
+
[MACRO] ITER_ALL_U64 %out_bool, %iter_reg, %pred_fn
|
|
561
|
+
jmp L_ITER_ALL_HEAD_%out_bool
|
|
562
|
+
L_ITER_ALL_HEAD_%out_bool:
|
|
563
|
+
EXPAND ITER_NEXT_U64 __iter_all_has_%out_bool, __iter_all_value_%out_bool, %iter_reg
|
|
564
|
+
br __iter_all_has_%out_bool -> L_ITER_ALL_CHECK_%out_bool, L_ITER_ALL_TRUE_%out_bool
|
|
565
|
+
L_ITER_ALL_CHECK_%out_bool:
|
|
566
|
+
__iter_all_pred_%out_bool = call %pred_fn(__iter_all_value_%out_bool)
|
|
567
|
+
__iter_all_match_%out_bool = ne __iter_all_pred_%out_bool, 0
|
|
568
|
+
br __iter_all_match_%out_bool -> L_ITER_ALL_NEXT_%out_bool, L_ITER_ALL_FALSE_%out_bool
|
|
569
|
+
L_ITER_ALL_NEXT_%out_bool:
|
|
570
|
+
!__iter_all_match_%out_bool
|
|
571
|
+
!__iter_all_pred_%out_bool
|
|
572
|
+
!__iter_all_value_%out_bool
|
|
573
|
+
!__iter_all_has_%out_bool
|
|
574
|
+
jmp L_ITER_ALL_HEAD_%out_bool
|
|
575
|
+
L_ITER_ALL_FALSE_%out_bool:
|
|
576
|
+
%out_bool = add 0, 0
|
|
577
|
+
!__iter_all_match_%out_bool
|
|
578
|
+
!__iter_all_pred_%out_bool
|
|
579
|
+
!__iter_all_value_%out_bool
|
|
580
|
+
!__iter_all_has_%out_bool
|
|
581
|
+
jmp L_ITER_ALL_END_%out_bool
|
|
582
|
+
L_ITER_ALL_TRUE_%out_bool:
|
|
583
|
+
%out_bool = add 0, 1
|
|
584
|
+
!__iter_all_value_%out_bool
|
|
585
|
+
!__iter_all_has_%out_bool
|
|
586
|
+
L_ITER_ALL_END_%out_bool:
|
|
587
|
+
[END_MACRO]
|
|
588
|
+
|
|
589
|
+
// Rust method-name alias over ITER_ALL_U64.
|
|
590
|
+
[MACRO] ITER_ALL %out_bool, %iter_reg, %pred_fn
|
|
591
|
+
EXPAND ITER_ALL_U64 %out_bool, %iter_reg, %pred_fn
|
|
592
|
+
[END_MACRO]
|
|
593
|
+
|
|
594
|
+
[MACRO] ITER_FOLD_U64 %out_value, %iter_reg, %init_value, %fold_fn
|
|
595
|
+
__iter_fold_acc_slot_%out_value = stack_alloc 8
|
|
596
|
+
store __iter_fold_acc_slot_%out_value+0, %init_value as u64
|
|
597
|
+
jmp L_ITER_FOLD_HEAD_%out_value
|
|
598
|
+
L_ITER_FOLD_HEAD_%out_value:
|
|
599
|
+
EXPAND ITER_NEXT_U64 __iter_fold_has_%out_value, __iter_fold_value_%out_value, %iter_reg
|
|
600
|
+
br __iter_fold_has_%out_value -> L_ITER_FOLD_BODY_%out_value, L_ITER_FOLD_DONE_%out_value
|
|
601
|
+
L_ITER_FOLD_BODY_%out_value:
|
|
602
|
+
__iter_fold_acc_%out_value = load __iter_fold_acc_slot_%out_value+0 as u64
|
|
603
|
+
__iter_fold_next_%out_value = call %fold_fn(__iter_fold_acc_%out_value, __iter_fold_value_%out_value)
|
|
604
|
+
store __iter_fold_acc_slot_%out_value+0, __iter_fold_next_%out_value as u64
|
|
605
|
+
!__iter_fold_next_%out_value
|
|
606
|
+
!__iter_fold_acc_%out_value
|
|
607
|
+
!__iter_fold_value_%out_value
|
|
608
|
+
!__iter_fold_has_%out_value
|
|
609
|
+
jmp L_ITER_FOLD_HEAD_%out_value
|
|
610
|
+
L_ITER_FOLD_DONE_%out_value:
|
|
611
|
+
%out_value = load __iter_fold_acc_slot_%out_value+0 as u64
|
|
612
|
+
!__iter_fold_value_%out_value
|
|
613
|
+
!__iter_fold_has_%out_value
|
|
614
|
+
[END_MACRO]
|
|
615
|
+
|
|
616
|
+
// Rust method-name alias over ITER_FOLD_U64.
|
|
617
|
+
[MACRO] ITER_FOLD %out_value, %iter_reg, %init_value, %fold_fn
|
|
618
|
+
EXPAND ITER_FOLD_U64 %out_value, %iter_reg, %init_value, %fold_fn
|
|
619
|
+
[END_MACRO]
|
|
620
|
+
|
|
621
|
+
[MACRO] ITER_TRY_FOLD_U64 %out_ok, %out_value, %iter_reg, %init_value, %fold_fn
|
|
622
|
+
__iter_try_fold_acc_slot_%out_ok = stack_alloc 8
|
|
623
|
+
__iter_try_fold_next_slot_%out_ok = stack_alloc 8
|
|
624
|
+
store __iter_try_fold_acc_slot_%out_ok+0, %init_value as u64
|
|
625
|
+
store __iter_try_fold_next_slot_%out_ok+0, %init_value as u64
|
|
626
|
+
jmp L_ITER_TRY_FOLD_HEAD_%out_ok
|
|
627
|
+
L_ITER_TRY_FOLD_HEAD_%out_ok:
|
|
628
|
+
EXPAND ITER_NEXT_U64 __iter_try_fold_has_%out_ok, __iter_try_fold_value_%out_ok, %iter_reg
|
|
629
|
+
br __iter_try_fold_has_%out_ok -> L_ITER_TRY_FOLD_BODY_%out_ok, L_ITER_TRY_FOLD_DONE_%out_ok
|
|
630
|
+
L_ITER_TRY_FOLD_BODY_%out_ok:
|
|
631
|
+
__iter_try_fold_acc_%out_ok = load __iter_try_fold_acc_slot_%out_ok+0 as u64
|
|
632
|
+
__iter_try_fold_status_%out_ok = call %fold_fn(__iter_try_fold_acc_%out_ok, __iter_try_fold_value_%out_ok, &__iter_try_fold_next_slot_%out_ok)
|
|
633
|
+
__iter_try_fold_continue_%out_ok = ne __iter_try_fold_status_%out_ok, 0
|
|
634
|
+
br __iter_try_fold_continue_%out_ok -> L_ITER_TRY_FOLD_NEXT_%out_ok, L_ITER_TRY_FOLD_FAIL_%out_ok
|
|
635
|
+
L_ITER_TRY_FOLD_NEXT_%out_ok:
|
|
636
|
+
__iter_try_fold_next_%out_ok = load __iter_try_fold_next_slot_%out_ok+0 as u64
|
|
637
|
+
store __iter_try_fold_acc_slot_%out_ok+0, __iter_try_fold_next_%out_ok as u64
|
|
638
|
+
!__iter_try_fold_next_%out_ok
|
|
639
|
+
!__iter_try_fold_continue_%out_ok
|
|
640
|
+
!__iter_try_fold_status_%out_ok
|
|
641
|
+
!__iter_try_fold_acc_%out_ok
|
|
642
|
+
!__iter_try_fold_value_%out_ok
|
|
643
|
+
!__iter_try_fold_has_%out_ok
|
|
644
|
+
jmp L_ITER_TRY_FOLD_HEAD_%out_ok
|
|
645
|
+
L_ITER_TRY_FOLD_FAIL_%out_ok:
|
|
646
|
+
%out_value = load __iter_try_fold_acc_slot_%out_ok+0 as u64
|
|
647
|
+
%out_ok = add 0, 0
|
|
648
|
+
!__iter_try_fold_continue_%out_ok
|
|
649
|
+
!__iter_try_fold_status_%out_ok
|
|
650
|
+
!__iter_try_fold_acc_%out_ok
|
|
651
|
+
!__iter_try_fold_value_%out_ok
|
|
652
|
+
!__iter_try_fold_has_%out_ok
|
|
653
|
+
jmp L_ITER_TRY_FOLD_END_%out_ok
|
|
654
|
+
L_ITER_TRY_FOLD_DONE_%out_ok:
|
|
655
|
+
%out_value = load __iter_try_fold_acc_slot_%out_ok+0 as u64
|
|
656
|
+
%out_ok = add 0, 1
|
|
657
|
+
!__iter_try_fold_value_%out_ok
|
|
658
|
+
!__iter_try_fold_has_%out_ok
|
|
659
|
+
L_ITER_TRY_FOLD_END_%out_ok:
|
|
660
|
+
[END_MACRO]
|
|
661
|
+
|
|
662
|
+
// Rust method-name alias over ITER_TRY_FOLD_U64.
|
|
663
|
+
[MACRO] ITER_TRY_FOLD %out_ok, %out_value, %iter_reg, %init_value, %fold_fn
|
|
664
|
+
EXPAND ITER_TRY_FOLD_U64 %out_ok, %out_value, %iter_reg, %init_value, %fold_fn
|
|
665
|
+
[END_MACRO]
|
|
666
|
+
|
|
667
|
+
[MACRO] ITER_RFOLD_U64 %out_value, %iter_reg, %init_value, %fold_fn
|
|
668
|
+
__iter_rfold_acc_slot_%out_value = stack_alloc 8
|
|
669
|
+
store __iter_rfold_acc_slot_%out_value+0, %init_value as u64
|
|
670
|
+
jmp L_ITER_RFOLD_HEAD_%out_value
|
|
671
|
+
L_ITER_RFOLD_HEAD_%out_value:
|
|
672
|
+
EXPAND ITER_NEXT_BACK_U64 __iter_rfold_has_%out_value, __iter_rfold_value_%out_value, %iter_reg
|
|
673
|
+
br __iter_rfold_has_%out_value -> L_ITER_RFOLD_BODY_%out_value, L_ITER_RFOLD_DONE_%out_value
|
|
674
|
+
L_ITER_RFOLD_BODY_%out_value:
|
|
675
|
+
__iter_rfold_acc_%out_value = load __iter_rfold_acc_slot_%out_value+0 as u64
|
|
676
|
+
__iter_rfold_next_%out_value = call %fold_fn(__iter_rfold_acc_%out_value, __iter_rfold_value_%out_value)
|
|
677
|
+
store __iter_rfold_acc_slot_%out_value+0, __iter_rfold_next_%out_value as u64
|
|
678
|
+
!__iter_rfold_next_%out_value
|
|
679
|
+
!__iter_rfold_acc_%out_value
|
|
680
|
+
!__iter_rfold_value_%out_value
|
|
681
|
+
!__iter_rfold_has_%out_value
|
|
682
|
+
jmp L_ITER_RFOLD_HEAD_%out_value
|
|
683
|
+
L_ITER_RFOLD_DONE_%out_value:
|
|
684
|
+
%out_value = load __iter_rfold_acc_slot_%out_value+0 as u64
|
|
685
|
+
!__iter_rfold_value_%out_value
|
|
686
|
+
!__iter_rfold_has_%out_value
|
|
687
|
+
[END_MACRO]
|
|
688
|
+
|
|
689
|
+
// Rust method-name alias over ITER_RFOLD_U64.
|
|
690
|
+
[MACRO] ITER_RFOLD %out_value, %iter_reg, %init_value, %fold_fn
|
|
691
|
+
EXPAND ITER_RFOLD_U64 %out_value, %iter_reg, %init_value, %fold_fn
|
|
692
|
+
[END_MACRO]
|
|
693
|
+
|
|
694
|
+
[MACRO] ITER_TRY_RFOLD_U64 %out_ok, %out_value, %iter_reg, %init_value, %fold_fn
|
|
695
|
+
__iter_try_rfold_acc_slot_%out_ok = stack_alloc 8
|
|
696
|
+
__iter_try_rfold_next_slot_%out_ok = stack_alloc 8
|
|
697
|
+
store __iter_try_rfold_acc_slot_%out_ok+0, %init_value as u64
|
|
698
|
+
store __iter_try_rfold_next_slot_%out_ok+0, %init_value as u64
|
|
699
|
+
jmp L_ITER_TRY_RFOLD_HEAD_%out_ok
|
|
700
|
+
L_ITER_TRY_RFOLD_HEAD_%out_ok:
|
|
701
|
+
EXPAND ITER_NEXT_BACK_U64 __iter_try_rfold_has_%out_ok, __iter_try_rfold_value_%out_ok, %iter_reg
|
|
702
|
+
br __iter_try_rfold_has_%out_ok -> L_ITER_TRY_RFOLD_BODY_%out_ok, L_ITER_TRY_RFOLD_DONE_%out_ok
|
|
703
|
+
L_ITER_TRY_RFOLD_BODY_%out_ok:
|
|
704
|
+
__iter_try_rfold_acc_%out_ok = load __iter_try_rfold_acc_slot_%out_ok+0 as u64
|
|
705
|
+
__iter_try_rfold_status_%out_ok = call %fold_fn(__iter_try_rfold_acc_%out_ok, __iter_try_rfold_value_%out_ok, &__iter_try_rfold_next_slot_%out_ok)
|
|
706
|
+
__iter_try_rfold_continue_%out_ok = ne __iter_try_rfold_status_%out_ok, 0
|
|
707
|
+
br __iter_try_rfold_continue_%out_ok -> L_ITER_TRY_RFOLD_NEXT_%out_ok, L_ITER_TRY_RFOLD_FAIL_%out_ok
|
|
708
|
+
L_ITER_TRY_RFOLD_NEXT_%out_ok:
|
|
709
|
+
__iter_try_rfold_next_%out_ok = load __iter_try_rfold_next_slot_%out_ok+0 as u64
|
|
710
|
+
store __iter_try_rfold_acc_slot_%out_ok+0, __iter_try_rfold_next_%out_ok as u64
|
|
711
|
+
!__iter_try_rfold_next_%out_ok
|
|
712
|
+
!__iter_try_rfold_continue_%out_ok
|
|
713
|
+
!__iter_try_rfold_status_%out_ok
|
|
714
|
+
!__iter_try_rfold_acc_%out_ok
|
|
715
|
+
!__iter_try_rfold_value_%out_ok
|
|
716
|
+
!__iter_try_rfold_has_%out_ok
|
|
717
|
+
jmp L_ITER_TRY_RFOLD_HEAD_%out_ok
|
|
718
|
+
L_ITER_TRY_RFOLD_FAIL_%out_ok:
|
|
719
|
+
%out_value = load __iter_try_rfold_acc_slot_%out_ok+0 as u64
|
|
720
|
+
%out_ok = add 0, 0
|
|
721
|
+
!__iter_try_rfold_continue_%out_ok
|
|
722
|
+
!__iter_try_rfold_status_%out_ok
|
|
723
|
+
!__iter_try_rfold_acc_%out_ok
|
|
724
|
+
!__iter_try_rfold_value_%out_ok
|
|
725
|
+
!__iter_try_rfold_has_%out_ok
|
|
726
|
+
jmp L_ITER_TRY_RFOLD_END_%out_ok
|
|
727
|
+
L_ITER_TRY_RFOLD_DONE_%out_ok:
|
|
728
|
+
%out_value = load __iter_try_rfold_acc_slot_%out_ok+0 as u64
|
|
729
|
+
%out_ok = add 0, 1
|
|
730
|
+
!__iter_try_rfold_value_%out_ok
|
|
731
|
+
!__iter_try_rfold_has_%out_ok
|
|
732
|
+
L_ITER_TRY_RFOLD_END_%out_ok:
|
|
733
|
+
[END_MACRO]
|
|
734
|
+
|
|
735
|
+
// Rust method-name alias over ITER_TRY_RFOLD_U64.
|
|
736
|
+
[MACRO] ITER_TRY_RFOLD %out_ok, %out_value, %iter_reg, %init_value, %fold_fn
|
|
737
|
+
EXPAND ITER_TRY_RFOLD_U64 %out_ok, %out_value, %iter_reg, %init_value, %fold_fn
|
|
738
|
+
[END_MACRO]
|
|
739
|
+
|
|
740
|
+
[MACRO] ITER_SUM_U64 %out_value, %iter_reg
|
|
741
|
+
__iter_sum_slot_%out_value = stack_alloc 8
|
|
742
|
+
store __iter_sum_slot_%out_value+0, 0 as u64
|
|
743
|
+
jmp L_ITER_SUM_HEAD_%out_value
|
|
744
|
+
L_ITER_SUM_HEAD_%out_value:
|
|
745
|
+
EXPAND ITER_NEXT_U64 __iter_sum_has_%out_value, __iter_sum_value_%out_value, %iter_reg
|
|
746
|
+
br __iter_sum_has_%out_value -> L_ITER_SUM_BODY_%out_value, L_ITER_SUM_DONE_%out_value
|
|
747
|
+
L_ITER_SUM_BODY_%out_value:
|
|
748
|
+
__iter_sum_acc_%out_value = load __iter_sum_slot_%out_value+0 as u64
|
|
749
|
+
__iter_sum_next_%out_value = add __iter_sum_acc_%out_value, __iter_sum_value_%out_value
|
|
750
|
+
store __iter_sum_slot_%out_value+0, __iter_sum_next_%out_value as u64
|
|
751
|
+
!__iter_sum_next_%out_value
|
|
752
|
+
!__iter_sum_acc_%out_value
|
|
753
|
+
!__iter_sum_value_%out_value
|
|
754
|
+
!__iter_sum_has_%out_value
|
|
755
|
+
jmp L_ITER_SUM_HEAD_%out_value
|
|
756
|
+
L_ITER_SUM_DONE_%out_value:
|
|
757
|
+
%out_value = load __iter_sum_slot_%out_value+0 as u64
|
|
758
|
+
!__iter_sum_value_%out_value
|
|
759
|
+
!__iter_sum_has_%out_value
|
|
760
|
+
[END_MACRO]
|
|
761
|
+
|
|
762
|
+
// Rust method-name alias over ITER_SUM_U64.
|
|
763
|
+
[MACRO] ITER_SUM %out_value, %iter_reg
|
|
764
|
+
EXPAND ITER_SUM_U64 %out_value, %iter_reg
|
|
765
|
+
[END_MACRO]
|
|
766
|
+
|
|
767
|
+
[MACRO] ITER_PRODUCT_U64 %out_value, %iter_reg
|
|
768
|
+
__iter_product_slot_%out_value = stack_alloc 8
|
|
769
|
+
store __iter_product_slot_%out_value+0, 1 as u64
|
|
770
|
+
jmp L_ITER_PRODUCT_HEAD_%out_value
|
|
771
|
+
L_ITER_PRODUCT_HEAD_%out_value:
|
|
772
|
+
EXPAND ITER_NEXT_U64 __iter_product_has_%out_value, __iter_product_value_%out_value, %iter_reg
|
|
773
|
+
br __iter_product_has_%out_value -> L_ITER_PRODUCT_BODY_%out_value, L_ITER_PRODUCT_DONE_%out_value
|
|
774
|
+
L_ITER_PRODUCT_BODY_%out_value:
|
|
775
|
+
__iter_product_acc_%out_value = load __iter_product_slot_%out_value+0 as u64
|
|
776
|
+
__iter_product_next_%out_value = mul __iter_product_acc_%out_value, __iter_product_value_%out_value
|
|
777
|
+
store __iter_product_slot_%out_value+0, __iter_product_next_%out_value as u64
|
|
778
|
+
!__iter_product_next_%out_value
|
|
779
|
+
!__iter_product_acc_%out_value
|
|
780
|
+
!__iter_product_value_%out_value
|
|
781
|
+
!__iter_product_has_%out_value
|
|
782
|
+
jmp L_ITER_PRODUCT_HEAD_%out_value
|
|
783
|
+
L_ITER_PRODUCT_DONE_%out_value:
|
|
784
|
+
%out_value = load __iter_product_slot_%out_value+0 as u64
|
|
785
|
+
!__iter_product_value_%out_value
|
|
786
|
+
!__iter_product_has_%out_value
|
|
787
|
+
[END_MACRO]
|
|
788
|
+
|
|
789
|
+
// Rust method-name alias over ITER_PRODUCT_U64.
|
|
790
|
+
[MACRO] ITER_PRODUCT %out_value, %iter_reg
|
|
791
|
+
EXPAND ITER_PRODUCT_U64 %out_value, %iter_reg
|
|
792
|
+
[END_MACRO]
|
|
793
|
+
|
|
794
|
+
[MACRO] ITER_MIN_U64 %out_has, %out_value, %iter_reg
|
|
795
|
+
EXPAND ITER_NEXT_U64 __iter_min_has_%out_has, __iter_min_value_%out_has, %iter_reg
|
|
796
|
+
br __iter_min_has_%out_has -> L_ITER_MIN_INIT_%out_has, L_ITER_MIN_NONE_%out_has
|
|
797
|
+
L_ITER_MIN_INIT_%out_has:
|
|
798
|
+
__iter_min_slot_%out_has = stack_alloc 8
|
|
799
|
+
store __iter_min_slot_%out_has+0, __iter_min_value_%out_has as u64
|
|
800
|
+
!__iter_min_value_%out_has
|
|
801
|
+
!__iter_min_has_%out_has
|
|
802
|
+
jmp L_ITER_MIN_HEAD_%out_has
|
|
803
|
+
L_ITER_MIN_HEAD_%out_has:
|
|
804
|
+
EXPAND ITER_NEXT_U64 __iter_min_next_has_%out_has, __iter_min_next_value_%out_has, %iter_reg
|
|
805
|
+
br __iter_min_next_has_%out_has -> L_ITER_MIN_BODY_%out_has, L_ITER_MIN_DONE_%out_has
|
|
806
|
+
L_ITER_MIN_BODY_%out_has:
|
|
807
|
+
__iter_min_current_%out_has = load __iter_min_slot_%out_has+0 as u64
|
|
808
|
+
__iter_min_less_%out_has = ult __iter_min_next_value_%out_has, __iter_min_current_%out_has
|
|
809
|
+
br __iter_min_less_%out_has -> L_ITER_MIN_STORE_%out_has, L_ITER_MIN_KEEP_%out_has
|
|
810
|
+
L_ITER_MIN_STORE_%out_has:
|
|
811
|
+
store __iter_min_slot_%out_has+0, __iter_min_next_value_%out_has as u64
|
|
812
|
+
jmp L_ITER_MIN_NEXT_%out_has
|
|
813
|
+
L_ITER_MIN_KEEP_%out_has:
|
|
814
|
+
jmp L_ITER_MIN_NEXT_%out_has
|
|
815
|
+
L_ITER_MIN_NEXT_%out_has:
|
|
816
|
+
!__iter_min_less_%out_has
|
|
817
|
+
!__iter_min_current_%out_has
|
|
818
|
+
!__iter_min_next_value_%out_has
|
|
819
|
+
!__iter_min_next_has_%out_has
|
|
820
|
+
jmp L_ITER_MIN_HEAD_%out_has
|
|
821
|
+
L_ITER_MIN_DONE_%out_has:
|
|
822
|
+
%out_value = load __iter_min_slot_%out_has+0 as u64
|
|
823
|
+
%out_has = add 0, 1
|
|
824
|
+
!__iter_min_next_value_%out_has
|
|
825
|
+
!__iter_min_next_has_%out_has
|
|
826
|
+
jmp L_ITER_MIN_END_%out_has
|
|
827
|
+
L_ITER_MIN_NONE_%out_has:
|
|
828
|
+
%out_value = add 0, 0
|
|
829
|
+
%out_has = add 0, 0
|
|
830
|
+
!__iter_min_value_%out_has
|
|
831
|
+
!__iter_min_has_%out_has
|
|
832
|
+
L_ITER_MIN_END_%out_has:
|
|
833
|
+
[END_MACRO]
|
|
834
|
+
|
|
835
|
+
// Rust method-name alias over ITER_MIN_U64.
|
|
836
|
+
[MACRO] ITER_MIN %out_has, %out_value, %iter_reg
|
|
837
|
+
EXPAND ITER_MIN_U64 %out_has, %out_value, %iter_reg
|
|
838
|
+
[END_MACRO]
|
|
839
|
+
|
|
840
|
+
[MACRO] ITER_MAX_U64 %out_has, %out_value, %iter_reg
|
|
841
|
+
EXPAND ITER_NEXT_U64 __iter_max_has_%out_has, __iter_max_value_%out_has, %iter_reg
|
|
842
|
+
br __iter_max_has_%out_has -> L_ITER_MAX_INIT_%out_has, L_ITER_MAX_NONE_%out_has
|
|
843
|
+
L_ITER_MAX_INIT_%out_has:
|
|
844
|
+
__iter_max_slot_%out_has = stack_alloc 8
|
|
845
|
+
store __iter_max_slot_%out_has+0, __iter_max_value_%out_has as u64
|
|
846
|
+
!__iter_max_value_%out_has
|
|
847
|
+
!__iter_max_has_%out_has
|
|
848
|
+
jmp L_ITER_MAX_HEAD_%out_has
|
|
849
|
+
L_ITER_MAX_HEAD_%out_has:
|
|
850
|
+
EXPAND ITER_NEXT_U64 __iter_max_next_has_%out_has, __iter_max_next_value_%out_has, %iter_reg
|
|
851
|
+
br __iter_max_next_has_%out_has -> L_ITER_MAX_BODY_%out_has, L_ITER_MAX_DONE_%out_has
|
|
852
|
+
L_ITER_MAX_BODY_%out_has:
|
|
853
|
+
__iter_max_current_%out_has = load __iter_max_slot_%out_has+0 as u64
|
|
854
|
+
__iter_max_greater_%out_has = ugt __iter_max_next_value_%out_has, __iter_max_current_%out_has
|
|
855
|
+
br __iter_max_greater_%out_has -> L_ITER_MAX_STORE_%out_has, L_ITER_MAX_KEEP_%out_has
|
|
856
|
+
L_ITER_MAX_STORE_%out_has:
|
|
857
|
+
store __iter_max_slot_%out_has+0, __iter_max_next_value_%out_has as u64
|
|
858
|
+
jmp L_ITER_MAX_NEXT_%out_has
|
|
859
|
+
L_ITER_MAX_KEEP_%out_has:
|
|
860
|
+
jmp L_ITER_MAX_NEXT_%out_has
|
|
861
|
+
L_ITER_MAX_NEXT_%out_has:
|
|
862
|
+
!__iter_max_greater_%out_has
|
|
863
|
+
!__iter_max_current_%out_has
|
|
864
|
+
!__iter_max_next_value_%out_has
|
|
865
|
+
!__iter_max_next_has_%out_has
|
|
866
|
+
jmp L_ITER_MAX_HEAD_%out_has
|
|
867
|
+
L_ITER_MAX_DONE_%out_has:
|
|
868
|
+
%out_value = load __iter_max_slot_%out_has+0 as u64
|
|
869
|
+
%out_has = add 0, 1
|
|
870
|
+
!__iter_max_next_value_%out_has
|
|
871
|
+
!__iter_max_next_has_%out_has
|
|
872
|
+
jmp L_ITER_MAX_END_%out_has
|
|
873
|
+
L_ITER_MAX_NONE_%out_has:
|
|
874
|
+
%out_value = add 0, 0
|
|
875
|
+
%out_has = add 0, 0
|
|
876
|
+
!__iter_max_value_%out_has
|
|
877
|
+
!__iter_max_has_%out_has
|
|
878
|
+
L_ITER_MAX_END_%out_has:
|
|
879
|
+
[END_MACRO]
|
|
880
|
+
|
|
881
|
+
// Rust method-name alias over ITER_MAX_U64.
|
|
882
|
+
[MACRO] ITER_MAX %out_has, %out_value, %iter_reg
|
|
883
|
+
EXPAND ITER_MAX_U64 %out_has, %out_value, %iter_reg
|
|
884
|
+
[END_MACRO]
|
|
885
|
+
|
|
886
|
+
[MACRO] ITER_SIZE_HINT %out_lower, %out_upper, %iter_reg
|
|
887
|
+
EXPAND ITER_LEN %out_lower, %iter_reg
|
|
888
|
+
%out_upper = add %out_lower, 0
|
|
889
|
+
[END_MACRO]
|
|
890
|
+
|
|
891
|
+
[MACRO] ITER_ADVANCE_BY %out_ok, %out_remaining, %iter_reg, %count
|
|
892
|
+
__iter_adv_len_%out_ok = load %iter_reg+Iter_len as u64
|
|
893
|
+
__iter_adv_index_%out_ok = load %iter_reg+Iter_index as u64
|
|
894
|
+
__iter_adv_remaining_%out_ok = sub __iter_adv_len_%out_ok, __iter_adv_index_%out_ok
|
|
895
|
+
__iter_adv_can_%out_ok = ule %count, __iter_adv_remaining_%out_ok
|
|
896
|
+
br __iter_adv_can_%out_ok -> L_ITER_ADVANCE_BY_OK_%out_ok, L_ITER_ADVANCE_BY_SHORT_%out_ok
|
|
897
|
+
L_ITER_ADVANCE_BY_OK_%out_ok:
|
|
898
|
+
__iter_adv_next_%out_ok = add __iter_adv_index_%out_ok, %count
|
|
899
|
+
store %iter_reg+Iter_index, __iter_adv_next_%out_ok as u64
|
|
900
|
+
%out_remaining = add 0, 0
|
|
901
|
+
%out_ok = add 0, 1
|
|
902
|
+
!__iter_adv_next_%out_ok
|
|
903
|
+
!__iter_adv_can_%out_ok
|
|
904
|
+
!__iter_adv_remaining_%out_ok
|
|
905
|
+
!__iter_adv_index_%out_ok
|
|
906
|
+
!__iter_adv_len_%out_ok
|
|
907
|
+
jmp L_ITER_ADVANCE_BY_END_%out_ok
|
|
908
|
+
L_ITER_ADVANCE_BY_SHORT_%out_ok:
|
|
909
|
+
%out_remaining = sub %count, __iter_adv_remaining_%out_ok
|
|
910
|
+
store %iter_reg+Iter_index, __iter_adv_len_%out_ok as u64
|
|
911
|
+
%out_ok = add 0, 0
|
|
912
|
+
!__iter_adv_can_%out_ok
|
|
913
|
+
!__iter_adv_remaining_%out_ok
|
|
914
|
+
!__iter_adv_index_%out_ok
|
|
915
|
+
!__iter_adv_len_%out_ok
|
|
916
|
+
L_ITER_ADVANCE_BY_END_%out_ok:
|
|
917
|
+
[END_MACRO]
|
|
918
|
+
|
|
919
|
+
[MACRO] ITER_ADVANCE_BACK_BY %out_ok, %out_remaining, %iter_reg, %count
|
|
920
|
+
__iter_adv_back_len_%out_ok = load %iter_reg+Iter_len as u64
|
|
921
|
+
__iter_adv_back_index_%out_ok = load %iter_reg+Iter_index as u64
|
|
922
|
+
__iter_adv_back_remaining_%out_ok = sub __iter_adv_back_len_%out_ok, __iter_adv_back_index_%out_ok
|
|
923
|
+
__iter_adv_back_can_%out_ok = ule %count, __iter_adv_back_remaining_%out_ok
|
|
924
|
+
br __iter_adv_back_can_%out_ok -> L_ITER_ADVANCE_BACK_BY_OK_%out_ok, L_ITER_ADVANCE_BACK_BY_SHORT_%out_ok
|
|
925
|
+
L_ITER_ADVANCE_BACK_BY_OK_%out_ok:
|
|
926
|
+
__iter_adv_back_next_len_%out_ok = sub __iter_adv_back_len_%out_ok, %count
|
|
927
|
+
store %iter_reg+Iter_len, __iter_adv_back_next_len_%out_ok as u64
|
|
928
|
+
%out_remaining = add 0, 0
|
|
929
|
+
%out_ok = add 0, 1
|
|
930
|
+
!__iter_adv_back_next_len_%out_ok
|
|
931
|
+
!__iter_adv_back_can_%out_ok
|
|
932
|
+
!__iter_adv_back_remaining_%out_ok
|
|
933
|
+
!__iter_adv_back_index_%out_ok
|
|
934
|
+
!__iter_adv_back_len_%out_ok
|
|
935
|
+
jmp L_ITER_ADVANCE_BACK_BY_END_%out_ok
|
|
936
|
+
L_ITER_ADVANCE_BACK_BY_SHORT_%out_ok:
|
|
937
|
+
%out_remaining = sub %count, __iter_adv_back_remaining_%out_ok
|
|
938
|
+
store %iter_reg+Iter_len, __iter_adv_back_index_%out_ok as u64
|
|
939
|
+
%out_ok = add 0, 0
|
|
940
|
+
!__iter_adv_back_can_%out_ok
|
|
941
|
+
!__iter_adv_back_remaining_%out_ok
|
|
942
|
+
!__iter_adv_back_index_%out_ok
|
|
943
|
+
!__iter_adv_back_len_%out_ok
|
|
944
|
+
L_ITER_ADVANCE_BACK_BY_END_%out_ok:
|
|
945
|
+
[END_MACRO]
|
|
946
|
+
|
|
947
|
+
[MACRO] ITER_NTH_BACK_U64 %out_has, %out_value, %iter_reg, %nth
|
|
948
|
+
__iter_nth_back_len_%out_has = load %iter_reg+Iter_len as u64
|
|
949
|
+
__iter_nth_back_index_%out_has = load %iter_reg+Iter_index as u64
|
|
950
|
+
__iter_nth_back_remaining_%out_has = sub __iter_nth_back_len_%out_has, __iter_nth_back_index_%out_has
|
|
951
|
+
__iter_nth_back_ok_%out_has = ult %nth, __iter_nth_back_remaining_%out_has
|
|
952
|
+
br __iter_nth_back_ok_%out_has -> L_ITER_NTH_BACK_SOME_%out_has, L_ITER_NTH_BACK_NONE_%out_has
|
|
953
|
+
L_ITER_NTH_BACK_SOME_%out_has:
|
|
954
|
+
__iter_nth_back_skip_%out_has = add %nth, 1
|
|
955
|
+
__iter_nth_back_target_%out_has = sub __iter_nth_back_len_%out_has, __iter_nth_back_skip_%out_has
|
|
956
|
+
__iter_nth_back_ptr_%out_has = load %iter_reg+Iter_ptr as ptr
|
|
957
|
+
__iter_nth_back_off_%out_has = mul __iter_nth_back_target_%out_has, 8
|
|
958
|
+
__iter_nth_back_item_%out_has = ptr_add __iter_nth_back_ptr_%out_has, __iter_nth_back_off_%out_has
|
|
959
|
+
%out_value = load __iter_nth_back_item_%out_has+0 as u64
|
|
960
|
+
store %iter_reg+Iter_len, __iter_nth_back_target_%out_has as u64
|
|
961
|
+
%out_has = add 0, 1
|
|
962
|
+
!__iter_nth_back_item_%out_has
|
|
963
|
+
!__iter_nth_back_off_%out_has
|
|
964
|
+
!__iter_nth_back_ptr_%out_has
|
|
965
|
+
!__iter_nth_back_target_%out_has
|
|
966
|
+
!__iter_nth_back_skip_%out_has
|
|
967
|
+
!__iter_nth_back_ok_%out_has
|
|
968
|
+
!__iter_nth_back_remaining_%out_has
|
|
969
|
+
!__iter_nth_back_index_%out_has
|
|
970
|
+
!__iter_nth_back_len_%out_has
|
|
971
|
+
jmp L_ITER_NTH_BACK_END_%out_has
|
|
972
|
+
L_ITER_NTH_BACK_NONE_%out_has:
|
|
973
|
+
%out_value = add 0, 0
|
|
974
|
+
%out_has = add 0, 0
|
|
975
|
+
store %iter_reg+Iter_len, __iter_nth_back_index_%out_has as u64
|
|
976
|
+
!__iter_nth_back_ok_%out_has
|
|
977
|
+
!__iter_nth_back_remaining_%out_has
|
|
978
|
+
!__iter_nth_back_index_%out_has
|
|
979
|
+
!__iter_nth_back_len_%out_has
|
|
980
|
+
L_ITER_NTH_BACK_END_%out_has:
|
|
981
|
+
[END_MACRO]
|
|
982
|
+
|
|
983
|
+
// Rust method-name alias over ITER_NTH_BACK_U64.
|
|
984
|
+
[MACRO] ITER_NTH_BACK %out_has, %out_value, %iter_reg, %nth
|
|
985
|
+
EXPAND ITER_NTH_BACK_U64 %out_has, %out_value, %iter_reg, %nth
|
|
986
|
+
[END_MACRO]
|
|
987
|
+
|
|
988
|
+
[MACRO] ITER_RFIND_U64 %out_has, %out_value, %iter_reg, %pred_fn
|
|
989
|
+
jmp L_ITER_RFIND_HEAD_%out_has
|
|
990
|
+
L_ITER_RFIND_HEAD_%out_has:
|
|
991
|
+
EXPAND ITER_NEXT_BACK_U64 __iter_rfind_has_%out_has, __iter_rfind_value_%out_has, %iter_reg
|
|
992
|
+
br __iter_rfind_has_%out_has -> L_ITER_RFIND_CHECK_%out_has, L_ITER_RFIND_NONE_%out_has
|
|
993
|
+
L_ITER_RFIND_CHECK_%out_has:
|
|
994
|
+
__iter_rfind_pred_%out_has = call %pred_fn(__iter_rfind_value_%out_has)
|
|
995
|
+
__iter_rfind_match_%out_has = ne __iter_rfind_pred_%out_has, 0
|
|
996
|
+
br __iter_rfind_match_%out_has -> L_ITER_RFIND_SOME_%out_has, L_ITER_RFIND_NEXT_%out_has
|
|
997
|
+
L_ITER_RFIND_NEXT_%out_has:
|
|
998
|
+
!__iter_rfind_match_%out_has
|
|
999
|
+
!__iter_rfind_pred_%out_has
|
|
1000
|
+
!__iter_rfind_value_%out_has
|
|
1001
|
+
!__iter_rfind_has_%out_has
|
|
1002
|
+
jmp L_ITER_RFIND_HEAD_%out_has
|
|
1003
|
+
L_ITER_RFIND_SOME_%out_has:
|
|
1004
|
+
%out_value = add __iter_rfind_value_%out_has, 0
|
|
1005
|
+
%out_has = add 0, 1
|
|
1006
|
+
!__iter_rfind_match_%out_has
|
|
1007
|
+
!__iter_rfind_pred_%out_has
|
|
1008
|
+
!__iter_rfind_value_%out_has
|
|
1009
|
+
!__iter_rfind_has_%out_has
|
|
1010
|
+
jmp L_ITER_RFIND_END_%out_has
|
|
1011
|
+
L_ITER_RFIND_NONE_%out_has:
|
|
1012
|
+
%out_value = add 0, 0
|
|
1013
|
+
%out_has = add 0, 0
|
|
1014
|
+
!__iter_rfind_value_%out_has
|
|
1015
|
+
!__iter_rfind_has_%out_has
|
|
1016
|
+
L_ITER_RFIND_END_%out_has:
|
|
1017
|
+
[END_MACRO]
|
|
1018
|
+
|
|
1019
|
+
// Rust method-name alias over ITER_RFIND_U64.
|
|
1020
|
+
[MACRO] ITER_RFIND %out_has, %out_value, %iter_reg, %pred_fn
|
|
1021
|
+
EXPAND ITER_RFIND_U64 %out_has, %out_value, %iter_reg, %pred_fn
|
|
1022
|
+
[END_MACRO]
|
|
1023
|
+
|
|
1024
|
+
[MACRO] ITER_REDUCE_U64 %out_has, %out_value, %iter_reg, %reduce_fn
|
|
1025
|
+
EXPAND ITER_NEXT_U64 __iter_reduce_has_%out_has, __iter_reduce_first_%out_has, %iter_reg
|
|
1026
|
+
br __iter_reduce_has_%out_has -> L_ITER_REDUCE_INIT_%out_has, L_ITER_REDUCE_NONE_%out_has
|
|
1027
|
+
L_ITER_REDUCE_INIT_%out_has:
|
|
1028
|
+
__iter_reduce_slot_%out_has = stack_alloc 8
|
|
1029
|
+
store __iter_reduce_slot_%out_has+0, __iter_reduce_first_%out_has as u64
|
|
1030
|
+
!__iter_reduce_first_%out_has
|
|
1031
|
+
!__iter_reduce_has_%out_has
|
|
1032
|
+
jmp L_ITER_REDUCE_HEAD_%out_has
|
|
1033
|
+
L_ITER_REDUCE_HEAD_%out_has:
|
|
1034
|
+
EXPAND ITER_NEXT_U64 __iter_reduce_next_has_%out_has, __iter_reduce_next_value_%out_has, %iter_reg
|
|
1035
|
+
br __iter_reduce_next_has_%out_has -> L_ITER_REDUCE_BODY_%out_has, L_ITER_REDUCE_DONE_%out_has
|
|
1036
|
+
L_ITER_REDUCE_BODY_%out_has:
|
|
1037
|
+
__iter_reduce_acc_%out_has = load __iter_reduce_slot_%out_has+0 as u64
|
|
1038
|
+
__iter_reduce_next_acc_%out_has = call %reduce_fn(__iter_reduce_acc_%out_has, __iter_reduce_next_value_%out_has)
|
|
1039
|
+
store __iter_reduce_slot_%out_has+0, __iter_reduce_next_acc_%out_has as u64
|
|
1040
|
+
!__iter_reduce_next_acc_%out_has
|
|
1041
|
+
!__iter_reduce_acc_%out_has
|
|
1042
|
+
!__iter_reduce_next_value_%out_has
|
|
1043
|
+
!__iter_reduce_next_has_%out_has
|
|
1044
|
+
jmp L_ITER_REDUCE_HEAD_%out_has
|
|
1045
|
+
L_ITER_REDUCE_DONE_%out_has:
|
|
1046
|
+
%out_value = load __iter_reduce_slot_%out_has+0 as u64
|
|
1047
|
+
%out_has = add 0, 1
|
|
1048
|
+
!__iter_reduce_next_value_%out_has
|
|
1049
|
+
!__iter_reduce_next_has_%out_has
|
|
1050
|
+
jmp L_ITER_REDUCE_END_%out_has
|
|
1051
|
+
L_ITER_REDUCE_NONE_%out_has:
|
|
1052
|
+
%out_value = add 0, 0
|
|
1053
|
+
%out_has = add 0, 0
|
|
1054
|
+
!__iter_reduce_first_%out_has
|
|
1055
|
+
!__iter_reduce_has_%out_has
|
|
1056
|
+
L_ITER_REDUCE_END_%out_has:
|
|
1057
|
+
[END_MACRO]
|
|
1058
|
+
|
|
1059
|
+
// Rust method-name alias over ITER_REDUCE_U64.
|
|
1060
|
+
[MACRO] ITER_REDUCE %out_has, %out_value, %iter_reg, %reduce_fn
|
|
1061
|
+
EXPAND ITER_REDUCE_U64 %out_has, %out_value, %iter_reg, %reduce_fn
|
|
1062
|
+
[END_MACRO]
|
|
1063
|
+
|
|
1064
|
+
[MACRO] ITER_TRY_REDUCE_U64 %out_ok, %out_has, %out_value, %iter_reg, %reduce_fn
|
|
1065
|
+
EXPAND ITER_NEXT_U64 __iter_try_reduce_has_%out_ok, __iter_try_reduce_first_%out_ok, %iter_reg
|
|
1066
|
+
br __iter_try_reduce_has_%out_ok -> L_ITER_TRY_REDUCE_INIT_%out_ok, L_ITER_TRY_REDUCE_NONE_%out_ok
|
|
1067
|
+
L_ITER_TRY_REDUCE_INIT_%out_ok:
|
|
1068
|
+
__iter_try_reduce_acc_slot_%out_ok = stack_alloc 8
|
|
1069
|
+
__iter_try_reduce_next_slot_%out_ok = stack_alloc 8
|
|
1070
|
+
store __iter_try_reduce_acc_slot_%out_ok+0, __iter_try_reduce_first_%out_ok as u64
|
|
1071
|
+
store __iter_try_reduce_next_slot_%out_ok+0, __iter_try_reduce_first_%out_ok as u64
|
|
1072
|
+
!__iter_try_reduce_first_%out_ok
|
|
1073
|
+
!__iter_try_reduce_has_%out_ok
|
|
1074
|
+
jmp L_ITER_TRY_REDUCE_HEAD_%out_ok
|
|
1075
|
+
L_ITER_TRY_REDUCE_HEAD_%out_ok:
|
|
1076
|
+
EXPAND ITER_NEXT_U64 __iter_try_reduce_next_has_%out_ok, __iter_try_reduce_next_value_%out_ok, %iter_reg
|
|
1077
|
+
br __iter_try_reduce_next_has_%out_ok -> L_ITER_TRY_REDUCE_BODY_%out_ok, L_ITER_TRY_REDUCE_DONE_%out_ok
|
|
1078
|
+
L_ITER_TRY_REDUCE_BODY_%out_ok:
|
|
1079
|
+
__iter_try_reduce_acc_%out_ok = load __iter_try_reduce_acc_slot_%out_ok+0 as u64
|
|
1080
|
+
__iter_try_reduce_status_%out_ok = call %reduce_fn(__iter_try_reduce_acc_%out_ok, __iter_try_reduce_next_value_%out_ok, &__iter_try_reduce_next_slot_%out_ok)
|
|
1081
|
+
__iter_try_reduce_continue_%out_ok = ne __iter_try_reduce_status_%out_ok, 0
|
|
1082
|
+
br __iter_try_reduce_continue_%out_ok -> L_ITER_TRY_REDUCE_NEXT_%out_ok, L_ITER_TRY_REDUCE_FAIL_%out_ok
|
|
1083
|
+
L_ITER_TRY_REDUCE_NEXT_%out_ok:
|
|
1084
|
+
__iter_try_reduce_next_acc_%out_ok = load __iter_try_reduce_next_slot_%out_ok+0 as u64
|
|
1085
|
+
store __iter_try_reduce_acc_slot_%out_ok+0, __iter_try_reduce_next_acc_%out_ok as u64
|
|
1086
|
+
!__iter_try_reduce_next_acc_%out_ok
|
|
1087
|
+
!__iter_try_reduce_continue_%out_ok
|
|
1088
|
+
!__iter_try_reduce_status_%out_ok
|
|
1089
|
+
!__iter_try_reduce_acc_%out_ok
|
|
1090
|
+
!__iter_try_reduce_next_value_%out_ok
|
|
1091
|
+
!__iter_try_reduce_next_has_%out_ok
|
|
1092
|
+
jmp L_ITER_TRY_REDUCE_HEAD_%out_ok
|
|
1093
|
+
L_ITER_TRY_REDUCE_FAIL_%out_ok:
|
|
1094
|
+
%out_value = load __iter_try_reduce_acc_slot_%out_ok+0 as u64
|
|
1095
|
+
%out_has = add 0, 0
|
|
1096
|
+
%out_ok = add 0, 0
|
|
1097
|
+
!__iter_try_reduce_continue_%out_ok
|
|
1098
|
+
!__iter_try_reduce_status_%out_ok
|
|
1099
|
+
!__iter_try_reduce_acc_%out_ok
|
|
1100
|
+
!__iter_try_reduce_next_value_%out_ok
|
|
1101
|
+
!__iter_try_reduce_next_has_%out_ok
|
|
1102
|
+
jmp L_ITER_TRY_REDUCE_END_%out_ok
|
|
1103
|
+
L_ITER_TRY_REDUCE_DONE_%out_ok:
|
|
1104
|
+
%out_value = load __iter_try_reduce_acc_slot_%out_ok+0 as u64
|
|
1105
|
+
%out_has = add 0, 1
|
|
1106
|
+
%out_ok = add 0, 1
|
|
1107
|
+
!__iter_try_reduce_next_value_%out_ok
|
|
1108
|
+
!__iter_try_reduce_next_has_%out_ok
|
|
1109
|
+
jmp L_ITER_TRY_REDUCE_END_%out_ok
|
|
1110
|
+
L_ITER_TRY_REDUCE_NONE_%out_ok:
|
|
1111
|
+
%out_value = add 0, 0
|
|
1112
|
+
%out_has = add 0, 0
|
|
1113
|
+
%out_ok = add 0, 1
|
|
1114
|
+
!__iter_try_reduce_first_%out_ok
|
|
1115
|
+
!__iter_try_reduce_has_%out_ok
|
|
1116
|
+
L_ITER_TRY_REDUCE_END_%out_ok:
|
|
1117
|
+
[END_MACRO]
|
|
1118
|
+
|
|
1119
|
+
// Rust method-name alias over ITER_TRY_REDUCE_U64.
|
|
1120
|
+
[MACRO] ITER_TRY_REDUCE %out_ok, %out_has, %out_value, %iter_reg, %reduce_fn
|
|
1121
|
+
EXPAND ITER_TRY_REDUCE_U64 %out_ok, %out_has, %out_value, %iter_reg, %reduce_fn
|
|
1122
|
+
[END_MACRO]
|
|
1123
|
+
|
|
1124
|
+
[MACRO] ITER_FOR_EACH_U64 %iter_reg, %each_fn
|
|
1125
|
+
jmp L_ITER_FOR_EACH_HEAD_%iter_reg
|
|
1126
|
+
L_ITER_FOR_EACH_HEAD_%iter_reg:
|
|
1127
|
+
EXPAND ITER_NEXT_U64 __iter_each_has_%iter_reg, __iter_each_value_%iter_reg, %iter_reg
|
|
1128
|
+
br __iter_each_has_%iter_reg -> L_ITER_FOR_EACH_BODY_%iter_reg, L_ITER_FOR_EACH_DONE_%iter_reg
|
|
1129
|
+
L_ITER_FOR_EACH_BODY_%iter_reg:
|
|
1130
|
+
__iter_each_result_%iter_reg = call %each_fn(__iter_each_value_%iter_reg)
|
|
1131
|
+
!__iter_each_result_%iter_reg
|
|
1132
|
+
!__iter_each_value_%iter_reg
|
|
1133
|
+
!__iter_each_has_%iter_reg
|
|
1134
|
+
jmp L_ITER_FOR_EACH_HEAD_%iter_reg
|
|
1135
|
+
L_ITER_FOR_EACH_DONE_%iter_reg:
|
|
1136
|
+
!__iter_each_value_%iter_reg
|
|
1137
|
+
!__iter_each_has_%iter_reg
|
|
1138
|
+
[END_MACRO]
|
|
1139
|
+
|
|
1140
|
+
// Rust method-name alias over ITER_FOR_EACH_U64.
|
|
1141
|
+
[MACRO] ITER_FOR_EACH %iter_reg, %each_fn
|
|
1142
|
+
EXPAND ITER_FOR_EACH_U64 %iter_reg, %each_fn
|
|
1143
|
+
[END_MACRO]
|
|
1144
|
+
|
|
1145
|
+
[MACRO] ITER_TRY_FOR_EACH_U64 %out_ok, %iter_reg, %each_fn
|
|
1146
|
+
jmp L_ITER_TRY_FOR_EACH_HEAD_%out_ok
|
|
1147
|
+
L_ITER_TRY_FOR_EACH_HEAD_%out_ok:
|
|
1148
|
+
EXPAND ITER_NEXT_U64 __iter_try_each_has_%out_ok, __iter_try_each_value_%out_ok, %iter_reg
|
|
1149
|
+
br __iter_try_each_has_%out_ok -> L_ITER_TRY_FOR_EACH_BODY_%out_ok, L_ITER_TRY_FOR_EACH_DONE_%out_ok
|
|
1150
|
+
L_ITER_TRY_FOR_EACH_BODY_%out_ok:
|
|
1151
|
+
__iter_try_each_status_%out_ok = call %each_fn(__iter_try_each_value_%out_ok)
|
|
1152
|
+
__iter_try_each_continue_%out_ok = ne __iter_try_each_status_%out_ok, 0
|
|
1153
|
+
br __iter_try_each_continue_%out_ok -> L_ITER_TRY_FOR_EACH_NEXT_%out_ok, L_ITER_TRY_FOR_EACH_FAIL_%out_ok
|
|
1154
|
+
L_ITER_TRY_FOR_EACH_NEXT_%out_ok:
|
|
1155
|
+
!__iter_try_each_continue_%out_ok
|
|
1156
|
+
!__iter_try_each_status_%out_ok
|
|
1157
|
+
!__iter_try_each_value_%out_ok
|
|
1158
|
+
!__iter_try_each_has_%out_ok
|
|
1159
|
+
jmp L_ITER_TRY_FOR_EACH_HEAD_%out_ok
|
|
1160
|
+
L_ITER_TRY_FOR_EACH_FAIL_%out_ok:
|
|
1161
|
+
%out_ok = add 0, 0
|
|
1162
|
+
!__iter_try_each_continue_%out_ok
|
|
1163
|
+
!__iter_try_each_status_%out_ok
|
|
1164
|
+
!__iter_try_each_value_%out_ok
|
|
1165
|
+
!__iter_try_each_has_%out_ok
|
|
1166
|
+
jmp L_ITER_TRY_FOR_EACH_END_%out_ok
|
|
1167
|
+
L_ITER_TRY_FOR_EACH_DONE_%out_ok:
|
|
1168
|
+
%out_ok = add 0, 1
|
|
1169
|
+
!__iter_try_each_value_%out_ok
|
|
1170
|
+
!__iter_try_each_has_%out_ok
|
|
1171
|
+
L_ITER_TRY_FOR_EACH_END_%out_ok:
|
|
1172
|
+
[END_MACRO]
|
|
1173
|
+
|
|
1174
|
+
// Rust method-name alias over ITER_TRY_FOR_EACH_U64.
|
|
1175
|
+
[MACRO] ITER_TRY_FOR_EACH %out_ok, %iter_reg, %each_fn
|
|
1176
|
+
EXPAND ITER_TRY_FOR_EACH_U64 %out_ok, %iter_reg, %each_fn
|
|
1177
|
+
[END_MACRO]
|
|
1178
|
+
|
|
1179
|
+
[MACRO] ITER_COLLECT_U64 %out_vec, %iter_reg
|
|
1180
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1181
|
+
jmp L_ITER_COLLECT_HEAD_%out_vec
|
|
1182
|
+
L_ITER_COLLECT_HEAD_%out_vec:
|
|
1183
|
+
EXPAND ITER_NEXT_U64 __iter_collect_has_%out_vec, __iter_collect_value_%out_vec, %iter_reg
|
|
1184
|
+
br __iter_collect_has_%out_vec -> L_ITER_COLLECT_PUSH_%out_vec, L_ITER_COLLECT_DONE_%out_vec
|
|
1185
|
+
L_ITER_COLLECT_PUSH_%out_vec:
|
|
1186
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_collect_value_%out_vec
|
|
1187
|
+
!__iter_collect_value_%out_vec
|
|
1188
|
+
!__iter_collect_has_%out_vec
|
|
1189
|
+
jmp L_ITER_COLLECT_HEAD_%out_vec
|
|
1190
|
+
L_ITER_COLLECT_DONE_%out_vec:
|
|
1191
|
+
!__iter_collect_value_%out_vec
|
|
1192
|
+
!__iter_collect_has_%out_vec
|
|
1193
|
+
[END_MACRO]
|
|
1194
|
+
|
|
1195
|
+
// Rust method-name alias over ITER_COLLECT_U64.
|
|
1196
|
+
[MACRO] ITER_COLLECT %out_vec, %iter_reg
|
|
1197
|
+
EXPAND ITER_COLLECT_U64 %out_vec, %iter_reg
|
|
1198
|
+
[END_MACRO]
|
|
1199
|
+
|
|
1200
|
+
[MACRO] ITER_COPIED_COLLECT_U64 %out_vec, %iter_reg
|
|
1201
|
+
EXPAND ITER_COLLECT_U64 %out_vec, %iter_reg
|
|
1202
|
+
[END_MACRO]
|
|
1203
|
+
|
|
1204
|
+
// Rust method-name alias over ITER_COPIED_COLLECT_U64.
|
|
1205
|
+
[MACRO] ITER_COPIED_COLLECT %out_vec, %iter_reg
|
|
1206
|
+
EXPAND ITER_COPIED_COLLECT_U64 %out_vec, %iter_reg
|
|
1207
|
+
[END_MACRO]
|
|
1208
|
+
|
|
1209
|
+
[MACRO] ITER_CLONED_COLLECT_U64 %out_vec, %iter_reg
|
|
1210
|
+
EXPAND ITER_COLLECT_U64 %out_vec, %iter_reg
|
|
1211
|
+
[END_MACRO]
|
|
1212
|
+
|
|
1213
|
+
// Rust method-name alias over ITER_CLONED_COLLECT_U64.
|
|
1214
|
+
[MACRO] ITER_CLONED_COLLECT %out_vec, %iter_reg
|
|
1215
|
+
EXPAND ITER_CLONED_COLLECT_U64 %out_vec, %iter_reg
|
|
1216
|
+
[END_MACRO]
|
|
1217
|
+
|
|
1218
|
+
[MACRO] ITER_BY_REF_COLLECT_U64 %out_vec, %iter_reg
|
|
1219
|
+
EXPAND ITER_BY_REF __iter_by_ref_collect_iter_%out_vec, %iter_reg
|
|
1220
|
+
EXPAND ITER_COLLECT_U64 %out_vec, __iter_by_ref_collect_iter_%out_vec
|
|
1221
|
+
!__iter_by_ref_collect_iter_%out_vec
|
|
1222
|
+
[END_MACRO]
|
|
1223
|
+
|
|
1224
|
+
// Rust method-name alias over ITER_BY_REF_COLLECT_U64.
|
|
1225
|
+
[MACRO] ITER_BY_REF_COLLECT %out_vec, %iter_reg
|
|
1226
|
+
EXPAND ITER_BY_REF_COLLECT_U64 %out_vec, %iter_reg
|
|
1227
|
+
[END_MACRO]
|
|
1228
|
+
|
|
1229
|
+
[MACRO] ITER_FUSE_COLLECT_U64 %out_vec, %iter_reg
|
|
1230
|
+
EXPAND ITER_COLLECT_U64 %out_vec, %iter_reg
|
|
1231
|
+
[END_MACRO]
|
|
1232
|
+
|
|
1233
|
+
// Rust method-name alias over ITER_FUSE_COLLECT_U64.
|
|
1234
|
+
[MACRO] ITER_FUSE_COLLECT %out_vec, %iter_reg
|
|
1235
|
+
EXPAND ITER_FUSE_COLLECT_U64 %out_vec, %iter_reg
|
|
1236
|
+
[END_MACRO]
|
|
1237
|
+
|
|
1238
|
+
[MACRO] ITER_PEEKABLE_COLLECT_U64 %out_vec, %iter_reg
|
|
1239
|
+
EXPAND ITER_COLLECT_U64 %out_vec, %iter_reg
|
|
1240
|
+
[END_MACRO]
|
|
1241
|
+
|
|
1242
|
+
// Rust method-name alias over ITER_PEEKABLE_COLLECT_U64.
|
|
1243
|
+
[MACRO] ITER_PEEKABLE_COLLECT %out_vec, %iter_reg
|
|
1244
|
+
EXPAND ITER_PEEKABLE_COLLECT_U64 %out_vec, %iter_reg
|
|
1245
|
+
[END_MACRO]
|
|
1246
|
+
|
|
1247
|
+
[MACRO] ITER_TRY_COLLECT_U64 %out_ok, %out_vec, %iter_reg, %try_fn
|
|
1248
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1249
|
+
__iter_try_collect_slot_%out_ok = stack_alloc 8
|
|
1250
|
+
jmp L_ITER_TRY_COLLECT_HEAD_%out_ok
|
|
1251
|
+
L_ITER_TRY_COLLECT_HEAD_%out_ok:
|
|
1252
|
+
EXPAND ITER_NEXT_U64 __iter_try_collect_has_%out_ok, __iter_try_collect_value_%out_ok, %iter_reg
|
|
1253
|
+
br __iter_try_collect_has_%out_ok -> L_ITER_TRY_COLLECT_CHECK_%out_ok, L_ITER_TRY_COLLECT_DONE_%out_ok
|
|
1254
|
+
L_ITER_TRY_COLLECT_CHECK_%out_ok:
|
|
1255
|
+
__iter_try_collect_status_%out_ok = call %try_fn(__iter_try_collect_value_%out_ok, &__iter_try_collect_slot_%out_ok)
|
|
1256
|
+
__iter_try_collect_continue_%out_ok = ne __iter_try_collect_status_%out_ok, 0
|
|
1257
|
+
br __iter_try_collect_continue_%out_ok -> L_ITER_TRY_COLLECT_PUSH_%out_ok, L_ITER_TRY_COLLECT_FAIL_%out_ok
|
|
1258
|
+
L_ITER_TRY_COLLECT_PUSH_%out_ok:
|
|
1259
|
+
__iter_try_collect_mapped_%out_ok = load __iter_try_collect_slot_%out_ok+0 as u64
|
|
1260
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_try_collect_mapped_%out_ok
|
|
1261
|
+
!__iter_try_collect_mapped_%out_ok
|
|
1262
|
+
!__iter_try_collect_continue_%out_ok
|
|
1263
|
+
!__iter_try_collect_status_%out_ok
|
|
1264
|
+
!__iter_try_collect_value_%out_ok
|
|
1265
|
+
!__iter_try_collect_has_%out_ok
|
|
1266
|
+
jmp L_ITER_TRY_COLLECT_HEAD_%out_ok
|
|
1267
|
+
L_ITER_TRY_COLLECT_FAIL_%out_ok:
|
|
1268
|
+
%out_ok = add 0, 0
|
|
1269
|
+
!__iter_try_collect_continue_%out_ok
|
|
1270
|
+
!__iter_try_collect_status_%out_ok
|
|
1271
|
+
!__iter_try_collect_value_%out_ok
|
|
1272
|
+
!__iter_try_collect_has_%out_ok
|
|
1273
|
+
jmp L_ITER_TRY_COLLECT_END_%out_ok
|
|
1274
|
+
L_ITER_TRY_COLLECT_DONE_%out_ok:
|
|
1275
|
+
%out_ok = add 0, 1
|
|
1276
|
+
!__iter_try_collect_value_%out_ok
|
|
1277
|
+
!__iter_try_collect_has_%out_ok
|
|
1278
|
+
L_ITER_TRY_COLLECT_END_%out_ok:
|
|
1279
|
+
[END_MACRO]
|
|
1280
|
+
|
|
1281
|
+
// Rust method-name alias over ITER_TRY_COLLECT_U64.
|
|
1282
|
+
[MACRO] ITER_TRY_COLLECT %out_ok, %out_vec, %iter_reg, %try_fn
|
|
1283
|
+
EXPAND ITER_TRY_COLLECT_U64 %out_ok, %out_vec, %iter_reg, %try_fn
|
|
1284
|
+
[END_MACRO]
|
|
1285
|
+
|
|
1286
|
+
[MACRO] ITER_ARRAY_CHUNKS_COLLECT_U64 %out_ok, %out_vec, %iter_reg, %chunk_size
|
|
1287
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1288
|
+
__iter_array_chunks_zero_%out_ok = eq %chunk_size, 0
|
|
1289
|
+
br __iter_array_chunks_zero_%out_ok -> L_ITER_ARRAY_CHUNKS_INVALID_%out_ok, L_ITER_ARRAY_CHUNKS_INIT_%out_ok
|
|
1290
|
+
L_ITER_ARRAY_CHUNKS_INIT_%out_ok:
|
|
1291
|
+
__iter_array_chunks_ptr_%out_ok = load %iter_reg+Iter_ptr as ptr
|
|
1292
|
+
__iter_array_chunks_len_%out_ok = load %iter_reg+Iter_len as u64
|
|
1293
|
+
__iter_array_chunks_start_%out_ok = load %iter_reg+Iter_index as u64
|
|
1294
|
+
__iter_array_chunks_remaining_%out_ok = sub __iter_array_chunks_len_%out_ok, __iter_array_chunks_start_%out_ok
|
|
1295
|
+
__iter_array_chunks_remainder_%out_ok = urem __iter_array_chunks_remaining_%out_ok, %chunk_size
|
|
1296
|
+
__iter_array_chunks_full_%out_ok = sub __iter_array_chunks_remaining_%out_ok, __iter_array_chunks_remainder_%out_ok
|
|
1297
|
+
__iter_array_chunks_end_%out_ok = add __iter_array_chunks_start_%out_ok, __iter_array_chunks_full_%out_ok
|
|
1298
|
+
__iter_array_chunks_index_%out_ok = add __iter_array_chunks_start_%out_ok, 0
|
|
1299
|
+
%out_ok = add 0, 1
|
|
1300
|
+
__iter_array_chunks_empty_%out_ok = eq __iter_array_chunks_full_%out_ok, 0
|
|
1301
|
+
br __iter_array_chunks_empty_%out_ok -> L_ITER_ARRAY_CHUNKS_DONE_%out_ok, L_ITER_ARRAY_CHUNKS_HEAD_%out_ok
|
|
1302
|
+
L_ITER_ARRAY_CHUNKS_HEAD_%out_ok:
|
|
1303
|
+
__iter_array_chunks_more_%out_ok = ult __iter_array_chunks_index_%out_ok, __iter_array_chunks_end_%out_ok
|
|
1304
|
+
br __iter_array_chunks_more_%out_ok -> L_ITER_ARRAY_CHUNKS_PUSH_%out_ok, L_ITER_ARRAY_CHUNKS_DONE_MORE_%out_ok
|
|
1305
|
+
L_ITER_ARRAY_CHUNKS_PUSH_%out_ok:
|
|
1306
|
+
__iter_array_chunks_off_%out_ok = mul __iter_array_chunks_index_%out_ok, 8
|
|
1307
|
+
__iter_array_chunks_item_%out_ok = ptr_add __iter_array_chunks_ptr_%out_ok, __iter_array_chunks_off_%out_ok
|
|
1308
|
+
__iter_array_chunks_value_%out_ok = load __iter_array_chunks_item_%out_ok+0 as u64
|
|
1309
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_array_chunks_value_%out_ok
|
|
1310
|
+
__iter_array_chunks_next_%out_ok = add __iter_array_chunks_index_%out_ok, 1
|
|
1311
|
+
!__iter_array_chunks_index_%out_ok
|
|
1312
|
+
__iter_array_chunks_index_%out_ok = add __iter_array_chunks_next_%out_ok, 0
|
|
1313
|
+
!__iter_array_chunks_next_%out_ok
|
|
1314
|
+
!__iter_array_chunks_value_%out_ok
|
|
1315
|
+
!__iter_array_chunks_item_%out_ok
|
|
1316
|
+
!__iter_array_chunks_off_%out_ok
|
|
1317
|
+
!__iter_array_chunks_more_%out_ok
|
|
1318
|
+
jmp L_ITER_ARRAY_CHUNKS_HEAD_%out_ok
|
|
1319
|
+
L_ITER_ARRAY_CHUNKS_DONE_MORE_%out_ok:
|
|
1320
|
+
!__iter_array_chunks_more_%out_ok
|
|
1321
|
+
jmp L_ITER_ARRAY_CHUNKS_DONE_%out_ok
|
|
1322
|
+
L_ITER_ARRAY_CHUNKS_DONE_%out_ok:
|
|
1323
|
+
store %iter_reg+Iter_index, __iter_array_chunks_end_%out_ok as u64
|
|
1324
|
+
!__iter_array_chunks_empty_%out_ok
|
|
1325
|
+
!__iter_array_chunks_index_%out_ok
|
|
1326
|
+
!__iter_array_chunks_end_%out_ok
|
|
1327
|
+
!__iter_array_chunks_full_%out_ok
|
|
1328
|
+
!__iter_array_chunks_remainder_%out_ok
|
|
1329
|
+
!__iter_array_chunks_remaining_%out_ok
|
|
1330
|
+
!__iter_array_chunks_start_%out_ok
|
|
1331
|
+
!__iter_array_chunks_len_%out_ok
|
|
1332
|
+
!__iter_array_chunks_ptr_%out_ok
|
|
1333
|
+
!__iter_array_chunks_zero_%out_ok
|
|
1334
|
+
jmp L_ITER_ARRAY_CHUNKS_END_%out_ok
|
|
1335
|
+
L_ITER_ARRAY_CHUNKS_INVALID_%out_ok:
|
|
1336
|
+
%out_ok = add 0, 0
|
|
1337
|
+
!__iter_array_chunks_zero_%out_ok
|
|
1338
|
+
L_ITER_ARRAY_CHUNKS_END_%out_ok:
|
|
1339
|
+
[END_MACRO]
|
|
1340
|
+
|
|
1341
|
+
// Rust method-name alias over ITER_ARRAY_CHUNKS_COLLECT_U64.
|
|
1342
|
+
[MACRO] ITER_ARRAY_CHUNKS_COLLECT %out_ok, %out_vec, %iter_reg, %chunk_size
|
|
1343
|
+
EXPAND ITER_ARRAY_CHUNKS_COLLECT_U64 %out_ok, %out_vec, %iter_reg, %chunk_size
|
|
1344
|
+
[END_MACRO]
|
|
1345
|
+
|
|
1346
|
+
[MACRO] ITER_MAP_WINDOWS_COLLECT_U64 %out_ok, %out_vec, %iter_reg, %window_size, %map_fn
|
|
1347
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1348
|
+
__iter_map_windows_zero_%out_ok = eq %window_size, 0
|
|
1349
|
+
br __iter_map_windows_zero_%out_ok -> L_ITER_MAP_WINDOWS_INVALID_%out_ok, L_ITER_MAP_WINDOWS_INIT_%out_ok
|
|
1350
|
+
L_ITER_MAP_WINDOWS_INIT_%out_ok:
|
|
1351
|
+
__iter_map_windows_ptr_%out_ok = load %iter_reg+Iter_ptr as ptr
|
|
1352
|
+
__iter_map_windows_len_%out_ok = load %iter_reg+Iter_len as u64
|
|
1353
|
+
__iter_map_windows_start_%out_ok = load %iter_reg+Iter_index as u64
|
|
1354
|
+
__iter_map_windows_remaining_%out_ok = sub __iter_map_windows_len_%out_ok, __iter_map_windows_start_%out_ok
|
|
1355
|
+
__iter_map_windows_short_%out_ok = ult __iter_map_windows_remaining_%out_ok, %window_size
|
|
1356
|
+
%out_ok = add 0, 1
|
|
1357
|
+
br __iter_map_windows_short_%out_ok -> L_ITER_MAP_WINDOWS_CONSUME_EMPTY_%out_ok, L_ITER_MAP_WINDOWS_RUN_%out_ok
|
|
1358
|
+
L_ITER_MAP_WINDOWS_RUN_%out_ok:
|
|
1359
|
+
__iter_map_windows_span_%out_ok = sub __iter_map_windows_remaining_%out_ok, %window_size
|
|
1360
|
+
__iter_map_windows_count_%out_ok = add __iter_map_windows_span_%out_ok, 1
|
|
1361
|
+
__iter_map_windows_done_count_%out_ok = add 0, 0
|
|
1362
|
+
jmp L_ITER_MAP_WINDOWS_HEAD_%out_ok
|
|
1363
|
+
L_ITER_MAP_WINDOWS_HEAD_%out_ok:
|
|
1364
|
+
__iter_map_windows_more_%out_ok = ult __iter_map_windows_done_count_%out_ok, __iter_map_windows_count_%out_ok
|
|
1365
|
+
br __iter_map_windows_more_%out_ok -> L_ITER_MAP_WINDOWS_PUSH_%out_ok, L_ITER_MAP_WINDOWS_DONE_MORE_%out_ok
|
|
1366
|
+
L_ITER_MAP_WINDOWS_PUSH_%out_ok:
|
|
1367
|
+
__iter_map_windows_abs_index_%out_ok = add __iter_map_windows_start_%out_ok, __iter_map_windows_done_count_%out_ok
|
|
1368
|
+
__iter_map_windows_off_%out_ok = mul __iter_map_windows_abs_index_%out_ok, 8
|
|
1369
|
+
__iter_map_windows_item_%out_ok = ptr_add __iter_map_windows_ptr_%out_ok, __iter_map_windows_off_%out_ok
|
|
1370
|
+
__iter_map_windows_mapped_%out_ok = call %map_fn(__iter_map_windows_item_%out_ok, %window_size)
|
|
1371
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_map_windows_mapped_%out_ok
|
|
1372
|
+
__iter_map_windows_next_count_%out_ok = add __iter_map_windows_done_count_%out_ok, 1
|
|
1373
|
+
!__iter_map_windows_done_count_%out_ok
|
|
1374
|
+
__iter_map_windows_done_count_%out_ok = add __iter_map_windows_next_count_%out_ok, 0
|
|
1375
|
+
!__iter_map_windows_next_count_%out_ok
|
|
1376
|
+
!__iter_map_windows_mapped_%out_ok
|
|
1377
|
+
!__iter_map_windows_item_%out_ok
|
|
1378
|
+
!__iter_map_windows_off_%out_ok
|
|
1379
|
+
!__iter_map_windows_abs_index_%out_ok
|
|
1380
|
+
!__iter_map_windows_more_%out_ok
|
|
1381
|
+
jmp L_ITER_MAP_WINDOWS_HEAD_%out_ok
|
|
1382
|
+
L_ITER_MAP_WINDOWS_DONE_MORE_%out_ok:
|
|
1383
|
+
!__iter_map_windows_more_%out_ok
|
|
1384
|
+
!__iter_map_windows_done_count_%out_ok
|
|
1385
|
+
!__iter_map_windows_count_%out_ok
|
|
1386
|
+
!__iter_map_windows_span_%out_ok
|
|
1387
|
+
jmp L_ITER_MAP_WINDOWS_CONSUME_EMPTY_%out_ok
|
|
1388
|
+
L_ITER_MAP_WINDOWS_CONSUME_EMPTY_%out_ok:
|
|
1389
|
+
store %iter_reg+Iter_index, __iter_map_windows_len_%out_ok as u64
|
|
1390
|
+
!__iter_map_windows_short_%out_ok
|
|
1391
|
+
!__iter_map_windows_remaining_%out_ok
|
|
1392
|
+
!__iter_map_windows_start_%out_ok
|
|
1393
|
+
!__iter_map_windows_len_%out_ok
|
|
1394
|
+
!__iter_map_windows_ptr_%out_ok
|
|
1395
|
+
!__iter_map_windows_zero_%out_ok
|
|
1396
|
+
jmp L_ITER_MAP_WINDOWS_END_%out_ok
|
|
1397
|
+
L_ITER_MAP_WINDOWS_INVALID_%out_ok:
|
|
1398
|
+
%out_ok = add 0, 0
|
|
1399
|
+
!__iter_map_windows_zero_%out_ok
|
|
1400
|
+
L_ITER_MAP_WINDOWS_END_%out_ok:
|
|
1401
|
+
[END_MACRO]
|
|
1402
|
+
|
|
1403
|
+
// Rust method-name alias over ITER_MAP_WINDOWS_COLLECT_U64.
|
|
1404
|
+
[MACRO] ITER_MAP_WINDOWS_COLLECT %out_ok, %out_vec, %iter_reg, %window_size, %map_fn
|
|
1405
|
+
EXPAND ITER_MAP_WINDOWS_COLLECT_U64 %out_ok, %out_vec, %iter_reg, %window_size, %map_fn
|
|
1406
|
+
[END_MACRO]
|
|
1407
|
+
|
|
1408
|
+
[MACRO] ITER_COLLECT_INTO_U64 %vec_reg, %iter_reg
|
|
1409
|
+
jmp L_ITER_COLLECT_INTO_HEAD_%iter_reg
|
|
1410
|
+
L_ITER_COLLECT_INTO_HEAD_%iter_reg:
|
|
1411
|
+
EXPAND ITER_NEXT_U64 __iter_collect_into_has_%iter_reg, __iter_collect_into_value_%iter_reg, %iter_reg
|
|
1412
|
+
br __iter_collect_into_has_%iter_reg -> L_ITER_COLLECT_INTO_PUSH_%iter_reg, L_ITER_COLLECT_INTO_DONE_%iter_reg
|
|
1413
|
+
L_ITER_COLLECT_INTO_PUSH_%iter_reg:
|
|
1414
|
+
EXPAND ITER_VEC_PUSH_U64 %vec_reg, __iter_collect_into_value_%iter_reg
|
|
1415
|
+
!__iter_collect_into_value_%iter_reg
|
|
1416
|
+
!__iter_collect_into_has_%iter_reg
|
|
1417
|
+
jmp L_ITER_COLLECT_INTO_HEAD_%iter_reg
|
|
1418
|
+
L_ITER_COLLECT_INTO_DONE_%iter_reg:
|
|
1419
|
+
!__iter_collect_into_value_%iter_reg
|
|
1420
|
+
!__iter_collect_into_has_%iter_reg
|
|
1421
|
+
[END_MACRO]
|
|
1422
|
+
|
|
1423
|
+
// Rust method-name alias over ITER_COLLECT_INTO_U64.
|
|
1424
|
+
[MACRO] ITER_COLLECT_INTO %vec_reg, %iter_reg
|
|
1425
|
+
EXPAND ITER_COLLECT_INTO_U64 %vec_reg, %iter_reg
|
|
1426
|
+
[END_MACRO]
|
|
1427
|
+
|
|
1428
|
+
[MACRO] ITER_TAKE_COLLECT_U64 %out_vec, %iter_reg, %count
|
|
1429
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1430
|
+
__iter_take_collect_taken_%out_vec = add 0, 0
|
|
1431
|
+
jmp L_ITER_TAKE_COLLECT_HEAD_%out_vec
|
|
1432
|
+
L_ITER_TAKE_COLLECT_HEAD_%out_vec:
|
|
1433
|
+
__iter_take_collect_more_%out_vec = ult __iter_take_collect_taken_%out_vec, %count
|
|
1434
|
+
br __iter_take_collect_more_%out_vec -> L_ITER_TAKE_COLLECT_NEXT_%out_vec, L_ITER_TAKE_COLLECT_COUNT_DONE_%out_vec
|
|
1435
|
+
L_ITER_TAKE_COLLECT_NEXT_%out_vec:
|
|
1436
|
+
EXPAND ITER_NEXT_U64 __iter_take_collect_has_%out_vec, __iter_take_collect_value_%out_vec, %iter_reg
|
|
1437
|
+
br __iter_take_collect_has_%out_vec -> L_ITER_TAKE_COLLECT_PUSH_%out_vec, L_ITER_TAKE_COLLECT_STOP_%out_vec
|
|
1438
|
+
L_ITER_TAKE_COLLECT_PUSH_%out_vec:
|
|
1439
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_take_collect_value_%out_vec
|
|
1440
|
+
__iter_take_collect_next_taken_%out_vec = add __iter_take_collect_taken_%out_vec, 1
|
|
1441
|
+
!__iter_take_collect_taken_%out_vec
|
|
1442
|
+
__iter_take_collect_taken_%out_vec = add __iter_take_collect_next_taken_%out_vec, 0
|
|
1443
|
+
!__iter_take_collect_next_taken_%out_vec
|
|
1444
|
+
!__iter_take_collect_value_%out_vec
|
|
1445
|
+
!__iter_take_collect_has_%out_vec
|
|
1446
|
+
!__iter_take_collect_more_%out_vec
|
|
1447
|
+
jmp L_ITER_TAKE_COLLECT_HEAD_%out_vec
|
|
1448
|
+
L_ITER_TAKE_COLLECT_STOP_%out_vec:
|
|
1449
|
+
!__iter_take_collect_value_%out_vec
|
|
1450
|
+
!__iter_take_collect_has_%out_vec
|
|
1451
|
+
!__iter_take_collect_more_%out_vec
|
|
1452
|
+
jmp L_ITER_TAKE_COLLECT_DONE_%out_vec
|
|
1453
|
+
L_ITER_TAKE_COLLECT_COUNT_DONE_%out_vec:
|
|
1454
|
+
!__iter_take_collect_more_%out_vec
|
|
1455
|
+
jmp L_ITER_TAKE_COLLECT_DONE_%out_vec
|
|
1456
|
+
L_ITER_TAKE_COLLECT_DONE_%out_vec:
|
|
1457
|
+
!__iter_take_collect_taken_%out_vec
|
|
1458
|
+
[END_MACRO]
|
|
1459
|
+
|
|
1460
|
+
// Rust method-name alias over ITER_TAKE_COLLECT_U64.
|
|
1461
|
+
[MACRO] ITER_TAKE_COLLECT %out_vec, %iter_reg, %count
|
|
1462
|
+
EXPAND ITER_TAKE_COLLECT_U64 %out_vec, %iter_reg, %count
|
|
1463
|
+
[END_MACRO]
|
|
1464
|
+
|
|
1465
|
+
[MACRO] ITER_SKIP_COLLECT_U64 %out_vec, %iter_reg, %count
|
|
1466
|
+
EXPAND ITER_ADVANCE_BY __iter_skip_collect_ok_%out_vec, __iter_skip_collect_remaining_%out_vec, %iter_reg, %count
|
|
1467
|
+
!__iter_skip_collect_remaining_%out_vec
|
|
1468
|
+
!__iter_skip_collect_ok_%out_vec
|
|
1469
|
+
EXPAND ITER_COLLECT_U64 %out_vec, %iter_reg
|
|
1470
|
+
[END_MACRO]
|
|
1471
|
+
|
|
1472
|
+
// Rust method-name alias over ITER_SKIP_COLLECT_U64.
|
|
1473
|
+
[MACRO] ITER_SKIP_COLLECT %out_vec, %iter_reg, %count
|
|
1474
|
+
EXPAND ITER_SKIP_COLLECT_U64 %out_vec, %iter_reg, %count
|
|
1475
|
+
[END_MACRO]
|
|
1476
|
+
|
|
1477
|
+
[MACRO] ITER_INTERSPERSE_COLLECT_U64 %out_vec, %iter_reg, %separator
|
|
1478
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1479
|
+
EXPAND ITER_NEXT_U64 __iter_intersperse_first_has_%out_vec, __iter_intersperse_first_value_%out_vec, %iter_reg
|
|
1480
|
+
br __iter_intersperse_first_has_%out_vec -> L_ITER_INTERSPERSE_FIRST_%out_vec, L_ITER_INTERSPERSE_DONE_EMPTY_%out_vec
|
|
1481
|
+
L_ITER_INTERSPERSE_FIRST_%out_vec:
|
|
1482
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_intersperse_first_value_%out_vec
|
|
1483
|
+
!__iter_intersperse_first_value_%out_vec
|
|
1484
|
+
!__iter_intersperse_first_has_%out_vec
|
|
1485
|
+
jmp L_ITER_INTERSPERSE_HEAD_%out_vec
|
|
1486
|
+
L_ITER_INTERSPERSE_HEAD_%out_vec:
|
|
1487
|
+
EXPAND ITER_NEXT_U64 __iter_intersperse_has_%out_vec, __iter_intersperse_value_%out_vec, %iter_reg
|
|
1488
|
+
br __iter_intersperse_has_%out_vec -> L_ITER_INTERSPERSE_PUSH_PAIR_%out_vec, L_ITER_INTERSPERSE_DONE_%out_vec
|
|
1489
|
+
L_ITER_INTERSPERSE_PUSH_PAIR_%out_vec:
|
|
1490
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, %separator
|
|
1491
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_intersperse_value_%out_vec
|
|
1492
|
+
!__iter_intersperse_value_%out_vec
|
|
1493
|
+
!__iter_intersperse_has_%out_vec
|
|
1494
|
+
jmp L_ITER_INTERSPERSE_HEAD_%out_vec
|
|
1495
|
+
L_ITER_INTERSPERSE_DONE_EMPTY_%out_vec:
|
|
1496
|
+
!__iter_intersperse_first_value_%out_vec
|
|
1497
|
+
!__iter_intersperse_first_has_%out_vec
|
|
1498
|
+
jmp L_ITER_INTERSPERSE_END_%out_vec
|
|
1499
|
+
L_ITER_INTERSPERSE_DONE_%out_vec:
|
|
1500
|
+
!__iter_intersperse_value_%out_vec
|
|
1501
|
+
!__iter_intersperse_has_%out_vec
|
|
1502
|
+
L_ITER_INTERSPERSE_END_%out_vec:
|
|
1503
|
+
[END_MACRO]
|
|
1504
|
+
|
|
1505
|
+
// Rust method-name alias over ITER_INTERSPERSE_COLLECT_U64.
|
|
1506
|
+
[MACRO] ITER_INTERSPERSE_COLLECT %out_vec, %iter_reg, %separator
|
|
1507
|
+
EXPAND ITER_INTERSPERSE_COLLECT_U64 %out_vec, %iter_reg, %separator
|
|
1508
|
+
[END_MACRO]
|
|
1509
|
+
|
|
1510
|
+
[MACRO] ITER_INTERSPERSE_WITH_COLLECT_U64 %out_vec, %iter_reg, %sep_fn
|
|
1511
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1512
|
+
EXPAND ITER_NEXT_U64 __iter_intersperse_with_first_has_%out_vec, __iter_intersperse_with_first_value_%out_vec, %iter_reg
|
|
1513
|
+
br __iter_intersperse_with_first_has_%out_vec -> L_ITER_INTERSPERSE_WITH_FIRST_%out_vec, L_ITER_INTERSPERSE_WITH_DONE_EMPTY_%out_vec
|
|
1514
|
+
L_ITER_INTERSPERSE_WITH_FIRST_%out_vec:
|
|
1515
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_intersperse_with_first_value_%out_vec
|
|
1516
|
+
!__iter_intersperse_with_first_value_%out_vec
|
|
1517
|
+
!__iter_intersperse_with_first_has_%out_vec
|
|
1518
|
+
jmp L_ITER_INTERSPERSE_WITH_HEAD_%out_vec
|
|
1519
|
+
L_ITER_INTERSPERSE_WITH_HEAD_%out_vec:
|
|
1520
|
+
EXPAND ITER_NEXT_U64 __iter_intersperse_with_has_%out_vec, __iter_intersperse_with_value_%out_vec, %iter_reg
|
|
1521
|
+
br __iter_intersperse_with_has_%out_vec -> L_ITER_INTERSPERSE_WITH_PUSH_PAIR_%out_vec, L_ITER_INTERSPERSE_WITH_DONE_%out_vec
|
|
1522
|
+
L_ITER_INTERSPERSE_WITH_PUSH_PAIR_%out_vec:
|
|
1523
|
+
__iter_intersperse_with_sep_%out_vec = call %sep_fn()
|
|
1524
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_intersperse_with_sep_%out_vec
|
|
1525
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_intersperse_with_value_%out_vec
|
|
1526
|
+
!__iter_intersperse_with_sep_%out_vec
|
|
1527
|
+
!__iter_intersperse_with_value_%out_vec
|
|
1528
|
+
!__iter_intersperse_with_has_%out_vec
|
|
1529
|
+
jmp L_ITER_INTERSPERSE_WITH_HEAD_%out_vec
|
|
1530
|
+
L_ITER_INTERSPERSE_WITH_DONE_EMPTY_%out_vec:
|
|
1531
|
+
!__iter_intersperse_with_first_value_%out_vec
|
|
1532
|
+
!__iter_intersperse_with_first_has_%out_vec
|
|
1533
|
+
jmp L_ITER_INTERSPERSE_WITH_END_%out_vec
|
|
1534
|
+
L_ITER_INTERSPERSE_WITH_DONE_%out_vec:
|
|
1535
|
+
!__iter_intersperse_with_value_%out_vec
|
|
1536
|
+
!__iter_intersperse_with_has_%out_vec
|
|
1537
|
+
L_ITER_INTERSPERSE_WITH_END_%out_vec:
|
|
1538
|
+
[END_MACRO]
|
|
1539
|
+
|
|
1540
|
+
// Rust method-name alias over ITER_INTERSPERSE_WITH_COLLECT_U64.
|
|
1541
|
+
[MACRO] ITER_INTERSPERSE_WITH_COLLECT %out_vec, %iter_reg, %sep_fn
|
|
1542
|
+
EXPAND ITER_INTERSPERSE_WITH_COLLECT_U64 %out_vec, %iter_reg, %sep_fn
|
|
1543
|
+
[END_MACRO]
|
|
1544
|
+
|
|
1545
|
+
[MACRO] ITER_TRY_STEP_BY_COLLECT_U64 %out_ok, %out_vec, %iter_reg, %step
|
|
1546
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1547
|
+
__iter_step_zero_%out_ok = eq %step, 0
|
|
1548
|
+
br __iter_step_zero_%out_ok -> L_ITER_STEP_BY_INVALID_%out_ok, L_ITER_STEP_BY_INIT_%out_ok
|
|
1549
|
+
L_ITER_STEP_BY_INIT_%out_ok:
|
|
1550
|
+
__iter_step_skip_%out_ok = sub %step, 1
|
|
1551
|
+
%out_ok = add 0, 1
|
|
1552
|
+
jmp L_ITER_STEP_BY_HEAD_%out_ok
|
|
1553
|
+
L_ITER_STEP_BY_HEAD_%out_ok:
|
|
1554
|
+
EXPAND ITER_NEXT_U64 __iter_step_has_%out_ok, __iter_step_value_%out_ok, %iter_reg
|
|
1555
|
+
br __iter_step_has_%out_ok -> L_ITER_STEP_BY_PUSH_%out_ok, L_ITER_STEP_BY_DONE_%out_ok
|
|
1556
|
+
L_ITER_STEP_BY_PUSH_%out_ok:
|
|
1557
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_step_value_%out_ok
|
|
1558
|
+
EXPAND ITER_ADVANCE_BY __iter_step_adv_ok_%out_ok, __iter_step_adv_remaining_%out_ok, %iter_reg, __iter_step_skip_%out_ok
|
|
1559
|
+
!__iter_step_adv_remaining_%out_ok
|
|
1560
|
+
!__iter_step_adv_ok_%out_ok
|
|
1561
|
+
!__iter_step_value_%out_ok
|
|
1562
|
+
!__iter_step_has_%out_ok
|
|
1563
|
+
jmp L_ITER_STEP_BY_HEAD_%out_ok
|
|
1564
|
+
L_ITER_STEP_BY_INVALID_%out_ok:
|
|
1565
|
+
%out_ok = add 0, 0
|
|
1566
|
+
!__iter_step_zero_%out_ok
|
|
1567
|
+
jmp L_ITER_STEP_BY_END_%out_ok
|
|
1568
|
+
L_ITER_STEP_BY_DONE_%out_ok:
|
|
1569
|
+
!__iter_step_value_%out_ok
|
|
1570
|
+
!__iter_step_has_%out_ok
|
|
1571
|
+
!__iter_step_skip_%out_ok
|
|
1572
|
+
!__iter_step_zero_%out_ok
|
|
1573
|
+
L_ITER_STEP_BY_END_%out_ok:
|
|
1574
|
+
[END_MACRO]
|
|
1575
|
+
|
|
1576
|
+
// Rust method-name alias over ITER_TRY_STEP_BY_COLLECT_U64.
|
|
1577
|
+
[MACRO] ITER_TRY_STEP_BY_COLLECT %out_ok, %out_vec, %iter_reg, %step
|
|
1578
|
+
EXPAND ITER_TRY_STEP_BY_COLLECT_U64 %out_ok, %out_vec, %iter_reg, %step
|
|
1579
|
+
[END_MACRO]
|
|
1580
|
+
|
|
1581
|
+
[MACRO] ITER_STEP_BY_COLLECT_U64 %out_vec, %iter_reg, %step
|
|
1582
|
+
EXPAND ITER_TRY_STEP_BY_COLLECT_U64 __iter_step_by_ok_%out_vec, %out_vec, %iter_reg, %step
|
|
1583
|
+
!__iter_step_by_ok_%out_vec
|
|
1584
|
+
[END_MACRO]
|
|
1585
|
+
|
|
1586
|
+
// Rust method-name alias over ITER_STEP_BY_COLLECT_U64.
|
|
1587
|
+
[MACRO] ITER_STEP_BY_COLLECT %out_vec, %iter_reg, %step
|
|
1588
|
+
EXPAND ITER_STEP_BY_COLLECT_U64 %out_vec, %iter_reg, %step
|
|
1589
|
+
[END_MACRO]
|
|
1590
|
+
|
|
1591
|
+
[MACRO] ITER_CYCLE_TAKE_COLLECT_U64 %out_vec, %iter_reg, %count
|
|
1592
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1593
|
+
__iter_cycle_count_zero_%out_vec = eq %count, 0
|
|
1594
|
+
br __iter_cycle_count_zero_%out_vec -> L_ITER_CYCLE_TAKE_DONE_ZERO_%out_vec, L_ITER_CYCLE_TAKE_INIT_%out_vec
|
|
1595
|
+
L_ITER_CYCLE_TAKE_INIT_%out_vec:
|
|
1596
|
+
__iter_cycle_ptr_%out_vec = load %iter_reg+Iter_ptr as ptr
|
|
1597
|
+
__iter_cycle_len_%out_vec = load %iter_reg+Iter_len as u64
|
|
1598
|
+
__iter_cycle_start_%out_vec = load %iter_reg+Iter_index as u64
|
|
1599
|
+
__iter_cycle_rem_%out_vec = sub __iter_cycle_len_%out_vec, __iter_cycle_start_%out_vec
|
|
1600
|
+
__iter_cycle_empty_%out_vec = eq __iter_cycle_rem_%out_vec, 0
|
|
1601
|
+
__iter_cycle_taken_%out_vec = add 0, 0
|
|
1602
|
+
br __iter_cycle_empty_%out_vec -> L_ITER_CYCLE_TAKE_DONE_EMPTY_%out_vec, L_ITER_CYCLE_TAKE_HEAD_%out_vec
|
|
1603
|
+
L_ITER_CYCLE_TAKE_HEAD_%out_vec:
|
|
1604
|
+
__iter_cycle_more_%out_vec = ult __iter_cycle_taken_%out_vec, %count
|
|
1605
|
+
br __iter_cycle_more_%out_vec -> L_ITER_CYCLE_TAKE_PUSH_%out_vec, L_ITER_CYCLE_TAKE_DONE_COUNT_%out_vec
|
|
1606
|
+
L_ITER_CYCLE_TAKE_PUSH_%out_vec:
|
|
1607
|
+
__iter_cycle_mod_%out_vec = urem __iter_cycle_taken_%out_vec, __iter_cycle_rem_%out_vec
|
|
1608
|
+
__iter_cycle_index_%out_vec = add __iter_cycle_start_%out_vec, __iter_cycle_mod_%out_vec
|
|
1609
|
+
__iter_cycle_off_%out_vec = mul __iter_cycle_index_%out_vec, 8
|
|
1610
|
+
__iter_cycle_item_%out_vec = ptr_add __iter_cycle_ptr_%out_vec, __iter_cycle_off_%out_vec
|
|
1611
|
+
__iter_cycle_value_%out_vec = load __iter_cycle_item_%out_vec+0 as u64
|
|
1612
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_cycle_value_%out_vec
|
|
1613
|
+
__iter_cycle_next_taken_%out_vec = add __iter_cycle_taken_%out_vec, 1
|
|
1614
|
+
!__iter_cycle_taken_%out_vec
|
|
1615
|
+
__iter_cycle_taken_%out_vec = add __iter_cycle_next_taken_%out_vec, 0
|
|
1616
|
+
!__iter_cycle_next_taken_%out_vec
|
|
1617
|
+
!__iter_cycle_value_%out_vec
|
|
1618
|
+
!__iter_cycle_item_%out_vec
|
|
1619
|
+
!__iter_cycle_off_%out_vec
|
|
1620
|
+
!__iter_cycle_index_%out_vec
|
|
1621
|
+
!__iter_cycle_mod_%out_vec
|
|
1622
|
+
!__iter_cycle_more_%out_vec
|
|
1623
|
+
jmp L_ITER_CYCLE_TAKE_HEAD_%out_vec
|
|
1624
|
+
L_ITER_CYCLE_TAKE_DONE_COUNT_%out_vec:
|
|
1625
|
+
store %iter_reg+Iter_index, __iter_cycle_len_%out_vec as u64
|
|
1626
|
+
!__iter_cycle_more_%out_vec
|
|
1627
|
+
jmp L_ITER_CYCLE_TAKE_DONE_%out_vec
|
|
1628
|
+
L_ITER_CYCLE_TAKE_DONE_EMPTY_%out_vec:
|
|
1629
|
+
jmp L_ITER_CYCLE_TAKE_DONE_%out_vec
|
|
1630
|
+
L_ITER_CYCLE_TAKE_DONE_ZERO_%out_vec:
|
|
1631
|
+
!__iter_cycle_count_zero_%out_vec
|
|
1632
|
+
jmp L_ITER_CYCLE_TAKE_END_%out_vec
|
|
1633
|
+
L_ITER_CYCLE_TAKE_DONE_%out_vec:
|
|
1634
|
+
!__iter_cycle_taken_%out_vec
|
|
1635
|
+
!__iter_cycle_empty_%out_vec
|
|
1636
|
+
!__iter_cycle_rem_%out_vec
|
|
1637
|
+
!__iter_cycle_start_%out_vec
|
|
1638
|
+
!__iter_cycle_len_%out_vec
|
|
1639
|
+
!__iter_cycle_ptr_%out_vec
|
|
1640
|
+
!__iter_cycle_count_zero_%out_vec
|
|
1641
|
+
L_ITER_CYCLE_TAKE_END_%out_vec:
|
|
1642
|
+
[END_MACRO]
|
|
1643
|
+
|
|
1644
|
+
// Rust method-name alias over ITER_CYCLE_TAKE_COLLECT_U64.
|
|
1645
|
+
[MACRO] ITER_CYCLE_TAKE_COLLECT %out_vec, %iter_reg, %count
|
|
1646
|
+
EXPAND ITER_CYCLE_TAKE_COLLECT_U64 %out_vec, %iter_reg, %count
|
|
1647
|
+
[END_MACRO]
|
|
1648
|
+
|
|
1649
|
+
[MACRO] ITER_REV_COLLECT_U64 %out_vec, %iter_reg
|
|
1650
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1651
|
+
jmp L_ITER_REV_COLLECT_HEAD_%out_vec
|
|
1652
|
+
L_ITER_REV_COLLECT_HEAD_%out_vec:
|
|
1653
|
+
EXPAND ITER_NEXT_BACK_U64 __iter_rev_collect_has_%out_vec, __iter_rev_collect_value_%out_vec, %iter_reg
|
|
1654
|
+
br __iter_rev_collect_has_%out_vec -> L_ITER_REV_COLLECT_PUSH_%out_vec, L_ITER_REV_COLLECT_DONE_%out_vec
|
|
1655
|
+
L_ITER_REV_COLLECT_PUSH_%out_vec:
|
|
1656
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_rev_collect_value_%out_vec
|
|
1657
|
+
!__iter_rev_collect_value_%out_vec
|
|
1658
|
+
!__iter_rev_collect_has_%out_vec
|
|
1659
|
+
jmp L_ITER_REV_COLLECT_HEAD_%out_vec
|
|
1660
|
+
L_ITER_REV_COLLECT_DONE_%out_vec:
|
|
1661
|
+
!__iter_rev_collect_value_%out_vec
|
|
1662
|
+
!__iter_rev_collect_has_%out_vec
|
|
1663
|
+
[END_MACRO]
|
|
1664
|
+
|
|
1665
|
+
// Rust method-name alias over ITER_REV_COLLECT_U64.
|
|
1666
|
+
[MACRO] ITER_REV_COLLECT %out_vec, %iter_reg
|
|
1667
|
+
EXPAND ITER_REV_COLLECT_U64 %out_vec, %iter_reg
|
|
1668
|
+
[END_MACRO]
|
|
1669
|
+
|
|
1670
|
+
[MACRO] ITER_TAKE_WHILE_COLLECT_U64 %out_vec, %iter_reg, %pred_fn
|
|
1671
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1672
|
+
jmp L_ITER_TAKE_WHILE_HEAD_%out_vec
|
|
1673
|
+
L_ITER_TAKE_WHILE_HEAD_%out_vec:
|
|
1674
|
+
EXPAND ITER_NEXT_U64 __iter_take_while_has_%out_vec, __iter_take_while_value_%out_vec, %iter_reg
|
|
1675
|
+
br __iter_take_while_has_%out_vec -> L_ITER_TAKE_WHILE_CHECK_%out_vec, L_ITER_TAKE_WHILE_DONE_EMPTY_%out_vec
|
|
1676
|
+
L_ITER_TAKE_WHILE_CHECK_%out_vec:
|
|
1677
|
+
__iter_take_while_pred_%out_vec = call %pred_fn(__iter_take_while_value_%out_vec)
|
|
1678
|
+
__iter_take_while_keep_%out_vec = ne __iter_take_while_pred_%out_vec, 0
|
|
1679
|
+
br __iter_take_while_keep_%out_vec -> L_ITER_TAKE_WHILE_PUSH_%out_vec, L_ITER_TAKE_WHILE_STOP_%out_vec
|
|
1680
|
+
L_ITER_TAKE_WHILE_PUSH_%out_vec:
|
|
1681
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_take_while_value_%out_vec
|
|
1682
|
+
!__iter_take_while_keep_%out_vec
|
|
1683
|
+
!__iter_take_while_pred_%out_vec
|
|
1684
|
+
!__iter_take_while_value_%out_vec
|
|
1685
|
+
!__iter_take_while_has_%out_vec
|
|
1686
|
+
jmp L_ITER_TAKE_WHILE_HEAD_%out_vec
|
|
1687
|
+
L_ITER_TAKE_WHILE_STOP_%out_vec:
|
|
1688
|
+
!__iter_take_while_keep_%out_vec
|
|
1689
|
+
!__iter_take_while_pred_%out_vec
|
|
1690
|
+
!__iter_take_while_value_%out_vec
|
|
1691
|
+
!__iter_take_while_has_%out_vec
|
|
1692
|
+
jmp L_ITER_TAKE_WHILE_DONE_%out_vec
|
|
1693
|
+
L_ITER_TAKE_WHILE_DONE_EMPTY_%out_vec:
|
|
1694
|
+
!__iter_take_while_value_%out_vec
|
|
1695
|
+
!__iter_take_while_has_%out_vec
|
|
1696
|
+
jmp L_ITER_TAKE_WHILE_DONE_%out_vec
|
|
1697
|
+
L_ITER_TAKE_WHILE_DONE_%out_vec:
|
|
1698
|
+
[END_MACRO]
|
|
1699
|
+
|
|
1700
|
+
// Rust method-name alias over ITER_TAKE_WHILE_COLLECT_U64.
|
|
1701
|
+
[MACRO] ITER_TAKE_WHILE_COLLECT %out_vec, %iter_reg, %pred_fn
|
|
1702
|
+
EXPAND ITER_TAKE_WHILE_COLLECT_U64 %out_vec, %iter_reg, %pred_fn
|
|
1703
|
+
[END_MACRO]
|
|
1704
|
+
|
|
1705
|
+
[MACRO] ITER_SKIP_WHILE_COLLECT_U64 %out_vec, %iter_reg, %pred_fn
|
|
1706
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1707
|
+
jmp L_ITER_SKIP_WHILE_HEAD_%out_vec
|
|
1708
|
+
L_ITER_SKIP_WHILE_HEAD_%out_vec:
|
|
1709
|
+
EXPAND ITER_NEXT_U64 __iter_skip_while_has_%out_vec, __iter_skip_while_value_%out_vec, %iter_reg
|
|
1710
|
+
br __iter_skip_while_has_%out_vec -> L_ITER_SKIP_WHILE_CHECK_%out_vec, L_ITER_SKIP_WHILE_DONE_EMPTY_%out_vec
|
|
1711
|
+
L_ITER_SKIP_WHILE_CHECK_%out_vec:
|
|
1712
|
+
__iter_skip_while_pred_%out_vec = call %pred_fn(__iter_skip_while_value_%out_vec)
|
|
1713
|
+
__iter_skip_while_drop_%out_vec = ne __iter_skip_while_pred_%out_vec, 0
|
|
1714
|
+
br __iter_skip_while_drop_%out_vec -> L_ITER_SKIP_WHILE_DROP_%out_vec, L_ITER_SKIP_WHILE_FIRST_PUSH_%out_vec
|
|
1715
|
+
L_ITER_SKIP_WHILE_DROP_%out_vec:
|
|
1716
|
+
!__iter_skip_while_drop_%out_vec
|
|
1717
|
+
!__iter_skip_while_pred_%out_vec
|
|
1718
|
+
!__iter_skip_while_value_%out_vec
|
|
1719
|
+
!__iter_skip_while_has_%out_vec
|
|
1720
|
+
jmp L_ITER_SKIP_WHILE_HEAD_%out_vec
|
|
1721
|
+
L_ITER_SKIP_WHILE_FIRST_PUSH_%out_vec:
|
|
1722
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_skip_while_value_%out_vec
|
|
1723
|
+
!__iter_skip_while_drop_%out_vec
|
|
1724
|
+
!__iter_skip_while_pred_%out_vec
|
|
1725
|
+
!__iter_skip_while_value_%out_vec
|
|
1726
|
+
!__iter_skip_while_has_%out_vec
|
|
1727
|
+
jmp L_ITER_SKIP_WHILE_TAIL_HEAD_%out_vec
|
|
1728
|
+
L_ITER_SKIP_WHILE_TAIL_HEAD_%out_vec:
|
|
1729
|
+
EXPAND ITER_NEXT_U64 __iter_skip_tail_has_%out_vec, __iter_skip_tail_value_%out_vec, %iter_reg
|
|
1730
|
+
br __iter_skip_tail_has_%out_vec -> L_ITER_SKIP_WHILE_TAIL_PUSH_%out_vec, L_ITER_SKIP_WHILE_TAIL_DONE_%out_vec
|
|
1731
|
+
L_ITER_SKIP_WHILE_TAIL_PUSH_%out_vec:
|
|
1732
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_skip_tail_value_%out_vec
|
|
1733
|
+
!__iter_skip_tail_value_%out_vec
|
|
1734
|
+
!__iter_skip_tail_has_%out_vec
|
|
1735
|
+
jmp L_ITER_SKIP_WHILE_TAIL_HEAD_%out_vec
|
|
1736
|
+
L_ITER_SKIP_WHILE_TAIL_DONE_%out_vec:
|
|
1737
|
+
!__iter_skip_tail_value_%out_vec
|
|
1738
|
+
!__iter_skip_tail_has_%out_vec
|
|
1739
|
+
jmp L_ITER_SKIP_WHILE_DONE_%out_vec
|
|
1740
|
+
L_ITER_SKIP_WHILE_DONE_EMPTY_%out_vec:
|
|
1741
|
+
!__iter_skip_while_value_%out_vec
|
|
1742
|
+
!__iter_skip_while_has_%out_vec
|
|
1743
|
+
jmp L_ITER_SKIP_WHILE_DONE_%out_vec
|
|
1744
|
+
L_ITER_SKIP_WHILE_DONE_%out_vec:
|
|
1745
|
+
[END_MACRO]
|
|
1746
|
+
|
|
1747
|
+
// Rust method-name alias over ITER_SKIP_WHILE_COLLECT_U64.
|
|
1748
|
+
[MACRO] ITER_SKIP_WHILE_COLLECT %out_vec, %iter_reg, %pred_fn
|
|
1749
|
+
EXPAND ITER_SKIP_WHILE_COLLECT_U64 %out_vec, %iter_reg, %pred_fn
|
|
1750
|
+
[END_MACRO]
|
|
1751
|
+
|
|
1752
|
+
[MACRO] ITER_ENUMERATE_COLLECT_U64 %out_vec, %iter_reg
|
|
1753
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1754
|
+
__iter_enumerate_index_%out_vec = add 0, 0
|
|
1755
|
+
jmp L_ITER_ENUMERATE_HEAD_%out_vec
|
|
1756
|
+
L_ITER_ENUMERATE_HEAD_%out_vec:
|
|
1757
|
+
EXPAND ITER_NEXT_U64 __iter_enumerate_has_%out_vec, __iter_enumerate_value_%out_vec, %iter_reg
|
|
1758
|
+
br __iter_enumerate_has_%out_vec -> L_ITER_ENUMERATE_PUSH_%out_vec, L_ITER_ENUMERATE_DONE_%out_vec
|
|
1759
|
+
L_ITER_ENUMERATE_PUSH_%out_vec:
|
|
1760
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_enumerate_index_%out_vec
|
|
1761
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_enumerate_value_%out_vec
|
|
1762
|
+
__iter_enumerate_next_index_%out_vec = add __iter_enumerate_index_%out_vec, 1
|
|
1763
|
+
!__iter_enumerate_index_%out_vec
|
|
1764
|
+
__iter_enumerate_index_%out_vec = add __iter_enumerate_next_index_%out_vec, 0
|
|
1765
|
+
!__iter_enumerate_next_index_%out_vec
|
|
1766
|
+
!__iter_enumerate_value_%out_vec
|
|
1767
|
+
!__iter_enumerate_has_%out_vec
|
|
1768
|
+
jmp L_ITER_ENUMERATE_HEAD_%out_vec
|
|
1769
|
+
L_ITER_ENUMERATE_DONE_%out_vec:
|
|
1770
|
+
!__iter_enumerate_value_%out_vec
|
|
1771
|
+
!__iter_enumerate_has_%out_vec
|
|
1772
|
+
!__iter_enumerate_index_%out_vec
|
|
1773
|
+
[END_MACRO]
|
|
1774
|
+
|
|
1775
|
+
// Rust method-name alias over ITER_ENUMERATE_COLLECT_U64.
|
|
1776
|
+
[MACRO] ITER_ENUMERATE_COLLECT %out_vec, %iter_reg
|
|
1777
|
+
EXPAND ITER_ENUMERATE_COLLECT_U64 %out_vec, %iter_reg
|
|
1778
|
+
[END_MACRO]
|
|
1779
|
+
|
|
1780
|
+
[MACRO] ITER_ZIP_COLLECT_U64 %out_vec, %left_iter, %right_iter
|
|
1781
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1782
|
+
jmp L_ITER_ZIP_HEAD_%out_vec
|
|
1783
|
+
L_ITER_ZIP_HEAD_%out_vec:
|
|
1784
|
+
EXPAND ITER_NEXT_U64 __iter_zip_left_has_%out_vec, __iter_zip_left_value_%out_vec, %left_iter
|
|
1785
|
+
br __iter_zip_left_has_%out_vec -> L_ITER_ZIP_RIGHT_%out_vec, L_ITER_ZIP_DONE_LEFT_%out_vec
|
|
1786
|
+
L_ITER_ZIP_RIGHT_%out_vec:
|
|
1787
|
+
EXPAND ITER_NEXT_U64 __iter_zip_right_has_%out_vec, __iter_zip_right_value_%out_vec, %right_iter
|
|
1788
|
+
br __iter_zip_right_has_%out_vec -> L_ITER_ZIP_PUSH_%out_vec, L_ITER_ZIP_DONE_RIGHT_%out_vec
|
|
1789
|
+
L_ITER_ZIP_PUSH_%out_vec:
|
|
1790
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_zip_left_value_%out_vec
|
|
1791
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_zip_right_value_%out_vec
|
|
1792
|
+
!__iter_zip_right_value_%out_vec
|
|
1793
|
+
!__iter_zip_right_has_%out_vec
|
|
1794
|
+
!__iter_zip_left_value_%out_vec
|
|
1795
|
+
!__iter_zip_left_has_%out_vec
|
|
1796
|
+
jmp L_ITER_ZIP_HEAD_%out_vec
|
|
1797
|
+
L_ITER_ZIP_DONE_RIGHT_%out_vec:
|
|
1798
|
+
!__iter_zip_right_value_%out_vec
|
|
1799
|
+
!__iter_zip_right_has_%out_vec
|
|
1800
|
+
!__iter_zip_left_value_%out_vec
|
|
1801
|
+
!__iter_zip_left_has_%out_vec
|
|
1802
|
+
jmp L_ITER_ZIP_DONE_%out_vec
|
|
1803
|
+
L_ITER_ZIP_DONE_LEFT_%out_vec:
|
|
1804
|
+
!__iter_zip_left_value_%out_vec
|
|
1805
|
+
!__iter_zip_left_has_%out_vec
|
|
1806
|
+
jmp L_ITER_ZIP_DONE_%out_vec
|
|
1807
|
+
L_ITER_ZIP_DONE_%out_vec:
|
|
1808
|
+
[END_MACRO]
|
|
1809
|
+
|
|
1810
|
+
// Rust method-name alias over ITER_ZIP_COLLECT_U64.
|
|
1811
|
+
[MACRO] ITER_ZIP_COLLECT %out_vec, %left_iter, %right_iter
|
|
1812
|
+
EXPAND ITER_ZIP_COLLECT_U64 %out_vec, %left_iter, %right_iter
|
|
1813
|
+
[END_MACRO]
|
|
1814
|
+
|
|
1815
|
+
[MACRO] ITER_CHAIN_COLLECT_U64 %out_vec, %left_iter, %right_iter
|
|
1816
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1817
|
+
jmp L_ITER_CHAIN_LEFT_HEAD_%out_vec
|
|
1818
|
+
L_ITER_CHAIN_LEFT_HEAD_%out_vec:
|
|
1819
|
+
EXPAND ITER_NEXT_U64 __iter_chain_left_has_%out_vec, __iter_chain_left_value_%out_vec, %left_iter
|
|
1820
|
+
br __iter_chain_left_has_%out_vec -> L_ITER_CHAIN_LEFT_PUSH_%out_vec, L_ITER_CHAIN_RIGHT_HEAD_%out_vec
|
|
1821
|
+
L_ITER_CHAIN_LEFT_PUSH_%out_vec:
|
|
1822
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_chain_left_value_%out_vec
|
|
1823
|
+
!__iter_chain_left_value_%out_vec
|
|
1824
|
+
!__iter_chain_left_has_%out_vec
|
|
1825
|
+
jmp L_ITER_CHAIN_LEFT_HEAD_%out_vec
|
|
1826
|
+
L_ITER_CHAIN_RIGHT_HEAD_%out_vec:
|
|
1827
|
+
!__iter_chain_left_value_%out_vec
|
|
1828
|
+
!__iter_chain_left_has_%out_vec
|
|
1829
|
+
jmp L_ITER_CHAIN_RIGHT_NEXT_%out_vec
|
|
1830
|
+
L_ITER_CHAIN_RIGHT_NEXT_%out_vec:
|
|
1831
|
+
EXPAND ITER_NEXT_U64 __iter_chain_right_has_%out_vec, __iter_chain_right_value_%out_vec, %right_iter
|
|
1832
|
+
br __iter_chain_right_has_%out_vec -> L_ITER_CHAIN_RIGHT_PUSH_%out_vec, L_ITER_CHAIN_DONE_%out_vec
|
|
1833
|
+
L_ITER_CHAIN_RIGHT_PUSH_%out_vec:
|
|
1834
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_chain_right_value_%out_vec
|
|
1835
|
+
!__iter_chain_right_value_%out_vec
|
|
1836
|
+
!__iter_chain_right_has_%out_vec
|
|
1837
|
+
jmp L_ITER_CHAIN_RIGHT_NEXT_%out_vec
|
|
1838
|
+
L_ITER_CHAIN_DONE_%out_vec:
|
|
1839
|
+
!__iter_chain_right_value_%out_vec
|
|
1840
|
+
!__iter_chain_right_has_%out_vec
|
|
1841
|
+
[END_MACRO]
|
|
1842
|
+
|
|
1843
|
+
// Rust method-name alias over ITER_CHAIN_COLLECT_U64.
|
|
1844
|
+
[MACRO] ITER_CHAIN_COLLECT %out_vec, %left_iter, %right_iter
|
|
1845
|
+
EXPAND ITER_CHAIN_COLLECT_U64 %out_vec, %left_iter, %right_iter
|
|
1846
|
+
[END_MACRO]
|
|
1847
|
+
|
|
1848
|
+
[MACRO] ITER_MAP_COLLECT_U64 %out_vec, %iter_reg, %map_fn
|
|
1849
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1850
|
+
jmp L_ITER_MAP_COLLECT_HEAD_%out_vec
|
|
1851
|
+
L_ITER_MAP_COLLECT_HEAD_%out_vec:
|
|
1852
|
+
EXPAND ITER_NEXT_U64 __iter_map_collect_has_%out_vec, __iter_map_collect_value_%out_vec, %iter_reg
|
|
1853
|
+
br __iter_map_collect_has_%out_vec -> L_ITER_MAP_COLLECT_PUSH_%out_vec, L_ITER_MAP_COLLECT_DONE_%out_vec
|
|
1854
|
+
L_ITER_MAP_COLLECT_PUSH_%out_vec:
|
|
1855
|
+
__iter_map_collect_mapped_%out_vec = call %map_fn(__iter_map_collect_value_%out_vec)
|
|
1856
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_map_collect_mapped_%out_vec
|
|
1857
|
+
!__iter_map_collect_mapped_%out_vec
|
|
1858
|
+
!__iter_map_collect_value_%out_vec
|
|
1859
|
+
!__iter_map_collect_has_%out_vec
|
|
1860
|
+
jmp L_ITER_MAP_COLLECT_HEAD_%out_vec
|
|
1861
|
+
L_ITER_MAP_COLLECT_DONE_%out_vec:
|
|
1862
|
+
!__iter_map_collect_value_%out_vec
|
|
1863
|
+
!__iter_map_collect_has_%out_vec
|
|
1864
|
+
[END_MACRO]
|
|
1865
|
+
|
|
1866
|
+
// Rust method-name alias over ITER_MAP_COLLECT_U64.
|
|
1867
|
+
[MACRO] ITER_MAP_COLLECT %out_vec, %iter_reg, %map_fn
|
|
1868
|
+
EXPAND ITER_MAP_COLLECT_U64 %out_vec, %iter_reg, %map_fn
|
|
1869
|
+
[END_MACRO]
|
|
1870
|
+
|
|
1871
|
+
[MACRO] ITER_INSPECT_COLLECT_U64 %out_vec, %iter_reg, %inspect_fn
|
|
1872
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1873
|
+
jmp L_ITER_INSPECT_COLLECT_HEAD_%out_vec
|
|
1874
|
+
L_ITER_INSPECT_COLLECT_HEAD_%out_vec:
|
|
1875
|
+
EXPAND ITER_NEXT_U64 __iter_inspect_collect_has_%out_vec, __iter_inspect_collect_value_%out_vec, %iter_reg
|
|
1876
|
+
br __iter_inspect_collect_has_%out_vec -> L_ITER_INSPECT_COLLECT_PUSH_%out_vec, L_ITER_INSPECT_COLLECT_DONE_%out_vec
|
|
1877
|
+
L_ITER_INSPECT_COLLECT_PUSH_%out_vec:
|
|
1878
|
+
__iter_inspect_collect_result_%out_vec = call %inspect_fn(__iter_inspect_collect_value_%out_vec)
|
|
1879
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_inspect_collect_value_%out_vec
|
|
1880
|
+
!__iter_inspect_collect_result_%out_vec
|
|
1881
|
+
!__iter_inspect_collect_value_%out_vec
|
|
1882
|
+
!__iter_inspect_collect_has_%out_vec
|
|
1883
|
+
jmp L_ITER_INSPECT_COLLECT_HEAD_%out_vec
|
|
1884
|
+
L_ITER_INSPECT_COLLECT_DONE_%out_vec:
|
|
1885
|
+
!__iter_inspect_collect_value_%out_vec
|
|
1886
|
+
!__iter_inspect_collect_has_%out_vec
|
|
1887
|
+
[END_MACRO]
|
|
1888
|
+
|
|
1889
|
+
// Rust method-name alias over ITER_INSPECT_COLLECT_U64.
|
|
1890
|
+
[MACRO] ITER_INSPECT_COLLECT %out_vec, %iter_reg, %inspect_fn
|
|
1891
|
+
EXPAND ITER_INSPECT_COLLECT_U64 %out_vec, %iter_reg, %inspect_fn
|
|
1892
|
+
[END_MACRO]
|
|
1893
|
+
|
|
1894
|
+
[MACRO] ITER_SCAN_COLLECT_U64 %out_vec, %iter_reg, %initial_state, %scan_fn
|
|
1895
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1896
|
+
__iter_scan_state_%out_vec = stack_alloc 8
|
|
1897
|
+
__iter_scan_collect_slot_%out_vec = stack_alloc 8
|
|
1898
|
+
store __iter_scan_state_%out_vec+0, %initial_state as u64
|
|
1899
|
+
jmp L_ITER_SCAN_COLLECT_HEAD_%out_vec
|
|
1900
|
+
L_ITER_SCAN_COLLECT_HEAD_%out_vec:
|
|
1901
|
+
EXPAND ITER_NEXT_U64 __iter_scan_collect_has_%out_vec, __iter_scan_collect_value_%out_vec, %iter_reg
|
|
1902
|
+
br __iter_scan_collect_has_%out_vec -> L_ITER_SCAN_COLLECT_CHECK_%out_vec, L_ITER_SCAN_COLLECT_DONE_EMPTY_%out_vec
|
|
1903
|
+
L_ITER_SCAN_COLLECT_CHECK_%out_vec:
|
|
1904
|
+
__iter_scan_collect_yielded_%out_vec = call %scan_fn(&__iter_scan_state_%out_vec, __iter_scan_collect_value_%out_vec, &__iter_scan_collect_slot_%out_vec)
|
|
1905
|
+
__iter_scan_collect_keep_%out_vec = ne __iter_scan_collect_yielded_%out_vec, 0
|
|
1906
|
+
br __iter_scan_collect_keep_%out_vec -> L_ITER_SCAN_COLLECT_PUSH_%out_vec, L_ITER_SCAN_COLLECT_STOP_%out_vec
|
|
1907
|
+
L_ITER_SCAN_COLLECT_PUSH_%out_vec:
|
|
1908
|
+
__iter_scan_collect_mapped_%out_vec = load __iter_scan_collect_slot_%out_vec+0 as u64
|
|
1909
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_scan_collect_mapped_%out_vec
|
|
1910
|
+
!__iter_scan_collect_mapped_%out_vec
|
|
1911
|
+
!__iter_scan_collect_keep_%out_vec
|
|
1912
|
+
!__iter_scan_collect_yielded_%out_vec
|
|
1913
|
+
!__iter_scan_collect_value_%out_vec
|
|
1914
|
+
!__iter_scan_collect_has_%out_vec
|
|
1915
|
+
jmp L_ITER_SCAN_COLLECT_HEAD_%out_vec
|
|
1916
|
+
L_ITER_SCAN_COLLECT_STOP_%out_vec:
|
|
1917
|
+
!__iter_scan_collect_keep_%out_vec
|
|
1918
|
+
!__iter_scan_collect_yielded_%out_vec
|
|
1919
|
+
!__iter_scan_collect_value_%out_vec
|
|
1920
|
+
!__iter_scan_collect_has_%out_vec
|
|
1921
|
+
jmp L_ITER_SCAN_COLLECT_DONE_%out_vec
|
|
1922
|
+
L_ITER_SCAN_COLLECT_DONE_EMPTY_%out_vec:
|
|
1923
|
+
!__iter_scan_collect_value_%out_vec
|
|
1924
|
+
!__iter_scan_collect_has_%out_vec
|
|
1925
|
+
jmp L_ITER_SCAN_COLLECT_DONE_%out_vec
|
|
1926
|
+
L_ITER_SCAN_COLLECT_DONE_%out_vec:
|
|
1927
|
+
[END_MACRO]
|
|
1928
|
+
|
|
1929
|
+
// Rust method-name alias over ITER_SCAN_COLLECT_U64.
|
|
1930
|
+
[MACRO] ITER_SCAN_COLLECT %out_vec, %iter_reg, %initial_state, %scan_fn
|
|
1931
|
+
EXPAND ITER_SCAN_COLLECT_U64 %out_vec, %iter_reg, %initial_state, %scan_fn
|
|
1932
|
+
[END_MACRO]
|
|
1933
|
+
|
|
1934
|
+
[MACRO] ITER_FILTER_COLLECT_U64 %out_vec, %iter_reg, %pred_fn
|
|
1935
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1936
|
+
jmp L_ITER_FILTER_COLLECT_HEAD_%out_vec
|
|
1937
|
+
L_ITER_FILTER_COLLECT_HEAD_%out_vec:
|
|
1938
|
+
EXPAND ITER_NEXT_U64 __iter_filter_collect_has_%out_vec, __iter_filter_collect_value_%out_vec, %iter_reg
|
|
1939
|
+
br __iter_filter_collect_has_%out_vec -> L_ITER_FILTER_COLLECT_CHECK_%out_vec, L_ITER_FILTER_COLLECT_DONE_%out_vec
|
|
1940
|
+
L_ITER_FILTER_COLLECT_CHECK_%out_vec:
|
|
1941
|
+
__iter_filter_collect_pred_%out_vec = call %pred_fn(__iter_filter_collect_value_%out_vec)
|
|
1942
|
+
__iter_filter_collect_keep_%out_vec = ne __iter_filter_collect_pred_%out_vec, 0
|
|
1943
|
+
br __iter_filter_collect_keep_%out_vec -> L_ITER_FILTER_COLLECT_PUSH_%out_vec, L_ITER_FILTER_COLLECT_NEXT_%out_vec
|
|
1944
|
+
L_ITER_FILTER_COLLECT_PUSH_%out_vec:
|
|
1945
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_filter_collect_value_%out_vec
|
|
1946
|
+
!__iter_filter_collect_keep_%out_vec
|
|
1947
|
+
!__iter_filter_collect_pred_%out_vec
|
|
1948
|
+
!__iter_filter_collect_value_%out_vec
|
|
1949
|
+
!__iter_filter_collect_has_%out_vec
|
|
1950
|
+
jmp L_ITER_FILTER_COLLECT_HEAD_%out_vec
|
|
1951
|
+
L_ITER_FILTER_COLLECT_NEXT_%out_vec:
|
|
1952
|
+
!__iter_filter_collect_keep_%out_vec
|
|
1953
|
+
!__iter_filter_collect_pred_%out_vec
|
|
1954
|
+
!__iter_filter_collect_value_%out_vec
|
|
1955
|
+
!__iter_filter_collect_has_%out_vec
|
|
1956
|
+
jmp L_ITER_FILTER_COLLECT_HEAD_%out_vec
|
|
1957
|
+
L_ITER_FILTER_COLLECT_DONE_%out_vec:
|
|
1958
|
+
!__iter_filter_collect_value_%out_vec
|
|
1959
|
+
!__iter_filter_collect_has_%out_vec
|
|
1960
|
+
[END_MACRO]
|
|
1961
|
+
|
|
1962
|
+
// Rust method-name alias over ITER_FILTER_COLLECT_U64.
|
|
1963
|
+
[MACRO] ITER_FILTER_COLLECT %out_vec, %iter_reg, %pred_fn
|
|
1964
|
+
EXPAND ITER_FILTER_COLLECT_U64 %out_vec, %iter_reg, %pred_fn
|
|
1965
|
+
[END_MACRO]
|
|
1966
|
+
|
|
1967
|
+
[MACRO] ITER_FILTER_MAP_COLLECT_U64 %out_vec, %iter_reg, %map_fn
|
|
1968
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
1969
|
+
__iter_filter_map_slot_%out_vec = stack_alloc 8
|
|
1970
|
+
jmp L_ITER_FILTER_MAP_HEAD_%out_vec
|
|
1971
|
+
L_ITER_FILTER_MAP_HEAD_%out_vec:
|
|
1972
|
+
EXPAND ITER_NEXT_U64 __iter_filter_map_has_%out_vec, __iter_filter_map_value_%out_vec, %iter_reg
|
|
1973
|
+
br __iter_filter_map_has_%out_vec -> L_ITER_FILTER_MAP_CHECK_%out_vec, L_ITER_FILTER_MAP_DONE_%out_vec
|
|
1974
|
+
L_ITER_FILTER_MAP_CHECK_%out_vec:
|
|
1975
|
+
__iter_filter_map_found_%out_vec = call %map_fn(__iter_filter_map_value_%out_vec, &__iter_filter_map_slot_%out_vec)
|
|
1976
|
+
__iter_filter_map_match_%out_vec = ne __iter_filter_map_found_%out_vec, 0
|
|
1977
|
+
br __iter_filter_map_match_%out_vec -> L_ITER_FILTER_MAP_PUSH_%out_vec, L_ITER_FILTER_MAP_NEXT_%out_vec
|
|
1978
|
+
L_ITER_FILTER_MAP_PUSH_%out_vec:
|
|
1979
|
+
__iter_filter_map_mapped_%out_vec = load __iter_filter_map_slot_%out_vec+0 as u64
|
|
1980
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_filter_map_mapped_%out_vec
|
|
1981
|
+
!__iter_filter_map_mapped_%out_vec
|
|
1982
|
+
!__iter_filter_map_match_%out_vec
|
|
1983
|
+
!__iter_filter_map_found_%out_vec
|
|
1984
|
+
!__iter_filter_map_value_%out_vec
|
|
1985
|
+
!__iter_filter_map_has_%out_vec
|
|
1986
|
+
jmp L_ITER_FILTER_MAP_HEAD_%out_vec
|
|
1987
|
+
L_ITER_FILTER_MAP_NEXT_%out_vec:
|
|
1988
|
+
!__iter_filter_map_match_%out_vec
|
|
1989
|
+
!__iter_filter_map_found_%out_vec
|
|
1990
|
+
!__iter_filter_map_value_%out_vec
|
|
1991
|
+
!__iter_filter_map_has_%out_vec
|
|
1992
|
+
jmp L_ITER_FILTER_MAP_HEAD_%out_vec
|
|
1993
|
+
L_ITER_FILTER_MAP_DONE_%out_vec:
|
|
1994
|
+
!__iter_filter_map_value_%out_vec
|
|
1995
|
+
!__iter_filter_map_has_%out_vec
|
|
1996
|
+
[END_MACRO]
|
|
1997
|
+
|
|
1998
|
+
// Rust method-name alias over ITER_FILTER_MAP_COLLECT_U64.
|
|
1999
|
+
[MACRO] ITER_FILTER_MAP_COLLECT %out_vec, %iter_reg, %map_fn
|
|
2000
|
+
EXPAND ITER_FILTER_MAP_COLLECT_U64 %out_vec, %iter_reg, %map_fn
|
|
2001
|
+
[END_MACRO]
|
|
2002
|
+
|
|
2003
|
+
[MACRO] ITER_MAP_WHILE_COLLECT_U64 %out_vec, %iter_reg, %map_fn
|
|
2004
|
+
EXPAND ITER_VEC_NEW %out_vec
|
|
2005
|
+
__iter_map_while_slot_%out_vec = stack_alloc 8
|
|
2006
|
+
jmp L_ITER_MAP_WHILE_HEAD_%out_vec
|
|
2007
|
+
L_ITER_MAP_WHILE_HEAD_%out_vec:
|
|
2008
|
+
EXPAND ITER_NEXT_U64 __iter_map_while_has_%out_vec, __iter_map_while_value_%out_vec, %iter_reg
|
|
2009
|
+
br __iter_map_while_has_%out_vec -> L_ITER_MAP_WHILE_CHECK_%out_vec, L_ITER_MAP_WHILE_DONE_EMPTY_%out_vec
|
|
2010
|
+
L_ITER_MAP_WHILE_CHECK_%out_vec:
|
|
2011
|
+
__iter_map_while_found_%out_vec = call %map_fn(__iter_map_while_value_%out_vec, &__iter_map_while_slot_%out_vec)
|
|
2012
|
+
__iter_map_while_keep_%out_vec = ne __iter_map_while_found_%out_vec, 0
|
|
2013
|
+
br __iter_map_while_keep_%out_vec -> L_ITER_MAP_WHILE_PUSH_%out_vec, L_ITER_MAP_WHILE_STOP_%out_vec
|
|
2014
|
+
L_ITER_MAP_WHILE_PUSH_%out_vec:
|
|
2015
|
+
__iter_map_while_mapped_%out_vec = load __iter_map_while_slot_%out_vec+0 as u64
|
|
2016
|
+
EXPAND ITER_VEC_PUSH_U64 %out_vec, __iter_map_while_mapped_%out_vec
|
|
2017
|
+
!__iter_map_while_mapped_%out_vec
|
|
2018
|
+
!__iter_map_while_keep_%out_vec
|
|
2019
|
+
!__iter_map_while_found_%out_vec
|
|
2020
|
+
!__iter_map_while_value_%out_vec
|
|
2021
|
+
!__iter_map_while_has_%out_vec
|
|
2022
|
+
jmp L_ITER_MAP_WHILE_HEAD_%out_vec
|
|
2023
|
+
L_ITER_MAP_WHILE_STOP_%out_vec:
|
|
2024
|
+
!__iter_map_while_keep_%out_vec
|
|
2025
|
+
!__iter_map_while_found_%out_vec
|
|
2026
|
+
!__iter_map_while_value_%out_vec
|
|
2027
|
+
!__iter_map_while_has_%out_vec
|
|
2028
|
+
jmp L_ITER_MAP_WHILE_DONE_%out_vec
|
|
2029
|
+
L_ITER_MAP_WHILE_DONE_EMPTY_%out_vec:
|
|
2030
|
+
!__iter_map_while_value_%out_vec
|
|
2031
|
+
!__iter_map_while_has_%out_vec
|
|
2032
|
+
jmp L_ITER_MAP_WHILE_DONE_%out_vec
|
|
2033
|
+
L_ITER_MAP_WHILE_DONE_%out_vec:
|
|
2034
|
+
[END_MACRO]
|
|
2035
|
+
|
|
2036
|
+
// Rust method-name alias over ITER_MAP_WHILE_COLLECT_U64.
|
|
2037
|
+
[MACRO] ITER_MAP_WHILE_COLLECT %out_vec, %iter_reg, %map_fn
|
|
2038
|
+
EXPAND ITER_MAP_WHILE_COLLECT_U64 %out_vec, %iter_reg, %map_fn
|
|
2039
|
+
[END_MACRO]
|
|
2040
|
+
|
|
2041
|
+
[MACRO] ITER_PARTITION_U64 %out_true_vec, %out_false_vec, %iter_reg, %pred_fn
|
|
2042
|
+
EXPAND ITER_VEC_NEW %out_true_vec
|
|
2043
|
+
EXPAND ITER_VEC_NEW %out_false_vec
|
|
2044
|
+
jmp L_ITER_PARTITION_HEAD_%out_true_vec
|
|
2045
|
+
L_ITER_PARTITION_HEAD_%out_true_vec:
|
|
2046
|
+
EXPAND ITER_NEXT_U64 __iter_partition_has_%out_true_vec, __iter_partition_value_%out_true_vec, %iter_reg
|
|
2047
|
+
br __iter_partition_has_%out_true_vec -> L_ITER_PARTITION_CHECK_%out_true_vec, L_ITER_PARTITION_DONE_%out_true_vec
|
|
2048
|
+
L_ITER_PARTITION_CHECK_%out_true_vec:
|
|
2049
|
+
__iter_partition_pred_%out_true_vec = call %pred_fn(__iter_partition_value_%out_true_vec)
|
|
2050
|
+
__iter_partition_take_true_%out_true_vec = ne __iter_partition_pred_%out_true_vec, 0
|
|
2051
|
+
br __iter_partition_take_true_%out_true_vec -> L_ITER_PARTITION_PUSH_TRUE_%out_true_vec, L_ITER_PARTITION_PUSH_FALSE_%out_true_vec
|
|
2052
|
+
L_ITER_PARTITION_PUSH_TRUE_%out_true_vec:
|
|
2053
|
+
EXPAND ITER_VEC_PUSH_U64 %out_true_vec, __iter_partition_value_%out_true_vec
|
|
2054
|
+
!__iter_partition_take_true_%out_true_vec
|
|
2055
|
+
!__iter_partition_pred_%out_true_vec
|
|
2056
|
+
!__iter_partition_value_%out_true_vec
|
|
2057
|
+
!__iter_partition_has_%out_true_vec
|
|
2058
|
+
jmp L_ITER_PARTITION_HEAD_%out_true_vec
|
|
2059
|
+
L_ITER_PARTITION_PUSH_FALSE_%out_true_vec:
|
|
2060
|
+
EXPAND ITER_VEC_PUSH_U64 %out_false_vec, __iter_partition_value_%out_true_vec
|
|
2061
|
+
!__iter_partition_take_true_%out_true_vec
|
|
2062
|
+
!__iter_partition_pred_%out_true_vec
|
|
2063
|
+
!__iter_partition_value_%out_true_vec
|
|
2064
|
+
!__iter_partition_has_%out_true_vec
|
|
2065
|
+
jmp L_ITER_PARTITION_HEAD_%out_true_vec
|
|
2066
|
+
L_ITER_PARTITION_DONE_%out_true_vec:
|
|
2067
|
+
!__iter_partition_value_%out_true_vec
|
|
2068
|
+
!__iter_partition_has_%out_true_vec
|
|
2069
|
+
[END_MACRO]
|
|
2070
|
+
|
|
2071
|
+
// Rust method-name alias over ITER_PARTITION_U64.
|
|
2072
|
+
[MACRO] ITER_PARTITION %out_true_vec, %out_false_vec, %iter_reg, %pred_fn
|
|
2073
|
+
EXPAND ITER_PARTITION_U64 %out_true_vec, %out_false_vec, %iter_reg, %pred_fn
|
|
2074
|
+
[END_MACRO]
|
|
2075
|
+
|
|
2076
|
+
[MACRO] ITER_PARTITION_IN_PLACE_U64 %out_count, %iter_reg, %pred_fn
|
|
2077
|
+
__iter_partition_in_place_ptr_%out_count = load %iter_reg+Iter_ptr as ptr
|
|
2078
|
+
__iter_partition_in_place_len_%out_count = load %iter_reg+Iter_len as u64
|
|
2079
|
+
__iter_partition_in_place_left_%out_count = load %iter_reg+Iter_index as u64
|
|
2080
|
+
__iter_partition_in_place_right_%out_count = add __iter_partition_in_place_len_%out_count, 0
|
|
2081
|
+
%out_count = add 0, 0
|
|
2082
|
+
jmp L_ITER_PARTITION_IN_PLACE_HEAD_%out_count
|
|
2083
|
+
L_ITER_PARTITION_IN_PLACE_HEAD_%out_count:
|
|
2084
|
+
__iter_partition_in_place_head_done_%out_count = uge __iter_partition_in_place_left_%out_count, __iter_partition_in_place_right_%out_count
|
|
2085
|
+
br __iter_partition_in_place_head_done_%out_count -> L_ITER_PARTITION_IN_PLACE_HEAD_DONE_%out_count, L_ITER_PARTITION_IN_PLACE_CHECK_HEAD_%out_count
|
|
2086
|
+
L_ITER_PARTITION_IN_PLACE_CHECK_HEAD_%out_count:
|
|
2087
|
+
!__iter_partition_in_place_head_done_%out_count
|
|
2088
|
+
__iter_partition_in_place_head_off_%out_count = mul __iter_partition_in_place_left_%out_count, 8
|
|
2089
|
+
__iter_partition_in_place_head_ptr_%out_count = ptr_add __iter_partition_in_place_ptr_%out_count, __iter_partition_in_place_head_off_%out_count
|
|
2090
|
+
__iter_partition_in_place_head_value_%out_count = load __iter_partition_in_place_head_ptr_%out_count+0 as u64
|
|
2091
|
+
__iter_partition_in_place_head_pred_%out_count = call %pred_fn(__iter_partition_in_place_head_value_%out_count)
|
|
2092
|
+
__iter_partition_in_place_head_true_%out_count = ne __iter_partition_in_place_head_pred_%out_count, 0
|
|
2093
|
+
br __iter_partition_in_place_head_true_%out_count -> L_ITER_PARTITION_IN_PLACE_ADVANCE_TRUE_%out_count, L_ITER_PARTITION_IN_PLACE_TAIL_START_%out_count
|
|
2094
|
+
L_ITER_PARTITION_IN_PLACE_ADVANCE_TRUE_%out_count:
|
|
2095
|
+
__iter_partition_in_place_next_count_%out_count = add %out_count, 1
|
|
2096
|
+
!%out_count
|
|
2097
|
+
%out_count = add __iter_partition_in_place_next_count_%out_count, 0
|
|
2098
|
+
__iter_partition_in_place_next_left_%out_count = add __iter_partition_in_place_left_%out_count, 1
|
|
2099
|
+
!__iter_partition_in_place_left_%out_count
|
|
2100
|
+
__iter_partition_in_place_left_%out_count = add __iter_partition_in_place_next_left_%out_count, 0
|
|
2101
|
+
!__iter_partition_in_place_next_left_%out_count
|
|
2102
|
+
!__iter_partition_in_place_next_count_%out_count
|
|
2103
|
+
!__iter_partition_in_place_head_true_%out_count
|
|
2104
|
+
!__iter_partition_in_place_head_pred_%out_count
|
|
2105
|
+
!__iter_partition_in_place_head_value_%out_count
|
|
2106
|
+
!__iter_partition_in_place_head_ptr_%out_count
|
|
2107
|
+
!__iter_partition_in_place_head_off_%out_count
|
|
2108
|
+
jmp L_ITER_PARTITION_IN_PLACE_HEAD_%out_count
|
|
2109
|
+
L_ITER_PARTITION_IN_PLACE_TAIL_START_%out_count:
|
|
2110
|
+
!__iter_partition_in_place_head_true_%out_count
|
|
2111
|
+
!__iter_partition_in_place_head_pred_%out_count
|
|
2112
|
+
!__iter_partition_in_place_head_value_%out_count
|
|
2113
|
+
!__iter_partition_in_place_head_ptr_%out_count
|
|
2114
|
+
!__iter_partition_in_place_head_off_%out_count
|
|
2115
|
+
jmp L_ITER_PARTITION_IN_PLACE_TAIL_HEAD_%out_count
|
|
2116
|
+
L_ITER_PARTITION_IN_PLACE_TAIL_HEAD_%out_count:
|
|
2117
|
+
__iter_partition_in_place_tail_min_%out_count = add __iter_partition_in_place_left_%out_count, 1
|
|
2118
|
+
__iter_partition_in_place_tail_done_%out_count = ule __iter_partition_in_place_right_%out_count, __iter_partition_in_place_tail_min_%out_count
|
|
2119
|
+
br __iter_partition_in_place_tail_done_%out_count -> L_ITER_PARTITION_IN_PLACE_TAIL_DONE_%out_count, L_ITER_PARTITION_IN_PLACE_CHECK_TAIL_%out_count
|
|
2120
|
+
L_ITER_PARTITION_IN_PLACE_CHECK_TAIL_%out_count:
|
|
2121
|
+
!__iter_partition_in_place_tail_done_%out_count
|
|
2122
|
+
!__iter_partition_in_place_tail_min_%out_count
|
|
2123
|
+
__iter_partition_in_place_tail_index_%out_count = sub __iter_partition_in_place_right_%out_count, 1
|
|
2124
|
+
__iter_partition_in_place_tail_off_%out_count = mul __iter_partition_in_place_tail_index_%out_count, 8
|
|
2125
|
+
__iter_partition_in_place_tail_ptr_%out_count = ptr_add __iter_partition_in_place_ptr_%out_count, __iter_partition_in_place_tail_off_%out_count
|
|
2126
|
+
__iter_partition_in_place_tail_value_%out_count = load __iter_partition_in_place_tail_ptr_%out_count+0 as u64
|
|
2127
|
+
__iter_partition_in_place_tail_pred_%out_count = call %pred_fn(__iter_partition_in_place_tail_value_%out_count)
|
|
2128
|
+
__iter_partition_in_place_tail_true_%out_count = ne __iter_partition_in_place_tail_pred_%out_count, 0
|
|
2129
|
+
br __iter_partition_in_place_tail_true_%out_count -> L_ITER_PARTITION_IN_PLACE_SWAP_%out_count, L_ITER_PARTITION_IN_PLACE_DROP_TAIL_%out_count
|
|
2130
|
+
L_ITER_PARTITION_IN_PLACE_DROP_TAIL_%out_count:
|
|
2131
|
+
!__iter_partition_in_place_right_%out_count
|
|
2132
|
+
__iter_partition_in_place_right_%out_count = add __iter_partition_in_place_tail_index_%out_count, 0
|
|
2133
|
+
!__iter_partition_in_place_tail_true_%out_count
|
|
2134
|
+
!__iter_partition_in_place_tail_pred_%out_count
|
|
2135
|
+
!__iter_partition_in_place_tail_value_%out_count
|
|
2136
|
+
!__iter_partition_in_place_tail_ptr_%out_count
|
|
2137
|
+
!__iter_partition_in_place_tail_off_%out_count
|
|
2138
|
+
!__iter_partition_in_place_tail_index_%out_count
|
|
2139
|
+
jmp L_ITER_PARTITION_IN_PLACE_TAIL_HEAD_%out_count
|
|
2140
|
+
L_ITER_PARTITION_IN_PLACE_SWAP_%out_count:
|
|
2141
|
+
__iter_partition_in_place_left_off_%out_count = mul __iter_partition_in_place_left_%out_count, 8
|
|
2142
|
+
__iter_partition_in_place_left_ptr_%out_count = ptr_add __iter_partition_in_place_ptr_%out_count, __iter_partition_in_place_left_off_%out_count
|
|
2143
|
+
__iter_partition_in_place_left_value_%out_count = load __iter_partition_in_place_left_ptr_%out_count+0 as u64
|
|
2144
|
+
store __iter_partition_in_place_left_ptr_%out_count+0, __iter_partition_in_place_tail_value_%out_count as u64
|
|
2145
|
+
store __iter_partition_in_place_tail_ptr_%out_count+0, __iter_partition_in_place_left_value_%out_count as u64
|
|
2146
|
+
__iter_partition_in_place_swap_count_%out_count = add %out_count, 1
|
|
2147
|
+
!%out_count
|
|
2148
|
+
%out_count = add __iter_partition_in_place_swap_count_%out_count, 0
|
|
2149
|
+
__iter_partition_in_place_swap_left_%out_count = add __iter_partition_in_place_left_%out_count, 1
|
|
2150
|
+
!__iter_partition_in_place_left_%out_count
|
|
2151
|
+
__iter_partition_in_place_left_%out_count = add __iter_partition_in_place_swap_left_%out_count, 0
|
|
2152
|
+
!__iter_partition_in_place_right_%out_count
|
|
2153
|
+
__iter_partition_in_place_right_%out_count = add __iter_partition_in_place_tail_index_%out_count, 0
|
|
2154
|
+
!__iter_partition_in_place_swap_left_%out_count
|
|
2155
|
+
!__iter_partition_in_place_swap_count_%out_count
|
|
2156
|
+
!__iter_partition_in_place_left_value_%out_count
|
|
2157
|
+
!__iter_partition_in_place_left_ptr_%out_count
|
|
2158
|
+
!__iter_partition_in_place_left_off_%out_count
|
|
2159
|
+
!__iter_partition_in_place_tail_true_%out_count
|
|
2160
|
+
!__iter_partition_in_place_tail_pred_%out_count
|
|
2161
|
+
!__iter_partition_in_place_tail_value_%out_count
|
|
2162
|
+
!__iter_partition_in_place_tail_ptr_%out_count
|
|
2163
|
+
!__iter_partition_in_place_tail_off_%out_count
|
|
2164
|
+
!__iter_partition_in_place_tail_index_%out_count
|
|
2165
|
+
jmp L_ITER_PARTITION_IN_PLACE_HEAD_%out_count
|
|
2166
|
+
L_ITER_PARTITION_IN_PLACE_TAIL_DONE_%out_count:
|
|
2167
|
+
!__iter_partition_in_place_tail_done_%out_count
|
|
2168
|
+
!__iter_partition_in_place_tail_min_%out_count
|
|
2169
|
+
jmp L_ITER_PARTITION_IN_PLACE_DONE_%out_count
|
|
2170
|
+
L_ITER_PARTITION_IN_PLACE_HEAD_DONE_%out_count:
|
|
2171
|
+
!__iter_partition_in_place_head_done_%out_count
|
|
2172
|
+
jmp L_ITER_PARTITION_IN_PLACE_DONE_%out_count
|
|
2173
|
+
L_ITER_PARTITION_IN_PLACE_DONE_%out_count:
|
|
2174
|
+
store %iter_reg+Iter_index, __iter_partition_in_place_len_%out_count as u64
|
|
2175
|
+
!__iter_partition_in_place_right_%out_count
|
|
2176
|
+
!__iter_partition_in_place_left_%out_count
|
|
2177
|
+
!__iter_partition_in_place_len_%out_count
|
|
2178
|
+
!__iter_partition_in_place_ptr_%out_count
|
|
2179
|
+
[END_MACRO]
|
|
2180
|
+
|
|
2181
|
+
// Rust method-name alias over ITER_PARTITION_IN_PLACE_U64.
|
|
2182
|
+
[MACRO] ITER_PARTITION_IN_PLACE %out_count, %iter_reg, %pred_fn
|
|
2183
|
+
EXPAND ITER_PARTITION_IN_PLACE_U64 %out_count, %iter_reg, %pred_fn
|
|
2184
|
+
[END_MACRO]
|
|
2185
|
+
|
|
2186
|
+
[MACRO] ITER_IS_PARTITIONED_U64 %out_bool, %iter_reg, %pred_fn
|
|
2187
|
+
EXPAND ITER_ALL_U64 __iter_partitioned_all_%out_bool, %iter_reg, %pred_fn
|
|
2188
|
+
br __iter_partitioned_all_%out_bool -> L_ITER_IS_PARTITIONED_TRUE_%out_bool, L_ITER_IS_PARTITIONED_CHECK_REST_%out_bool
|
|
2189
|
+
L_ITER_IS_PARTITIONED_TRUE_%out_bool:
|
|
2190
|
+
%out_bool = add 0, 1
|
|
2191
|
+
!__iter_partitioned_all_%out_bool
|
|
2192
|
+
jmp L_ITER_IS_PARTITIONED_END_%out_bool
|
|
2193
|
+
L_ITER_IS_PARTITIONED_CHECK_REST_%out_bool:
|
|
2194
|
+
EXPAND ITER_ANY_U64 __iter_partitioned_any_%out_bool, %iter_reg, %pred_fn
|
|
2195
|
+
%out_bool = eq __iter_partitioned_any_%out_bool, 0
|
|
2196
|
+
!__iter_partitioned_any_%out_bool
|
|
2197
|
+
!__iter_partitioned_all_%out_bool
|
|
2198
|
+
L_ITER_IS_PARTITIONED_END_%out_bool:
|
|
2199
|
+
[END_MACRO]
|
|
2200
|
+
|
|
2201
|
+
// Rust method-name alias over ITER_IS_PARTITIONED_U64.
|
|
2202
|
+
[MACRO] ITER_IS_PARTITIONED %out_bool, %iter_reg, %pred_fn
|
|
2203
|
+
EXPAND ITER_IS_PARTITIONED_U64 %out_bool, %iter_reg, %pred_fn
|
|
2204
|
+
[END_MACRO]
|
|
2205
|
+
|
|
2206
|
+
[MACRO] ITER_MIN_BY_U64 %out_has, %out_value, %iter_reg, %compare_fn
|
|
2207
|
+
EXPAND ITER_NEXT_U64 __iter_min_by_has_%out_has, __iter_min_by_value_%out_has, %iter_reg
|
|
2208
|
+
br __iter_min_by_has_%out_has -> L_ITER_MIN_BY_INIT_%out_has, L_ITER_MIN_BY_NONE_%out_has
|
|
2209
|
+
L_ITER_MIN_BY_INIT_%out_has:
|
|
2210
|
+
__iter_min_by_slot_%out_has = stack_alloc 8
|
|
2211
|
+
store __iter_min_by_slot_%out_has+0, __iter_min_by_value_%out_has as u64
|
|
2212
|
+
!__iter_min_by_value_%out_has
|
|
2213
|
+
!__iter_min_by_has_%out_has
|
|
2214
|
+
jmp L_ITER_MIN_BY_HEAD_%out_has
|
|
2215
|
+
L_ITER_MIN_BY_HEAD_%out_has:
|
|
2216
|
+
EXPAND ITER_NEXT_U64 __iter_min_by_next_has_%out_has, __iter_min_by_next_value_%out_has, %iter_reg
|
|
2217
|
+
br __iter_min_by_next_has_%out_has -> L_ITER_MIN_BY_BODY_%out_has, L_ITER_MIN_BY_DONE_%out_has
|
|
2218
|
+
L_ITER_MIN_BY_BODY_%out_has:
|
|
2219
|
+
__iter_min_by_current_%out_has = load __iter_min_by_slot_%out_has+0 as u64
|
|
2220
|
+
__iter_min_by_order_%out_has = call %compare_fn(__iter_min_by_next_value_%out_has, __iter_min_by_current_%out_has)
|
|
2221
|
+
__iter_min_by_take_%out_has = slt __iter_min_by_order_%out_has, 0
|
|
2222
|
+
br __iter_min_by_take_%out_has -> L_ITER_MIN_BY_STORE_%out_has, L_ITER_MIN_BY_KEEP_%out_has
|
|
2223
|
+
L_ITER_MIN_BY_STORE_%out_has:
|
|
2224
|
+
store __iter_min_by_slot_%out_has+0, __iter_min_by_next_value_%out_has as u64
|
|
2225
|
+
jmp L_ITER_MIN_BY_NEXT_%out_has
|
|
2226
|
+
L_ITER_MIN_BY_KEEP_%out_has:
|
|
2227
|
+
jmp L_ITER_MIN_BY_NEXT_%out_has
|
|
2228
|
+
L_ITER_MIN_BY_NEXT_%out_has:
|
|
2229
|
+
!__iter_min_by_take_%out_has
|
|
2230
|
+
!__iter_min_by_order_%out_has
|
|
2231
|
+
!__iter_min_by_current_%out_has
|
|
2232
|
+
!__iter_min_by_next_value_%out_has
|
|
2233
|
+
!__iter_min_by_next_has_%out_has
|
|
2234
|
+
jmp L_ITER_MIN_BY_HEAD_%out_has
|
|
2235
|
+
L_ITER_MIN_BY_DONE_%out_has:
|
|
2236
|
+
%out_value = load __iter_min_by_slot_%out_has+0 as u64
|
|
2237
|
+
%out_has = add 0, 1
|
|
2238
|
+
!__iter_min_by_next_value_%out_has
|
|
2239
|
+
!__iter_min_by_next_has_%out_has
|
|
2240
|
+
jmp L_ITER_MIN_BY_END_%out_has
|
|
2241
|
+
L_ITER_MIN_BY_NONE_%out_has:
|
|
2242
|
+
%out_value = add 0, 0
|
|
2243
|
+
%out_has = add 0, 0
|
|
2244
|
+
!__iter_min_by_value_%out_has
|
|
2245
|
+
!__iter_min_by_has_%out_has
|
|
2246
|
+
L_ITER_MIN_BY_END_%out_has:
|
|
2247
|
+
[END_MACRO]
|
|
2248
|
+
|
|
2249
|
+
// Rust method-name alias over ITER_MIN_BY_U64.
|
|
2250
|
+
[MACRO] ITER_MIN_BY %out_has, %out_value, %iter_reg, %compare_fn
|
|
2251
|
+
EXPAND ITER_MIN_BY_U64 %out_has, %out_value, %iter_reg, %compare_fn
|
|
2252
|
+
[END_MACRO]
|
|
2253
|
+
|
|
2254
|
+
[MACRO] ITER_MAX_BY_U64 %out_has, %out_value, %iter_reg, %compare_fn
|
|
2255
|
+
EXPAND ITER_NEXT_U64 __iter_max_by_has_%out_has, __iter_max_by_value_%out_has, %iter_reg
|
|
2256
|
+
br __iter_max_by_has_%out_has -> L_ITER_MAX_BY_INIT_%out_has, L_ITER_MAX_BY_NONE_%out_has
|
|
2257
|
+
L_ITER_MAX_BY_INIT_%out_has:
|
|
2258
|
+
__iter_max_by_slot_%out_has = stack_alloc 8
|
|
2259
|
+
store __iter_max_by_slot_%out_has+0, __iter_max_by_value_%out_has as u64
|
|
2260
|
+
!__iter_max_by_value_%out_has
|
|
2261
|
+
!__iter_max_by_has_%out_has
|
|
2262
|
+
jmp L_ITER_MAX_BY_HEAD_%out_has
|
|
2263
|
+
L_ITER_MAX_BY_HEAD_%out_has:
|
|
2264
|
+
EXPAND ITER_NEXT_U64 __iter_max_by_next_has_%out_has, __iter_max_by_next_value_%out_has, %iter_reg
|
|
2265
|
+
br __iter_max_by_next_has_%out_has -> L_ITER_MAX_BY_BODY_%out_has, L_ITER_MAX_BY_DONE_%out_has
|
|
2266
|
+
L_ITER_MAX_BY_BODY_%out_has:
|
|
2267
|
+
__iter_max_by_current_%out_has = load __iter_max_by_slot_%out_has+0 as u64
|
|
2268
|
+
__iter_max_by_order_%out_has = call %compare_fn(__iter_max_by_next_value_%out_has, __iter_max_by_current_%out_has)
|
|
2269
|
+
__iter_max_by_take_%out_has = sgt __iter_max_by_order_%out_has, 0
|
|
2270
|
+
br __iter_max_by_take_%out_has -> L_ITER_MAX_BY_STORE_%out_has, L_ITER_MAX_BY_KEEP_%out_has
|
|
2271
|
+
L_ITER_MAX_BY_STORE_%out_has:
|
|
2272
|
+
store __iter_max_by_slot_%out_has+0, __iter_max_by_next_value_%out_has as u64
|
|
2273
|
+
jmp L_ITER_MAX_BY_NEXT_%out_has
|
|
2274
|
+
L_ITER_MAX_BY_KEEP_%out_has:
|
|
2275
|
+
jmp L_ITER_MAX_BY_NEXT_%out_has
|
|
2276
|
+
L_ITER_MAX_BY_NEXT_%out_has:
|
|
2277
|
+
!__iter_max_by_take_%out_has
|
|
2278
|
+
!__iter_max_by_order_%out_has
|
|
2279
|
+
!__iter_max_by_current_%out_has
|
|
2280
|
+
!__iter_max_by_next_value_%out_has
|
|
2281
|
+
!__iter_max_by_next_has_%out_has
|
|
2282
|
+
jmp L_ITER_MAX_BY_HEAD_%out_has
|
|
2283
|
+
L_ITER_MAX_BY_DONE_%out_has:
|
|
2284
|
+
%out_value = load __iter_max_by_slot_%out_has+0 as u64
|
|
2285
|
+
%out_has = add 0, 1
|
|
2286
|
+
!__iter_max_by_next_value_%out_has
|
|
2287
|
+
!__iter_max_by_next_has_%out_has
|
|
2288
|
+
jmp L_ITER_MAX_BY_END_%out_has
|
|
2289
|
+
L_ITER_MAX_BY_NONE_%out_has:
|
|
2290
|
+
%out_value = add 0, 0
|
|
2291
|
+
%out_has = add 0, 0
|
|
2292
|
+
!__iter_max_by_value_%out_has
|
|
2293
|
+
!__iter_max_by_has_%out_has
|
|
2294
|
+
L_ITER_MAX_BY_END_%out_has:
|
|
2295
|
+
[END_MACRO]
|
|
2296
|
+
|
|
2297
|
+
// Rust method-name alias over ITER_MAX_BY_U64.
|
|
2298
|
+
[MACRO] ITER_MAX_BY %out_has, %out_value, %iter_reg, %compare_fn
|
|
2299
|
+
EXPAND ITER_MAX_BY_U64 %out_has, %out_value, %iter_reg, %compare_fn
|
|
2300
|
+
[END_MACRO]
|
|
2301
|
+
|
|
2302
|
+
[MACRO] ITER_MIN_BY_KEY_U64 %out_has, %out_value, %iter_reg, %key_fn
|
|
2303
|
+
EXPAND ITER_NEXT_U64 __iter_min_key_has_%out_has, __iter_min_key_value_%out_has, %iter_reg
|
|
2304
|
+
br __iter_min_key_has_%out_has -> L_ITER_MIN_KEY_INIT_%out_has, L_ITER_MIN_KEY_NONE_%out_has
|
|
2305
|
+
L_ITER_MIN_KEY_INIT_%out_has:
|
|
2306
|
+
__iter_min_key_slot_%out_has = stack_alloc 8
|
|
2307
|
+
store __iter_min_key_slot_%out_has+0, __iter_min_key_value_%out_has as u64
|
|
2308
|
+
!__iter_min_key_value_%out_has
|
|
2309
|
+
!__iter_min_key_has_%out_has
|
|
2310
|
+
jmp L_ITER_MIN_KEY_HEAD_%out_has
|
|
2311
|
+
L_ITER_MIN_KEY_HEAD_%out_has:
|
|
2312
|
+
EXPAND ITER_NEXT_U64 __iter_min_key_next_has_%out_has, __iter_min_key_next_value_%out_has, %iter_reg
|
|
2313
|
+
br __iter_min_key_next_has_%out_has -> L_ITER_MIN_KEY_BODY_%out_has, L_ITER_MIN_KEY_DONE_%out_has
|
|
2314
|
+
L_ITER_MIN_KEY_BODY_%out_has:
|
|
2315
|
+
__iter_min_key_current_%out_has = load __iter_min_key_slot_%out_has+0 as u64
|
|
2316
|
+
__iter_min_key_current_key_%out_has = call %key_fn(__iter_min_key_current_%out_has)
|
|
2317
|
+
__iter_min_key_next_key_%out_has = call %key_fn(__iter_min_key_next_value_%out_has)
|
|
2318
|
+
__iter_min_key_take_%out_has = ult __iter_min_key_next_key_%out_has, __iter_min_key_current_key_%out_has
|
|
2319
|
+
br __iter_min_key_take_%out_has -> L_ITER_MIN_KEY_STORE_%out_has, L_ITER_MIN_KEY_KEEP_%out_has
|
|
2320
|
+
L_ITER_MIN_KEY_STORE_%out_has:
|
|
2321
|
+
store __iter_min_key_slot_%out_has+0, __iter_min_key_next_value_%out_has as u64
|
|
2322
|
+
jmp L_ITER_MIN_KEY_NEXT_%out_has
|
|
2323
|
+
L_ITER_MIN_KEY_KEEP_%out_has:
|
|
2324
|
+
jmp L_ITER_MIN_KEY_NEXT_%out_has
|
|
2325
|
+
L_ITER_MIN_KEY_NEXT_%out_has:
|
|
2326
|
+
!__iter_min_key_take_%out_has
|
|
2327
|
+
!__iter_min_key_next_key_%out_has
|
|
2328
|
+
!__iter_min_key_current_key_%out_has
|
|
2329
|
+
!__iter_min_key_current_%out_has
|
|
2330
|
+
!__iter_min_key_next_value_%out_has
|
|
2331
|
+
!__iter_min_key_next_has_%out_has
|
|
2332
|
+
jmp L_ITER_MIN_KEY_HEAD_%out_has
|
|
2333
|
+
L_ITER_MIN_KEY_DONE_%out_has:
|
|
2334
|
+
%out_value = load __iter_min_key_slot_%out_has+0 as u64
|
|
2335
|
+
%out_has = add 0, 1
|
|
2336
|
+
!__iter_min_key_next_value_%out_has
|
|
2337
|
+
!__iter_min_key_next_has_%out_has
|
|
2338
|
+
jmp L_ITER_MIN_KEY_END_%out_has
|
|
2339
|
+
L_ITER_MIN_KEY_NONE_%out_has:
|
|
2340
|
+
%out_value = add 0, 0
|
|
2341
|
+
%out_has = add 0, 0
|
|
2342
|
+
!__iter_min_key_value_%out_has
|
|
2343
|
+
!__iter_min_key_has_%out_has
|
|
2344
|
+
L_ITER_MIN_KEY_END_%out_has:
|
|
2345
|
+
[END_MACRO]
|
|
2346
|
+
|
|
2347
|
+
// Rust method-name alias over ITER_MIN_BY_KEY_U64.
|
|
2348
|
+
[MACRO] ITER_MIN_BY_KEY %out_has, %out_value, %iter_reg, %key_fn
|
|
2349
|
+
EXPAND ITER_MIN_BY_KEY_U64 %out_has, %out_value, %iter_reg, %key_fn
|
|
2350
|
+
[END_MACRO]
|
|
2351
|
+
|
|
2352
|
+
[MACRO] ITER_MAX_BY_KEY_U64 %out_has, %out_value, %iter_reg, %key_fn
|
|
2353
|
+
EXPAND ITER_NEXT_U64 __iter_max_key_has_%out_has, __iter_max_key_value_%out_has, %iter_reg
|
|
2354
|
+
br __iter_max_key_has_%out_has -> L_ITER_MAX_KEY_INIT_%out_has, L_ITER_MAX_KEY_NONE_%out_has
|
|
2355
|
+
L_ITER_MAX_KEY_INIT_%out_has:
|
|
2356
|
+
__iter_max_key_slot_%out_has = stack_alloc 8
|
|
2357
|
+
store __iter_max_key_slot_%out_has+0, __iter_max_key_value_%out_has as u64
|
|
2358
|
+
!__iter_max_key_value_%out_has
|
|
2359
|
+
!__iter_max_key_has_%out_has
|
|
2360
|
+
jmp L_ITER_MAX_KEY_HEAD_%out_has
|
|
2361
|
+
L_ITER_MAX_KEY_HEAD_%out_has:
|
|
2362
|
+
EXPAND ITER_NEXT_U64 __iter_max_key_next_has_%out_has, __iter_max_key_next_value_%out_has, %iter_reg
|
|
2363
|
+
br __iter_max_key_next_has_%out_has -> L_ITER_MAX_KEY_BODY_%out_has, L_ITER_MAX_KEY_DONE_%out_has
|
|
2364
|
+
L_ITER_MAX_KEY_BODY_%out_has:
|
|
2365
|
+
__iter_max_key_current_%out_has = load __iter_max_key_slot_%out_has+0 as u64
|
|
2366
|
+
__iter_max_key_current_key_%out_has = call %key_fn(__iter_max_key_current_%out_has)
|
|
2367
|
+
__iter_max_key_next_key_%out_has = call %key_fn(__iter_max_key_next_value_%out_has)
|
|
2368
|
+
__iter_max_key_take_%out_has = ugt __iter_max_key_next_key_%out_has, __iter_max_key_current_key_%out_has
|
|
2369
|
+
br __iter_max_key_take_%out_has -> L_ITER_MAX_KEY_STORE_%out_has, L_ITER_MAX_KEY_KEEP_%out_has
|
|
2370
|
+
L_ITER_MAX_KEY_STORE_%out_has:
|
|
2371
|
+
store __iter_max_key_slot_%out_has+0, __iter_max_key_next_value_%out_has as u64
|
|
2372
|
+
jmp L_ITER_MAX_KEY_NEXT_%out_has
|
|
2373
|
+
L_ITER_MAX_KEY_KEEP_%out_has:
|
|
2374
|
+
jmp L_ITER_MAX_KEY_NEXT_%out_has
|
|
2375
|
+
L_ITER_MAX_KEY_NEXT_%out_has:
|
|
2376
|
+
!__iter_max_key_take_%out_has
|
|
2377
|
+
!__iter_max_key_next_key_%out_has
|
|
2378
|
+
!__iter_max_key_current_key_%out_has
|
|
2379
|
+
!__iter_max_key_current_%out_has
|
|
2380
|
+
!__iter_max_key_next_value_%out_has
|
|
2381
|
+
!__iter_max_key_next_has_%out_has
|
|
2382
|
+
jmp L_ITER_MAX_KEY_HEAD_%out_has
|
|
2383
|
+
L_ITER_MAX_KEY_DONE_%out_has:
|
|
2384
|
+
%out_value = load __iter_max_key_slot_%out_has+0 as u64
|
|
2385
|
+
%out_has = add 0, 1
|
|
2386
|
+
!__iter_max_key_next_value_%out_has
|
|
2387
|
+
!__iter_max_key_next_has_%out_has
|
|
2388
|
+
jmp L_ITER_MAX_KEY_END_%out_has
|
|
2389
|
+
L_ITER_MAX_KEY_NONE_%out_has:
|
|
2390
|
+
%out_value = add 0, 0
|
|
2391
|
+
%out_has = add 0, 0
|
|
2392
|
+
!__iter_max_key_value_%out_has
|
|
2393
|
+
!__iter_max_key_has_%out_has
|
|
2394
|
+
L_ITER_MAX_KEY_END_%out_has:
|
|
2395
|
+
[END_MACRO]
|
|
2396
|
+
|
|
2397
|
+
// Rust method-name alias over ITER_MAX_BY_KEY_U64.
|
|
2398
|
+
[MACRO] ITER_MAX_BY_KEY %out_has, %out_value, %iter_reg, %key_fn
|
|
2399
|
+
EXPAND ITER_MAX_BY_KEY_U64 %out_has, %out_value, %iter_reg, %key_fn
|
|
2400
|
+
[END_MACRO]
|
|
2401
|
+
|
|
2402
|
+
[MACRO] ITER_CMP_U64 %out_ordering, %left_iter, %right_iter
|
|
2403
|
+
jmp L_ITER_CMP_HEAD_%out_ordering
|
|
2404
|
+
L_ITER_CMP_HEAD_%out_ordering:
|
|
2405
|
+
EXPAND ITER_NEXT_U64 __iter_cmp_left_has_%out_ordering, __iter_cmp_left_value_%out_ordering, %left_iter
|
|
2406
|
+
EXPAND ITER_NEXT_U64 __iter_cmp_right_has_%out_ordering, __iter_cmp_right_value_%out_ordering, %right_iter
|
|
2407
|
+
br __iter_cmp_left_has_%out_ordering -> L_ITER_CMP_LEFT_SOME_%out_ordering, L_ITER_CMP_LEFT_NONE_%out_ordering
|
|
2408
|
+
L_ITER_CMP_LEFT_SOME_%out_ordering:
|
|
2409
|
+
br __iter_cmp_right_has_%out_ordering -> L_ITER_CMP_BOTH_SOME_%out_ordering, L_ITER_CMP_RIGHT_NONE_%out_ordering
|
|
2410
|
+
L_ITER_CMP_BOTH_SOME_%out_ordering:
|
|
2411
|
+
__iter_cmp_less_%out_ordering = ult __iter_cmp_left_value_%out_ordering, __iter_cmp_right_value_%out_ordering
|
|
2412
|
+
br __iter_cmp_less_%out_ordering -> L_ITER_CMP_LESS_%out_ordering, L_ITER_CMP_CHECK_GREATER_%out_ordering
|
|
2413
|
+
L_ITER_CMP_CHECK_GREATER_%out_ordering:
|
|
2414
|
+
__iter_cmp_greater_%out_ordering = ugt __iter_cmp_left_value_%out_ordering, __iter_cmp_right_value_%out_ordering
|
|
2415
|
+
br __iter_cmp_greater_%out_ordering -> L_ITER_CMP_GREATER_%out_ordering, L_ITER_CMP_EQUAL_ITEM_%out_ordering
|
|
2416
|
+
L_ITER_CMP_EQUAL_ITEM_%out_ordering:
|
|
2417
|
+
!__iter_cmp_greater_%out_ordering
|
|
2418
|
+
!__iter_cmp_less_%out_ordering
|
|
2419
|
+
!__iter_cmp_right_value_%out_ordering
|
|
2420
|
+
!__iter_cmp_right_has_%out_ordering
|
|
2421
|
+
!__iter_cmp_left_value_%out_ordering
|
|
2422
|
+
!__iter_cmp_left_has_%out_ordering
|
|
2423
|
+
jmp L_ITER_CMP_HEAD_%out_ordering
|
|
2424
|
+
L_ITER_CMP_LESS_%out_ordering:
|
|
2425
|
+
%out_ordering = sub 0, 1
|
|
2426
|
+
!__iter_cmp_less_%out_ordering
|
|
2427
|
+
!__iter_cmp_right_value_%out_ordering
|
|
2428
|
+
!__iter_cmp_right_has_%out_ordering
|
|
2429
|
+
!__iter_cmp_left_value_%out_ordering
|
|
2430
|
+
!__iter_cmp_left_has_%out_ordering
|
|
2431
|
+
jmp L_ITER_CMP_END_%out_ordering
|
|
2432
|
+
L_ITER_CMP_GREATER_%out_ordering:
|
|
2433
|
+
%out_ordering = add 0, 1
|
|
2434
|
+
!__iter_cmp_greater_%out_ordering
|
|
2435
|
+
!__iter_cmp_less_%out_ordering
|
|
2436
|
+
!__iter_cmp_right_value_%out_ordering
|
|
2437
|
+
!__iter_cmp_right_has_%out_ordering
|
|
2438
|
+
!__iter_cmp_left_value_%out_ordering
|
|
2439
|
+
!__iter_cmp_left_has_%out_ordering
|
|
2440
|
+
jmp L_ITER_CMP_END_%out_ordering
|
|
2441
|
+
L_ITER_CMP_RIGHT_NONE_%out_ordering:
|
|
2442
|
+
%out_ordering = add 0, 1
|
|
2443
|
+
!__iter_cmp_right_value_%out_ordering
|
|
2444
|
+
!__iter_cmp_right_has_%out_ordering
|
|
2445
|
+
!__iter_cmp_left_value_%out_ordering
|
|
2446
|
+
!__iter_cmp_left_has_%out_ordering
|
|
2447
|
+
jmp L_ITER_CMP_END_%out_ordering
|
|
2448
|
+
L_ITER_CMP_LEFT_NONE_%out_ordering:
|
|
2449
|
+
br __iter_cmp_right_has_%out_ordering -> L_ITER_CMP_LEFT_SHORT_%out_ordering, L_ITER_CMP_BOTH_DONE_%out_ordering
|
|
2450
|
+
L_ITER_CMP_LEFT_SHORT_%out_ordering:
|
|
2451
|
+
%out_ordering = sub 0, 1
|
|
2452
|
+
!__iter_cmp_right_value_%out_ordering
|
|
2453
|
+
!__iter_cmp_right_has_%out_ordering
|
|
2454
|
+
!__iter_cmp_left_value_%out_ordering
|
|
2455
|
+
!__iter_cmp_left_has_%out_ordering
|
|
2456
|
+
jmp L_ITER_CMP_END_%out_ordering
|
|
2457
|
+
L_ITER_CMP_BOTH_DONE_%out_ordering:
|
|
2458
|
+
%out_ordering = add 0, 0
|
|
2459
|
+
!__iter_cmp_right_value_%out_ordering
|
|
2460
|
+
!__iter_cmp_right_has_%out_ordering
|
|
2461
|
+
!__iter_cmp_left_value_%out_ordering
|
|
2462
|
+
!__iter_cmp_left_has_%out_ordering
|
|
2463
|
+
L_ITER_CMP_END_%out_ordering:
|
|
2464
|
+
[END_MACRO]
|
|
2465
|
+
|
|
2466
|
+
// Rust method-name alias over ITER_CMP_U64.
|
|
2467
|
+
[MACRO] ITER_CMP %out_ordering, %left_iter, %right_iter
|
|
2468
|
+
EXPAND ITER_CMP_U64 %out_ordering, %left_iter, %right_iter
|
|
2469
|
+
[END_MACRO]
|
|
2470
|
+
|
|
2471
|
+
[MACRO] ITER_CMP_BY_U64 %out_ordering, %left_iter, %right_iter, %compare_fn
|
|
2472
|
+
jmp L_ITER_CMP_BY_HEAD_%out_ordering
|
|
2473
|
+
L_ITER_CMP_BY_HEAD_%out_ordering:
|
|
2474
|
+
EXPAND ITER_NEXT_U64 __iter_cmp_by_left_has_%out_ordering, __iter_cmp_by_left_value_%out_ordering, %left_iter
|
|
2475
|
+
EXPAND ITER_NEXT_U64 __iter_cmp_by_right_has_%out_ordering, __iter_cmp_by_right_value_%out_ordering, %right_iter
|
|
2476
|
+
br __iter_cmp_by_left_has_%out_ordering -> L_ITER_CMP_BY_LEFT_SOME_%out_ordering, L_ITER_CMP_BY_LEFT_NONE_%out_ordering
|
|
2477
|
+
L_ITER_CMP_BY_LEFT_SOME_%out_ordering:
|
|
2478
|
+
br __iter_cmp_by_right_has_%out_ordering -> L_ITER_CMP_BY_BOTH_SOME_%out_ordering, L_ITER_CMP_BY_RIGHT_NONE_%out_ordering
|
|
2479
|
+
L_ITER_CMP_BY_BOTH_SOME_%out_ordering:
|
|
2480
|
+
__iter_cmp_by_order_%out_ordering = call %compare_fn(__iter_cmp_by_left_value_%out_ordering, __iter_cmp_by_right_value_%out_ordering)
|
|
2481
|
+
__iter_cmp_by_equal_%out_ordering = eq __iter_cmp_by_order_%out_ordering, 0
|
|
2482
|
+
br __iter_cmp_by_equal_%out_ordering -> L_ITER_CMP_BY_EQUAL_ITEM_%out_ordering, L_ITER_CMP_BY_NON_EQUAL_%out_ordering
|
|
2483
|
+
L_ITER_CMP_BY_EQUAL_ITEM_%out_ordering:
|
|
2484
|
+
!__iter_cmp_by_equal_%out_ordering
|
|
2485
|
+
!__iter_cmp_by_order_%out_ordering
|
|
2486
|
+
!__iter_cmp_by_right_value_%out_ordering
|
|
2487
|
+
!__iter_cmp_by_right_has_%out_ordering
|
|
2488
|
+
!__iter_cmp_by_left_value_%out_ordering
|
|
2489
|
+
!__iter_cmp_by_left_has_%out_ordering
|
|
2490
|
+
jmp L_ITER_CMP_BY_HEAD_%out_ordering
|
|
2491
|
+
L_ITER_CMP_BY_NON_EQUAL_%out_ordering:
|
|
2492
|
+
%out_ordering = add __iter_cmp_by_order_%out_ordering, 0
|
|
2493
|
+
!__iter_cmp_by_equal_%out_ordering
|
|
2494
|
+
!__iter_cmp_by_order_%out_ordering
|
|
2495
|
+
!__iter_cmp_by_right_value_%out_ordering
|
|
2496
|
+
!__iter_cmp_by_right_has_%out_ordering
|
|
2497
|
+
!__iter_cmp_by_left_value_%out_ordering
|
|
2498
|
+
!__iter_cmp_by_left_has_%out_ordering
|
|
2499
|
+
jmp L_ITER_CMP_BY_END_%out_ordering
|
|
2500
|
+
L_ITER_CMP_BY_RIGHT_NONE_%out_ordering:
|
|
2501
|
+
%out_ordering = add 0, 1
|
|
2502
|
+
!__iter_cmp_by_right_value_%out_ordering
|
|
2503
|
+
!__iter_cmp_by_right_has_%out_ordering
|
|
2504
|
+
!__iter_cmp_by_left_value_%out_ordering
|
|
2505
|
+
!__iter_cmp_by_left_has_%out_ordering
|
|
2506
|
+
jmp L_ITER_CMP_BY_END_%out_ordering
|
|
2507
|
+
L_ITER_CMP_BY_LEFT_NONE_%out_ordering:
|
|
2508
|
+
br __iter_cmp_by_right_has_%out_ordering -> L_ITER_CMP_BY_LEFT_SHORT_%out_ordering, L_ITER_CMP_BY_BOTH_DONE_%out_ordering
|
|
2509
|
+
L_ITER_CMP_BY_LEFT_SHORT_%out_ordering:
|
|
2510
|
+
%out_ordering = sub 0, 1
|
|
2511
|
+
!__iter_cmp_by_right_value_%out_ordering
|
|
2512
|
+
!__iter_cmp_by_right_has_%out_ordering
|
|
2513
|
+
!__iter_cmp_by_left_value_%out_ordering
|
|
2514
|
+
!__iter_cmp_by_left_has_%out_ordering
|
|
2515
|
+
jmp L_ITER_CMP_BY_END_%out_ordering
|
|
2516
|
+
L_ITER_CMP_BY_BOTH_DONE_%out_ordering:
|
|
2517
|
+
%out_ordering = add 0, 0
|
|
2518
|
+
!__iter_cmp_by_right_value_%out_ordering
|
|
2519
|
+
!__iter_cmp_by_right_has_%out_ordering
|
|
2520
|
+
!__iter_cmp_by_left_value_%out_ordering
|
|
2521
|
+
!__iter_cmp_by_left_has_%out_ordering
|
|
2522
|
+
L_ITER_CMP_BY_END_%out_ordering:
|
|
2523
|
+
[END_MACRO]
|
|
2524
|
+
|
|
2525
|
+
// Rust method-name alias over ITER_CMP_BY_U64.
|
|
2526
|
+
[MACRO] ITER_CMP_BY %out_ordering, %left_iter, %right_iter, %compare_fn
|
|
2527
|
+
EXPAND ITER_CMP_BY_U64 %out_ordering, %left_iter, %right_iter, %compare_fn
|
|
2528
|
+
[END_MACRO]
|
|
2529
|
+
|
|
2530
|
+
[MACRO] ITER_PARTIAL_CMP_BY_U64 %out_ok, %out_ordering, %left_iter, %right_iter, %compare_fn
|
|
2531
|
+
__iter_partial_cmp_by_order_slot_%out_ok = stack_alloc 8
|
|
2532
|
+
jmp L_ITER_PARTIAL_CMP_BY_HEAD_%out_ok
|
|
2533
|
+
L_ITER_PARTIAL_CMP_BY_HEAD_%out_ok:
|
|
2534
|
+
EXPAND ITER_NEXT_U64 __iter_partial_cmp_by_left_has_%out_ok, __iter_partial_cmp_by_left_value_%out_ok, %left_iter
|
|
2535
|
+
EXPAND ITER_NEXT_U64 __iter_partial_cmp_by_right_has_%out_ok, __iter_partial_cmp_by_right_value_%out_ok, %right_iter
|
|
2536
|
+
br __iter_partial_cmp_by_left_has_%out_ok -> L_ITER_PARTIAL_CMP_BY_LEFT_SOME_%out_ok, L_ITER_PARTIAL_CMP_BY_LEFT_NONE_%out_ok
|
|
2537
|
+
L_ITER_PARTIAL_CMP_BY_LEFT_SOME_%out_ok:
|
|
2538
|
+
br __iter_partial_cmp_by_right_has_%out_ok -> L_ITER_PARTIAL_CMP_BY_BOTH_SOME_%out_ok, L_ITER_PARTIAL_CMP_BY_RIGHT_NONE_%out_ok
|
|
2539
|
+
L_ITER_PARTIAL_CMP_BY_BOTH_SOME_%out_ok:
|
|
2540
|
+
__iter_partial_cmp_by_ok_%out_ok = call %compare_fn(__iter_partial_cmp_by_left_value_%out_ok, __iter_partial_cmp_by_right_value_%out_ok, &__iter_partial_cmp_by_order_slot_%out_ok)
|
|
2541
|
+
__iter_partial_cmp_by_has_order_%out_ok = ne __iter_partial_cmp_by_ok_%out_ok, 0
|
|
2542
|
+
br __iter_partial_cmp_by_has_order_%out_ok -> L_ITER_PARTIAL_CMP_BY_CHECK_ORDER_%out_ok, L_ITER_PARTIAL_CMP_BY_NONE_%out_ok
|
|
2543
|
+
L_ITER_PARTIAL_CMP_BY_CHECK_ORDER_%out_ok:
|
|
2544
|
+
__iter_partial_cmp_by_order_%out_ok = load __iter_partial_cmp_by_order_slot_%out_ok+0 as i64
|
|
2545
|
+
__iter_partial_cmp_by_equal_%out_ok = eq __iter_partial_cmp_by_order_%out_ok, 0
|
|
2546
|
+
br __iter_partial_cmp_by_equal_%out_ok -> L_ITER_PARTIAL_CMP_BY_EQUAL_ITEM_%out_ok, L_ITER_PARTIAL_CMP_BY_NON_EQUAL_%out_ok
|
|
2547
|
+
L_ITER_PARTIAL_CMP_BY_EQUAL_ITEM_%out_ok:
|
|
2548
|
+
!__iter_partial_cmp_by_equal_%out_ok
|
|
2549
|
+
!__iter_partial_cmp_by_order_%out_ok
|
|
2550
|
+
!__iter_partial_cmp_by_has_order_%out_ok
|
|
2551
|
+
!__iter_partial_cmp_by_ok_%out_ok
|
|
2552
|
+
!__iter_partial_cmp_by_right_value_%out_ok
|
|
2553
|
+
!__iter_partial_cmp_by_right_has_%out_ok
|
|
2554
|
+
!__iter_partial_cmp_by_left_value_%out_ok
|
|
2555
|
+
!__iter_partial_cmp_by_left_has_%out_ok
|
|
2556
|
+
jmp L_ITER_PARTIAL_CMP_BY_HEAD_%out_ok
|
|
2557
|
+
L_ITER_PARTIAL_CMP_BY_NON_EQUAL_%out_ok:
|
|
2558
|
+
%out_ordering = add __iter_partial_cmp_by_order_%out_ok, 0
|
|
2559
|
+
%out_ok = add 0, 1
|
|
2560
|
+
!__iter_partial_cmp_by_equal_%out_ok
|
|
2561
|
+
!__iter_partial_cmp_by_order_%out_ok
|
|
2562
|
+
!__iter_partial_cmp_by_has_order_%out_ok
|
|
2563
|
+
!__iter_partial_cmp_by_ok_%out_ok
|
|
2564
|
+
!__iter_partial_cmp_by_right_value_%out_ok
|
|
2565
|
+
!__iter_partial_cmp_by_right_has_%out_ok
|
|
2566
|
+
!__iter_partial_cmp_by_left_value_%out_ok
|
|
2567
|
+
!__iter_partial_cmp_by_left_has_%out_ok
|
|
2568
|
+
jmp L_ITER_PARTIAL_CMP_BY_END_%out_ok
|
|
2569
|
+
L_ITER_PARTIAL_CMP_BY_NONE_%out_ok:
|
|
2570
|
+
%out_ordering = add 0, 0
|
|
2571
|
+
%out_ok = add 0, 0
|
|
2572
|
+
!__iter_partial_cmp_by_has_order_%out_ok
|
|
2573
|
+
!__iter_partial_cmp_by_ok_%out_ok
|
|
2574
|
+
!__iter_partial_cmp_by_right_value_%out_ok
|
|
2575
|
+
!__iter_partial_cmp_by_right_has_%out_ok
|
|
2576
|
+
!__iter_partial_cmp_by_left_value_%out_ok
|
|
2577
|
+
!__iter_partial_cmp_by_left_has_%out_ok
|
|
2578
|
+
jmp L_ITER_PARTIAL_CMP_BY_END_%out_ok
|
|
2579
|
+
L_ITER_PARTIAL_CMP_BY_RIGHT_NONE_%out_ok:
|
|
2580
|
+
%out_ordering = add 0, 1
|
|
2581
|
+
%out_ok = add 0, 1
|
|
2582
|
+
!__iter_partial_cmp_by_right_value_%out_ok
|
|
2583
|
+
!__iter_partial_cmp_by_right_has_%out_ok
|
|
2584
|
+
!__iter_partial_cmp_by_left_value_%out_ok
|
|
2585
|
+
!__iter_partial_cmp_by_left_has_%out_ok
|
|
2586
|
+
jmp L_ITER_PARTIAL_CMP_BY_END_%out_ok
|
|
2587
|
+
L_ITER_PARTIAL_CMP_BY_LEFT_NONE_%out_ok:
|
|
2588
|
+
br __iter_partial_cmp_by_right_has_%out_ok -> L_ITER_PARTIAL_CMP_BY_LEFT_SHORT_%out_ok, L_ITER_PARTIAL_CMP_BY_BOTH_DONE_%out_ok
|
|
2589
|
+
L_ITER_PARTIAL_CMP_BY_LEFT_SHORT_%out_ok:
|
|
2590
|
+
%out_ordering = sub 0, 1
|
|
2591
|
+
%out_ok = add 0, 1
|
|
2592
|
+
!__iter_partial_cmp_by_right_value_%out_ok
|
|
2593
|
+
!__iter_partial_cmp_by_right_has_%out_ok
|
|
2594
|
+
!__iter_partial_cmp_by_left_value_%out_ok
|
|
2595
|
+
!__iter_partial_cmp_by_left_has_%out_ok
|
|
2596
|
+
jmp L_ITER_PARTIAL_CMP_BY_END_%out_ok
|
|
2597
|
+
L_ITER_PARTIAL_CMP_BY_BOTH_DONE_%out_ok:
|
|
2598
|
+
%out_ordering = add 0, 0
|
|
2599
|
+
%out_ok = add 0, 1
|
|
2600
|
+
!__iter_partial_cmp_by_right_value_%out_ok
|
|
2601
|
+
!__iter_partial_cmp_by_right_has_%out_ok
|
|
2602
|
+
!__iter_partial_cmp_by_left_value_%out_ok
|
|
2603
|
+
!__iter_partial_cmp_by_left_has_%out_ok
|
|
2604
|
+
L_ITER_PARTIAL_CMP_BY_END_%out_ok:
|
|
2605
|
+
[END_MACRO]
|
|
2606
|
+
|
|
2607
|
+
// Rust method-name alias over ITER_PARTIAL_CMP_BY_U64.
|
|
2608
|
+
[MACRO] ITER_PARTIAL_CMP_BY %out_ok, %out_ordering, %left_iter, %right_iter, %compare_fn
|
|
2609
|
+
EXPAND ITER_PARTIAL_CMP_BY_U64 %out_ok, %out_ordering, %left_iter, %right_iter, %compare_fn
|
|
2610
|
+
[END_MACRO]
|
|
2611
|
+
|
|
2612
|
+
[MACRO] ITER_EQ_BY_U64 %out_bool, %left_iter, %right_iter, %eq_fn
|
|
2613
|
+
jmp L_ITER_EQ_BY_HEAD_%out_bool
|
|
2614
|
+
L_ITER_EQ_BY_HEAD_%out_bool:
|
|
2615
|
+
EXPAND ITER_NEXT_U64 __iter_eq_by_left_has_%out_bool, __iter_eq_by_left_value_%out_bool, %left_iter
|
|
2616
|
+
EXPAND ITER_NEXT_U64 __iter_eq_by_right_has_%out_bool, __iter_eq_by_right_value_%out_bool, %right_iter
|
|
2617
|
+
br __iter_eq_by_left_has_%out_bool -> L_ITER_EQ_BY_LEFT_SOME_%out_bool, L_ITER_EQ_BY_LEFT_NONE_%out_bool
|
|
2618
|
+
L_ITER_EQ_BY_LEFT_SOME_%out_bool:
|
|
2619
|
+
br __iter_eq_by_right_has_%out_bool -> L_ITER_EQ_BY_BOTH_SOME_%out_bool, L_ITER_EQ_BY_RIGHT_NONE_%out_bool
|
|
2620
|
+
L_ITER_EQ_BY_BOTH_SOME_%out_bool:
|
|
2621
|
+
__iter_eq_by_same_%out_bool = call %eq_fn(__iter_eq_by_left_value_%out_bool, __iter_eq_by_right_value_%out_bool)
|
|
2622
|
+
__iter_eq_by_matches_%out_bool = ne __iter_eq_by_same_%out_bool, 0
|
|
2623
|
+
br __iter_eq_by_matches_%out_bool -> L_ITER_EQ_BY_EQUAL_ITEM_%out_bool, L_ITER_EQ_BY_FALSE_%out_bool
|
|
2624
|
+
L_ITER_EQ_BY_EQUAL_ITEM_%out_bool:
|
|
2625
|
+
!__iter_eq_by_matches_%out_bool
|
|
2626
|
+
!__iter_eq_by_same_%out_bool
|
|
2627
|
+
!__iter_eq_by_right_value_%out_bool
|
|
2628
|
+
!__iter_eq_by_right_has_%out_bool
|
|
2629
|
+
!__iter_eq_by_left_value_%out_bool
|
|
2630
|
+
!__iter_eq_by_left_has_%out_bool
|
|
2631
|
+
jmp L_ITER_EQ_BY_HEAD_%out_bool
|
|
2632
|
+
L_ITER_EQ_BY_FALSE_%out_bool:
|
|
2633
|
+
%out_bool = add 0, 0
|
|
2634
|
+
!__iter_eq_by_matches_%out_bool
|
|
2635
|
+
!__iter_eq_by_same_%out_bool
|
|
2636
|
+
!__iter_eq_by_right_value_%out_bool
|
|
2637
|
+
!__iter_eq_by_right_has_%out_bool
|
|
2638
|
+
!__iter_eq_by_left_value_%out_bool
|
|
2639
|
+
!__iter_eq_by_left_has_%out_bool
|
|
2640
|
+
jmp L_ITER_EQ_BY_END_%out_bool
|
|
2641
|
+
L_ITER_EQ_BY_RIGHT_NONE_%out_bool:
|
|
2642
|
+
%out_bool = add 0, 0
|
|
2643
|
+
!__iter_eq_by_right_value_%out_bool
|
|
2644
|
+
!__iter_eq_by_right_has_%out_bool
|
|
2645
|
+
!__iter_eq_by_left_value_%out_bool
|
|
2646
|
+
!__iter_eq_by_left_has_%out_bool
|
|
2647
|
+
jmp L_ITER_EQ_BY_END_%out_bool
|
|
2648
|
+
L_ITER_EQ_BY_LEFT_NONE_%out_bool:
|
|
2649
|
+
br __iter_eq_by_right_has_%out_bool -> L_ITER_EQ_BY_LEFT_SHORT_%out_bool, L_ITER_EQ_BY_BOTH_DONE_%out_bool
|
|
2650
|
+
L_ITER_EQ_BY_LEFT_SHORT_%out_bool:
|
|
2651
|
+
%out_bool = add 0, 0
|
|
2652
|
+
!__iter_eq_by_right_value_%out_bool
|
|
2653
|
+
!__iter_eq_by_right_has_%out_bool
|
|
2654
|
+
!__iter_eq_by_left_value_%out_bool
|
|
2655
|
+
!__iter_eq_by_left_has_%out_bool
|
|
2656
|
+
jmp L_ITER_EQ_BY_END_%out_bool
|
|
2657
|
+
L_ITER_EQ_BY_BOTH_DONE_%out_bool:
|
|
2658
|
+
%out_bool = add 0, 1
|
|
2659
|
+
!__iter_eq_by_right_value_%out_bool
|
|
2660
|
+
!__iter_eq_by_right_has_%out_bool
|
|
2661
|
+
!__iter_eq_by_left_value_%out_bool
|
|
2662
|
+
!__iter_eq_by_left_has_%out_bool
|
|
2663
|
+
L_ITER_EQ_BY_END_%out_bool:
|
|
2664
|
+
[END_MACRO]
|
|
2665
|
+
|
|
2666
|
+
// Rust method-name alias over ITER_EQ_BY_U64.
|
|
2667
|
+
[MACRO] ITER_EQ_BY %out_bool, %left_iter, %right_iter, %eq_fn
|
|
2668
|
+
EXPAND ITER_EQ_BY_U64 %out_bool, %left_iter, %right_iter, %eq_fn
|
|
2669
|
+
[END_MACRO]
|
|
2670
|
+
|
|
2671
|
+
[MACRO] ITER_EQ_U64 %out_bool, %left_iter, %right_iter
|
|
2672
|
+
EXPAND ITER_CMP_U64 __iter_eq_order_%out_bool, %left_iter, %right_iter
|
|
2673
|
+
%out_bool = eq __iter_eq_order_%out_bool, 0
|
|
2674
|
+
!__iter_eq_order_%out_bool
|
|
2675
|
+
[END_MACRO]
|
|
2676
|
+
|
|
2677
|
+
// Rust method-name alias over ITER_EQ_U64.
|
|
2678
|
+
[MACRO] ITER_EQ %out_bool, %left_iter, %right_iter
|
|
2679
|
+
EXPAND ITER_EQ_U64 %out_bool, %left_iter, %right_iter
|
|
2680
|
+
[END_MACRO]
|
|
2681
|
+
|
|
2682
|
+
[MACRO] ITER_NE_U64 %out_bool, %left_iter, %right_iter
|
|
2683
|
+
EXPAND ITER_CMP_U64 __iter_ne_order_%out_bool, %left_iter, %right_iter
|
|
2684
|
+
__iter_ne_is_eq_%out_bool = eq __iter_ne_order_%out_bool, 0
|
|
2685
|
+
%out_bool = eq __iter_ne_is_eq_%out_bool, 0
|
|
2686
|
+
!__iter_ne_is_eq_%out_bool
|
|
2687
|
+
!__iter_ne_order_%out_bool
|
|
2688
|
+
[END_MACRO]
|
|
2689
|
+
|
|
2690
|
+
// Rust method-name alias over ITER_NE_U64.
|
|
2691
|
+
[MACRO] ITER_NE %out_bool, %left_iter, %right_iter
|
|
2692
|
+
EXPAND ITER_NE_U64 %out_bool, %left_iter, %right_iter
|
|
2693
|
+
[END_MACRO]
|
|
2694
|
+
|
|
2695
|
+
[MACRO] ITER_LT_U64 %out_bool, %left_iter, %right_iter
|
|
2696
|
+
EXPAND ITER_CMP_U64 __iter_lt_order_%out_bool, %left_iter, %right_iter
|
|
2697
|
+
%out_bool = slt __iter_lt_order_%out_bool, 0
|
|
2698
|
+
!__iter_lt_order_%out_bool
|
|
2699
|
+
[END_MACRO]
|
|
2700
|
+
|
|
2701
|
+
// Rust method-name alias over ITER_LT_U64.
|
|
2702
|
+
[MACRO] ITER_LT %out_bool, %left_iter, %right_iter
|
|
2703
|
+
EXPAND ITER_LT_U64 %out_bool, %left_iter, %right_iter
|
|
2704
|
+
[END_MACRO]
|
|
2705
|
+
|
|
2706
|
+
[MACRO] ITER_LE_U64 %out_bool, %left_iter, %right_iter
|
|
2707
|
+
EXPAND ITER_CMP_U64 __iter_le_order_%out_bool, %left_iter, %right_iter
|
|
2708
|
+
%out_bool = sle __iter_le_order_%out_bool, 0
|
|
2709
|
+
!__iter_le_order_%out_bool
|
|
2710
|
+
[END_MACRO]
|
|
2711
|
+
|
|
2712
|
+
// Rust method-name alias over ITER_LE_U64.
|
|
2713
|
+
[MACRO] ITER_LE %out_bool, %left_iter, %right_iter
|
|
2714
|
+
EXPAND ITER_LE_U64 %out_bool, %left_iter, %right_iter
|
|
2715
|
+
[END_MACRO]
|
|
2716
|
+
|
|
2717
|
+
[MACRO] ITER_GT_U64 %out_bool, %left_iter, %right_iter
|
|
2718
|
+
EXPAND ITER_CMP_U64 __iter_gt_order_%out_bool, %left_iter, %right_iter
|
|
2719
|
+
%out_bool = sgt __iter_gt_order_%out_bool, 0
|
|
2720
|
+
!__iter_gt_order_%out_bool
|
|
2721
|
+
[END_MACRO]
|
|
2722
|
+
|
|
2723
|
+
// Rust method-name alias over ITER_GT_U64.
|
|
2724
|
+
[MACRO] ITER_GT %out_bool, %left_iter, %right_iter
|
|
2725
|
+
EXPAND ITER_GT_U64 %out_bool, %left_iter, %right_iter
|
|
2726
|
+
[END_MACRO]
|
|
2727
|
+
|
|
2728
|
+
[MACRO] ITER_GE_U64 %out_bool, %left_iter, %right_iter
|
|
2729
|
+
EXPAND ITER_CMP_U64 __iter_ge_order_%out_bool, %left_iter, %right_iter
|
|
2730
|
+
%out_bool = sge __iter_ge_order_%out_bool, 0
|
|
2731
|
+
!__iter_ge_order_%out_bool
|
|
2732
|
+
[END_MACRO]
|
|
2733
|
+
|
|
2734
|
+
// Rust method-name alias over ITER_GE_U64.
|
|
2735
|
+
[MACRO] ITER_GE %out_bool, %left_iter, %right_iter
|
|
2736
|
+
EXPAND ITER_GE_U64 %out_bool, %left_iter, %right_iter
|
|
2737
|
+
[END_MACRO]
|
|
2738
|
+
|
|
2739
|
+
[MACRO] ITER_EXACT_SIZE_LEN %out_len, %iter_reg
|
|
2740
|
+
EXPAND ITER_LEN %out_len, %iter_reg
|
|
2741
|
+
[END_MACRO]
|
|
2742
|
+
|
|
2743
|
+
[MACRO] ITER_EXACT_SIZE_IS_EMPTY %out_bool, %iter_reg
|
|
2744
|
+
EXPAND ITER_IS_EMPTY %out_bool, %iter_reg
|
|
2745
|
+
[END_MACRO]
|
|
2746
|
+
|
|
2747
|
+
[MACRO] ITER_PARTIAL_EQ_U64 %out_bool, %left_iter, %right_iter
|
|
2748
|
+
EXPAND ITER_EQ_U64 %out_bool, %left_iter, %right_iter
|
|
2749
|
+
[END_MACRO]
|
|
2750
|
+
|
|
2751
|
+
// Rust method-name alias over ITER_PARTIAL_EQ_U64.
|
|
2752
|
+
[MACRO] ITER_PARTIAL_EQ %out_bool, %left_iter, %right_iter
|
|
2753
|
+
EXPAND ITER_PARTIAL_EQ_U64 %out_bool, %left_iter, %right_iter
|
|
2754
|
+
[END_MACRO]
|
|
2755
|
+
|
|
2756
|
+
[MACRO] ITER_PARTIAL_CMP_U64 %out_ordering, %left_iter, %right_iter
|
|
2757
|
+
EXPAND ITER_CMP_U64 %out_ordering, %left_iter, %right_iter
|
|
2758
|
+
[END_MACRO]
|
|
2759
|
+
|
|
2760
|
+
// Rust method-name alias over ITER_PARTIAL_CMP_U64.
|
|
2761
|
+
[MACRO] ITER_PARTIAL_CMP %out_ordering, %left_iter, %right_iter
|
|
2762
|
+
EXPAND ITER_PARTIAL_CMP_U64 %out_ordering, %left_iter, %right_iter
|
|
2763
|
+
[END_MACRO]
|
|
2764
|
+
|
|
2765
|
+
[MACRO] ITER_IS_SORTED_U64 %out_bool, %iter_reg
|
|
2766
|
+
__iter_sorted_slice_%out_bool = stack_alloc Slice_SIZE
|
|
2767
|
+
EXPAND ITER_AS_SLICE_U64 __iter_sorted_slice_%out_bool, %iter_reg
|
|
2768
|
+
EXPAND SLICE_IS_SORTED_U64 %out_bool, __iter_sorted_slice_%out_bool
|
|
2769
|
+
__iter_sorted_len_%out_bool = load %iter_reg+Iter_len as u64
|
|
2770
|
+
store %iter_reg+Iter_index, __iter_sorted_len_%out_bool as u64
|
|
2771
|
+
!__iter_sorted_len_%out_bool
|
|
2772
|
+
[END_MACRO]
|
|
2773
|
+
|
|
2774
|
+
// Rust method-name alias over ITER_IS_SORTED_U64.
|
|
2775
|
+
[MACRO] ITER_IS_SORTED %out_bool, %iter_reg
|
|
2776
|
+
EXPAND ITER_IS_SORTED_U64 %out_bool, %iter_reg
|
|
2777
|
+
[END_MACRO]
|
|
2778
|
+
|
|
2779
|
+
[MACRO] ITER_IS_SORTED_BY_U64 %out_bool, %iter_reg, %compare_fn
|
|
2780
|
+
__iter_sorted_by_slice_%out_bool = stack_alloc Slice_SIZE
|
|
2781
|
+
EXPAND ITER_AS_SLICE_U64 __iter_sorted_by_slice_%out_bool, %iter_reg
|
|
2782
|
+
EXPAND SLICE_IS_SORTED_BY_U64 %out_bool, __iter_sorted_by_slice_%out_bool, %compare_fn
|
|
2783
|
+
__iter_sorted_by_len_%out_bool = load %iter_reg+Iter_len as u64
|
|
2784
|
+
store %iter_reg+Iter_index, __iter_sorted_by_len_%out_bool as u64
|
|
2785
|
+
!__iter_sorted_by_len_%out_bool
|
|
2786
|
+
[END_MACRO]
|
|
2787
|
+
|
|
2788
|
+
// Rust method-name alias over ITER_IS_SORTED_BY_U64.
|
|
2789
|
+
[MACRO] ITER_IS_SORTED_BY %out_bool, %iter_reg, %compare_fn
|
|
2790
|
+
EXPAND ITER_IS_SORTED_BY_U64 %out_bool, %iter_reg, %compare_fn
|
|
2791
|
+
[END_MACRO]
|
|
2792
|
+
|
|
2793
|
+
[MACRO] ITER_IS_SORTED_BY_KEY_U64 %out_bool, %iter_reg, %key_fn
|
|
2794
|
+
__iter_sorted_key_slice_%out_bool = stack_alloc Slice_SIZE
|
|
2795
|
+
EXPAND ITER_AS_SLICE_U64 __iter_sorted_key_slice_%out_bool, %iter_reg
|
|
2796
|
+
EXPAND SLICE_IS_SORTED_BY_KEY_U64 %out_bool, __iter_sorted_key_slice_%out_bool, %key_fn
|
|
2797
|
+
__iter_sorted_key_len_%out_bool = load %iter_reg+Iter_len as u64
|
|
2798
|
+
store %iter_reg+Iter_index, __iter_sorted_key_len_%out_bool as u64
|
|
2799
|
+
!__iter_sorted_key_len_%out_bool
|
|
2800
|
+
[END_MACRO]
|
|
2801
|
+
|
|
2802
|
+
// Rust method-name alias over ITER_IS_SORTED_BY_KEY_U64.
|
|
2803
|
+
[MACRO] ITER_IS_SORTED_BY_KEY %out_bool, %iter_reg, %key_fn
|
|
2804
|
+
EXPAND ITER_IS_SORTED_BY_KEY_U64 %out_bool, %iter_reg, %key_fn
|
|
2805
|
+
[END_MACRO]
|