@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
@@ -30,10 +30,10 @@ build: [
30
30
  ]
31
31
  ]
32
32
  url {
33
- src: "https://github.com/ocaml/dune/releases/download/3.9.0/dune-3.9.0.tbz"
33
+ src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
34
34
  checksum: [
35
- "sha256=c4825a9de454aedf450c2db25ac353033e31d326a9d1b4b7a2cd7260639bd544"
36
- "sha512=55d83bfee7c741cb5b74187674f9ef992ddf0b149f8d22a0a392c4c8ddf1075e9192eebd81cf36c115331cd96e10824100c6c338835d26c25e965e68ed94673d"
35
+ "sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
36
+ "sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
37
37
  ]
38
38
  }
39
- x-commit-hash: "891fa5a7d72655634378425d51a1cf703ff93336"
39
+ x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
@@ -36,10 +36,10 @@ build: [
36
36
  ]
37
37
  ]
38
38
  url {
39
- src: "https://github.com/ocaml/dune/releases/download/3.9.0/dune-3.9.0.tbz"
39
+ src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
40
40
  checksum: [
41
- "sha256=c4825a9de454aedf450c2db25ac353033e31d326a9d1b4b7a2cd7260639bd544"
42
- "sha512=55d83bfee7c741cb5b74187674f9ef992ddf0b149f8d22a0a392c4c8ddf1075e9192eebd81cf36c115331cd96e10824100c6c338835d26c25e965e68ed94673d"
41
+ "sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
42
+ "sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
43
43
  ]
44
44
  }
45
- x-commit-hash: "891fa5a7d72655634378425d51a1cf703ff93336"
45
+ x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
@@ -40,10 +40,10 @@ build: [
40
40
  ]
41
41
  ]
42
42
  url {
43
- src: "https://github.com/ocaml/dune/releases/download/3.9.0/dune-3.9.0.tbz"
43
+ src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
44
44
  checksum: [
45
- "sha256=c4825a9de454aedf450c2db25ac353033e31d326a9d1b4b7a2cd7260639bd544"
46
- "sha512=55d83bfee7c741cb5b74187674f9ef992ddf0b149f8d22a0a392c4c8ddf1075e9192eebd81cf36c115331cd96e10824100c6c338835d26c25e965e68ed94673d"
45
+ "sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
46
+ "sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
47
47
  ]
48
48
  }
49
- x-commit-hash: "891fa5a7d72655634378425d51a1cf703ff93336"
49
+ x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
@@ -34,10 +34,10 @@ build: [
34
34
  ]
35
35
  ]
36
36
  url {
37
- src: "https://github.com/ocaml/dune/releases/download/3.9.0/dune-3.9.0.tbz"
37
+ src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
38
38
  checksum: [
39
- "sha256=c4825a9de454aedf450c2db25ac353033e31d326a9d1b4b7a2cd7260639bd544"
40
- "sha512=55d83bfee7c741cb5b74187674f9ef992ddf0b149f8d22a0a392c4c8ddf1075e9192eebd81cf36c115331cd96e10824100c6c338835d26c25e965e68ed94673d"
39
+ "sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
40
+ "sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
41
41
  ]
42
42
  }
43
- x-commit-hash: "891fa5a7d72655634378425d51a1cf703ff93336"
43
+ x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
@@ -47,10 +47,10 @@ depends: [
47
47
  "base-threads"
48
48
  ]
49
49
  url {
50
- src: "https://github.com/ocaml/dune/releases/download/3.9.0/dune-3.9.0.tbz"
50
+ src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
51
51
  checksum: [
52
- "sha256=c4825a9de454aedf450c2db25ac353033e31d326a9d1b4b7a2cd7260639bd544"
53
- "sha512=55d83bfee7c741cb5b74187674f9ef992ddf0b149f8d22a0a392c4c8ddf1075e9192eebd81cf36c115331cd96e10824100c6c338835d26c25e965e68ed94673d"
52
+ "sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
53
+ "sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
54
54
  ]
55
55
  }
