@grain/binaryen.ml 0.17.1 → 0.19.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 (68) hide show
  1. binaryen-archive/CHANGELOG.md +38 -0
  2. binaryen-archive/binaryen.opam +2 -2
  3. binaryen-archive/esy.lock/index.json +355 -346
  4. binaryen-archive/esy.lock/opam/camlp-streams.5.0.1/opam +59 -0
  5. binaryen-archive/esy.lock/opam/chrome-trace.3.5.0/opam +39 -0
  6. binaryen-archive/esy.lock/opam/{dune-build-info.3.2.0 → dune-build-info.3.5.0}/opam +5 -6
  7. binaryen-archive/esy.lock/opam/{dune-configurator.3.2.0 → dune-configurator.3.5.0}/opam +6 -6
  8. binaryen-archive/esy.lock/opam/{dune-rpc.3.2.0 → dune-rpc.3.5.0}/opam +5 -6
  9. binaryen-archive/esy.lock/opam/{dune.3.2.0 → dune.3.5.0}/opam +4 -5
  10. binaryen-archive/esy.lock/opam/{dyn.3.2.0 → dyn.3.5.0}/opam +5 -6
  11. binaryen-archive/esy.lock/opam/{fiber.3.2.0 → fiber.3.5.0}/opam +5 -6
  12. binaryen-archive/esy.lock/opam/{ocaml-lsp-server.1.11.6 → ocaml-lsp-server.1.14.1}/opam +9 -8
  13. binaryen-archive/esy.lock/opam/{ocaml-version.3.4.0 → ocaml-version.3.5.0}/opam +4 -4
  14. binaryen-archive/esy.lock/opam/{ocamlbuild.0.14.1 → ocamlbuild.0.14.2}/opam +3 -3
  15. binaryen-archive/esy.lock/opam/ocamlfind.1.9.5/files/0001-Fix-bug-when-installing-with-a-system-compiler.patch +26 -0
  16. binaryen-archive/esy.lock/opam/{ocamlfind.1.9.3 → ocamlfind.1.9.5}/opam +6 -3
  17. binaryen-archive/esy.lock/opam/{ocamlformat-rpc-lib.0.22.4 → ocamlformat-rpc-lib.0.24.1}/opam +4 -4
  18. binaryen-archive/esy.lock/opam/ocamlformat.0.20.1/opam +1 -1
  19. binaryen-archive/esy.lock/opam/{odoc-parser.1.0.0 → odoc-parser.1.0.1}/opam +5 -4
  20. binaryen-archive/esy.lock/opam/omd.1.3.2/opam +50 -0
  21. binaryen-archive/esy.lock/opam/{ordering.3.2.0 → ordering.3.5.0}/opam +5 -6
  22. binaryen-archive/esy.lock/opam/{ppxlib.0.26.0 → ppxlib.0.28.0}/opam +7 -7
  23. binaryen-archive/esy.lock/opam/sexplib0.v0.14.0/opam +1 -1
  24. binaryen-archive/esy.lock/opam/{stdune.3.2.0 → stdune.3.5.0}/opam +6 -6
  25. binaryen-archive/esy.lock/opam/uucp.15.0.0/opam +55 -0
  26. binaryen-archive/esy.lock/opam/{uuseg.14.0.0 → uuseg.15.0.0}/opam +39 -25
  27. binaryen-archive/esy.lock/opam/{xdg.3.2.0 → xdg.3.5.0}/opam +5 -6
  28. binaryen-archive/esy.lock/opam/{yojson.1.7.0 → yojson.2.0.2}/opam +14 -14
  29. binaryen-archive/esy.lock/overrides/{opam__s__ocamlbuild_opam__c__0.14.1_opam_override → opam__s__ocamlbuild_opam__c__0.14.2_opam_override}/files/winpatch.patch +0 -0
  30. binaryen-archive/esy.lock/overrides/{opam__s__ocamlbuild_opam__c__0.14.1_opam_override → opam__s__ocamlbuild_opam__c__0.14.2_opam_override}/package.json +0 -0
  31. binaryen-archive/esy.lock/overrides/{opam__s__ocamlfind_opam__c__1.9.3_opam_override → opam__s__ocamlfind_opam__c__1.9.5_opam_override}/files/findlib.patch +0 -0
  32. binaryen-archive/esy.lock/overrides/{opam__s__ocamlfind_opam__c__1.9.3_opam_override → opam__s__ocamlfind_opam__c__1.9.5_opam_override}/package.json +0 -0
  33. binaryen-archive/package.json +2 -2
  34. binaryen-archive/src/binaryen_stubs_exports.js +36 -20
  35. binaryen-archive/src/binaryen_stubs_expressions.c +101 -0
  36. binaryen-archive/src/binaryen_stubs_expressions.js +543 -508
  37. binaryen-archive/src/binaryen_stubs_features.js +34 -34
  38. binaryen-archive/src/binaryen_stubs_functions.js +45 -19
  39. binaryen-archive/src/binaryen_stubs_globals.js +8 -8
  40. binaryen-archive/src/binaryen_stubs_imports.c +14 -0
  41. binaryen-archive/src/binaryen_stubs_imports.js +67 -14
  42. binaryen-archive/src/binaryen_stubs_memory.c +40 -0
  43. binaryen-archive/src/binaryen_stubs_memory.js +45 -2
  44. binaryen-archive/src/binaryen_stubs_modules.c +20 -0
  45. binaryen-archive/src/binaryen_stubs_modules.js +26 -8
  46. binaryen-archive/src/binaryen_stubs_ops.js +632 -632
  47. binaryen-archive/src/binaryen_stubs_settings.js +36 -38
  48. binaryen-archive/src/binaryen_stubs_tables.js +18 -12
  49. binaryen-archive/src/binaryen_stubs_types.c +23 -2
  50. binaryen-archive/src/binaryen_stubs_types.js +44 -26
  51. binaryen-archive/src/expression.ml +27 -0
  52. binaryen-archive/src/expression.mli +18 -0
  53. binaryen-archive/src/import.ml +4 -0
  54. binaryen-archive/src/import.mli +2 -0
  55. binaryen-archive/src/memory.ml +25 -12
  56. binaryen-archive/src/memory.mli +12 -6
  57. binaryen-archive/src/module.ml +2 -0
  58. binaryen-archive/src/module.mli +2 -0
  59. binaryen-archive/src/passes.ml +6 -0
  60. binaryen-archive/src/passes.mli +6 -0
  61. binaryen-archive/src/type.ml +14 -2
  62. binaryen-archive/src/type.mli +4 -1
  63. binaryen-archive/test/test.expected +49 -12
  64. binaryen-archive/test/test.ml +49 -12
  65. binaryen-archive/esy.lock/opam/biniou.1.2.1/opam +0 -45
  66. binaryen-archive/esy.lock/opam/easy-format.1.3.4/opam +0 -56
  67. binaryen-archive/esy.lock/opam/omd.1.3.1/opam +0 -39
  68. binaryen-archive/esy.lock/opam/uucp.14.0.0/opam +0 -41
