@grain/binaryen.ml 0.16.0 → 0.18.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.
- binaryen-archive/CHANGELOG.md +43 -0
- binaryen-archive/binaryen.opam +6 -6
- binaryen-archive/esy.lock/index.json +509 -308
- binaryen-archive/esy.lock/opam/base-bigarray.base/opam +6 -0
- binaryen-archive/esy.lock/opam/{cppo.1.6.8 → cppo.1.6.9}/opam +21 -19
- binaryen-archive/esy.lock/opam/{dune-build-info.2.9.3 → dune-build-info.3.3.1}/opam +8 -6
- binaryen-archive/esy.lock/opam/{dune-configurator.2.9.3 → dune-configurator.3.3.1}/opam +10 -9
- binaryen-archive/esy.lock/opam/dune-rpc.3.3.1/opam +43 -0
- binaryen-archive/esy.lock/opam/{dune.2.9.3 → dune.3.3.1}/opam +6 -9
- binaryen-archive/esy.lock/opam/dyn.3.3.1/opam +40 -0
- binaryen-archive/esy.lock/opam/fiber.3.3.1/opam +41 -0
- binaryen-archive/esy.lock/opam/{js_of_ocaml-compiler.3.11.0 → js_of_ocaml-compiler.4.0.0}/opam +13 -11
- binaryen-archive/esy.lock/opam/{menhir.20211128 → menhir.20220210}/opam +4 -4
- binaryen-archive/esy.lock/opam/{menhirLib.20211128 → menhirLib.20220210}/opam +3 -3
- binaryen-archive/esy.lock/opam/{menhirSdk.20211128 → menhirSdk.20220210}/opam +3 -3
- binaryen-archive/esy.lock/opam/{ocaml-lsp-server.1.10.3 → ocaml-lsp-server.1.12.2}/opam +16 -8
- binaryen-archive/esy.lock/opam/{ocamlfind.1.9.3 → ocamlfind.1.9.5}/opam +4 -3
- binaryen-archive/esy.lock/opam/{ocamlformat-rpc-lib.0.19.0 → ocamlformat-rpc-lib.0.22.4}/opam +6 -7
- binaryen-archive/esy.lock/opam/octavius.1.2.2/opam +33 -0
- binaryen-archive/esy.lock/opam/odoc-parser.1.0.0/opam +1 -1
- binaryen-archive/esy.lock/opam/omd.1.3.1/opam +39 -0
- binaryen-archive/esy.lock/opam/ordering.3.3.1/opam +38 -0
- binaryen-archive/esy.lock/opam/{ppxlib.0.26.0 → ppxlib.0.27.0}/opam +6 -6
- binaryen-archive/esy.lock/opam/sexplib0.v0.14.0/opam +1 -1
- binaryen-archive/esy.lock/opam/stdune.3.3.1/opam +44 -0
- binaryen-archive/esy.lock/opam/xdg.3.3.1/opam +39 -0
- binaryen-archive/esy.lock/opam/{yojson.1.7.0 → yojson.2.0.0}/opam +13 -13
- binaryen-archive/esy.lock/overrides/opam__s__js__of__ocaml_compiler_opam__c__4.0.0_opam_override/package.json +3 -0
- 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
- 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
- binaryen-archive/package.json +6 -6
- binaryen-archive/src/binaryen_stubs_exports.js +36 -20
- binaryen-archive/src/binaryen_stubs_expressions.c +101 -0
- binaryen-archive/src/binaryen_stubs_expressions.js +543 -508
- binaryen-archive/src/binaryen_stubs_features.c +6 -0
- binaryen-archive/src/binaryen_stubs_features.js +38 -32
- binaryen-archive/src/binaryen_stubs_functions.js +45 -19
- binaryen-archive/src/binaryen_stubs_globals.js +8 -8
- binaryen-archive/src/binaryen_stubs_imports.js +53 -14
- binaryen-archive/src/binaryen_stubs_memory.js +4 -2
- binaryen-archive/src/binaryen_stubs_modules.js +9 -8
- binaryen-archive/src/binaryen_stubs_ops.c +2 -2
- binaryen-archive/src/binaryen_stubs_ops.js +632 -632
- binaryen-archive/src/binaryen_stubs_settings.js +36 -38
- binaryen-archive/src/binaryen_stubs_tables.js +18 -12
- binaryen-archive/src/binaryen_stubs_types.c +23 -2
- binaryen-archive/src/binaryen_stubs_types.js +44 -26
- binaryen-archive/src/expression.ml +27 -0
- binaryen-archive/src/expression.mli +18 -0
- binaryen-archive/src/memory.ml +15 -12
- binaryen-archive/src/memory.mli +2 -6
- binaryen-archive/src/module.ml +4 -0
- binaryen-archive/src/module.mli +1 -0
- binaryen-archive/src/passes.ml +6 -0
- binaryen-archive/src/passes.mli +6 -0
- binaryen-archive/src/type.ml +14 -2
- binaryen-archive/src/type.mli +4 -1
- binaryen-archive/test/test.expected +13 -12
- binaryen-archive/test/test.ml +26 -11
- binaryen-archive/esy.lock/opam/biniou.1.2.1/opam +0 -45
- binaryen-archive/esy.lock/opam/easy-format.1.3.3/opam +0 -58
- binaryen-archive/esy.lock/overrides/opam__s__easy_format_opam__c__1.3.3_opam_override/package.json +0 -3
|
@@ -2,7 +2,7 @@ opam-version: "2.0"
|
|
|
2
2
|
synopsis: "Standard library for ppx rewriters"
|
|
3
3
|
description: """
|
|
4
4
|
Ppxlib is the standard library for ppx rewriters and other programs
|
|
5
|
-
that manipulate the in-memory
|
|
5
|
+
that manipulate the in-memory representation of OCaml programs, a.k.a
|
|
6
6
|
the "Parsetree".
|
|
7
7
|
|
|
8
8
|
It also comes bundled with two ppx rewriters that are commonly used to
|
|
@@ -20,7 +20,7 @@ doc: "https://ocaml-ppx.github.io/ppxlib/"
|
|
|
20
20
|
bug-reports: "https://github.com/ocaml-ppx/ppxlib/issues"
|
|
21
21
|
depends: [
|
|
22
22
|
"dune" {>= "2.7"}
|
|
23
|
-
"ocaml" {>= "4.04.1" & < "
|
|
23
|
+
"ocaml" {>= "4.04.1" & < "5.1.0"}
|
|
24
24
|
"ocaml-compiler-libs" {>= "v0.11.0"}
|
|
25
25
|
"ppx_derivers" {>= "1.0"}
|
|
26
26
|
"sexplib0" {>= "v0.12"}
|
|
@@ -54,10 +54,10 @@ build: [
|
|
|
54
54
|
dev-repo: "git+https://github.com/ocaml-ppx/ppxlib.git"
|
|
55
55
|
url {
|
|
56
56
|
src:
|
|
57
|
-
"https://github.com/ocaml-ppx/ppxlib/releases/download/0.
|
|
57
|
+
"https://github.com/ocaml-ppx/ppxlib/releases/download/0.27.0/ppxlib-0.27.0.tbz"
|
|
58
58
|
checksum: [
|
|
59
|
-
"sha256=
|
|
60
|
-
"sha512=
|
|
59
|
+
"sha256=764b96121d6ffd6a73820e0ec5235176bfc42b94cf2ff97e32d068a5c4b28c62"
|
|
60
|
+
"sha512=2dcce0be6acdb3e185bfdad2785303a405c617f99949316abe6793f785d7227c10795ca49e79290bd385873da635191b44e8a5c211de114a168846d5d26f505c"
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
|
-
x-commit-hash: "
|
|
63
|
+
x-commit-hash: "c33c48981a30359af5b4cddaeb633060c1784d62"
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
opam-version: "2.0"
|
|
2
|
+
synopsis: "Dune's unstable standard library"
|
|
3
|
+
description:
|
|
4
|
+
"This library offers no backwards compatibility guarantees. Use at your own risk."
|
|
5
|
+
maintainer: ["Jane Street Group, LLC <opensource@janestreet.com>"]
|
|
6
|
+
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"]
|
|
7
|
+
license: "MIT"
|
|
8
|
+
homepage: "https://github.com/ocaml/dune"
|
|
9
|
+
doc: "https://dune.readthedocs.io/"
|
|
10
|
+
bug-reports: "https://github.com/ocaml/dune/issues"
|
|
11
|
+
depends: [
|
|
12
|
+
"dune" {>= "3.3"}
|
|
13
|
+
"ocaml" {>= "4.08.0"}
|
|
14
|
+
"base-unix"
|
|
15
|
+
"dyn" {= version}
|
|
16
|
+
"ordering" {= version}
|
|
17
|
+
"pp" {>= "1.1.0"}
|
|
18
|
+
"csexp" {>= "1.5.0"}
|
|
19
|
+
"odoc" {with-doc}
|
|
20
|
+
]
|
|
21
|
+
dev-repo: "git+https://github.com/ocaml/dune.git"
|
|
22
|
+
build: [
|
|
23
|
+
["dune" "subst"] {dev}
|
|
24
|
+
["rm" "-rf" "vendor/csexp"]
|
|
25
|
+
["rm" "-rf" "vendor/pp"]
|
|
26
|
+
[
|
|
27
|
+
"dune"
|
|
28
|
+
"build"
|
|
29
|
+
"-p"
|
|
30
|
+
name
|
|
31
|
+
"-j"
|
|
32
|
+
jobs
|
|
33
|
+
"@install"
|
|
34
|
+
"@doc" {with-doc}
|
|
35
|
+
]
|
|
36
|
+
]
|
|
37
|
+
url {
|
|
38
|
+
src: "https://github.com/ocaml/dune/releases/download/3.3.1/dune-3.3.1.tbz"
|
|
39
|
+
checksum: [
|
|
40
|
+
"sha256=840c80491bfe12bab5f2b99d49e163f3e4c4d2fc4b4a3e6fb16c24dccd5502e1"
|
|
41
|
+
"sha512=b5d7639336b5df8cf37b8aac45906c6d0ff7e38b1a4a2c6ddb616ea81cdc5a8ff36cecf3d4ee4ff9282c835ed2958d4702ae1b3dd1f048c4269f5e7fedbe50d5"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
x-commit-hash: "b3232b22e13ff2fe4db994ba7ae3db727d1493cd"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
opam-version: "2.0"
|
|
2
|
+
synopsis: "XDG Base Directory Specification"
|
|
3
|
+
description:
|
|
4
|
+
"https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html"
|
|
5
|
+
maintainer: ["Jane Street Group, LLC <opensource@janestreet.com>"]
|
|
6
|
+
authors: ["Jane Street Group, LLC <opensource@janestreet.com>"]
|
|
7
|
+
license: "MIT"
|
|
8
|
+
homepage: "https://github.com/ocaml/dune"
|
|
9
|
+
doc: "https://dune.readthedocs.io/"
|
|
10
|
+
bug-reports: "https://github.com/ocaml/dune/issues"
|
|
11
|
+
depends: [
|
|
12
|
+
"dune" {>= "3.3"}
|
|
13
|
+
"ocaml" {>= "4.08"}
|
|
14
|
+
"odoc" {with-doc}
|
|
15
|
+
]
|
|
16
|
+
dev-repo: "git+https://github.com/ocaml/dune.git"
|
|
17
|
+
build: [
|
|
18
|
+
["dune" "subst"] {dev}
|
|
19
|
+
["rm" "-rf" "vendor/csexp"]
|
|
20
|
+
["rm" "-rf" "vendor/pp"]
|
|
21
|
+
[
|
|
22
|
+
"dune"
|
|
23
|
+
"build"
|
|
24
|
+
"-p"
|
|
25
|
+
name
|
|
26
|
+
"-j"
|
|
27
|
+
jobs
|
|
28
|
+
"@install"
|
|
29
|
+
"@doc" {with-doc}
|
|
30
|
+
]
|
|
31
|
+
]
|
|
32
|
+
url {
|
|
33
|
+
src: "https://github.com/ocaml/dune/releases/download/3.3.1/dune-3.3.1.tbz"
|
|
34
|
+
checksum: [
|
|
35
|
+
"sha256=840c80491bfe12bab5f2b99d49e163f3e4c4d2fc4b4a3e6fb16c24dccd5502e1"
|
|
36
|
+
"sha512=b5d7639336b5df8cf37b8aac45906c6d0ff7e38b1a4a2c6ddb616ea81cdc5a8ff36cecf3d4ee4ff9282c835ed2958d4702ae1b3dd1f048c4269f5e7fedbe50d5"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
x-commit-hash: "b3232b22e13ff2fe4db994ba7ae3db727d1493cd"
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
opam-version: "2.0"
|
|
2
|
-
maintainer: "
|
|
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
17
|
"dune"
|
|
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/
|
|
37
|
-
checksum:
|
|
32
|
+
"https://github.com/ocaml-community/yojson/releases/download/2.0.0/yojson-2.0.0.tbz"
|
|
33
|
+
checksum: [
|
|
34
|
+
"sha256=ab5d863f7f951a8f7fb4a708399ca2da2cf139a5e0af7818145c20295420cb1a"
|
|
35
|
+
"sha512=3ea982dbeef7ec8da54d29124ddb8b86f90583eb96ed3947851cedec9e3d2d47b981e3465d41f2c94943e6865ba6a9a51c6f0252efa6df2386d398b679aae8f2"
|
|
36
|
+
]
|
|
38
37
|
}
|
|
38
|
+
x-commit-hash: "9c5cee131ae0ec79713e62397076d597486844ed"
|
|
File without changes
|
|
File without changes
|
binaryen-archive/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grain/binaryen.ml",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.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
|
-
"ocaml": ">= 4.12.0
|
|
9
|
-
"@grain/libbinaryen": ">=
|
|
10
|
-
"@opam/dune": ">= 2.9.1
|
|
11
|
-
"@opam/dune-configurator": ">= 2.9.1
|
|
8
|
+
"ocaml": ">= 4.12.0",
|
|
9
|
+
"@grain/libbinaryen": ">= 108.0.0 < 109.0.0",
|
|
10
|
+
"@opam/dune": ">= 2.9.1",
|
|
11
|
+
"@opam/dune-configurator": ">= 2.9.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@opam/js_of_ocaml-compiler": ">= 3.10.0
|
|
14
|
+
"@opam/js_of_ocaml-compiler": ">= 3.10.0",
|
|
15
15
|
"@opam/ocamlformat": "0.20.1",
|
|
16
16
|
"@opam/ocaml-lsp-server": "^1.9.1"
|
|
17
17
|
},
|
|
@@ -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(
|
|
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(
|
|
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(
|
|
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(
|
|
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:
|
|
76
|
+
//Requires: Binaryen
|
|
61
77
|
//Requires: caml_string_of_jsstring
|
|
62
78
|
function caml_binaryen_export_get_name(exp) {
|
|
63
|
-
var export_info =
|
|
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:
|
|
84
|
+
//Requires: Binaryen
|
|
69
85
|
//Requires: caml_string_of_jsstring
|
|
70
86
|
function caml_binaryen_export_get_value(exp) {
|
|
71
|
-
var export_info =
|
|
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:
|
|
92
|
+
//Requires: Binaryen
|
|
77
93
|
function caml_binaryen_external_function() {
|
|
78
|
-
return
|
|
94
|
+
return Binaryen._BinaryenExternalFunction();
|
|
79
95
|
}
|
|
80
96
|
|
|
81
97
|
//Provides: caml_binaryen_external_table
|
|
82
|
-
//Requires:
|
|
98
|
+
//Requires: Binaryen
|
|
83
99
|
function caml_binaryen_external_table() {
|
|
84
|
-
return
|
|
100
|
+
return Binaryen._BinaryenExternalTable();
|
|
85
101
|
}
|
|
86
102
|
|
|
87
103
|
//Provides: caml_binaryen_external_memory
|
|
88
|
-
//Requires:
|
|
104
|
+
//Requires: Binaryen
|
|
89
105
|
function caml_binaryen_external_memory() {
|
|
90
|
-
return
|
|
106
|
+
return Binaryen._BinaryenExternalMemory();
|
|
91
107
|
}
|
|
92
108
|
|
|
93
109
|
//Provides: caml_binaryen_external_global
|
|
94
|
-
//Requires:
|
|
110
|
+
//Requires: Binaryen
|
|
95
111
|
function caml_binaryen_external_global() {
|
|
96
|
-
return
|
|
112
|
+
return Binaryen._BinaryenExternalGlobal();
|
|
97
113
|
}
|
|
98
114
|
|
|
99
115
|
//Provides: caml_binaryen_external_tag
|
|
100
|
-
//Requires:
|
|
116
|
+
//Requires: Binaryen
|
|
101
117
|
function caml_binaryen_external_tag() {
|
|
102
|
-
return
|
|
118
|
+
return Binaryen._BinaryenExternalTag();
|
|
103
119
|
}
|
|
104
120
|
|
|
105
121
|
//Provides: caml_binaryen_export_get_kind
|
|
106
|
-
//Requires:
|
|
122
|
+
//Requires: Binaryen
|
|
107
123
|
function caml_binaryen_export_get_kind(exp) {
|
|
108
|
-
var export_info =
|
|
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);
|