56
- x-commit-hash: "891fa5a7d72655634378425d51a1cf703ff93336"
56
+ x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
@@ -31,10 +31,10 @@ build: [
31
31
  ]
32
32
  ]
33
33
  url {
34
- src: "https://github.com/ocaml/dune/releases/download/3.9.0/dune-3.9.0.tbz"
34
+ src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
35
35
  checksum: [
36
- "sha256=c4825a9de454aedf450c2db25ac353033e31d326a9d1b4b7a2cd7260639bd544"
37
- "sha512=55d83bfee7c741cb5b74187674f9ef992ddf0b149f8d22a0a392c4c8ddf1075e9192eebd81cf36c115331cd96e10824100c6c338835d26c25e965e68ed94673d"
36
+ "sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
37
+ "sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
38
38
  ]
39
39
  }
40
- x-commit-hash: "891fa5a7d72655634378425d51a1cf703ff93336"
40
+ x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
@@ -12,7 +12,7 @@ doc: "https://ocsigen.org/js_of_ocaml/latest/manual/overview"
12
12
  bug-reports: "https://github.com/ocsigen/js_of_ocaml/issues"
13
13
  depends: [
14
14
  "dune" {>= "3.7"}
15
- "ocaml" {>= "4.08" & < "5.1"}
15
+ "ocaml" {>= "4.08" & < "5.2"}
16
16
  "num" {with-test}
17
17
  "ppx_expect" {>= "v0.14.2" & with-test}
18
18
  "ppxlib" {>= "0.15.0"}
@@ -46,10 +46,10 @@ build: [
46
46
  ]
47
47
  url {
48
48
  src:
49
- "https://github.com/ocsigen/js_of_ocaml/releases/download/5.3.0/js_of_ocaml-5.3.0.tbz"
49
+ "https://github.com/ocsigen/js_of_ocaml/releases/download/5.4.0/js_of_ocaml-5.4.0.tbz"
50
50
  checksum: [
51
- "sha256=be9e3deeb98e5d28f1bcb2d9847c04d2885fc07ed58ccd8b08aa4b6628cd64d2"
52
- "sha512=26ba67312747f63c1ab58e92a20fde635833275a56b0570c145e57c093a0412ea8dd6c1bce84a71fd321d76a4223b7e50843c4352f6515909ea1b0713b6cfe68"
51
+ "sha256=f1215de133867fefdb16e2798a225ee0446469a57462af0deebdd22d2a8d3b94"
52
+ "sha512=610cd22818bc6f0a0163f0eec74f58338e18709a6101639f65e58241a9216ed286c3cb091b41e36a82c926de5f030d718a6e76a493e885e61456047a8da153c9"
53
53
  ]
54
54
  }
55
- x-commit-hash: "7b2929f3e08375a859f13f31cf8d918b6e9455b7"
55
+ x-commit-hash: "705b9e39bfb6ab22afbb606dc85c81d1c30faff4"
@@ -29,10 +29,10 @@ build: [
29
29
  ]
30
30
  ]
31
31
  url {
32
- src: "https://github.com/ocaml/dune/releases/download/3.9.0/dune-3.9.0.tbz"
32
+ src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
33
33
  checksum: [
34
- "sha256=c4825a9de454aedf450c2db25ac353033e31d326a9d1b4b7a2cd7260639bd544"
35
- "sha512=55d83bfee7c741cb5b74187674f9ef992ddf0b149f8d22a0a392c4c8ddf1075e9192eebd81cf36c115331cd96e10824100c6c338835d26c25e965e68ed94673d"
34
+ "sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
35
+ "sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
36
36
  ]
37
37
  }
38
- x-commit-hash: "891fa5a7d72655634378425d51a1cf703ff93336"
38
+ x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
@@ -35,10 +35,10 @@ build: [
35
35
  ]
36
36
  ]