@@ -1,28 +1,6 @@
1
1
  opam-version: "2.0"
2
- synopsis: """Unicode text segmentation for OCaml"""
3
- maintainer: ["Daniel Bünzli <daniel.buenzl i@erratique.ch>"]
4
- authors: ["The uuseg programmers"]
5
- homepage: "https://erratique.ch/software/uuseg"
6
- doc: "https://erratique.ch/software/uuseg/doc/"
7
- dev-repo: "git+https://erratique.ch/repos/uuseg.git"
8
- bug-reports: "https://github.com/dbuenzli/uuseg/issues"
9
- license: ["ISC"]
10
- tags: ["unicode" "text" "segmentation" "org:erratique"]
11
- depends: ["ocaml" {>= "4.03.0"}
12
- "ocamlfind" {build}
13
- "ocamlbuild" {build}
14
- "topkg" {build & >= "1.0.3"}
15
- "uucp" {>= "14.0.0" & < "15.0.0"}]
16
- depopts: ["uutf"
17
- "cmdliner"]
18
- conflicts: ["uutf" {< "1.0.0"}]
19
- build: [["ocaml" "pkg/pkg.ml" "build" "--dev-pkg" "%{dev}%"
20
- "--with-uutf" "%{uutf:installed}%"
21
- "--with-cmdliner" "%{cmdliner:installed}%" ]]
22
- url {
23
- src: "https://erratique.ch/software/uuseg/releases/uuseg-14.0.0.tbz"
24
- checksum: "sha512=3f089baf95f010663a0c2f060b2911395d9b396f478efb10fd979815f527c9e61e0a70b3192f2e921f59287bfde0da6e25109d4a1825554e2e4a50c0535e97aa"}
25
- description: """
2
+ synopsis: "Unicode text segmentation for OCaml"
3
+ description: """\
26
4
  Uuseg is an OCaml library for segmenting Unicode text. It implements
