@grain/binaryen.ml 0.14.1 → 0.17.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 +63 -0
- binaryen-archive/README.md +10 -24
- binaryen-archive/binaryen.opam +3 -5
- binaryen-archive/dune +1 -1
- binaryen-archive/esy.lock/index.json +77 -160
- binaryen-archive/esy.lock/opam/{cmdliner.1.1.0 → cmdliner.1.1.1}/opam +24 -18
- binaryen-archive/esy.lock/opam/{easy-format.1.3.2 → easy-format.1.3.3}/opam +30 -18
- binaryen-archive/esy.lock/opam/{ppx_yojson_conv_lib.v0.14.0 → ppx_yojson_conv_lib.v0.15.0}/opam +2 -2
- binaryen-archive/esy.lock/opam/{ppxlib.0.25.0 → ppxlib.0.26.0}/opam +5 -4
- binaryen-archive/esy.lock/opam/{re.1.10.3 → re.1.10.4}/opam +7 -7
- binaryen-archive/esy.lock/opam/{spawn.v0.15.0 → spawn.v0.15.1}/opam +4 -4
- binaryen-archive/esy.lock/overrides/opam__s__easy_format_opam__c__1.3.3_opam_override/package.json +3 -0
- binaryen-archive/package.json +4 -6
- binaryen-archive/src/binaryen_stubs_exports.js +110 -0
- binaryen-archive/src/binaryen_stubs_expressions.c +6 -1
- binaryen-archive/src/binaryen_stubs_expressions.js +1614 -0
- binaryen-archive/src/binaryen_stubs_features.c +6 -0
- binaryen-archive/src/binaryen_stubs_features.js +111 -0
- binaryen-archive/src/binaryen_stubs_functions.js +92 -0
- binaryen-archive/src/binaryen_stubs_globals.js +62 -0
- binaryen-archive/src/binaryen_stubs_imports.js +86 -0
- binaryen-archive/src/binaryen_stubs_literals.js +29 -0
- binaryen-archive/src/binaryen_stubs_memory.js +25 -0
- binaryen-archive/src/binaryen_stubs_modules.js +121 -0
- binaryen-archive/src/binaryen_stubs_ops.c +2 -2
- binaryen-archive/src/binaryen_stubs_ops.js +1895 -0
- binaryen-archive/src/binaryen_stubs_settings.js +120 -0
- binaryen-archive/src/binaryen_stubs_tables.c +2 -0
- binaryen-archive/src/binaryen_stubs_tables.js +84 -0
- binaryen-archive/src/binaryen_stubs_types.js +73 -0
- binaryen-archive/src/dune +11 -4
- binaryen-archive/{virtual → src}/element_segment.mli +0 -0
- binaryen-archive/{virtual → src}/export.mli +0 -0
- binaryen-archive/src/expression.ml +1 -1
- binaryen-archive/{virtual → src}/expression.mli +1 -1
- binaryen-archive/{virtual → src}/function.mli +0 -0
- binaryen-archive/{virtual → src}/global.mli +0 -0
- binaryen-archive/{virtual → src}/import.mli +0 -0
- binaryen-archive/src/literal.ml +0 -13
- binaryen-archive/src/literal.mli +8 -0
- binaryen-archive/src/memory.ml +6 -6
- binaryen-archive/{virtual → src}/memory.mli +1 -1
- binaryen-archive/src/module.ml +5 -1
- binaryen-archive/{virtual → src}/module.mli +2 -1
- binaryen-archive/{virtual → src}/op.mli +0 -0
- binaryen-archive/src/passes.ml +351 -0
- binaryen-archive/src/passes.mli +349 -0
- binaryen-archive/{virtual → src}/settings.mli +0 -0
- binaryen-archive/{virtual → src}/table.mli +0 -0
- binaryen-archive/{virtual → src}/type.mli +0 -0
- binaryen-archive/test/config/ocamlopt_flags.ml +1 -8
- binaryen-archive/test/dune +2 -22
- binaryen-archive/test/test.expected +8 -4
- binaryen-archive/test/test.ml +51 -10
- binaryen-archive/esy.lock/opam/js_of_ocaml-ppx.3.11.0/opam +0 -44
- binaryen-archive/esy.lock/opam/js_of_ocaml.3.11.0/opam +0 -45
- binaryen-archive/esy.lock/opam/uchar.0.0.2/opam +0 -36
- binaryen-archive/esy.lock/overrides/opam__s__uchar_opam__c__0.0.2_opam_override/files/winpatch.patch +0 -11
- binaryen-archive/esy.lock/overrides/opam__s__uchar_opam__c__0.0.2_opam_override/package.json +0 -11
- binaryen-archive/js/binaryen.es5.js +0 -363
- binaryen-archive/js/dune +0 -13
- binaryen-archive/js/element_segment.ml +0 -33
- binaryen-archive/js/export.ml +0 -57
- binaryen-archive/js/expression.ml +0 -1105
- binaryen-archive/js/function.ml +0 -60
- binaryen-archive/js/global.ml +0 -48
- binaryen-archive/js/import.ml +0 -69
- binaryen-archive/js/literal.ml +0 -28
- binaryen-archive/js/memory.ml +0 -39
- binaryen-archive/js/module.ml +0 -116
- binaryen-archive/js/op.ml +0 -482
- binaryen-archive/js/prelude.js +0 -2
- binaryen-archive/js/settings.ml +0 -60
- binaryen-archive/js/stubs.c +0 -15
- binaryen-archive/js/table.ml +0 -29
- binaryen-archive/js/type.ml +0 -21
- binaryen-archive/virtual/dune +0 -6
- binaryen-archive/virtual/literal.mli +0 -19
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
opam-version: "2.0"
|
|
2
|
-
synopsis: "
|
|
3
|
-
|
|
4
|
-
authors: ["The cmdliner programmers"]
|
|
5
|
-
homepage: "https://erratique.ch/software/cmdliner"
|
|
6
|
-
doc: "https://erratique.ch/software/cmdliner/doc"
|
|
7
|
-
dev-repo: "git+https://erratique.ch/repos/cmdliner.git"
|
|
8
|
-
bug-reports: "https://github.com/dbuenzli/cmdliner/issues"
|
|
9
|
-
license: ["ISC"]
|
|
10
|
-
tags: ["cli" "system" "declarative" "org:erratique"]
|
|
11
|
-
depends: ["ocaml" {>= "4.08.0"}]
|
|
12
|
-
build: [[ make "all" "PREFIX=%{prefix}%" ]]
|
|
13
|
-
install: [[make "install" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%"]
|
|
14
|
-
[make "install-doc" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%"]]
|
|
15
|
-
url {
|
|
16
|
-
src: "https://erratique.ch/software/cmdliner/releases/cmdliner-1.1.0.tbz"
|
|
17
|
-
checksum: "sha512=e2fad706829e7b8b50d1a510b59b87e44294252d8e8bdd9d6cb07f435d7c1c123f82353eedf29e9a4b7768da485516b89b62bf956234e90d7eae1bbaae2c9263"}
|
|
18
|
-
description: """
|
|
2
|
+
synopsis: "Declarative definition of command line interfaces for OCaml"
|
|
3
|
+
description: """\
|
|
19
4
|
Cmdliner allows the declarative definition of command line interfaces
|
|
20
5
|
for OCaml.
|
|
21
6
|
|
|
@@ -30,4 +15,25 @@ Cmdliner has no dependencies and is distributed under the ISC license.
|
|
|
30
15
|
[1]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html
|
|
31
16
|
[2]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
|
|
32
17
|
|
|
33
|
-
Home page: http://erratique.ch/software/cmdliner"""
|
|
18
|
+
Home page: http://erratique.ch/software/cmdliner"""
|
|
19
|
+
maintainer: "Daniel Bünzli <daniel.buenzl i@erratique.ch>"
|
|
20
|
+
authors: "The cmdliner programmers"
|
|
21
|
+
license: "ISC"
|
|
22
|
+
tags: ["cli" "system" "declarative" "org:erratique"]
|
|
23
|
+
homepage: "https://erratique.ch/software/cmdliner"
|
|
24
|
+
doc: "https://erratique.ch/software/cmdliner/doc"
|
|
25
|
+
bug-reports: "https://github.com/dbuenzli/cmdliner/issues"
|
|
26
|
+
depends: [
|
|
27
|
+
"ocaml" {>= "4.08.0"}
|
|
28
|
+
]
|
|
29
|
+
build: [make "all" "PREFIX=%{prefix}%"]
|
|
30
|
+
install: [
|
|
31
|
+
[make "install" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%"]
|
|
32
|
+
[make "install-doc" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%"]
|
|
33
|
+
]
|
|
34
|
+
dev-repo: "git+https://erratique.ch/repos/cmdliner.git"
|
|
35
|
+
url {
|
|
36
|
+
src: "https://erratique.ch/software/cmdliner/releases/cmdliner-1.1.1.tbz"
|
|
37
|
+
checksum:
|
|
38
|
+
"sha512=5478ad833da254b5587b3746e3a8493e66e867a081ac0f653a901cc8a7d944f66e4387592215ce25d939be76f281c4785702f54d4a74b1700bc8838a62255c9e"
|
|
39
|
+
}
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
opam-version: "2.0"
|
|
2
|
-
build: [
|
|
3
|
-
["dune" "subst"] {dev}
|
|
4
|
-
["dune" "build" "-p" name "-j" jobs]
|
|
5
|
-
["dune" "runtest" "-p" name "-j" jobs] {with-test}
|
|
6
|
-
["dune" "build" "-p" name "@doc"] {with-doc}
|
|
7
|
-
]
|
|
8
|
-
maintainer: ["martin@mjambon.com" "rudi.grinberg@gmail.com"]
|
|
9
|
-
authors: ["Martin Jambon"]
|
|
10
|
-
bug-reports: "https://github.com/mjambon/easy-format/issues"
|
|
11
|
-
homepage: "https://github.com/mjambon/easy-format"
|
|
12
|
-
doc: "https://mjambon.github.io/easy-format/"
|
|
13
|
-
license: "BSD-3-Clause"
|
|
14
|
-
dev-repo: "git+https://github.com/mjambon/easy-format.git"
|
|
15
2
|
synopsis:
|
|
16
3
|
"High-level and functional interface to the Format module of the OCaml standard library"
|
|
17
4
|
description: """
|
|
@@ -32,15 +19,40 @@ nodes:
|
|
|
32
19
|
Atoms represent any text that is guaranteed to be printed as-is. Lists can model
|
|
33
20
|
any sequence of items such as arrays of data or lists of definitions that are
|
|
34
21
|
labelled with something like "int main", "let x =" or "x:"."""
|
|
22
|
+
maintainer: ["martin@mjambon.com" "rudi.grinberg@gmail.com"]
|
|
23
|
+
authors: ["Martin Jambon"]
|
|
24
|
+
license: "BSD-3-Clause"
|
|
25
|
+
homepage: "https://github.com/mjambon/easy-format"
|
|
26
|
+
doc: "https://mjambon.github.io/easy-format/"
|
|
27
|
+
bug-reports: "https://github.com/mjambon/easy-format/issues"
|
|
35
28
|
depends: [
|
|
36
|
-
"dune" {>= "
|
|
37
|
-
"ocaml" {>= "4.
|
|
29
|
+
"dune" {>= "2.9"}
|
|
30
|
+
"ocaml" {>= "4.08"}
|
|
31
|
+
"odoc" {with-doc}
|
|
38
32
|
]
|
|
33
|
+
build: [
|
|
34
|
+
["dune" "subst"] {dev}
|
|
35
|
+
[
|
|
36
|
+
"dune"
|
|
37
|
+
"build"
|
|
38
|
+
"-p"
|
|
39
|
+
name
|
|
40
|
+
"-j"
|
|
41
|
+
jobs
|
|
42
|
+
"--promote-install-files=false"
|
|
43
|
+
"@install"
|
|
44
|
+
"@runtest" {with-test}
|
|
45
|
+
"@doc" {with-doc}
|
|
46
|
+
]
|
|
47
|
+
["dune" "install" "-p" name "--create-install-files" name]
|
|
48
|
+
]
|
|
49
|
+
dev-repo: "git+https://github.com/mjambon/easy-format.git"
|
|
39
50
|
url {
|
|
40
51
|
src:
|
|
41
|
-
"https://github.com/mjambon/easy-format/releases/download/1.3.
|
|
52
|
+
"https://github.com/mjambon/easy-format/releases/download/1.3.3/easy-format-1.3.3.tbz"
|
|
42
53
|
checksum: [
|
|
43
|
-
"sha256=
|
|
44
|
-
"sha512=
|
|
54
|
+
"sha256=eafccae911c26ca23e4ddacee3eaa54654d20f973b8680f84b708cef43adc416"
|
|
55
|
+
"sha512=611b3124f6a0ec6406b7bda8018a94c9c4a9da9d22495a5c34a6312bf7f0f0607a9529b276f7039ce3f3b15a955dac413d6d1229a55d5ac291302a3ddd5807e5"
|
|
45
56
|
]
|
|
46
57
|
}
|
|
58
|
+
x-commit-hash: "56c57e69ef067d1cc4e31029d31e77e55b46be95"
|
binaryen-archive/esy.lock/opam/{ppx_yojson_conv_lib.v0.14.0 → ppx_yojson_conv_lib.v0.15.0}/opam
RENAMED
|
@@ -19,6 +19,6 @@ description: "
|
|
|
19
19
|
Part of the Jane Street's PPX rewriters collection.
|
|
20
20
|
"
|
|
21
21
|
url {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
src: "https://ocaml.janestreet.com/ocaml-core/v0.15/files/ppx_yojson_conv_lib-v0.15.0.tar.gz"
|
|
23
|
+
checksum: "sha256=f9d2c5eff4566ec1f1f379b186ed22c8ddd6be0909a160bc5a9ac7abc6a6b684"
|
|
24
24
|
}
|
|
@@ -24,6 +24,7 @@ depends: [
|
|
|
24
24
|
"ocaml-compiler-libs" {>= "v0.11.0"}
|
|
25
25
|
"ppx_derivers" {>= "1.0"}
|
|
26
26
|
"sexplib0" {>= "v0.12"}
|
|
27
|
+
"sexplib0" {with-test & < "v0.15"}
|
|
27
28
|
"stdlib-shims"
|
|
28
29
|
"ocamlfind" {with-test}
|
|
29
30
|
"re" {with-test & >= "1.9.0"}
|
|
@@ -53,10 +54,10 @@ build: [
|
|
|
53
54
|
dev-repo: "git+https://github.com/ocaml-ppx/ppxlib.git"
|
|
54
55
|
url {
|
|
55
56
|
src:
|
|
56
|
-
"https://github.com/ocaml-ppx/ppxlib/releases/download/0.
|
|
57
|
+
"https://github.com/ocaml-ppx/ppxlib/releases/download/0.26.0/ppxlib-0.26.0.tbz"
|
|
57
58
|
checksum: [
|
|
58
|
-
"sha256=
|
|
59
|
-
"sha512=
|
|
59
|
+
"sha256=63117b67ea5863935455fe921f88fe333c0530f0483f730313303a93af817efd"
|
|
60
|
+
"sha512=9cfc9587657d17cdee5483e2a03292f872c42886e512bcc7442652e6418ce74c0135c731d8a68288c7fecae7f1b2defd93fe5acf8edb41e25144a8cec2806227"
|
|
60
61
|
]
|
|
61
62
|
}
|
|
62
|
-
x-commit-hash: "
|
|
63
|
+
x-commit-hash: "18b1ad68b59d151d662147661e43b159ac491f68"
|
|
@@ -8,19 +8,19 @@ authors: [
|
|
|
8
8
|
"Rudi Grinberg"
|
|
9
9
|
"Gabriel Radanne"
|
|
10
10
|
]
|
|
11
|
-
license: "LGPL-2.0
|
|
11
|
+
license: "LGPL-2.0-or-later WITH OCaml-LGPL-linking-exception"
|
|
12
12
|
homepage: "https://github.com/ocaml/ocaml-re"
|
|
13
13
|
bug-reports: "https://github.com/ocaml/ocaml-re/issues"
|
|
14
14
|
dev-repo: "git+https://github.com/ocaml/ocaml-re.git"
|
|
15
15
|
|
|
16
16
|
build: [
|
|
17
|
-
["dune" "subst"] {
|
|
17
|
+
["dune" "subst"] {dev}
|
|
18
18
|
["dune" "build" "-p" name "-j" jobs]
|
|
19
19
|
["dune" "runtest" "-p" name "-j" jobs] {with-test}
|
|
20
20
|
]
|
|
21
21
|
|
|
22
22
|
depends: [
|
|
23
|
-
"ocaml" {>= "4.
|
|
23
|
+
"ocaml" {>= "4.03"}
|
|
24
24
|
"dune" {>= "2.0"}
|
|
25
25
|
"ounit" {with-test}
|
|
26
26
|
"seq"
|
|
@@ -37,10 +37,10 @@ Pure OCaml regular expressions with:
|
|
|
37
37
|
"""
|
|
38
38
|
url {
|
|
39
39
|
src:
|
|
40
|
-
"https://github.com/ocaml/ocaml-re/releases/download/1.10.
|
|
40
|
+
"https://github.com/ocaml/ocaml-re/releases/download/1.10.4/re-1.10.4.tbz"
|
|
41
41
|
checksum: [
|
|
42
|
-
"sha256=
|
|
43
|
-
"sha512=
|
|
42
|
+
"sha256=83eb3e4300aa9b1dc7820749010f4362ea83524742130524d78c20ce99ca747c"
|
|
43
|
+
"sha512=92b05cf92c389fa8c753f2acca837b15dd05a4a2e8e2bec7a269d2e14c35b1a786d394258376648f80b4b99250ba1900cfe68230b8385aeac153149d9ce56099"
|
|
44
44
|
]
|
|
45
45
|
}
|
|
46
|
-
x-commit-hash: "
|
|
46
|
+
x-commit-hash: "e9a4cecb8294c1839db18b1d0c30e755ec85ed5e"
|
|
@@ -45,12 +45,12 @@ build: [
|
|
|
45
45
|
]
|
|
46
46
|
]
|
|
47
47
|
dev-repo: "git+https://github.com/janestreet/spawn.git"
|
|
48
|
-
x-commit-hash: "
|
|
48
|
+
x-commit-hash: "13d279ebfa8c40d4bafe18cddfdff0de54b4eaff"
|
|
49
49
|
url {
|
|
50
50
|
src:
|
|
51
|
-
"https://github.com/janestreet/spawn/archive/v0.15.
|
|
51
|
+
"https://github.com/janestreet/spawn/archive/v0.15.1.tar.gz"
|
|
52
52
|
checksum: [
|
|
53
|
-
"sha256=
|
|
54
|
-
"sha512=
|
|
53
|
+
"sha256=9afdee314fab6c3fcd689ab6eb5608d6b78078e6dede3953a47debde06c19d50"
|
|
54
|
+
"sha512=efdb31d5ec5ea36d0bc80224d4ee04e46ce3428d1662870e6cebece92bc313d6eebee378802c0c059dd6e0cafea515308c31b7dfaf04a098eb4566583c1e9ed4"
|
|
55
55
|
]
|
|
56
56
|
}
|
binaryen-archive/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grain/binaryen.ml",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.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": ">=
|
|
8
|
+
"ocaml": ">= 4.12.0 < 4.14.0",
|
|
9
|
+
"@grain/libbinaryen": ">= 107.0.0 < 108.0.0",
|
|
10
10
|
"@opam/dune": ">= 2.9.1 < 3.0.0",
|
|
11
|
-
"@opam/dune-configurator": ">= 2.9.1 < 3.0.0"
|
|
12
|
-
"@opam/js_of_ocaml": ">= 3.10.0 < 4.0.0",
|
|
13
|
-
"@opam/js_of_ocaml-ppx": ">= 3.10.0 < 4.0.0"
|
|
11
|
+
"@opam/dune-configurator": ">= 2.9.1 < 3.0.0"
|
|
14
12
|
},
|
|
15
13
|
"devDependencies": {
|
|
16
14
|
"@opam/js_of_ocaml-compiler": ">= 3.10.0 < 4.0.0",
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
//Provides: caml_binaryen_add_function_export
|
|
2
|
+
//Requires: caml_jsstring_of_string
|
|
3
|
+
function caml_binaryen_add_function_export(wasm_mod, internal_name, external_name) {
|
|
4
|
+
return wasm_mod.addFunctionExport(
|
|
5
|
+
caml_jsstring_of_string(internal_name),
|
|
6
|
+
caml_jsstring_of_string(external_name)
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//Provides: caml_binaryen_add_table_export
|
|
11
|
+
//Requires: caml_jsstring_of_string
|
|
12
|
+
function caml_binaryen_add_table_export(wasm_mod, internal_name, external_name) {
|
|
13
|
+
return wasm_mod.addTableExport(
|
|
14
|
+
caml_jsstring_of_string(internal_name),
|
|
15
|
+
caml_jsstring_of_string(external_name)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//Provides: caml_binaryen_add_memory_export
|
|
20
|
+
//Requires: caml_jsstring_of_string
|
|
21
|
+
function caml_binaryen_add_memory_export(wasm_mod, internal_name, external_name) {
|
|
22
|
+
return wasm_mod.addMemoryExport(
|
|
23
|
+
caml_jsstring_of_string(internal_name),
|
|
24
|
+
caml_jsstring_of_string(external_name)
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//Provides: caml_binaryen_add_global_export
|
|
29
|
+
//Requires: caml_jsstring_of_string
|
|
30
|
+
function caml_binaryen_add_global_export(wasm_mod, internal_name, external_name) {
|
|
31
|
+
return wasm_mod.addGlobalExport(
|
|
32
|
+
caml_jsstring_of_string(internal_name),
|
|
33
|
+
caml_jsstring_of_string(external_name)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//Provides: caml_binaryen_get_export
|
|
38
|
+
//Requires: caml_jsstring_of_string
|
|
39
|
+
function caml_binaryen_get_export(wasm_mod, external_name) {
|
|
40
|
+
return wasm_mod.getExport(caml_jsstring_of_string(external_name));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//Provides: caml_binaryen_remove_export
|
|
44
|
+
//Requires: caml_jsstring_of_string
|
|
45
|
+
function caml_binaryen_remove_export(wasm_mod, external_name) {
|
|
46
|
+
return wasm_mod.removeExport(caml_jsstring_of_string(external_name));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//Provides: caml_binaryen_get_num_exports
|
|
50
|
+
function caml_binaryen_get_num_exports(wasm_mod) {
|
|
51
|
+
return wasm_mod.getNumExports();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//Provides: caml_binaryen_get_export_by_index
|
|
55
|
+
function caml_binaryen_get_export_by_index(wasm_mod, index) {
|
|
56
|
+
return wasm_mod.getExportByIndex(index);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
//Provides: caml_binaryen_export_get_name
|
|
60
|
+
//Requires: binaryen
|
|
61
|
+
//Requires: caml_string_of_jsstring
|
|
62
|
+
function caml_binaryen_export_get_name(exp) {
|
|
63
|
+
var export_info = binaryen.getExportInfo(exp);
|
|
64
|
+
return caml_string_of_jsstring(export_info.name);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//Provides: caml_binaryen_export_get_value
|
|
68
|
+
//Requires: binaryen
|
|
69
|
+
//Requires: caml_string_of_jsstring
|
|
70
|
+
function caml_binaryen_export_get_value(exp) {
|
|
71
|
+
var export_info = binaryen.getExportInfo(exp);
|
|
72
|
+
return caml_string_of_jsstring(export_info.value);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
//Provides: caml_binaryen_external_function
|
|
76
|
+
//Requires: binaryen
|
|
77
|
+
function caml_binaryen_external_function() {
|
|
78
|
+
return binaryen._BinaryenExternalFunction();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
//Provides: caml_binaryen_external_table
|
|
82
|
+
//Requires: binaryen
|
|
83
|
+
function caml_binaryen_external_table() {
|
|
84
|
+
return binaryen._BinaryenExternalTable();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
//Provides: caml_binaryen_external_memory
|
|
88
|
+
//Requires: binaryen
|
|
89
|
+
function caml_binaryen_external_memory() {
|
|
90
|
+
return binaryen._BinaryenExternalMemory();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
//Provides: caml_binaryen_external_global
|
|
94
|
+
//Requires: binaryen
|
|
95
|
+
function caml_binaryen_external_global() {
|
|
96
|
+
return binaryen._BinaryenExternalGlobal();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//Provides: caml_binaryen_external_tag
|
|
100
|
+
//Requires: binaryen
|
|
101
|
+
function caml_binaryen_external_tag() {
|
|
102
|
+
return binaryen._BinaryenExternalTag();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
//Provides: caml_binaryen_export_get_kind
|
|
106
|
+
//Requires: binaryen
|
|
107
|
+
function caml_binaryen_export_get_kind(exp) {
|
|
108
|
+
var export_info = binaryen.getExportInfo(exp);
|
|
109
|
+
return export_info.kind;
|
|
110
|
+
}
|
|
@@ -1534,7 +1534,12 @@ CAMLprim value
|
|
|
1534
1534
|
caml_binaryen_return_get_value(value _exp) {
|
|
1535
1535
|
CAMLparam1(_exp);
|
|
1536
1536
|
BinaryenExpressionRef exp = BinaryenExpressionRef_val(_exp);
|
|
1537
|
-
|
|
1537
|
+
BinaryenExpressionRef val = BinaryenReturnGetValue(exp);
|
|
1538
|
+
if (val == NULL) {
|
|
1539
|
+
CAMLreturn(Val_none);
|
|
1540
|
+
} else {
|
|
1541
|
+
CAMLreturn(caml_alloc_some(alloc_BinaryenExpressionRef(val)));
|
|
1542
|
+
}
|
|
1538
1543
|
}
|
|
1539
1544
|
|
|
1540
1545
|
CAMLprim value
|