37
37
  url {
38
- src: "https://github.com/ocaml/dune/releases/download/3.9.0/dune-3.9.0.tbz"
38
+ src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
39
39
  checksum: [
40
- "sha256=c4825a9de454aedf450c2db25ac353033e31d326a9d1b4b7a2cd7260639bd544"
41
- "sha512=55d83bfee7c741cb5b74187674f9ef992ddf0b149f8d22a0a392c4c8ddf1075e9192eebd81cf36c115331cd96e10824100c6c338835d26c25e965e68ed94673d"
40
+ "sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
41
+ "sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
42
42
  ]
43
43
  }
44
- x-commit-hash: "891fa5a7d72655634378425d51a1cf703ff93336"
44
+ x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
@@ -30,10 +30,10 @@ build: [
30
30
  ]
31
31
  ]
32
32
  url {
33
- src: "https://github.com/ocaml/dune/releases/download/3.9.0/dune-3.9.0.tbz"
33
+ src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
34
34
  checksum: [
35
- "sha256=c4825a9de454aedf450c2db25ac353033e31d326a9d1b4b7a2cd7260639bd544"
36
- "sha512=55d83bfee7c741cb5b74187674f9ef992ddf0b149f8d22a0a392c4c8ddf1075e9192eebd81cf36c115331cd96e10824100c6c338835d26c25e965e68ed94673d"
35
+ "sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
36
+ "sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
37
37
  ]
38
38
  }
39
- x-commit-hash: "891fa5a7d72655634378425d51a1cf703ff93336"
39
+ x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@grain/binaryen.ml",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "OCaml bindings for Binaryen.",
5
5
  "author": "Oscar Spencer <oscar@grain-lang.org>",
6
6
  "license": "Apache-2.0",
7
7
  "dependencies": {
8
8
  "ocaml": ">= 4.12.0",
9
- "@grain/libbinaryen": ">= 111.0.0 < 112.0.0",
9
+ "@grain/libbinaryen": ">= 112.0.0 < 113.0.0",
10
10
  "@opam/dune": ">= 3.0.0",
11
11
  "@opam/dune-configurator": ">= 3.0.0"
12
12
  },
@@ -441,6 +441,25 @@ caml_binaryen_pop(value _module, value _ty) {
441
441
  CAMLreturn(alloc_BinaryenExpressionRef(exp));
442
442
  }
443
443
 
444
+ CAMLprim value
445
+ caml_binaryen_i31_new(value _module, value _val) {
446
+ CAMLparam2(_module, _val);
447
+ BinaryenModuleRef module = BinaryenModuleRef_val(_module);
448
+ BinaryenExpressionRef val = BinaryenExpressionRef_val(_val);
449
+ BinaryenExpressionRef exp = BinaryenI31New(module, val);
450
+ CAMLreturn(alloc_BinaryenExpressionRef(exp));
451
+ }
452
+
453
+ CAMLprim value
454
+ caml_binaryen_i31_get(value _module, value _val, value _signed) {
455
+ CAMLparam3(_module, _val, _signed);
456
+ BinaryenModuleRef module = BinaryenModuleRef_val(_module);
457
+ BinaryenExpressionRef val = BinaryenExpressionRef_val(_val);
458
+ bool isSigned = Bool_val(_signed);
459
+ BinaryenExpressionRef exp = BinaryenI31Get(module, val, isSigned);
460
+ CAMLreturn(alloc_BinaryenExpressionRef(exp));
461
+ }
462
+
444
463
  CAMLprim value