27
5
  the locale independent [Unicode text segmentation algorithms][1] to
28
6
  detect grapheme cluster, word and sentence boundaries and the
@@ -40,4 +18,40 @@ OCaml UTF-X encoded strings. It is distributed under the ISC license.
40
18
  [1]: http://www.unicode.org/reports/tr29/
41
19
  [2]: http://www.unicode.org/reports/tr14/
42
20
 
43
- Homepage: http://erratique.ch/software/uuseg"""
21
+ Homepage: http://erratique.ch/software/uuseg"""
22
+ maintainer: "Daniel Bünzli <daniel.buenzl i@erratique.ch>"
23
+ authors: "The uuseg programmers"
24
+ license: "ISC"
25
+ tags: ["unicode" "text" "segmentation" "org:erratique"]
26
+ homepage: "https://erratique.ch/software/uuseg"
27
+ doc: "https://erratique.ch/software/uuseg/doc/"
28
+ bug-reports: "https://github.com/dbuenzli/uuseg/issues"
29
+ depends: [
30
+ "ocaml" {>= "4.03.0"}
31
+ "ocamlfind" {build}
32
+ "ocamlbuild" {build}
33
+ "topkg" {build & >= "1.0.3"}
34
+ "uucp" {>= "15.0.0" & < "16.0.0"}
35
+ ]
36
+ depopts: ["uutf" "cmdliner"]
37
+ conflicts: [
38
+ "uutf" {< "1.0.0"}
39
+ "cmdliner" {< "1.1.0"}
40
+ ]
41
+ build: [
42
+ "ocaml"
43
+ "pkg/pkg.ml"
44
+ "build"
45
+ "--dev-pkg"
46
+ "%{dev}%"
47
+ "--with-uutf"
48
+ "%{uutf:installed}%"
49
+ "--with-cmdliner"
50
+ "%{cmdliner:installed}%"
51
+ ]
52
+ dev-repo: "git+https://erratique.ch/repos/uuseg.git"
53
+ url {
54
+ src: "https://erratique.ch/software/uuseg/releases/uuseg-15.0.0.tbz"
55
+ checksum:
56
+ "sha512=37ea83b582dd779a026cfae11f08f5d67ef79fce65a2cf03f2a9aabc7eb5de60c8e812524fa7531e4ff6e22a3b18228e3438a0143ce43be95f23237cc283576f"
57
+ }
@@ -9,7 +9,7 @@ homepage: "https://github.com/ocaml/dune"
9
9
  doc: "https://dune.readthedocs.io/"
10
10
  bug-reports: "https://github.com/ocaml/dune/issues"
11
11
  depends: [
12
- "dune" {>= "3.0"}
12
+ "dune" {>= "3.3"}
13
13
  "ocaml" {>= "4.08"}
14
14
  "odoc" {with-doc}
15
15
  ]
