@grain/binaryen.ml 0.21.0 → 0.22.0

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.
Files changed (37) hide show
  1. binaryen-archive/CHANGELOG.md +34 -0
  2. binaryen-archive/binaryen.opam +2 -2
  3. binaryen-archive/esy.lock/index.json +191 -191
  4. binaryen-archive/esy.lock/opam/{chrome-trace.3.9.0 → chrome-trace.3.9.1}/opam +4 -4
  5. binaryen-archive/esy.lock/opam/{dune-build-info.3.9.0 → dune-build-info.3.9.1}/opam +4 -4
  6. binaryen-archive/esy.lock/opam/{dune-configurator.3.9.0 → dune-configurator.3.9.1}/opam +4 -4
  7. binaryen-archive/esy.lock/opam/{dune-rpc.3.9.0 → dune-rpc.3.9.1}/opam +4 -4
  8. binaryen-archive/esy.lock/opam/{dune.3.9.0 → dune.3.9.1}/opam +4 -4
  9. binaryen-archive/esy.lock/opam/{dyn.3.9.0 → dyn.3.9.1}/opam +4 -4
  10. binaryen-archive/esy.lock/opam/{js_of_ocaml-compiler.5.3.0 → js_of_ocaml-compiler.5.4.0}/opam +5 -5
  11. binaryen-archive/esy.lock/opam/{ordering.3.9.0 → ordering.3.9.1}/opam +4 -4
  12. binaryen-archive/esy.lock/opam/{stdune.3.9.0 → stdune.3.9.1}/opam +4 -4
  13. binaryen-archive/esy.lock/opam/{xdg.3.9.0 → xdg.3.9.1}/opam +4 -4
  14. binaryen-archive/package.json +2 -2
  15. binaryen-archive/src/expression.c +24 -6
  16. binaryen-archive/src/expression.js +20 -6
  17. binaryen-archive/src/expression.ml +14 -5
  18. binaryen-archive/src/expression.mli +10 -2
  19. binaryen-archive/src/heap_type.c +2 -2
  20. binaryen-archive/src/heap_type.js +3 -3
  21. binaryen-archive/src/heap_type.ml +1 -1
  22. binaryen-archive/src/heap_type.mli +1 -1
  23. binaryen-archive/src/op.c +98 -91
  24. binaryen-archive/src/op.js +84 -78
  25. binaryen-archive/src/op.ml +138 -32
  26. binaryen-archive/src/op.mli +46 -45
  27. binaryen-archive/src/passes.ml +16 -0
  28. binaryen-archive/src/passes.mli +15 -0
  29. binaryen-archive/src/type.c +2 -2
  30. binaryen-archive/src/type.js +3 -3
  31. binaryen-archive/src/type.ml +2 -2
  32. binaryen-archive/src/type.mli +1 -1
  33. binaryen-archive/src/type_system.c +0 -6
  34. binaryen-archive/src/type_system.js +0 -6
  35. binaryen-archive/src/type_system.ml +0 -1
  36. binaryen-archive/src/type_system.mli +0 -1
  37. binaryen-archive/test/test.expected +12 -12
@@ -7,12 +7,6 @@
7
7
  #include "ocaml_helpers.h"
8
8
 
9
9
 
10
- CAMLprim value
11
- caml_binaryen_type_system_equirecursive(value unit) {
12
- CAMLparam1(unit);
13
- CAMLreturn(Val_int(BinaryenTypeSystemEquirecursive()));
14
- }
15
-
16
10
  CAMLprim value