445
464
  caml_binaryen_expression_id_invalid(value unit) {
446
465
  CAMLparam1(unit);
@@ -653,9 +672,9 @@ caml_binaryen_expression_id_ref_null(value unit) {
653
672
  CAMLreturn(Val_int(BinaryenRefNullId()));
654
673
  }
655
674
  CAMLprim value
656
- caml_binaryen_expression_id_ref_is(value unit) {
675
+ caml_binaryen_expression_id_ref_is_null(value unit) {
657
676
  CAMLparam1(unit);
658
- CAMLreturn(Val_int(BinaryenRefIsId()));
677
+ CAMLreturn(Val_int(BinaryenRefIsNullId()));
659
678
  }
660
679
  CAMLprim value
661
680
  caml_binaryen_expression_id_ref_as(value unit) {
@@ -1827,12 +1846,11 @@ caml_binaryen_ref_null(value _module, value _ty) {
1827
1846
  }
1828
1847
 
1829
1848
  CAMLprim value
1830
- caml_binaryen_ref_is(value _module, value _op, value _value) {
1831
- CAMLparam3(_module, _op, _value);
1849
+ caml_binaryen_ref_is_null(value _module, value _value) {
1850
+ CAMLparam2(_module, _value);
1832
1851
  BinaryenModuleRef module = BinaryenModuleRef_val(_module);
1833
- BinaryenOp op = BinaryenOp_val(_op);
1834
1852
  BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
1835
- BinaryenExpressionRef exp = BinaryenRefIs(module, op, val);
1853
+ BinaryenExpressionRef exp = BinaryenRefIsNull(module, val);
1836
1854
  CAMLreturn(alloc_BinaryenExpressionRef(exp));
1837
1855
  }
1838
1856
 
@@ -541,6 +541,20 @@ function caml_binaryen_pop(wasm_mod, typ) {
541
541
  return Binaryen._BinaryenPop(wasm_mod, typ);
542
542
  }
543
543
 
544
+ //Provides: caml_binaryen_i31_new
545
+ function caml_binaryen_i31_new(wasm_mod, typ) {
546
+ return wasm_mod.i31.new(typ);
547
+ }
548
+
549
+ //Provides: caml_binaryen_i31_get
550
+ function caml_binaryen_i31_get(wasm_mod, typ, signed) {
551
+ if (signed) {
552
+ return wasm_mod.i31.get_s(typ);
553
+ } else {
554
+ return wasm_mod.i31.get_u(typ);
555
+ }
556
+ }
557
+
544
558
  //Provides: caml_binaryen_expression_id_invalid
545
559
  //Requires: Binaryen
546
560
  function caml_binaryen_expression_id_invalid() {
@@ -752,10 +766,10 @@ function caml_binaryen_expression_id_pop() {
752
766
  function caml_binaryen_expression_id_ref_null() {
753
767
  return Binaryen.RefNullId;
754
768
  }
755
- //Provides: caml_binaryen_expression_id_ref_is
769
+ //Provides: caml_binaryen_expression_id_ref_is_null
756
770
  //Requires: Binaryen
757
- function caml_binaryen_expression_id_ref_is() {
758
- return Binaryen.RefIsId;
771
+ function caml_binaryen_expression_id_ref_is_null() {
772
+ return Binaryen.RefIsNullId;
759
773
  }
760
774
  //Provides: caml_binaryen_expression_id_ref_as
761
775
  //Requires: Binaryen
@@ -1664,10 +1678,10 @@ function caml_binaryen_ref_null(wasm_mod, typ) {
1664
1678
  return wasm_mod.ref.null(typ);
1665
1679
  }
1666
1680
 
1667
- //Provides: caml_binaryen_ref_is
1681
+ //Provides: caml_binaryen_ref_is_null
1668
1682
  //Requires: Binaryen
1669
- function caml_binaryen_ref_is(wasm_mod, op, value) {
1670
- return Binaryen._BinaryenRefIs(wasm_mod, op, value);
1683
+ function caml_binaryen_ref_is_null(wasm_mod, value) {
1684
+ return Binaryen.ExpressionIds.RefIsNull(wasm_mod, value);
1671
1685
  }
1672
1686
 
1673
1687
  //Provides: caml_binaryen_ref_as
@@ -251,9 +251,10 @@ external id_ref_null : unit -> int = "caml_binaryen_expression_id_ref_null"
251
251
 
252
252
  let id_ref_null = id_ref_null ()
253
253
 
254
- external id_ref_is : unit -> int = "caml_binaryen_expression_id_ref_is"
254
+ external id_ref_is_null : unit -> int
255
+ = "caml_binaryen_expression_id_ref_is_null"
255
256
 
256
- let id_ref_is = id_ref_is ()
257
+ let id_ref_is_null = id_ref_is_null ()
257
258
 
258
259
  external id_ref_func : unit -> int = "caml_binaryen_expression_id_ref_func"
259
260
 
@@ -385,7 +386,7 @@ let get_kind expr =
385
386
  | n when n = id_unreachable -> Unreachable
386
387
  | n when n = id_pop -> Pop
387
388
  | n when n = id_ref_null -> RefNull
388
- | n when n = id_ref_is -> RefIs
389
+ | n when n = id_ref_is_null -> RefIs
389
390
  | n when n = id_ref_func -> RefFunc
390
391
  | n when n = id_ref_eq -> RefEq
391
392
  | n when n = id_try -> Try
@@ -799,6 +800,14 @@ module Pop = struct
799
800
  (** Module, type *)
800
801
  end
801
802
 
803
+ module I31 = struct
804
+ external make : Module.t -> t -> t = "caml_binaryen_i31_new"
805
+ (** Module, value *)
806
+
807
+ external get : Module.t -> t -> bool -> t = "caml_binaryen_i31_get"
808
+ (** Module, i31, is_signed *)
809
+ end
810
+
802
811
  module Null = struct
803
812
  external make : unit -> t = "caml_binaryen_null_expression"
804
813
  (** A null reference. *)
@@ -808,8 +817,8 @@ module Ref = struct
808
817
  external null : Module.t -> Type.t -> t = "caml_binaryen_ref_null"
809
818
  (** Module, type *)
810
819
 
811
- external is : Module.t -> Op.t -> t -> t = "caml_binaryen_ref_is"
812
- (** Module, op, value *)
820
+ external is_null : Module.t -> t -> t = "caml_binaryen_ref_is_null"
821
+ (** Module, value *)
813
822
 
814
823
  external as_ : Module.t -> Op.t -> t -> t = "caml_binaryen_ref_as"
815
824
  (** Module, op, value *)
@@ -321,6 +321,14 @@ module Pop : sig
321
321
  val make : Module.t -> Type.t -> t
322
322
  end
323
323
 
324
+ module I31 : sig
325
+ val make : Module.t -> t -> t
326
+ (** Module, value *)
327
+
328
+ val get : Module.t -> t -> bool -> t
329
+ (** Module, i31, is_signed *)
330
+ end
331
+
324
332
  module Null : sig
325
333
  val make : unit -> t
326
334
  end
@@ -329,8 +337,8 @@ module Ref : sig
329
337
  val null : Module.t -> Type.t -> t
330
338
  (** Module, type *)
331
339
 
332
- val is : Module.t -> Op.t -> t -> t
333
- (** Module, op, value *)
340
+ val is_null : Module.t -> t -> t
341
+ (** Module, value *)
334
342
 
335
343
  val as_ : Module.t -> Op.t -> t -> t
336
344
  (** Module, op, value *)
@@ -43,9 +43,9 @@ caml_binaryen_heap_type_i31(value unit) {
43
43
  }
44
44
 
45
45
  CAMLprim value
46
- caml_binaryen_heap_type_data(value unit) {
46
+ caml_binaryen_heap_type_struct(value unit) {
47
47
  CAMLparam1(unit);
48
- BinaryenHeapType ty = BinaryenHeapTypeData();
48
+ BinaryenHeapType ty = BinaryenHeapTypeStruct();
49
49
  CAMLreturn(alloc_BinaryenHeapType(ty));
50
50
  }
51
51
 
@@ -28,10 +28,10 @@ function caml_binaryen_heap_type_i31() {
28
28
  return Binaryen._BinaryenHeapTypeI31();
29
29
  }
30
30
 
31
- //Provides: caml_binaryen_heap_type_data
31
+ //Provides: caml_binaryen_heap_type_struct
32
32
  //Requires: Binaryen
33
- function caml_binaryen_heap_type_data() {
34
- return Binaryen._BinaryenHeapTypeData();
33
+ function caml_binaryen_heap_type_struct() {
34
+ return Binaryen._BinaryenHeapTypeStruct();
35
35
  }
36
36
 
37
37
  //Provides: caml_binaryen_heap_type_array
@@ -5,7 +5,7 @@ external func : unit -> t = "caml_binaryen_heap_type_func"
5
5
  external any : unit -> t = "caml_binaryen_heap_type_any"
6
6
  external eq : unit -> t = "caml_binaryen_heap_type_eq"
7
7
  external i31 : unit -> t = "caml_binaryen_heap_type_i31"
8
- external data : unit -> t = "caml_binaryen_heap_type_data"
8
+ external struct_ : unit -> t = "caml_binaryen_heap_type_struct"
9
9
  external array : unit -> t = "caml_binaryen_heap_type_array"
10
10
  external string : unit -> t = "caml_binaryen_heap_type_string"
11
11
  external stringview_wtf8 : unit -> t = "caml_binaryen_heap_type_stringview_wtf8"
@@ -5,7 +5,7 @@ val func : unit -> t
5
5
  val any : unit -> t
6
6
  val eq : unit -> t
7
7
  val i31 : unit -> t
8
- val data : unit -> t
8
+ val struct_ : unit -> t
9
9
  val array : unit -> t
10
10
  val string : unit -> t
11
11
  val stringview_wtf8 : unit -> t
binaryen-archive/src/op.c CHANGED
@@ -1476,6 +1476,83 @@ caml_binaryen_bitselect_vec128(value unit) {
1476
1476
  CAMLreturn(alloc_BinaryenOp(op));
1477
1477
  }
1478
1478
 
1479
+ CAMLprim value
1480
+ caml_binaryen_relaxed_fma_vec_f32x4(value unit) {
1481
+ CAMLparam1(unit);
1482
+ BinaryenOp op = BinaryenRelaxedFmaVecF32x4();
1483
+ CAMLreturn(alloc_BinaryenOp(op));
1484
+ }
1485
+
1486
+ CAMLprim value
1487
+ caml_binaryen_relaxed_fms_vec_f32x4(value unit) {
1488
+ CAMLparam1(unit);
1489
+ BinaryenOp op = BinaryenRelaxedFmsVecF32x4();
1490
+ CAMLreturn(alloc_BinaryenOp(op));
1491
+ }
1492
+
1493
+ CAMLprim value
1494
+ caml_binaryen_relaxed_fma_vec_f64x4(value unit) {
1495
+ CAMLparam1(unit);
1496
+ BinaryenOp op = BinaryenRelaxedFmaVecF64x2();
1497
+ CAMLreturn(alloc_BinaryenOp(op));
1498
+ }
1499
+
1500
+ CAMLprim value
1501
+ caml_binaryen_relaxed_fms_vec_f64x4(value unit) {
1502
+ CAMLparam1(unit);
1503
+ BinaryenOp op = BinaryenRelaxedFmsVecF64x2();
1504
+ CAMLreturn(alloc_BinaryenOp(op));
1505
+ }
1506
+
1507
+ CAMLprim value
1508
+ caml_binaryen_laneselect_i8x16(value unit) {
1509
+ CAMLparam1(unit);
1510
+ BinaryenOp op = BinaryenLaneselectI8x16();
1511
+ CAMLreturn(alloc_BinaryenOp(op));
1512
+ }
1513
+
1514
+ CAMLprim value
1515
+ caml_binaryen_laneselect_i16x8(value unit) {
1516
+ CAMLparam1(unit);
1517
+ BinaryenOp op = BinaryenLaneselectI16x8();
1518
+ CAMLreturn(alloc_BinaryenOp(op));
1519
+ }
1520
+
1521
+ CAMLprim value
1522
+ caml_binaryen_laneselect_i32x4(value unit) {
1523
+ CAMLparam1(unit);
1524
+ BinaryenOp op = BinaryenLaneselectI32x4();
1525
+ CAMLreturn(alloc_BinaryenOp(op));
1526
+ }
1527
+
1528
+ CAMLprim value
1529
+ caml_binaryen_laneselect_i64x2(value unit) {
1530
+ CAMLparam1(unit);
1531
+ BinaryenOp op = BinaryenLaneselectI64x2();
1532
+ CAMLreturn(alloc_BinaryenOp(op));
1533
+ }
1534
+
1535
+ CAMLprim value
1536
+ caml_binaryen_dot_i8x16_i7x16_add_s_to_vec_i32x4(value unit) {
1537
+ CAMLparam1(unit);
1538
+ BinaryenOp op = BinaryenDotI8x16I7x16AddSToVecI32x4();
1539
+ CAMLreturn(alloc_BinaryenOp(op));
1540
+ }
1541
+
1542
+ CAMLprim value
1543
+ caml_binaryen_any_true_vec128(value unit) {
1544
+ CAMLparam1(unit);
1545
+ BinaryenOp op = BinaryenAnyTrueVec128();
1546
+ CAMLreturn(alloc_BinaryenOp(op));
1547
+ }
1548
+
1549
+ CAMLprim value
1550
+ caml_binaryen_popcnt_vec_i8x16(value unit) {
1551
+ CAMLparam1(unit);
1552
+ BinaryenOp op = BinaryenPopcntVecI8x16();
1553
+ CAMLreturn(alloc_BinaryenOp(op));
1554
+ }
1555
+
1479
1556
  CAMLprim value
1480
1557
  caml_binaryen_abs_vec_i8x16(value unit) {
1481
1558
  CAMLparam1(unit);
@@ -2162,34 +2239,6 @@ caml_binaryen_swizzle_vec8x16(value unit) {
2162
2239
  CAMLreturn(alloc_BinaryenOp(op));
2163
2240
  }
2164
2241
 
2165
- CAMLprim value
2166
- caml_binaryen_ref_is_null(value unit) {
2167
- CAMLparam1(unit);
2168
- BinaryenOp op = BinaryenRefIsNull();
2169
- CAMLreturn(alloc_BinaryenOp(op));
2170
- }
2171
-
2172
- CAMLprim value
2173
- caml_binaryen_ref_is_func(value unit) {
2174
- CAMLparam1(unit);
2175
- BinaryenOp op = BinaryenRefIsFunc();
2176
- CAMLreturn(alloc_BinaryenOp(op));
2177
- }
2178
-
2179
- CAMLprim value
2180
- caml_binaryen_ref_is_data(value unit) {
2181
- CAMLparam1(unit);
2182
- BinaryenOp op = BinaryenRefIsData();
2183
- CAMLreturn(alloc_BinaryenOp(op));
2184
- }
2185
-
2186
- CAMLprim value
2187
- caml_binaryen_ref_is_i31(value unit) {
2188
- CAMLparam1(unit);
2189
- BinaryenOp op = BinaryenRefIsI31();
2190
- CAMLreturn(alloc_BinaryenOp(op));
2191
- }
2192
-
2193
2242
  CAMLprim value
2194
2243
  caml_binaryen_ref_as_non_null(value unit) {
2195
2244
  CAMLparam1(unit);
@@ -2197,27 +2246,6 @@ caml_binaryen_ref_as_non_null(value unit) {
2197
2246
  CAMLreturn(alloc_BinaryenOp(op));
2198
2247
  }
2199
2248
 
2200
- CAMLprim value
2201
- caml_binaryen_ref_as_func(value unit) {
2202
- CAMLparam1(unit);
2203
- BinaryenOp op = BinaryenRefAsFunc();
2204
- CAMLreturn(alloc_BinaryenOp(op));
2205
- }
2206
-
2207
- CAMLprim value
2208
- caml_binaryen_ref_as_data(value unit) {
2209
- CAMLparam1(unit);
2210
- BinaryenOp op = BinaryenRefAsData();
2211
- CAMLreturn(alloc_BinaryenOp(op));
2212
- }
2213
-
2214
- CAMLprim value
2215
- caml_binaryen_ref_as_i31(value unit) {
2216
- CAMLparam1(unit);
2217
- BinaryenOp op = BinaryenRefAsI31();
2218
- CAMLreturn(alloc_BinaryenOp(op));
2219
- }
2220
-
2221
2249
  CAMLprim value
2222
2250
  caml_binaryen_ref_as_extern_internalize(value unit) {
2223
2251
  CAMLparam1(unit);
@@ -2260,48 +2288,6 @@ caml_binaryen_br_on_cast_fail(value unit) {
2260
2288
  CAMLreturn(alloc_BinaryenOp(op));
2261
2289
  }
2262
2290
 
2263
- CAMLprim value
2264
- caml_binaryen_br_on_func(value unit) {
2265
- CAMLparam1(unit);
2266
- BinaryenOp op = BinaryenBrOnFunc();
2267
- CAMLreturn(alloc_BinaryenOp(op));
2268
- }
2269
-
2270
- CAMLprim value
2271
- caml_binaryen_br_on_non_func(value unit) {
2272
- CAMLparam1(unit);
2273
- BinaryenOp op = BinaryenBrOnNonFunc();
2274
- CAMLreturn(alloc_BinaryenOp(op));
2275
- }
2276
-
2277
- CAMLprim value
2278
- caml_binaryen_br_on_data(value unit) {
2279
- CAMLparam1(unit);
2280
- BinaryenOp op = BinaryenBrOnData();
2281
- CAMLreturn(alloc_BinaryenOp(op));
2282
- }
2283
-
2284
- CAMLprim value
2285
- caml_binaryen_br_on_non_data(value unit) {
2286
- CAMLparam1(unit);
2287
- BinaryenOp op = BinaryenBrOnNonData();
2288
- CAMLreturn(alloc_BinaryenOp(op));
2289
- }
2290
-
2291
- CAMLprim value
2292
- caml_binaryen_br_on_i31(value unit) {
2293
- CAMLparam1(unit);
2294
- BinaryenOp op = BinaryenBrOnI31();
2295
- CAMLreturn(alloc_BinaryenOp(op));
2296
- }
2297
-
2298
- CAMLprim value
2299
- caml_binaryen_br_on_non_i31(value unit) {
2300
- CAMLparam1(unit);
2301
- BinaryenOp op = BinaryenBrOnNonI31();
2302
- CAMLreturn(alloc_BinaryenOp(op));
2303
- }
2304
-
2305
2291
  CAMLprim value
2306
2292
  caml_binaryen_string_new_utf8(value unit) {
2307
2293
  CAMLparam1(unit);
@@ -2358,6 +2344,13 @@ caml_binaryen_string_new_wtf16_array(value unit) {
2358
2344
  CAMLreturn(alloc_BinaryenOp(op));
2359
2345
  }
2360
2346
 
2347
+ CAMLprim value
2348
+ caml_binaryen_string_new_from_code_point(value unit) {
2349
+ CAMLparam1(unit);
2350
+ BinaryenOp op = BinaryenStringNewFromCodePoint();
2351
+ CAMLreturn(alloc_BinaryenOp(op));
2352
+ }
2353
+
2361
2354
  CAMLprim value
2362
2355
  caml_binaryen_string_measure_utf8(value unit) {
2363
2356
  CAMLparam1(unit);
@@ -2483,3 +2476,17 @@ caml_binaryen_string_slice_wtf16(value unit) {
2483
2476
  BinaryenOp op = BinaryenStringSliceWTF16();
2484
2477
  CAMLreturn(alloc_BinaryenOp(op));
2485
2478
  }
2479
+
2480
+ CAMLprim value
2481
+ caml_binaryen_string_eq_equal(value unit) {
2482
+ CAMLparam1(unit);
2483
+ BinaryenOp op = BinaryenStringEqEqual();
2484
+ CAMLreturn(alloc_BinaryenOp(op));
2485
+ }
2486
+
2487
+ CAMLprim value
2488
+ caml_binaryen_string_eq_compare(value unit) {
2489
+ CAMLparam1(unit);
2490
+ BinaryenOp op = BinaryenStringEqCompare();
2491
+ CAMLreturn(alloc_BinaryenOp(op));
2492
+ }