Skip to content

Commit 3e7c147

Browse files
authored
feat(stdlib): Implement List.zip, List.unzip, List.zipWith, Array.reduceRight, Array.zipWith (#1363)
1 parent 06e79a8 commit 3e7c147

18 files changed

+428
-65
lines changed

compiler/test/__snapshots__/stdlib.24cb9bbf.0.snapshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ stdlib › stdlib_equal_18
1111
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $GRAIN$EXPORT$malloc_0 (mut i32)))
1212
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
1313
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
14-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1239 (mut i32)))
14+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1248 (mut i32)))
1515
(import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $malloc_0 (param i32 i32) (result i32)))
1616
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
1717
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
18-
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1239 (param i32 i32 i32) (result i32)))
18+
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1248 (param i32 i32 i32) (result i32)))
1919
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
2020
(elem $elem (global.get $relocBase_0))
2121
(export \"memory\" (memory $0))
@@ -103,10 +103,10 @@ stdlib › stdlib_equal_18
103103
(block $do_backpatches.5
104104
)
105105
)
106-
(call $==_1239
106+
(call $==_1248
107107
(call $incRef_0
108108
(global.get $GRAIN$EXPORT$incRef_0)
109-
(global.get $==_1239)
109+
(global.get $==_1248)
110110
)
111111
(call $incRef_0
112112
(global.get $GRAIN$EXPORT$incRef_0)

compiler/test/__snapshots__/stdlib.5fe88631.0.snapshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ stdlib › stdlib_equal_16
1111
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $GRAIN$EXPORT$malloc_0 (mut i32)))
1212
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
1313
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
14-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1239 (mut i32)))
14+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1248 (mut i32)))
1515
(import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $malloc_0 (param i32 i32) (result i32)))
1616
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
1717
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
18-
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1239 (param i32 i32 i32) (result i32)))
18+
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1248 (param i32 i32 i32) (result i32)))
1919
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
2020
(elem $elem (global.get $relocBase_0))
2121
(export \"memory\" (memory $0))
@@ -103,10 +103,10 @@ stdlib › stdlib_equal_16
103103
(block $do_backpatches.5
104104
)
105105
)
106-
(call $==_1239
106+
(call $==_1248
107107
(call $incRef_0
108108
(global.get $GRAIN$EXPORT$incRef_0)
109-
(global.get $==_1239)
109+
(global.get $==_1248)
110110
)
111111
(call $incRef_0
112112
(global.get $GRAIN$EXPORT$incRef_0)

compiler/test/__snapshots__/stdlib.648f406e.0.snapshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ stdlib › stdlib_equal_12
1111
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $GRAIN$EXPORT$malloc_0 (mut i32)))
1212
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
1313
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
14-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1239 (mut i32)))
14+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1248 (mut i32)))
1515
(import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $malloc_0 (param i32 i32) (result i32)))
1616
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
1717
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
18-
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1239 (param i32 i32 i32) (result i32)))
18+
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1248 (param i32 i32 i32) (result i32)))
1919
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
2020
(elem $elem (global.get $relocBase_0))
2121
(export \"memory\" (memory $0))
@@ -127,10 +127,10 @@ stdlib › stdlib_equal_12
127127
(block $do_backpatches.5
128128
)
129129
)
130-
(call $==_1239
130+
(call $==_1248
131131
(call $incRef_0
132132
(global.get $GRAIN$EXPORT$incRef_0)
133-
(global.get $==_1239)
133+
(global.get $==_1248)
134134
)
135135
(call $incRef_0
136136
(global.get $GRAIN$EXPORT$incRef_0)

compiler/test/__snapshots__/stdlib.6bf88430.0.snapshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ stdlib › stdlib_equal_15
1111
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $GRAIN$EXPORT$malloc_0 (mut i32)))
1212
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
1313
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
14-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1239 (mut i32)))
14+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1248 (mut i32)))
1515
(import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $malloc_0 (param i32 i32) (result i32)))
1616
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
1717
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
18-
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1239 (param i32 i32 i32) (result i32)))
18+
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1248 (param i32 i32 i32) (result i32)))
1919
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
2020
(elem $elem (global.get $relocBase_0))
2121
(export \"memory\" (memory $0))
@@ -99,10 +99,10 @@ stdlib › stdlib_equal_15
9999
(block $do_backpatches.5
100100
)
101101
)
102-
(call $==_1239
102+
(call $==_1248
103103
(call $incRef_0
104104
(global.get $GRAIN$EXPORT$incRef_0)
105-
(global.get $==_1239)
105+
(global.get $==_1248)
106106
)
107107
(call $incRef_0
108108
(global.get $GRAIN$EXPORT$incRef_0)

compiler/test/__snapshots__/stdlib.6de47be2.0.snapshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ stdlib › stdlib_equal_14
1111
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $GRAIN$EXPORT$malloc_0 (mut i32)))
1212
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
1313
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
14-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1239 (mut i32)))
14+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1248 (mut i32)))
1515
(import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $malloc_0 (param i32 i32) (result i32)))
1616
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
1717
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
18-
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1239 (param i32 i32 i32) (result i32)))
18+
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1248 (param i32 i32 i32) (result i32)))
1919
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
2020
(elem $elem (global.get $relocBase_0))
2121
(export \"memory\" (memory $0))
@@ -99,10 +99,10 @@ stdlib › stdlib_equal_14
9999
(block $do_backpatches.5
100100
)
101101
)
102-
(call $==_1239
102+
(call $==_1248
103103
(call $incRef_0
104104
(global.get $GRAIN$EXPORT$incRef_0)
105-
(global.get $==_1239)
105+
(global.get $==_1248)
106106
)
107107
(call $incRef_0
108108
(global.get $GRAIN$EXPORT$incRef_0)

compiler/test/__snapshots__/stdlib.8300ad7c.0.snapshot

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ stdlib › stdlib_equal_3
1010
(import \"_grainEnv\" \"moduleRuntimeId\" (global $moduleRuntimeId_0 i32))
1111
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
1212
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
13-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$[]\" (global $[]_1247 (mut i32)))
14-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$[...]\" (global $[...]_1241 (mut i32)))
15-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1239 (mut i32)))
13+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$[]\" (global $[]_1256 (mut i32)))
14+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$[...]\" (global $[...]_1250 (mut i32)))
15+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1248 (mut i32)))
1616
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
1717
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
18-
(import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $[...]_1241 (param i32 i32 i32) (result i32)))
19-
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1239 (param i32 i32 i32) (result i32)))
18+
(import \"GRAIN$MODULE$pervasives\" \"[...]\" (func $[...]_1250 (param i32 i32 i32) (result i32)))
19+
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1248 (param i32 i32 i32) (result i32)))
2020
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
2121
(elem $elem (global.get $relocBase_0))
2222
(export \"memory\" (memory $0))
@@ -44,15 +44,15 @@ stdlib › stdlib_equal_3
4444
(local.set $6
4545
(tuple.extract 0
4646
(tuple.make
47-
(call $[...]_1241
47+
(call $[...]_1250
4848
(call $incRef_0
4949
(global.get $GRAIN$EXPORT$incRef_0)
50-
(global.get $[...]_1241)
50+
(global.get $[...]_1250)
5151
)
5252
(i32.const 7)
5353
(call $incRef_0
5454
(global.get $GRAIN$EXPORT$incRef_0)
55-
(global.get $[]_1247)
55+
(global.get $[]_1256)
5656
)
5757
)
5858
(call $decRef_0
@@ -69,10 +69,10 @@ stdlib › stdlib_equal_3
6969
(local.set $7
7070
(tuple.extract 0
7171
(tuple.make
72-
(call $[...]_1241
72+
(call $[...]_1250
7373
(call $incRef_0
7474
(global.get $GRAIN$EXPORT$incRef_0)
75-
(global.get $[...]_1241)
75+
(global.get $[...]_1250)
7676
)
7777
(i32.const 5)
7878
(call $incRef_0
@@ -94,10 +94,10 @@ stdlib › stdlib_equal_3
9494
(local.set $8
9595
(tuple.extract 0
9696
(tuple.make
97-
(call $[...]_1241
97+
(call $[...]_1250
9898
(call $incRef_0
9999
(global.get $GRAIN$EXPORT$incRef_0)
100-
(global.get $[...]_1241)
100+
(global.get $[...]_1250)
101101
)
102102
(i32.const 3)
103103
(call $incRef_0
@@ -119,15 +119,15 @@ stdlib › stdlib_equal_3
119119
(local.set $9
120120
(tuple.extract 0
121121
(tuple.make
122-
(call $[...]_1241
122+
(call $[...]_1250
123123
(call $incRef_0
124124
(global.get $GRAIN$EXPORT$incRef_0)
125-
(global.get $[...]_1241)
125+
(global.get $[...]_1250)
126126
)
127127
(i32.const 7)
128128
(call $incRef_0
129129
(global.get $GRAIN$EXPORT$incRef_0)
130-
(global.get $[]_1247)
130+
(global.get $[]_1256)
131131
)
132132
)
133133
(call $decRef_0
@@ -144,10 +144,10 @@ stdlib › stdlib_equal_3
144144
(local.set $10
145145
(tuple.extract 0
146146
(tuple.make
147-
(call $[...]_1241
147+
(call $[...]_1250
148148
(call $incRef_0
149149
(global.get $GRAIN$EXPORT$incRef_0)
150-
(global.get $[...]_1241)
150+
(global.get $[...]_1250)
151151
)
152152
(i32.const 5)
153153
(call $incRef_0
@@ -169,10 +169,10 @@ stdlib › stdlib_equal_3
169169
(local.set $11
170170
(tuple.extract 0
171171
(tuple.make
172-
(call $[...]_1241
172+
(call $[...]_1250
173173
(call $incRef_0
174174
(global.get $GRAIN$EXPORT$incRef_0)
175-
(global.get $[...]_1241)
175+
(global.get $[...]_1250)
176176
)
177177
(i32.const 3)
178178
(call $incRef_0
@@ -190,10 +190,10 @@ stdlib › stdlib_equal_3
190190
(block $do_backpatches.11
191191
)
192192
)
193-
(call $==_1239
193+
(call $==_1248
194194
(call $incRef_0
195195
(global.get $GRAIN$EXPORT$incRef_0)
196-
(global.get $==_1239)
196+
(global.get $==_1248)
197197
)
198198
(call $incRef_0
199199
(global.get $GRAIN$EXPORT$incRef_0)

compiler/test/__snapshots__/stdlib.91a94037.0.snapshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ stdlib › stdlib_equal_11
1111
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $GRAIN$EXPORT$malloc_0 (mut i32)))
1212
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
1313
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
14-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1239 (mut i32)))
14+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1248 (mut i32)))
1515
(import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $malloc_0 (param i32 i32) (result i32)))
1616
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
1717
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
18-
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1239 (param i32 i32 i32) (result i32)))
18+
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1248 (param i32 i32 i32) (result i32)))
1919
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
2020
(elem $elem (global.get $relocBase_0))
2121
(export \"memory\" (memory $0))
@@ -107,10 +107,10 @@ stdlib › stdlib_equal_11
107107
(block $do_backpatches.5
108108
)
109109
)
110-
(call $==_1239
110+
(call $==_1248
111111
(call $incRef_0
112112
(global.get $GRAIN$EXPORT$incRef_0)
113-
(global.get $==_1239)
113+
(global.get $==_1248)
114114
)
115115
(call $incRef_0
116116
(global.get $GRAIN$EXPORT$incRef_0)

compiler/test/__snapshots__/stdlib.a70e79ca.0.snapshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ stdlib › stdlib_equal_9
1111
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $GRAIN$EXPORT$malloc_0 (mut i32)))
1212
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
1313
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
14-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1239 (mut i32)))
14+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1248 (mut i32)))
1515
(import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $malloc_0 (param i32 i32) (result i32)))
1616
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
1717
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
18-
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1239 (param i32 i32 i32) (result i32)))
18+
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1248 (param i32 i32 i32) (result i32)))
1919
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
2020
(elem $elem (global.get $relocBase_0))
2121
(export \"memory\" (memory $0))
@@ -99,10 +99,10 @@ stdlib › stdlib_equal_9
9999
(block $do_backpatches.5
100100
)
101101
)
102-
(call $==_1239
102+
(call $==_1248
103103
(call $incRef_0
104104
(global.get $GRAIN$EXPORT$incRef_0)
105-
(global.get $==_1239)
105+
(global.get $==_1248)
106106
)
107107
(call $incRef_0
108108
(global.get $GRAIN$EXPORT$incRef_0)

compiler/test/__snapshots__/stdlib.d28dee65.0.snapshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ stdlib › stdlib_equal_10
1111
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $GRAIN$EXPORT$malloc_0 (mut i32)))
1212
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
1313
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
14-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1239 (mut i32)))
14+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1248 (mut i32)))
1515
(import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $malloc_0 (param i32 i32) (result i32)))
1616
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
1717
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
18-
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1239 (param i32 i32 i32) (result i32)))
18+
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1248 (param i32 i32 i32) (result i32)))
1919
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
2020
(elem $elem (global.get $relocBase_0))
2121
(export \"memory\" (memory $0))
@@ -103,10 +103,10 @@ stdlib › stdlib_equal_10
103103
(block $do_backpatches.5
104104
)
105105
)
106-
(call $==_1239
106+
(call $==_1248
107107
(call $incRef_0
108108
(global.get $GRAIN$EXPORT$incRef_0)
109-
(global.get $==_1239)
109+
(global.get $==_1248)
110110
)
111111
(call $incRef_0
112112
(global.get $GRAIN$EXPORT$incRef_0)

compiler/test/__snapshots__/stdlib.d4faa5bf.0.snapshot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ stdlib › stdlib_equal_13
1111
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$malloc\" (global $GRAIN$EXPORT$malloc_0 (mut i32)))
1212
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$incRef\" (global $GRAIN$EXPORT$incRef_0 (mut i32)))
1313
(import \"GRAIN$MODULE$runtime/gc\" \"GRAIN$EXPORT$decRef\" (global $GRAIN$EXPORT$decRef_0 (mut i32)))
14-
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1239 (mut i32)))
14+
(import \"GRAIN$MODULE$pervasives\" \"GRAIN$EXPORT$==\" (global $==_1248 (mut i32)))
1515
(import \"GRAIN$MODULE$runtime/gc\" \"malloc\" (func $malloc_0 (param i32 i32) (result i32)))
1616
(import \"GRAIN$MODULE$runtime/gc\" \"incRef\" (func $incRef_0 (param i32 i32) (result i32)))
1717
(import \"GRAIN$MODULE$runtime/gc\" \"decRef\" (func $decRef_0 (param i32 i32) (result i32)))
18-
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1239 (param i32 i32 i32) (result i32)))
18+
(import \"GRAIN$MODULE$pervasives\" \"==\" (func $==_1248 (param i32 i32 i32) (result i32)))
1919
(global $GRAIN$TABLE_SIZE i32 (i32.const 0))
2020
(elem $elem (global.get $relocBase_0))
2121
(export \"memory\" (memory $0))
@@ -95,10 +95,10 @@ stdlib › stdlib_equal_13
9595
(block $do_backpatches.5
9696
)
9797
)
98-
(call $==_1239
98+
(call $==_1248
9999
(call $incRef_0
100100
(global.get $GRAIN$EXPORT$incRef_0)
101-
(global.get $==_1239)
101+
(global.get $==_1248)
102102
)
103103
(call $incRef_0
104104
(global.get $GRAIN$EXPORT$incRef_0)

0 commit comments

Comments
 (0)