@@ -30,11 +30,10 @@ build: [
30
30
  ]
31
31
  ]
32
32
  url {
33
- src:
34
- "https://github.com/ocaml/dune/releases/download/3.2.0/chrome-trace-3.2.0.tbz"
33
+ src: "https://github.com/ocaml/dune/releases/download/3.5.0/dune-3.5.0.tbz"
35
34
  checksum: [
36
- "sha256=bd1fbce6ae79ed1eb26fa89bb2e2e23978afceb3f53f5578cf1bdab08a1ad5bc"
37
- "sha512=b99e82d7e2233a9dd8c1fae591a03f9470fcdf9750d0e428cee2d4c8bcfa4da1595e9e10af2f234279a6ca8a120a773b247d4761d2c39210fc6101076631690e"
35
+ "sha256=77bd4c6704359fae1969636cfc3cd7a517ba3604819ef89c919c0762b5093610"
36
+ "sha512=acaed76ab8618977118579641a1f6734ed4a225ab46494c6c5fd8e1bf9a0889e62db9adc7bd11770da602f4dd4785cef5ece4ad26512d08b64b8f3bd8954c80d"
38
37
  ]
39
38
  }
40
- x-commit-hash: "43af00f79e41ce9101d42b36dab13e1f68d49a7a"
39
+ x-commit-hash: "77c1e6f8f27f57fe0c04ec1624a85069b02437cf"
@@ -1,38 +1,38 @@
1
1
  opam-version: "2.0"
2
- maintainer: "martin@mjambon.com"
2
+ maintainer: ["nathan@cryptosense.com" "marek@xivilization.net"]
3
3
  authors: ["Martin Jambon"]
4
4
  homepage: "https://github.com/ocaml-community/yojson"
5
5
  bug-reports: "https://github.com/ocaml-community/yojson/issues"
6
6
  dev-repo: "git+https://github.com/ocaml-community/yojson.git"
7
7
  doc: "https://ocaml-community.github.io/yojson/"
8
+ license: "BSD-3-Clause"
8
9
  build: [
9
10
  ["dune" "subst"] {dev}
10
11
  ["dune" "build" "-p" name "-j" jobs]
12
+ ["dune" "runtest" "-p" name "-j" jobs] {with-test}
13
+ ["dune" "build" "@doc" "-p" name "-j" jobs] {with-doc}
11
14
  ]
12
- run-test: [["dune" "runtest" "-p" name "-j" jobs]]
13
15
  depends: [
14
16
  "ocaml" {>= "4.02.3"}
15
- "dune"
17
+ "dune" {>= "2.0"}
16
18
  "cppo" {build}
17
- "easy-format"
18
- "biniou" {>= "1.2.0"}
19
19
  "alcotest" {with-test & >= "0.8.5"}
20
+ "odoc" {with-doc}
21
+ "seq" {>= "0.2.2"}
20
22
  ]
21
23
  synopsis:
22
24
  "Yojson is an optimized parsing and printing library for the JSON format"
