@grain/binaryen.ml 0.27.0 → 0.28.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.
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.28.0](https://github.com/grain-lang/binaryen.ml/compare/v0.27.0...v0.28.0) (2025-11-01)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * Upgrade to Binaryen v118 ([#204](https://github.com/grain-lang/binaryen.ml/issues/204))
9
+
10
+ ### Features
11
+
12
+ * Upgrade to Binaryen v118 ([#204](https://github.com/grain-lang/binaryen.ml/issues/204)) ([6a5d0e8](https://github.com/grain-lang/binaryen.ml/commit/6a5d0e8ca24e306bc6d634bebc9f70efdf0896e0))
13
+
3
14
  ## [0.27.0](https://github.com/grain-lang/binaryen.ml/compare/v0.26.0...v0.27.0) (2025-10-29)
4
15
 
5
16
 
@@ -1,5 +1,5 @@
1
1
  opam-version: "2.0"
2
- version: "0.27.0"
2
+ version: "0.28.0"
3
3
  synopsis: "OCaml bindings for Binaryen"
4
4
  maintainer: "oscar@grain-lang.org"
5
5
  author: "Oscar Spencer"
@@ -16,5 +16,6 @@ depends: [
16
16
  "dune" {>= "3.0.0"}
17
17
  "dune-configurator" {>= "3.0.0"}
18
18
  "js_of_ocaml-compiler" {>= "6.0.0" < "7.0.0"}
19
- "libbinaryen" {> "117.0.0" < "118.0.0"}
19
+ "libbinaryen" {> "118.0.0" < "119.0.0"}
20
20
  ]
21
+ x-maintenance-intent: ["0.(latest)"]
@@ -1,5 +1,5 @@
1
1
  {
2
- "checksum": "3be8605787a43a951f40f7ce3b739916",
2
+ "checksum": "6cabedd34420da31165803fc405c807c",
3
3
  "root": "@grain/binaryen.ml@link-dev:./package.json",
4
4
  "node": {
5
5
  "ocaml@5.3.0@d41d8cd9": {
@@ -575,20 +575,20 @@
575
575
  ],
576
576
  "available": "true"
577
577
  },
578
- "@opam/ocamlformat-rpc-lib@opam:0.27.0@b911ff6f": {
579
- "id": "@opam/ocamlformat-rpc-lib@opam:0.27.0@b911ff6f",
578
+ "@opam/ocamlformat-rpc-lib@opam:0.28.1@4c691df7": {
579
+ "id": "@opam/ocamlformat-rpc-lib@opam:0.28.1@4c691df7",
580
580
  "name": "@opam/ocamlformat-rpc-lib",
581
- "version": "opam:0.27.0",
581
+ "version": "opam:0.28.1",
582
582
  "source": {
583
583
  "type": "install",
584
584
  "source": [
585
- "archive:https://opam.ocaml.org/cache/sha256/dd/ddbf484c076d08f99400ee84b790ec231f5c8fcbd5d3324a6400d5388e846d15#sha256:ddbf484c076d08f99400ee84b790ec231f5c8fcbd5d3324a6400d5388e846d15",
586
- "archive:https://github.com/ocaml-ppx/ocamlformat/releases/download/0.27.0/ocamlformat-0.27.0.tbz#sha256:ddbf484c076d08f99400ee84b790ec231f5c8fcbd5d3324a6400d5388e846d15"
585
+ "archive:https://opam.ocaml.org/cache/sha256/70/70bda037d0bed961ed91bdb5198b2eeef542444750a8b015d80ccb94b3ff41fb#sha256:70bda037d0bed961ed91bdb5198b2eeef542444750a8b015d80ccb94b3ff41fb",
586
+ "archive:https://github.com/ocaml-ppx/ocamlformat/releases/download/0.28.1/ocamlformat-0.28.1.tbz#sha256:70bda037d0bed961ed91bdb5198b2eeef542444750a8b015d80ccb94b3ff41fb"
587
587
  ],
588
588
  "opam": {
589
589
  "name": "ocamlformat-rpc-lib",
590
- "version": "0.27.0",
591
- "path": "esy.lock/opam/ocamlformat-rpc-lib.0.27.0"
590
+ "version": "0.28.1",
591
+ "path": "esy.lock/opam/ocamlformat-rpc-lib.0.28.1"
592
592
  }
593
593
  },
594
594
  "overrides": [],
@@ -846,7 +846,7 @@
846
846
  "@opam/ppx_yojson_conv_lib@opam:v0.17.0@2b444c0e",
847
847
  "@opam/pp@opam:2.0.0@2177bbde",
848
848
  "@opam/ordering@opam:3.20.2@6865c105",
849
- "@opam/ocamlformat-rpc-lib@opam:0.27.0@b911ff6f",
849
+ "@opam/ocamlformat-rpc-lib@opam:0.28.1@4c691df7",
850
850
  "@opam/ocamlc-loc@opam:3.20.2@4ca99b2f",
851
851
  "@opam/merlin-lib@opam:5.6-503@f2a59b18",
852
852
  "@opam/lsp@opam:1.23.1@22e2f8da",
@@ -869,7 +869,7 @@
869
869
  "@opam/ppx_yojson_conv_lib@opam:v0.17.0@2b444c0e",
870
870
  "@opam/pp@opam:2.0.0@2177bbde",
871
871
  "@opam/ordering@opam:3.20.2@6865c105",
872
- "@opam/ocamlformat-rpc-lib@opam:0.27.0@b911ff6f",
872
+ "@opam/ocamlformat-rpc-lib@opam:0.28.1@4c691df7",
873
873
  "@opam/ocamlc-loc@opam:3.20.2@4ca99b2f",
874
874
  "@opam/merlin-lib@opam:5.6-503@f2a59b18",
875
875
  "@opam/lsp@opam:1.23.1@22e2f8da",
@@ -1663,14 +1663,14 @@
1663
1663
  "devDependencies": [ "ocaml@5.3.0@d41d8cd9" ],
1664
1664
  "available": "true"
1665
1665
  },
1666
- "@grain/libbinaryen@117.0.0-b@d41d8cd9": {
1667
- "id": "@grain/libbinaryen@117.0.0-b@d41d8cd9",
1666
+ "@grain/libbinaryen@118.0.0-b@d41d8cd9": {
1667
+ "id": "@grain/libbinaryen@118.0.0-b@d41d8cd9",
1668
1668
  "name": "@grain/libbinaryen",
1669
- "version": "117.0.0-b",
1669
+ "version": "118.0.0-b",
1670
1670
  "source": {
1671
1671
  "type": "install",
1672
1672
  "source": [
1673
- "archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-117.0.0-b.tgz#sha1:1bb01d09165c55ffdf06491eecf298a7b88d916c"
1673
+ "archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-118.0.0-b.tgz#sha1:8c5330a7cd5ee8c89b21d8b57da9d4009417db09"
1674
1674
  ]
1675
1675
  },
1676
1676
  "overrides": [],
@@ -1680,7 +1680,8 @@
1680
1680
  "@opam/dune@opam:3.20.2@8daef28d",
1681
1681
  "@opam/conf-cmake@github:grain-lang/cmake:esy.json#033cab656dc71a6488b3c1ca6ea45099f794bd03@d41d8cd9"
1682
1682
  ],
1683
- "devDependencies": []
1683
+ "devDependencies": [],
1684
+ "installConfig": { "pnp": false }
1684
1685
  },
1685
1686
  "@grain/binaryen.ml@link-dev:./package.json": {
1686
1687
  "id": "@grain/binaryen.ml@link-dev:./package.json",
@@ -1696,7 +1697,7 @@
1696
1697
  "ocaml@5.3.0@d41d8cd9",
1697
1698
  "@opam/dune-configurator@opam:3.20.2@7eb6ff01",
1698
1699
  "@opam/dune@opam:3.20.2@8daef28d",
1699
- "@grain/libbinaryen@117.0.0-b@d41d8cd9"
1700
+ "@grain/libbinaryen@118.0.0-b@d41d8cd9"
1700
1701
  ],
1701
1702
  "devDependencies": [
1702
1703
  "@opam/ocamlformat@opam:0.27.0@c40d4612",
@@ -40,10 +40,10 @@ build: [
40
40
  dev-repo: "git+https://github.com/ocaml-ppx/ocamlformat.git"
41
41
  url {
42
42
  src:
43
- "https://github.com/ocaml-ppx/ocamlformat/releases/download/0.27.0/ocamlformat-0.27.0.tbz"
43
+ "https://github.com/ocaml-ppx/ocamlformat/releases/download/0.28.1/ocamlformat-0.28.1.tbz"
44
44
  checksum: [
45
- "sha256=ddbf484c076d08f99400ee84b790ec231f5c8fcbd5d3324a6400d5388e846d15"
46
- "sha512=4d2a8965a7b7ad45f8f4e76c01cf38bfa68462b07dfa7bdb2db23bd3e3017b214e6780f036679fa8595dde4167a01d957e3af8837274320449014e306773f917"
45
+ "sha256=70bda037d0bed961ed91bdb5198b2eeef542444750a8b015d80ccb94b3ff41fb"
46
+ "sha512=8de0517165c6f0cadcedcce66e57cb723956768a8068abd062243abb08fabf292283d0d284be230aa5647d0883a4dc7f28fcf1b70338a2b0c9b17a5bed1bbb71"
47
47
  ]
48
48
  }
49
- x-commit-hash: "5bac2e7f71d9b0a06bd1908dda9b13da1649eee1"
49
+ x-commit-hash: "809492a6044557239ed1e1c2f78eec602f068ea4"
@@ -1,15 +1,12 @@
1
1
  {
2
2
  "name": "@grain/binaryen.ml",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "description": "OCaml bindings for Binaryen.",
5
5
  "author": "Oscar Spencer <oscar@grain-lang.org>",
6
6
  "license": "Apache-2.0",
7
- "installConfig": {
8
- "pnp": false
9
- },
10
7
  "dependencies": {
11
8
  "ocaml": ">= 4.13.0 < 5.4.0",
12
- "@grain/libbinaryen": "117.0.0-b",
9
+ "@grain/libbinaryen": "118.0.0-b",
13
10
  "@opam/dune": ">= 3.0.0",
14
11
  "@opam/dune-configurator": ">= 3.0.0"
15
12
  },
@@ -63,27 +63,6 @@ caml_binaryen_heap_type_string(value unit) {
63
63
  CAMLreturn(alloc_BinaryenHeapType(ty));
64
64
  }
65
65
 
66
- CAMLprim value
67
- caml_binaryen_heap_type_stringview_wtf8(value unit) {
68
- CAMLparam1(unit);
69
- BinaryenHeapType ty = BinaryenHeapTypeStringviewWTF8();
70
- CAMLreturn(alloc_BinaryenHeapType(ty));
71
- }
72
-
73
- CAMLprim value
74
- caml_binaryen_heap_type_stringview_wtf16(value unit) {
75
- CAMLparam1(unit);
76
- BinaryenHeapType ty = BinaryenHeapTypeStringviewWTF16();
77
- CAMLreturn(alloc_BinaryenHeapType(ty));
78
- }
79
-
80
- CAMLprim value
81
- caml_binaryen_heap_type_stringview_iter(value unit) {
82
- CAMLparam1(unit);
83
- BinaryenHeapType ty = BinaryenHeapTypeStringviewIter();
84
- CAMLreturn(alloc_BinaryenHeapType(ty));
85
- }
86
-
87
66
  CAMLprim value
88
67
  caml_binaryen_heap_type_none(value unit) {
89
68
  CAMLparam1(unit);
@@ -46,24 +46,6 @@ function caml_binaryen_heap_type_string() {
46
46
  return Binaryen._BinaryenHeapTypeString();
47
47
  }
48
48
 
49
- //Provides: caml_binaryen_heap_type_stringview_wtf8
50
- //Requires: Binaryen
51
- function caml_binaryen_heap_type_stringview_wtf8() {
52
- return Binaryen._BinaryenHeapTypeStringviewWTF8();
53
- }
54
-
55
- //Provides: caml_binaryen_heap_type_stringview_wtf16
56
- //Requires: Binaryen
57
- function caml_binaryen_heap_type_stringview_wtf16() {
58
- return Binaryen._BinaryenHeapTypeStringviewWTF16();
59
- }
60
-
61
- //Provides: caml_binaryen_heap_type_stringview_iter
62
- //Requires: Binaryen
63
- function caml_binaryen_heap_type_stringview_iter() {
64
- return Binaryen._BinaryenHeapTypeStringviewIter();
65
- }
66
-
67
49
  //Provides: caml_binaryen_heap_type_none
68
50
  //Requires: Binaryen
69
51
  function caml_binaryen_heap_type_none() {
@@ -8,12 +8,6 @@ external i31 : unit -> t = "caml_binaryen_heap_type_i31"
8
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
- external stringview_wtf8 : unit -> t = "caml_binaryen_heap_type_stringview_wtf8"
12
-
13
- external stringview_wtf16 : unit -> t
14
- = "caml_binaryen_heap_type_stringview_wtf16"
15
-
16
- external stringview_iter : unit -> t = "caml_binaryen_heap_type_stringview_iter"
17
11
  external none : unit -> t = "caml_binaryen_heap_type_none"
18
12
  external noext : unit -> t = "caml_binaryen_heap_type_noext"
19
13
  external nofunc : unit -> t = "caml_binaryen_heap_type_nofunc"
@@ -8,9 +8,6 @@ val i31 : unit -> t
8
8
  val struct_ : unit -> t
9
9
  val array : unit -> t
10
10
  val string : unit -> t
11
- val stringview_wtf8 : unit -> t
12
- val stringview_wtf16 : unit -> t
13
- val stringview_iter : unit -> t
14
11
  val none : unit -> t
15
12
  val noext : unit -> t
16
13
  val nofunc : unit -> t
@@ -44,10 +44,9 @@ caml_binaryen_module_print_asmjs(value module) {
44
44
  }
45
45
 
46
46
  CAMLprim value
47
- caml_binaryen_module_print_stack_ir(value module, value _optimize) {
48
- CAMLparam2(module, _optimize);
49
- bool optimize = Bool_val(_optimize);
50
- BinaryenModulePrintStackIR(BinaryenModuleRef_val(module), optimize);
47
+ caml_binaryen_module_print_stack_ir(value module) {
48
+ CAMLparam1(module);
49
+ BinaryenModulePrintStackIR(BinaryenModuleRef_val(module));
51
50
  CAMLreturn(Val_unit);
52
51
  }
53
52
 
@@ -127,11 +126,10 @@ caml_binaryen_module_write_text(value _module) {
127
126
  // There is something weird with this function that causes a bunch of newlines to
128
127
  // be printed on stdout when calling it. Not sure if that's a bug in Binaryen.
129
128
  CAMLprim value
130
- caml_binaryen_module_write_stack_ir(value _module, value _optimize) {
131
- CAMLparam2(_module, _optimize);
129
+ caml_binaryen_module_write_stack_ir(value _module) {
130
+ CAMLparam1(_module);
132
131
  BinaryenModuleRef module = BinaryenModuleRef_val(_module);
133
- bool optimize = Bool_val(_optimize);
134
- char* result = BinaryenModuleAllocateAndWriteStackIR(module, optimize);
132
+ char* result = BinaryenModuleAllocateAndWriteStackIR(module);
135
133
  CAMLlocal1(text);
136
134
  text = caml_copy_string(result);
137
135
  free(result);
@@ -40,10 +40,10 @@ function caml_binaryen_module_print_asmjs(wasm_mod) {
40
40
 
41
41
  //Provides: caml_binaryen_module_print_stack_ir
42
42
  //Requires: caml_sys_fds
43
- //Requires: caml_string_of_jsstring, caml_js_from_bool
43
+ //Requires: caml_string_of_jsstring
44
44
  //Requires: caml_ml_output, caml_ml_string_length
45
- function caml_binaryen_module_print_stack_ir(wasm_mod, optimize) {
46
- var stackir = wasm_mod.emitStackIR(caml_js_from_bool(optimize));
45
+ function caml_binaryen_module_print_stack_ir(wasm_mod) {
46
+ var stackir = wasm_mod.emitStackIR();
47
47
  var chanid = caml_sys_fds[1].chanid; // stdout
48
48
  var s = caml_string_of_jsstring(stackir);
49
49
  caml_ml_output(chanid, s, 0, caml_ml_string_length(s));
@@ -96,9 +96,9 @@ function caml_binaryen_module_write_text(wasm_mod) {
96
96
  }
97
97
 
98
98
  //Provides: caml_binaryen_module_write_stack_ir
99
- //Requires: caml_string_of_jsstring, caml_js_from_bool
100
- function caml_binaryen_module_write_stack_ir(wasm_mod, optimize) {
101
- var text = wasm_mod.emitStackIR(caml_js_from_bool(optimize));
99
+ //Requires: caml_string_of_jsstring
100
+ function caml_binaryen_module_write_stack_ir(wasm_mod) {
101
+ var text = wasm_mod.emitStackIR();
102
102
  return caml_string_of_jsstring(text);
103
103
  }
104
104
 
@@ -90,10 +90,7 @@ external add_custom_section : t -> string -> string -> unit
90
90
  external parse : string -> t = "caml_binaryen_module_parse"
91
91
  external print : t -> unit = "caml_binaryen_module_print"
92
92
  external print_asmjs : t -> unit = "caml_binaryen_module_print_asmjs"
93
-
94
- external print_stack_ir : t -> bool -> unit
95
- = "caml_binaryen_module_print_stack_ir"
96
-
93
+ external print_stack_ir : t -> unit = "caml_binaryen_module_print_stack_ir"
97
94
  external validate : t -> int = "caml_binaryen_module_validate"
98
95
  external optimize : t -> unit = "caml_binaryen_module_optimize"
99
96
  external get_features : t -> int = "caml_binaryen_module_get_features"
@@ -124,10 +121,7 @@ external write : t -> string option -> bytes * string option
124
121
  = "caml_binaryen_module_write"
125
122
 
126
123
  external write_text : t -> string = "caml_binaryen_module_write_text"
127
-
128
- external write_stack_ir : t -> bool -> string
129
- = "caml_binaryen_module_write_stack_ir"
130
-
124
+ external write_stack_ir : t -> string = "caml_binaryen_module_write_stack_ir"
131
125
  external read : bytes -> t = "caml_binaryen_module_read"
132
126
  external interpret : t -> unit = "caml_binaryen_module_interpret"
133
127
 
@@ -29,7 +29,7 @@ val add_custom_section : t -> string -> string -> unit
29
29
  val parse : string -> t
30
30
  val print : t -> unit
31
31
  val print_asmjs : t -> unit
32
- val print_stack_ir : t -> bool -> unit
32
+ val print_stack_ir : t -> unit
33
33
  val validate : t -> int
34
34
  val optimize : t -> unit
35
35
  val get_features : t -> Feature.t list
@@ -38,7 +38,7 @@ val run_passes : t -> Passes.t list -> unit
38
38
  val auto_drop : t -> unit
39
39
  val write : t -> string option -> bytes * string option
40
40
  val write_text : t -> string
41
- val write_stack_ir : t -> bool -> string
41
+ val write_stack_ir : t -> string
42
42
  val read : bytes -> t
43
43
  val interpret : t -> unit
44
44
  val add_debug_info_filename : t -> string -> int
binaryen-archive/src/op.c CHANGED
@@ -2288,48 +2288,6 @@ caml_binaryen_br_on_cast_fail(value unit) {
2288
2288
  CAMLreturn(alloc_BinaryenOp(op));
2289
2289
  }
2290
2290
 
2291
- CAMLprim value
2292
- caml_binaryen_string_new_utf8(value unit) {
2293
- CAMLparam1(unit);
2294
- BinaryenOp op = BinaryenStringNewUTF8();
2295
- CAMLreturn(alloc_BinaryenOp(op));
2296
- }
2297
-
2298
- CAMLprim value
2299
- caml_binaryen_string_new_wtf8(value unit) {
2300
- CAMLparam1(unit);
2301
- BinaryenOp op = BinaryenStringNewWTF8();
2302
- CAMLreturn(alloc_BinaryenOp(op));
2303
- }
2304
-
2305
- CAMLprim value
2306
- caml_binaryen_string_new_lossy_utf8(value unit) {
2307
- CAMLparam1(unit);
2308
- BinaryenOp op = BinaryenStringNewLossyUTF8();
2309
- CAMLreturn(alloc_BinaryenOp(op));
2310
- }
2311
-
2312
- CAMLprim value
2313
- caml_binaryen_string_new_wtf16(value unit) {
2314
- CAMLparam1(unit);
2315
- BinaryenOp op = BinaryenStringNewWTF16();
2316
- CAMLreturn(alloc_BinaryenOp(op));
2317
- }
2318
-
2319
- CAMLprim value
2320
- caml_binaryen_string_new_utf8_array(value unit) {
2321
- CAMLparam1(unit);
2322
- BinaryenOp op = BinaryenStringNewUTF8Array();
2323
- CAMLreturn(alloc_BinaryenOp(op));
2324
- }
2325
-
2326
- CAMLprim value
2327
- caml_binaryen_string_new_wtf8_array(value unit) {
2328
- CAMLparam1(unit);
2329
- BinaryenOp op = BinaryenStringNewWTF8Array();
2330
- CAMLreturn(alloc_BinaryenOp(op));
2331
- }
2332
-
2333
2291
  CAMLprim value
2334
2292
  caml_binaryen_string_new_lossy_utf8_array(value unit) {
2335
2293
  CAMLparam1(unit);
@@ -2358,13 +2316,6 @@ caml_binaryen_string_measure_utf8(value unit) {
2358
2316
  CAMLreturn(alloc_BinaryenOp(op));
2359
2317
  }
2360
2318
 
2361
- CAMLprim value
2362
- caml_binaryen_string_measure_wtf8(value unit) {
2363
- CAMLparam1(unit);
2364
- BinaryenOp op = BinaryenStringMeasureWTF8();
2365
- CAMLreturn(alloc_BinaryenOp(op));
2366
- }
2367
-
2368
2319
  CAMLprim value
2369
2320
  caml_binaryen_string_measure_wtf16(value unit) {
2370
2321
  CAMLparam1(unit);
@@ -2372,55 +2323,6 @@ caml_binaryen_string_measure_wtf16(value unit) {
2372
2323
  CAMLreturn(alloc_BinaryenOp(op));
2373
2324
  }
2374
2325
 
2375
- CAMLprim value
2376
- caml_binaryen_string_measure_is_usv(value unit) {
2377
- CAMLparam1(unit);
2378
- BinaryenOp op = BinaryenStringMeasureIsUSV();
2379
- CAMLreturn(alloc_BinaryenOp(op));
2380
- }
2381
-
2382
- CAMLprim value
2383
- caml_binaryen_string_measure_wtf16_view(value unit) {
2384
- CAMLparam1(unit);
2385
- BinaryenOp op = BinaryenStringMeasureWTF16View();
2386
- CAMLreturn(alloc_BinaryenOp(op));
2387
- }
2388
-
2389
- CAMLprim value
2390
- caml_binaryen_string_encode_utf8(value unit) {
2391
- CAMLparam1(unit);
2392
- BinaryenOp op = BinaryenStringEncodeUTF8();
2393
- CAMLreturn(alloc_BinaryenOp(op));
2394
- }
2395
-
2396
- CAMLprim value
2397
- caml_binaryen_string_encode_lossy_utf8(value unit) {
2398
- CAMLparam1(unit);
2399
- BinaryenOp op = BinaryenStringEncodeLossyUTF8();
2400
- CAMLreturn(alloc_BinaryenOp(op));
2401
- }
2402
-
2403
- CAMLprim value
2404
- caml_binaryen_string_encode_wtf8(value unit) {
2405
- CAMLparam1(unit);
2406
- BinaryenOp op = BinaryenStringEncodeWTF8();
2407
- CAMLreturn(alloc_BinaryenOp(op));
2408
- }
2409
-
2410
- CAMLprim value
2411
- caml_binaryen_string_encode_wtf16(value unit) {
2412
- CAMLparam1(unit);
2413
- BinaryenOp op = BinaryenStringEncodeWTF16();
2414
- CAMLreturn(alloc_BinaryenOp(op));
2415
- }
2416
-
2417
- CAMLprim value
2418
- caml_binaryen_string_encode_utf8_array(value unit) {
2419
- CAMLparam1(unit);
2420
- BinaryenOp op = BinaryenStringEncodeUTF8Array();
2421
- CAMLreturn(alloc_BinaryenOp(op));
2422
- }
2423
-
2424
2326
  CAMLprim value
2425
2327
  caml_binaryen_string_encode_lossy_utf8_array(value unit) {
2426
2328
  CAMLparam1(unit);
@@ -2428,13 +2330,6 @@ caml_binaryen_string_encode_lossy_utf8_array(value unit) {
2428
2330
  CAMLreturn(alloc_BinaryenOp(op));
2429
2331
  }
2430
2332
 
2431
- CAMLprim value
2432
- caml_binaryen_string_encode_wtf8_array(value unit) {
2433
- CAMLparam1(unit);
2434
- BinaryenOp op = BinaryenStringEncodeWTF8Array();
2435
- CAMLreturn(alloc_BinaryenOp(op));
2436
- }
2437
-
2438
2333
  CAMLprim value
2439
2334
  caml_binaryen_string_encode_wtf16_array(value unit) {
2440
2335
  CAMLparam1(unit);
@@ -2442,55 +2337,6 @@ caml_binaryen_string_encode_wtf16_array(value unit) {
2442
2337
  CAMLreturn(alloc_BinaryenOp(op));
2443
2338
  }
2444
2339
 
2445
- CAMLprim value
2446
- caml_binaryen_string_as_wtf8(value unit) {
2447
- CAMLparam1(unit);
2448
- BinaryenOp op = BinaryenStringAsWTF8();
2449
- CAMLreturn(alloc_BinaryenOp(op));
2450
- }
2451
-
2452
- CAMLprim value
2453
- caml_binaryen_string_as_wtf16(value unit) {
2454
- CAMLparam1(unit);
2455
- BinaryenOp op = BinaryenStringAsWTF16();
2456
- CAMLreturn(alloc_BinaryenOp(op));
2457
- }
2458
-
2459
- CAMLprim value
2460
- caml_binaryen_string_as_iter(value unit) {
2461
- CAMLparam1(unit);
2462
- BinaryenOp op = BinaryenStringAsIter();
2463
- CAMLreturn(alloc_BinaryenOp(op));
2464
- }
2465
-
2466
- CAMLprim value
2467
- caml_binaryen_string_iter_move_advance(value unit) {
2468
- CAMLparam1(unit);
2469
- BinaryenOp op = BinaryenStringIterMoveAdvance();
2470
- CAMLreturn(alloc_BinaryenOp(op));
2471
- }
2472
-
2473
- CAMLprim value
2474
- caml_binaryen_string_iter_move_rewind(value unit) {
2475
- CAMLparam1(unit);
2476
- BinaryenOp op = BinaryenStringIterMoveRewind();
2477
- CAMLreturn(alloc_BinaryenOp(op));
2478
- }
2479
-
2480
- CAMLprim value
2481
- caml_binaryen_string_slice_wtf8(value unit) {
2482
- CAMLparam1(unit);
2483
- BinaryenOp op = BinaryenStringSliceWTF8();
2484
- CAMLreturn(alloc_BinaryenOp(op));
2485
- }
2486
-
2487
- CAMLprim value
2488
- caml_binaryen_string_slice_wtf16(value unit) {
2489
- CAMLparam1(unit);
2490
- BinaryenOp op = BinaryenStringSliceWTF16();
2491
- CAMLreturn(alloc_BinaryenOp(op));
2492
- }
2493
-
2494
2340
  CAMLprim value
2495
2341
  caml_binaryen_string_eq_equal(value unit) {
2496
2342
  CAMLparam1(unit);
@@ -1954,42 +1954,6 @@ function caml_binaryen_br_on_cast_fail() {
1954
1954
  return Binaryen.Operations.BrOnCastFail;
1955
1955
  }
1956
1956
 
1957
- //Provides: caml_binaryen_string_new_utf8
1958
- //Requires: Binaryen
1959
- function caml_binaryen_string_new_utf8() {
1960
- return Binaryen.Operations.StringNewUTF8;
1961
- }
1962
-
1963
- //Provides: caml_binaryen_string_new_wtf8
1964
- //Requires: Binaryen
1965
- function caml_binaryen_string_new_wtf8() {
1966
- return Binaryen.Operations.StringNewWTF8;
1967
- }
1968
-
1969
- //Provides: caml_binaryen_string_new_lossy_utf8
1970
- //Requires: Binaryen
1971
- function caml_binaryen_string_new_lossy_utf8() {
1972
- return Binaryen.Operations.StringNewLossyUTF8;
1973
- }
1974
-
1975
- //Provides: caml_binaryen_string_new_wtf16
1976
- //Requires: Binaryen
1977
- function caml_binaryen_string_new_wtf16() {
1978
- return Binaryen.Operations.StringNewWTF16;
1979
- }
1980
-
1981
- //Provides: caml_binaryen_string_new_utf8_array
1982
- //Requires: Binaryen
1983
- function caml_binaryen_string_new_utf8_array() {
1984
- return Binaryen.Operations.StringNewUTF8Array;
1985
- }
1986
-
1987
- //Provides: caml_binaryen_string_new_wtf8_array
1988
- //Requires: Binaryen
1989
- function caml_binaryen_string_new_wtf8_array() {
1990
- return Binaryen.Operations.StringNewWTF8Array;
1991
- }
1992
-
1993
1957
  //Provides: caml_binaryen_string_new_lossy_utf8_array
1994
1958
  //Requires: Binaryen
1995
1959
  function caml_binaryen_string_new_lossy_utf8_array() {
@@ -2014,120 +1978,24 @@ function caml_binaryen_string_measure_utf8() {
2014
1978
  return Binaryen.Operations.StringMeasureUTF8;
2015
1979
  }
2016
1980
 
2017
- //Provides: caml_binaryen_string_measure_wtf8
2018
- //Requires: Binaryen
2019
- function caml_binaryen_string_measure_wtf8() {
2020
- return Binaryen.Operations.StringMeasureWTF8;
2021
- }
2022
-
2023
1981
  //Provides: caml_binaryen_string_measure_wtf16
2024
1982
  //Requires: Binaryen
2025
1983
  function caml_binaryen_string_measure_wtf16() {
2026
1984
  return Binaryen.Operations.StringMeasureWTF16;
2027
1985
  }
2028
1986
 
2029
- //Provides: caml_binaryen_string_measure_is_usv
2030
- //Requires: Binaryen
2031
- function caml_binaryen_string_measure_is_usv() {
2032
- return Binaryen.Operations.StringMeasureIsUSV;
2033
- }
2034
-
2035
- //Provides: caml_binaryen_string_measure_wtf16_view
2036
- //Requires: Binaryen
2037
- function caml_binaryen_string_measure_wtf16_view() {
2038
- return Binaryen.Operations.StringMeasureWTF16View;
2039
- }
2040
-
2041
- //Provides: caml_binaryen_string_encode_utf8
2042
- //Requires: Binaryen
2043
- function caml_binaryen_string_encode_utf8() {
2044
- return Binaryen.Operations.StringEncodeUTF8;
2045
- }
2046
-
2047
- //Provides: caml_binaryen_string_encode_lossy_utf8
2048
- //Requires: Binaryen
2049
- function caml_binaryen_string_encode_lossy_utf8() {
2050
- return Binaryen.Operations.StringEncodeLossyUTF8;
2051
- }
2052
-
2053
- //Provides: caml_binaryen_string_encode_wtf8
2054
- //Requires: Binaryen
2055
- function caml_binaryen_string_encode_wtf8() {
2056
- return Binaryen.Operations.StringEncodeWTF8;
2057
- }
2058
-
2059
- //Provides: caml_binaryen_string_encode_wtf16
2060
- //Requires: Binaryen
2061
- function caml_binaryen_string_encode_wtf16() {
2062
- return Binaryen.Operations.StringEncodeWTF16;
2063
- }
2064
-
2065
- //Provides: caml_binaryen_string_encode_utf8_array
2066
- //Requires: Binaryen
2067
- function caml_binaryen_string_encode_utf8_array() {
2068
- return Binaryen.Operations.StringEncodeUTF8Array;
2069
- }
2070
-
2071
1987
  //Provides: caml_binaryen_string_encode_lossy_utf8_array
2072
1988
  //Requires: Binaryen
2073
1989
  function caml_binaryen_string_encode_lossy_utf8_array() {
2074
1990
  return Binaryen.Operations.StringEncodeLossyUTF8Array;
2075
1991
  }
2076
1992
 
2077
- //Provides: caml_binaryen_string_encode_wtf8_array
2078
- //Requires: Binaryen
2079
- function caml_binaryen_string_encode_wtf8_array() {
2080
- return Binaryen.Operations.StringEncodeWTF8Array;
2081
- }
2082
-
2083
1993
  //Provides: caml_binaryen_string_encode_wtf16_array
2084
1994
  //Requires: Binaryen
2085
1995
  function caml_binaryen_string_encode_wtf16_array() {
2086
1996
  return Binaryen.Operations.StringEncodeWTF16Array;
2087
1997
  }
2088
1998
 
2089
- //Provides: caml_binaryen_string_as_wtf8
2090
- //Requires: Binaryen
2091
- function caml_binaryen_string_as_wtf8() {
2092
- return Binaryen.Operations.StringAsWTF8;
2093
- }
2094
-
2095
- //Provides: caml_binaryen_string_as_wtf16
2096
- //Requires: Binaryen
2097
- function caml_binaryen_string_as_wtf16() {
2098
- return Binaryen.Operations.StringAsWTF16;
2099
- }
2100
-
2101
- //Provides: caml_binaryen_string_as_iter
2102
- //Requires: Binaryen
2103
- function caml_binaryen_string_as_iter() {
2104
- return Binaryen.Operations.StringAsIter;
2105
- }
2106
-
2107
- //Provides: caml_binaryen_string_iter_move_advance
2108
- //Requires: Binaryen
2109
- function caml_binaryen_string_iter_move_advance() {
2110
- return Binaryen.Operations.StringIterMoveAdvance;
2111
- }
2112
-
2113
- //Provides: caml_binaryen_string_iter_move_rewind
2114
- //Requires: Binaryen
2115
- function caml_binaryen_string_iter_move_rewind() {
2116
- return Binaryen.Operations.StringIterMoveRewind;
2117
- }
2118
-
2119
- //Provides: caml_binaryen_string_slice_wtf8
2120
- //Requires: Binaryen
2121
- function caml_binaryen_string_slice_wtf8() {
2122
- return Binaryen.Operations.StringSliceWTF8;
2123
- }
2124
-
2125
- //Provides: caml_binaryen_string_slice_wtf16
2126
- //Requires: Binaryen
2127
- function caml_binaryen_string_slice_wtf16() {
2128
- return Binaryen.Operations.StringSliceWTF16;
2129
- }
2130
-
2131
1999
  //Provides: caml_binaryen_string_eq_equal
2132
2000
  //Requires: Binaryen
2133
2001
  function caml_binaryen_string_eq_equal() {
@@ -1358,33 +1358,6 @@ external br_on_cast_fail : unit -> t = "caml_binaryen_br_on_cast_fail"
1358
1358
 
1359
1359
  let br_on_cast_fail = br_on_cast_fail ()
1360
1360
 
1361
- external string_new_utf8 : unit -> t = "caml_binaryen_string_new_utf8"
1362
-
1363
- let string_new_utf8 = string_new_utf8 ()
1364
-
1365
- external string_new_wtf8 : unit -> t = "caml_binaryen_string_new_wtf8"
1366
-
1367
- let string_new_wtf8 = string_new_wtf8 ()
1368
-
1369
- external string_new_lossy_utf8 : unit -> t
1370
- = "caml_binaryen_string_new_lossy_utf8"
1371
-
1372
- let string_new_lossy_utf8 = string_new_lossy_utf8 ()
1373
-
1374
- external string_new_wtf16 : unit -> t = "caml_binaryen_string_new_wtf16"
1375
-
1376
- let string_new_wtf16 = string_new_wtf16 ()
1377
-
1378
- external string_new_utf8_array : unit -> t
1379
- = "caml_binaryen_string_new_utf8_array"
1380
-
1381
- let string_new_utf8_array = string_new_utf8_array ()
1382
-
1383
- external string_new_wtf8_array : unit -> t
1384
- = "caml_binaryen_string_new_wtf8_array"
1385
-
1386
- let string_new_wtf8_array = string_new_wtf8_array ()
1387
-
1388
1361
  external string_new_lossy_utf8_array : unit -> t
1389
1362
  = "caml_binaryen_string_new_lossy_utf8_array"
1390
1363
 
@@ -1404,91 +1377,20 @@ external string_measure_utf8 : unit -> t = "caml_binaryen_string_measure_utf8"
1404
1377
 
1405
1378
  let string_measure_utf8 = string_measure_utf8 ()
1406
1379
 
1407
- external string_measure_wtf8 : unit -> t = "caml_binaryen_string_measure_wtf8"
1408
-
1409
- let string_measure_wtf8 = string_measure_wtf8 ()
1410
-
1411
1380
  external string_measure_wtf16 : unit -> t = "caml_binaryen_string_measure_wtf16"
1412
1381
 
1413
1382
  let string_measure_wtf16 = string_measure_wtf16 ()
1414
1383
 
1415
- external string_measure_is_usv : unit -> t
1416
- = "caml_binaryen_string_measure_is_usv"
1417
-
1418
- let string_measure_is_usv = string_measure_is_usv ()
1419
-
1420
- external string_measure_wtf16_view : unit -> t
1421
- = "caml_binaryen_string_measure_wtf16_view"
1422
-
1423
- let string_measure_wtf16_view = string_measure_wtf16_view ()
1424
-
1425
- external string_encode_utf8 : unit -> t = "caml_binaryen_string_encode_utf8"
1426
-
1427
- let string_encode_utf8 = string_encode_utf8 ()
1428
-
1429
- external string_encode_lossy_utf8 : unit -> t
1430
- = "caml_binaryen_string_encode_lossy_utf8"
1431
-
1432
- let string_encode_lossy_utf8 = string_encode_lossy_utf8 ()
1433
-
1434
- external string_encode_wtf8 : unit -> t = "caml_binaryen_string_encode_wtf8"
1435
-
1436
- let string_encode_wtf8 = string_encode_wtf8 ()
1437
-
1438
- external string_encode_wtf16 : unit -> t = "caml_binaryen_string_encode_wtf16"
1439
-
1440
- let string_encode_wtf16 = string_encode_wtf16 ()
1441
-
1442
- external string_encode_utf8_array : unit -> t
1443
- = "caml_binaryen_string_encode_utf8_array"
1444
-
1445
- let string_encode_utf8_array = string_encode_utf8_array ()
1446
-
1447
1384
  external string_encode_lossy_utf8_array : unit -> t
1448
1385
  = "caml_binaryen_string_encode_lossy_utf8_array"
1449
1386
 
1450
1387
  let string_encode_lossy_utf8_array = string_encode_lossy_utf8_array ()
1451
1388
 
1452
- external string_encode_wtf8_array : unit -> t
1453
- = "caml_binaryen_string_encode_wtf8_array"
1454
-
1455
- let string_encode_wtf8_array = string_encode_wtf8_array ()
1456
-
1457
1389
  external string_encode_wtf16_array : unit -> t
1458
1390
  = "caml_binaryen_string_encode_wtf16_array"
1459
1391
 
1460
1392
  let string_encode_wtf16_array = string_encode_wtf16_array ()
1461
1393
 
1462
- external string_as_wtf8 : unit -> t = "caml_binaryen_string_as_wtf8"
1463
-
1464
- let string_as_wtf8 = string_as_wtf8 ()
1465
-
1466
- external string_as_wtf16 : unit -> t = "caml_binaryen_string_as_wtf16"
1467
-
1468
- let string_as_wtf16 = string_as_wtf16 ()
1469
-
1470
- external string_as_iter : unit -> t = "caml_binaryen_string_as_iter"
1471
-
1472
- let string_as_iter = string_as_iter ()
1473
-
1474
- external string_iter_move_advance : unit -> t
1475
- = "caml_binaryen_string_iter_move_advance"
1476
-
1477
- let string_iter_move_advance = string_iter_move_advance ()
1478
-
1479
- external string_iter_move_rewind : unit -> t
1480
- = "caml_binaryen_string_iter_move_rewind"
1481
-
1482
- let string_iter_move_rewind = string_iter_move_rewind ()
1483
-
1484
- external string_slice_wtf8 : unit -> t = "caml_binaryen_string_slice_wtf8"
1485
-
1486
- let string_slice_wtf8 = string_slice_wtf8 ()
1487
-
1488
- external string_slice_wtf16 : unit -> t = "caml_binaryen_string_slice_wtf16"
1489
-
1490
- let string_slice_wtf16 = string_slice_wtf16 ()
1491
-
1492
1394
  external string_eq_equal : unit -> t = "caml_binaryen_string_eq_equal"
1493
1395
 
1494
1396
  let string_eq_equal = string_eq_equal ()
@@ -326,34 +326,12 @@ val br_on_null : t
326
326
  val br_on_non_null : t
327
327
  val br_on_cast : t
328
328
  val br_on_cast_fail : t
329
- val string_new_utf8 : t
330
- val string_new_wtf8 : t
331
- val string_new_lossy_utf8 : t
332
- val string_new_wtf16 : t
333
- val string_new_utf8_array : t
334
- val string_new_wtf8_array : t
335
329
  val string_new_wtf16_array : t
336
330
  val string_new_from_code_point : t
337
331
  val string_measure_utf8 : t
338
- val string_measure_wtf8 : t
339
332
  val string_new_lossy_utf8_array : t
340
333
  val string_measure_wtf16 : t
341
- val string_measure_is_usv : t
342
- val string_measure_wtf16_view : t
343
- val string_encode_utf8 : t
344
- val string_encode_lossy_utf8 : t
345
- val string_encode_wtf8 : t
346
- val string_encode_wtf16 : t
347
- val string_encode_utf8_array : t
348
334
  val string_encode_lossy_utf8_array : t
349
- val string_encode_wtf8_array : t
350
335
  val string_encode_wtf16_array : t
351
- val string_as_wtf8 : t
352
- val string_as_wtf16 : t
353
- val string_as_iter : t
354
- val string_iter_move_advance : t
355
- val string_iter_move_rewind : t
356
- val string_slice_wtf8 : t
357
- val string_slice_wtf16 : t
358
336
  val string_eq_equal : t
359
337
  val string_eq_compare : t
@@ -97,27 +97,6 @@ caml_binaryen_type_stringref(value unit) {
97
97
  CAMLreturn(alloc_BinaryenType(ty));
98
98
  }
99
99
 
100
- CAMLprim value
101
- caml_binaryen_type_stringview_wtf8(value unit) {
102
- CAMLparam1(unit);
103
- BinaryenType ty = BinaryenTypeStringviewWTF8();
104
- CAMLreturn(alloc_BinaryenType(ty));
105
- }
106
-
107
- CAMLprim value
108
- caml_binaryen_type_stringview_wtf16(value unit) {
109
- CAMLparam1(unit);
110
- BinaryenType ty = BinaryenTypeStringviewWTF16();
111
- CAMLreturn(alloc_BinaryenType(ty));
112
- }
113
-
114
- CAMLprim value
115
- caml_binaryen_type_stringview_iter(value unit) {
116
- CAMLparam1(unit);
117
- BinaryenType ty = BinaryenTypeStringviewIter();
118
- CAMLreturn(alloc_BinaryenType(ty));
119
- }
120
-
121
100
  CAMLprim value
122
101
  caml_binaryen_type_nullref(value unit) {
123
102
  CAMLparam1(unit);
@@ -77,24 +77,6 @@ function caml_binaryen_type_stringref() {
77
77
  return Binaryen.stringref;
78
78
  }
79
79
 
80
- //Provides: caml_binaryen_type_stringview_wtf8
81
- //Requires: Binaryen
82
- function caml_binaryen_type_stringview_wtf8() {
83
- return Binaryen.stringview_wtf8;
84
- }
85
-
86
- //Provides: caml_binaryen_type_stringview_wtf16
87
- //Requires: Binaryen
88
- function caml_binaryen_type_stringview_wtf16() {
89
- return Binaryen.stringview_wtf16;
90
- }
91
-
92
- //Provides: caml_binaryen_type_stringview_iter
93
- //Requires: Binaryen
94
- function caml_binaryen_type_stringview_iter() {
95
- return Binaryen.stringview_iter;
96
- }
97
-
98
80
  //Provides: caml_binaryen_type_nullref
99
81
  //Requires: Binaryen
100
82
  function caml_binaryen_type_nullref() {
@@ -52,18 +52,6 @@ external stringref : unit -> t = "caml_binaryen_type_stringref"
52
52
 
53
53
  let stringref = stringref ()
54
54
 
55
- external stringview_wtf8 : unit -> t = "caml_binaryen_type_stringview_wtf8"
56
-
57
- let stringview_wtf8 = stringview_wtf8 ()
58
-
59
- external stringview_wtf16 : unit -> t = "caml_binaryen_type_stringview_wtf16"
60
-
61
- let stringview_wtf16 = stringview_wtf16 ()
62
-
63
- external stringview_iter : unit -> t = "caml_binaryen_type_stringview_iter"
64
-
65
- let stringview_iter = stringview_iter ()
66
-
67
55
  external nullref : unit -> t = "caml_binaryen_type_nullref"
68
56
 
69
57
  let nullref = nullref ()
@@ -13,9 +13,6 @@ val i31ref : t
13
13
  val structref : t
14
14
  val arrayref : t
15
15
  val stringref : t
16
- val stringview_wtf8 : t
17
- val stringview_wtf16 : t
18
- val stringview_iter : t
19
16
  val nullref : t
20
17
  val null_externref : t
21
18
  val null_funcref : t
@@ -83,7 +83,7 @@
83
83
  (export "memory" (memory $0))
84
84
  (export "hello" (func $hello))
85
85
  (start $start)
86
- (func $adder (type $0) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
86
+ (func $adder (type $0) (param $0 i32) (param $1 i32) (result i32)
87
87
  (i32.add
88
88
  (select
89
89
  (local.get $0)
@@ -95,7 +95,7 @@
95
95
  (local.get $1)
96
96
  )
97
97
  )
98
- (func $start (type $1) (; has Stack IR ;)
98
+ (func $start (type $1)
99
99
  (memory.init $world
100
100
  (i32.const 2048)
101
101
  (i32.const 0)
@@ -108,7 +108,7 @@
108
108
  )
109
109
  )
110
110
  )
111
- (func $hello (type $3) (; has Stack IR ;) (param $0 anyref) (result i32)
111
+ (func $hello (type $3) (param $0 anyref) (result i32)
112
112
  (call $write
113
113
  (local.get $0)
114
114
  (i32.const 0)
@@ -278,7 +278,7 @@ let _ =
278
278
 
279
279
  let _ = Module.validate new_mod
280
280
  let _ = Module.print new_mod
281
- let _ = Module.print_stack_ir new_mod false
281
+ let _ = Module.print_stack_ir new_mod
282
282
 
283
283
  (* Dispose the modules 👋 *)
284
284