17
11
  caml_binaryen_type_system_nominal(value unit) {
18
12
  CAMLparam1(unit);
@@ -1,9 +1,3 @@
1
- //Provides: caml_binaryen_type_system_equirecursive
2
- //Requires: Binaryen
3
- function caml_binaryen_type_system_equirecursive() {
4
- return Binaryen._BinaryenTypeSystemEquirecursive();
5
- }
6
-
7
1
  //Provides: caml_binaryen_type_system_nominal
8
2
  //Requires: Binaryen
9
3
  function caml_binaryen_type_system_nominal() {
@@ -1,6 +1,5 @@
1
1
  type t = int
2
2
 
3
- external equirecursive : unit -> t = "caml_binaryen_type_system_equirecursive"
4
3
  external nominal : unit -> t = "caml_binaryen_type_system_nominal"
5
4
  external isorecursive : unit -> t = "caml_binaryen_type_system_isorecursive"
6
5
  external get_type_system : unit -> t = "caml_binaryen_get_type_system"
@@ -1,6 +1,5 @@
1
1
  type t
2
2
 
3
- val equirecursive : unit -> t
4
3
  val nominal : unit -> t
5
4
  val isorecursive : unit -> t
6
5
  val get_type_system : unit -> t
@@ -24,7 +24,7 @@
24
24
  (export "memory" (memory $0))
25
25
  (export "hello" (func $hello))
26
26
  (start $start)
27
- (func $adder (param $0 i32) (param $1 i32) (result i32)
27
+ (func $adder (type $i32_i32_=>_i32) (param $0 i32) (param $1 i32) (result i32)
28
28
  (block $add (result i32)
29
29
  (if
30
30
  (i32.const 0)
@@ -42,7 +42,7 @@
42
42
  )
43
43
  )
44
44
  )
45
- (func $start
45
+ (func $start (type $none_=>_none)
46
46
  (block $start
47
47
  (memory.init 1
48
48
  (i32.const 2048)
@@ -58,7 +58,7 @@
58
58
  )
59
59
  )
60
60
  )
61
- (func $hello (param $0 anyref) (result i32)
61
+ (func $hello (type $anyref_=>_i32) (param $0 anyref) (result i32)
62
62
  (call $write
63
63
  (local.get $0)
64
64
  (i32.const 0)
@@ -81,7 +81,7 @@
81
81
  (export "memory" (memory $0))
82
82
  (export "hello" (func $hello))
83
83
  (start $start)
84
- (func $adder (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
84
+ (func $adder (type $i32_i32_=>_i32) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
85
85
  (i32.add
86
86
  (select
87
87
  (local.get $0)
@@ -93,7 +93,7 @@
93
93
  (local.get $1)
94
94
  )
95
95
  )
96
- (func $start (; has Stack IR ;)
96
+ (func $start (type $none_=>_none) (; has Stack IR ;)
97
97
  (memory.init 1
98
98
  (i32.const 2048)
99
99
  (i32.const 0)
@@ -106,7 +106,7 @@
106
106
  )
107
107
  )
108
108
  )
109
- (func $hello (; has Stack IR ;) (param $0 anyref) (result i32)
109
+ (func $hello (type $anyref_=>_i32) (; has Stack IR ;) (param $0 anyref) (result i32)
110
110
  (call $write
111
111
  (local.get $0)
112
112
  (i32.const 0)
@@ -129,7 +129,7 @@
129
129
  (export "memory" (memory $0))
130
130
  (export "hello" (func $2))
131
131
  (start $1)
132
- (func $0 (param $0 i32) (param $1 i32) (result i32)
132
+ (func $0 (type $type$1) (param $0 i32) (param $1 i32) (result i32)
133
133
  (i32.add
134
134
  (select
135
135
  (local.get $0)
@@ -141,7 +141,7 @@
141
141
  (local.get $1)
142
142
  )
143
143
  )
144
- (func $1
144
+ (func $1 (type $type$2)
145
145
  (memory.init 1
146
146
  (i32.const 2048)
147
147
  (i32.const 0)
@@ -154,7 +154,7 @@
154
154
  )
155
155
  )
156
156
  )
157
- (func $2 (param $0 anyref) (result i32)
157
+ (func $2 (type $type$3) (param $0 anyref) (result i32)
158
158
  (call $fimport$0
159
159
  (local.get $0)
160
160
  (i32.const 0)
@@ -177,7 +177,7 @@
177
177
  (export "memory" (memory $0))
178
178
  (export "hello" (func $2))
179
179
  (start $1)
180
- (func $0 (param $0 i32) (param $1 i32) (result i32)
180
+ (func $0 (type $type$1) (param $0 i32) (param $1 i32) (result i32)
181
181
  local.get $0
182
182
  local.get $1
183
183
  i32.load $0
@@ -186,7 +186,7 @@
186
186
  local.get $1
187
187
  i32.add
188
188
  )
189
- (func $1
189
+ (func $1 (type $type$2)
190
190
  i32.const 2048
191
191
  i32.const 0
192
192
  i32.const 5
@@ -196,7 +196,7 @@
196
196
  call $0
197
197
  drop
198
198
  )
199
- (func $2 (param $0 anyref) (result i32)
199
+ (func $2 (type $type$3) (param $0 anyref) (result i32)
200
200
  local.get $0
201
201
  i32.const 0
202
202
  i32.const 1