23
25
  description: """
24
26
  Yojson is an optimized parsing and printing library for the JSON format.
25
27
 
26
- It addresses a few shortcomings of json-wheel including 2x speedup,
27
- polymorphic variants and optional syntax for tuples and variants.
28
-
29
28
  ydump is a pretty-printing command-line program provided with the
30
- yojson package.
31
-
32
- The program atdgen can be used to derive OCaml-JSON serializers and
33
- deserializers from type definitions."""
29
+ yojson package."""
34
30
  url {
35
31
  src:
36
- "https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz"
37
- checksum: "md5=b89d39ca3f8c532abe5f547ad3b8f84d"
32
+ "https://github.com/ocaml-community/yojson/releases/download/2.0.2/yojson-2.0.2.tbz"
33
+ checksum: [
34
+ "sha256=876bb6f38af73a84a29438a3da35e4857c60a14556a606525b148c6fdbe5461b"
35
+ "sha512=9e150689a814a64e53e361e336fe826df5a3e3851d1367fda4a001392175c29348de55db0b7d7ba18539dec2cf78198efcb7f41b77a9861763f5aa97c05509ad"
36
+ ]
38
37
  }
38
+ x-commit-hash: "17ca03c5877a4346f0691443f35ed9678f99962f"
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@grain/binaryen.ml",
3
- "version": "0.17.1",
3
+ "version": "0.19.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": ">= 107.0.0 < 108.0.0",
9
+ "@grain/libbinaryen": ">= 109.0.0 < 110.0.0",
10
10
  "@opam/dune": ">= 2.9.1",
11
11
  "@opam/dune-configurator": ">= 2.9.1"
12
12
  },
@@ -1,6 +1,10 @@
1
1
  //Provides: caml_binaryen_add_function_export
2
2
  //Requires: caml_jsstring_of_string
3
- function caml_binaryen_add_function_export(wasm_mod, internal_name, external_name) {
3
+ function caml_binaryen_add_function_export(
4
+ wasm_mod,
5
+ internal_name,
6
+ external_name
7
+ ) {
4
8
  return wasm_mod.addFunctionExport(
5
9
  caml_jsstring_of_string(internal_name),
6
10
  caml_jsstring_of_string(external_name)
@@ -9,7 +13,11 @@ function caml_binaryen_add_function_export(wasm_mod, internal_name, external_nam
9
13
 
10
14
  //Provides: caml_binaryen_add_table_export
11
15
  //Requires: caml_jsstring_of_string
12
- function caml_binaryen_add_table_export(wasm_mod, internal_name, external_name) {
16
+ function caml_binaryen_add_table_export(
17
+ wasm_mod,
18
+ internal_name,
19
+ external_name
20
+ ) {
13
21
  return wasm_mod.addTableExport(
14
22
  caml_jsstring_of_string(internal_name),
15
23
  caml_jsstring_of_string(external_name)
@@ -18,7 +26,11 @@ function caml_binaryen_add_table_export(wasm_mod, internal_name, external_name)
18
26
 
19
27
  //Provides: caml_binaryen_add_memory_export
20
28
  //Requires: caml_jsstring_of_string
21
- function caml_binaryen_add_memory_export(wasm_mod, internal_name, external_name) {
29
+ function caml_binaryen_add_memory_export(
30
+ wasm_mod,
31
+ internal_name,
32
+ external_name
33
+ ) {
22
34
  return wasm_mod.addMemoryExport(
23
35
  caml_jsstring_of_string(internal_name),
24
36
  caml_jsstring_of_string(external_name)
@@ -27,7 +39,11 @@ function caml_binaryen_add_memory_export(wasm_mod, internal_name, external_name)
27
39
 
28
40
  //Provides: caml_binaryen_add_global_export
29
41
  //Requires: caml_jsstring_of_string
30
- function caml_binaryen_add_global_export(wasm_mod, internal_name, external_name) {
42
+ function caml_binaryen_add_global_export(
43
+ wasm_mod,
44
+ internal_name,
45
+ external_name
46
+ ) {
31
47
  return wasm_mod.addGlobalExport(
32
48
  caml_jsstring_of_string(internal_name),
33
49
  caml_jsstring_of_string(external_name)
@@ -57,54 +73,54 @@ function caml_binaryen_get_export_by_index(wasm_mod, index) {
57
73
  }
58
74
 
59
75
  //Provides: caml_binaryen_export_get_name
60
- //Requires: binaryen
76
+ //Requires: Binaryen
61
77
  //Requires: caml_string_of_jsstring
62
78
  function caml_binaryen_export_get_name(exp) {
63
- var export_info = binaryen.getExportInfo(exp);
79
+ var export_info = Binaryen.getExportInfo(exp);
64
80
  return caml_string_of_jsstring(export_info.name);
65
81
  }
66
82
 
67
83
  //Provides: caml_binaryen_export_get_value
68
- //Requires: binaryen
84
+ //Requires: Binaryen
69
85
  //Requires: caml_string_of_jsstring
70
86
  function caml_binaryen_export_get_value(exp) {
71
- var export_info = binaryen.getExportInfo(exp);
87
+ var export_info = Binaryen.getExportInfo(exp);
72
88
  return caml_string_of_jsstring(export_info.value);
73
89
  }
74
90
 
75
91
  //Provides: caml_binaryen_external_function
76
- //Requires: binaryen
92
+ //Requires: Binaryen
77
93
  function caml_binaryen_external_function() {
78
- return binaryen._BinaryenExternalFunction();
94
+ return Binaryen._BinaryenExternalFunction();
79
95
  }
80
96
 
81
97
  //Provides: caml_binaryen_external_table
82
- //Requires: binaryen
98
+ //Requires: Binaryen
83
99
  function caml_binaryen_external_table() {
84
- return binaryen._BinaryenExternalTable();
100
+ return Binaryen._BinaryenExternalTable();
85
101
  }
86
102
 
87
103
  //Provides: caml_binaryen_external_memory
88
- //Requires: binaryen
104
+ //Requires: Binaryen
89
105
  function caml_binaryen_external_memory() {
90
- return binaryen._BinaryenExternalMemory();
106
+ return Binaryen._BinaryenExternalMemory();
91
107
  }
92
108
 
93
109
  //Provides: caml_binaryen_external_global
94
- //Requires: binaryen
110
+ //Requires: Binaryen
95
111
  function caml_binaryen_external_global() {
96
- return binaryen._BinaryenExternalGlobal();
112
+ return Binaryen._BinaryenExternalGlobal();
97
113
  }
98
114
 
99
115
  //Provides: caml_binaryen_external_tag
100
- //Requires: binaryen
116
+ //Requires: Binaryen
101
117
  function caml_binaryen_external_tag() {
102
- return binaryen._BinaryenExternalTag();
118
+ return Binaryen._BinaryenExternalTag();
103
119
  }
104
120
 
105
121
  //Provides: caml_binaryen_export_get_kind
106
- //Requires: binaryen
122
+ //Requires: Binaryen
107
123
  function caml_binaryen_export_get_kind(exp) {
108
- var export_info = binaryen.getExportInfo(exp);
124
+ var export_info = Binaryen.getExportInfo(exp);
109
125
  return export_info.kind;
110
126
  }
@@ -354,6 +354,27 @@ caml_binaryen_unreachable(value _module) {
354
354
  CAMLreturn(alloc_BinaryenExpressionRef(exp));
355
355
  }
356
356
 
357
+ CAMLprim value
358
+ caml_binaryen_memory_init(value _module, value _segment, value _dest, value _offset, value _size) {
359
+ CAMLparam5(_module, _segment, _dest, _offset, _size);
360
+ BinaryenModuleRef module = BinaryenModuleRef_val(_module);
361
+ uint32_t segment = Int_val(_segment);
362
+ BinaryenExpressionRef dest = BinaryenExpressionRef_val(_dest);
363
+ BinaryenExpressionRef offset = BinaryenExpressionRef_val(_offset);
364
+ BinaryenExpressionRef size = BinaryenExpressionRef_val(_size);
365
+ BinaryenExpressionRef exp = BinaryenMemoryInit(module, segment, dest, offset, size);
366
+ CAMLreturn(alloc_BinaryenExpressionRef(exp));
367
+ }
368
+
369
+ CAMLprim value
370
+ caml_binaryen_data_drop(value _module, value _segment) {
371
+ CAMLparam2(_module, _segment);
372
+ BinaryenModuleRef module = BinaryenModuleRef_val(_module);
373
+ uint32_t segment = Int_val(_segment);
374
+ BinaryenExpressionRef exp = BinaryenDataDrop(module, segment);
375
+ CAMLreturn(alloc_BinaryenExpressionRef(exp));
376
+ }
377
+
357
378
  CAMLprim value
358
379
  caml_binaryen_memory_copy(value _module, value _dest, value _source, value _size) {
359
380
  CAMLparam4(_module, _dest, _source, _size);
@@ -1551,6 +1572,86 @@ caml_binaryen_return_set_value(value _exp, value _value) {
1551
1572
  CAMLreturn(Val_unit);
1552
1573
  }
1553
1574
 
1575
+ CAMLprim value
1576
+ caml_binaryen_memory_init_get_segment(value _exp) {
1577
+ CAMLparam1(_exp);
1578
+ BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
1579
+ CAMLreturn(Val_int(BinaryenMemoryInitGetSegment(exp)));
1580
+ }
1581
+
1582
+ CAMLprim value
1583
+ caml_binaryen_memory_init_set_segment(value _exp, value _value) {
1584
+ CAMLparam2(_exp, _value);
1585
+ BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
1586
+ uint32_t val = Int_val(_value);
1587
+ BinaryenMemoryInitSetSegment(exp, val);
1588
+ CAMLreturn(Val_unit);
1589
+ }
1590
+
1591
+ CAMLprim value
1592
+ caml_binaryen_memory_init_get_dest(value _exp) {
1593
+ CAMLparam1(_exp);
1594
+ BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
1595
+ CAMLreturn(alloc_BinaryenExpressionRef(BinaryenMemoryInitGetDest(exp)));
1596
+ }
1597
+
1598
+ CAMLprim value
1599
+ caml_binaryen_memory_init_set_dest(value _exp, value _value) {
1600
+ CAMLparam2(_exp, _value);
1601
+ BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
1602
+ BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
1603
+ BinaryenMemoryInitSetDest(exp, val);
1604
+ CAMLreturn(Val_unit);
1605
+ }
1606
+
1607
+ CAMLprim value
1608
+ caml_binaryen_memory_init_get_offset(value _exp) {
1609
+ CAMLparam1(_exp);
1610
+ BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
1611
+ CAMLreturn(alloc_BinaryenExpressionRef(BinaryenMemoryInitGetOffset(exp)));
1612
+ }
1613
+
1614
+ CAMLprim value
1615
+ caml_binaryen_memory_init_set_offset(value _exp, value _value) {
1616
+ CAMLparam2(_exp, _value);
1617
+ BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
1618
+ BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
1619
+ BinaryenMemoryInitSetOffset(exp, val);
1620
+ CAMLreturn(Val_unit);
1621
+ }
1622
+
1623
+ CAMLprim value
1624
+ caml_binaryen_memory_init_get_size(value _exp) {
1625
+ CAMLparam1(_exp);
1626
+ BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
1627
+ CAMLreturn(alloc_BinaryenExpressionRef(BinaryenMemoryInitGetSize(exp)));
1628
+ }
1629
+
1630
+ CAMLprim value
1631
+ caml_binaryen_memory_init_set_size(value _exp, value _value) {
1632
+ CAMLparam2(_exp, _value);
1633
+ BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
1634
+ BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
1635
+ BinaryenMemoryInitSetSize(exp, val);
1636
+ CAMLreturn(Val_unit);
1637
+ }
1638
+
1639
+ CAMLprim value
1640
+ caml_binaryen_data_drop_get_segment(value _exp) {
1641
+ CAMLparam1(_exp);
1642
+ BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
1643
+ CAMLreturn(Val_int(BinaryenDataDropGetSegment(exp)));
1644
+ }
1645
+
1646
+ CAMLprim value
1647
+ caml_binaryen_data_drop_set_segment(value _exp, value _value) {
1648
+ CAMLparam2(_exp, _value);
1649
+ BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
1650
+ uint32_t val = Int_val(_value);
1651
+ BinaryenDataDropSetSegment(exp, val);
1652
+ CAMLreturn(Val_unit);
1653
+ }
1654
+
1554
1655
  CAMLprim value
1555
1656
  caml_binaryen_memory_copy_get_dest(value _exp) {
1556
1657
  CAMLparam1(_exp);