@grain/binaryen.ml 0.20.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- binaryen-archive/CHANGELOG.md +64 -0
- binaryen-archive/binaryen.opam +3 -3
- binaryen-archive/esy.lock/index.json +491 -426
- binaryen-archive/esy.lock/opam/{base.v0.15.1 → base.v0.16.1}/opam +7 -4
- binaryen-archive/esy.lock/opam/{chrome-trace.3.6.1 → chrome-trace.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{cmdliner.1.1.1 → cmdliner.1.2.0}/opam +2 -2
- binaryen-archive/esy.lock/opam/{csexp.1.5.1 → csexp.1.5.2}/opam +7 -9
- binaryen-archive/esy.lock/opam/{dune-build-info.3.6.1 → dune-build-info.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{dune-configurator.3.6.1 → dune-configurator.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{dune-rpc.3.6.1 → dune-rpc.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{dune.3.6.1 → dune.3.9.1}/opam +5 -5
- binaryen-archive/esy.lock/opam/{dyn.3.6.1 → dyn.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/fiber.3.7.0/opam +39 -0
- binaryen-archive/esy.lock/opam/{fix.20220121 → fix.20230505}/opam +3 -3
- binaryen-archive/esy.lock/opam/gen.1.1/opam +31 -0
- binaryen-archive/esy.lock/opam/{js_of_ocaml-compiler.4.1.0 → js_of_ocaml-compiler.5.4.0}/opam +10 -10
- binaryen-archive/esy.lock/opam/{menhir.20220210 → menhir.20230608}/opam +4 -4
- binaryen-archive/esy.lock/opam/{menhirLib.20220210 → menhirLib.20230608}/opam +4 -4
- binaryen-archive/esy.lock/opam/{menhirSdk.20220210 → menhirSdk.20230608}/opam +4 -4
- binaryen-archive/esy.lock/opam/{ocamlbuild.0.14.2 → ocamlbuild.0.14.2+win}/opam +13 -14
- binaryen-archive/esy.lock/opam/ocamlfind.1.9.6/files/0001-Harden-test-for-OCaml-5.patch +12 -0
- binaryen-archive/esy.lock/opam/{ocamlfind.1.9.5 → ocamlfind.1.9.6}/opam +8 -7
- binaryen-archive/esy.lock/opam/{ocamlformat-rpc-lib.0.24.1 → ocamlformat-rpc-lib.0.25.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/ocamlformat.0.24.1/opam +1 -1
- binaryen-archive/esy.lock/opam/{ordering.3.6.1 → ordering.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{ppx_yojson_conv_lib.v0.15.0 → ppx_yojson_conv_lib.v0.16.0}/opam +3 -3
- binaryen-archive/esy.lock/opam/{ppxlib.0.28.0 → ppxlib.0.29.1}/opam +5 -5
- binaryen-archive/esy.lock/opam/sedlex.3.2/opam +48 -0
- binaryen-archive/esy.lock/opam/{sexplib0.v0.15.1 → sexplib0.v0.16.0}/opam +3 -3
- binaryen-archive/esy.lock/opam/{stdio.v0.15.0 → stdio.v0.16.0}/opam +4 -4
- binaryen-archive/esy.lock/opam/{stdune.3.6.1 → stdune.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{topkg.1.0.6 → topkg.1.0.7}/opam +2 -2
- binaryen-archive/esy.lock/opam/{xdg.3.6.1 → xdg.3.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/{yojson.2.0.2 → yojson.2.1.0}/opam +33 -23
- binaryen-archive/esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.2+win_opam_override/files/ocamlbuild-0.14.2.patch +0 -0
- binaryen-archive/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.9.6_opam_override/files/findlib.patch +11 -0
- binaryen-archive/package.json +3 -3
- binaryen-archive/src/array_type.c +29 -0
- binaryen-archive/src/array_type.js +17 -0
- binaryen-archive/src/array_type.ml +8 -0
- binaryen-archive/src/array_type.mli +3 -0
- binaryen-archive/src/dune +38 -32
- binaryen-archive/src/{binaryen_stubs_exports.c → export.c} +0 -8
- binaryen-archive/src/{binaryen_stubs_expressions.c → expression.c} +24 -15
- binaryen-archive/src/{binaryen_stubs_expressions.js → expression.js} +20 -6
- binaryen-archive/src/expression.ml +14 -5
- binaryen-archive/src/expression.mli +10 -2
- binaryen-archive/src/{binaryen_stubs_functions.c → function.c} +0 -24
- binaryen-archive/src/{binaryen_stubs_globals.c → global.c} +0 -25
- binaryen-archive/src/heap_type.c +171 -0
- binaryen-archive/src/heap_type.js +131 -0
- binaryen-archive/src/heap_type.ml +12 -1
- binaryen-archive/src/heap_type.mli +12 -1
- binaryen-archive/src/{binaryen_stubs_literals.c → literal.c} +0 -9
- binaryen-archive/src/{binaryen_stubs_memory.c → memory.c} +15 -5
- binaryen-archive/src/{binaryen_stubs_memory.js → memory.js} +11 -1
- binaryen-archive/src/memory.ml +6 -3
- binaryen-archive/src/memory.mli +10 -1
- binaryen-archive/src/{binaryen_stubs_modules.c → module.c} +0 -9
- binaryen-archive/src/module.ml +4 -5
- binaryen-archive/src/module.mli +1 -1
- binaryen-archive/src/{binaryen_stubs_features.c → module_feature.c} +6 -6
- binaryen-archive/src/{binaryen_stubs_features.js → module_feature.js} +6 -6
- binaryen-archive/src/ocaml_helpers.c +87 -0
- binaryen-archive/src/ocaml_helpers.h +33 -0
- binaryen-archive/src/{binaryen_stubs_ops.c → op.c} +597 -333
- binaryen-archive/src/op.js +2129 -0
- binaryen-archive/src/op.ml +499 -352
- binaryen-archive/src/op.mli +46 -7
- binaryen-archive/src/passes.ml +46 -0
- binaryen-archive/src/passes.mli +45 -0
- binaryen-archive/src/signature_type.c +23 -0
- binaryen-archive/src/signature_type.js +11 -0
- binaryen-archive/src/signature_type.ml +5 -0
- binaryen-archive/src/signature_type.mli +2 -0
- binaryen-archive/src/struct_type.c +39 -0
- binaryen-archive/src/struct_type.js +23 -0
- binaryen-archive/src/struct_type.ml +11 -0
- binaryen-archive/src/struct_type.mli +4 -0
- binaryen-archive/src/{binaryen_stubs_tables.c → table.c} +0 -25
- binaryen-archive/src/{binaryen_stubs_types.c → type.c} +30 -12
- binaryen-archive/src/{binaryen_stubs_types.js → type.js} +31 -3
- binaryen-archive/src/type.ml +18 -2
- binaryen-archive/src/type.mli +5 -1
- binaryen-archive/src/{binaryen_stubs_type_system.c → type_system.c} +0 -6
- binaryen-archive/src/{binaryen_stubs_type_system.js → type_system.js} +0 -6
- binaryen-archive/src/type_system.ml +0 -1
- binaryen-archive/src/type_system.mli +0 -1
- binaryen-archive/test/test.expected +13 -13
- binaryen-archive/test/test.ml +11 -3
- binaryen-archive/esy.lock/opam/fiber.3.6.1/opam +0 -41
- binaryen-archive/esy.lock/opam/ocamlfind.1.9.5/files/0001-Fix-bug-when-installing-with-a-system-compiler.patch +0 -26
- binaryen-archive/esy.lock/overrides/opam__s__ocamlfind_opam__c__1.9.5_opam_override/files/findlib.patch +0 -485
- binaryen-archive/src/binaryen_stubs_heap_types.c +0 -95
- binaryen-archive/src/binaryen_stubs_heap_types.js +0 -65
- binaryen-archive/src/binaryen_stubs_ops.js +0 -1895
- /binaryen-archive/esy.lock/overrides/{opam__s__ocamlbuild_opam__c__0.14.2_opam_override → opam__s__ocamlbuild_opam__c__0.14.2+win_opam_override}/files/winpatch.patch +0 -0
- /binaryen-archive/esy.lock/overrides/{opam__s__ocamlbuild_opam__c__0.14.2_opam_override → opam__s__ocamlbuild_opam__c__0.14.2+win_opam_override}/package.json +0 -0
- /binaryen-archive/esy.lock/overrides/{opam__s__ocamlfind_opam__c__1.9.5_opam_override → opam__s__ocamlfind_opam__c__1.9.6_opam_override}/package.json +0 -0
- /binaryen-archive/src/{binaryen_stubs_exports.js → export.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_functions.js → function.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_globals.js → global.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_imports.c → import.c} +0 -0
- /binaryen-archive/src/{binaryen_stubs_imports.js → import.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_literals.js → literal.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_modules.js → module.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_packed_types.c → packed_type.c} +0 -0
- /binaryen-archive/src/{binaryen_stubs_packed_types.js → packed_type.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_settings.c → settings.c} +0 -0
- /binaryen-archive/src/{binaryen_stubs_settings.js → settings.js} +0 -0
- /binaryen-archive/src/{binaryen_stubs_tables.js → table.js} +0 -0
|
@@ -10,8 +10,8 @@ build: [
|
|
|
10
10
|
["dune" "build" "-p" name "-j" jobs]
|
|
11
11
|
]
|
|
12
12
|
depends: [
|
|
13
|
-
"ocaml" {>= "4.
|
|
14
|
-
"base" {>= "v0.
|
|
13
|
+
"ocaml" {>= "4.14.0"}
|
|
14
|
+
"base" {>= "v0.16" & < "v0.17"}
|
|
15
15
|
"dune" {>= "2.0.0"}
|
|
16
16
|
]
|
|
17
17
|
synopsis: "Standard IO library for OCaml"
|
|
@@ -22,6 +22,6 @@ It re-exports the input/output functions of the OCaml standard
|
|
|
22
22
|
libraries using a more consistent API.
|
|
23
23
|
"
|
|
24
24
|
url {
|
|
25
|
-
src: "https://ocaml.janestreet.com/ocaml-core/v0.
|
|
26
|
-
checksum: "sha256=
|
|
25
|
+
src: "https://ocaml.janestreet.com/ocaml-core/v0.16/files/stdio-v0.16.0.tar.gz"
|
|
26
|
+
checksum: "sha256=61f0b75950614ac5378c6ec0d822cce6463402d919d5810b736fc46522b3a73e"
|
|
27
27
|
}
|
|
@@ -35,10 +35,10 @@ build: [
|
|
|
35
35
|
]
|
|
36
36
|
]
|
|
37
37
|
url {
|
|
38
|
-
src: "https://github.com/ocaml/dune/releases/download/3.
|
|
38
|
+
src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
|
|
39
39
|
checksum: [
|
|
40
|
-
"sha256=
|
|
41
|
-
"sha512=
|
|
40
|
+
"sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
|
|
41
|
+
"sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
|
|
42
42
|
]
|
|
43
43
|
}
|
|
44
|
-
x-commit-hash: "
|
|
44
|
+
x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
|
|
@@ -41,7 +41,7 @@ depends: [
|
|
|
41
41
|
build: ["ocaml" "pkg/pkg.ml" "build" "--pkg-name" name "--dev-pkg" "%{dev}%"]
|
|
42
42
|
dev-repo: "git+https://erratique.ch/repos/topkg.git"
|
|
43
43
|
url {
|
|
44
|
-
src: "https://erratique.ch/software/topkg/releases/topkg-1.0.
|
|
44
|
+
src: "https://erratique.ch/software/topkg/releases/topkg-1.0.7.tbz"
|
|
45
45
|
checksum:
|
|
46
|
-
"sha512=
|
|
46
|
+
"sha512=09e59f1759bf4db8471f02d0aefd8db602b44932a291c05c312b1423796e7a15d1598d3c62a0cec7f083eff8e410fac09363533dc4bd2120914bb9664efea535"
|
|
47
47
|
}
|
|
@@ -30,10 +30,10 @@ build: [
|
|
|
30
30
|
]
|
|
31
31
|
]
|
|
32
32
|
url {
|
|
33
|
-
src: "https://github.com/ocaml/dune/releases/download/3.
|
|
33
|
+
src: "https://github.com/ocaml/dune/releases/download/3.9.1/dune-3.9.1.tbz"
|
|
34
34
|
checksum: [
|
|
35
|
-
"sha256=
|
|
36
|
-
"sha512=
|
|
35
|
+
"sha256=f0c3ce49f36c733b8aee72611f107cf06de6bc423be7262aab1bb3f03c05a878"
|
|
36
|
+
"sha512=105ea325a3a9d0c51e64d440d7f13f2231c5d0a56ea0bc334b3a39db4644499153823456f5d7b20f8bec724b3ceaace7c1718c3b941c300135769d01bb663979"
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
|
-
x-commit-hash: "
|
|
39
|
+
x-commit-hash: "3276f90725e4423790a43065cc51ddbbba61eb89"
|
|
@@ -1,38 +1,48 @@
|
|
|
1
1
|
opam-version: "2.0"
|
|
2
|
-
|
|
2
|
+
synopsis:
|
|
3
|
+
"Yojson is an optimized parsing and printing library for the JSON format"
|
|
4
|
+
description: """
|
|
5
|
+
Yojson is an optimized parsing and printing library for the JSON format.
|
|
6
|
+
|
|
7
|
+
ydump is a pretty-printing command-line program provided with the
|
|
8
|
+
yojson package."""
|
|
9
|
+
maintainer: [
|
|
10
|
+
"paul-elliot@tarides.com" "nathan@tarides.com" "marek@tarides.com"
|
|
11
|
+
]
|
|
3
12
|
authors: ["Martin Jambon"]
|
|
13
|
+
license: "BSD-3-Clause"
|
|
4
14
|
homepage: "https://github.com/ocaml-community/yojson"
|
|
15
|
+
doc: "https://ocaml-community.github.io/yojson"
|
|
5
16
|
bug-reports: "https://github.com/ocaml-community/yojson/issues"
|
|
6
|
-
dev-repo: "git+https://github.com/ocaml-community/yojson.git"
|
|
7
|
-
doc: "https://ocaml-community.github.io/yojson/"
|
|
8
|
-
license: "BSD-3-Clause"
|
|
9
|
-
build: [
|
|
10
|
-
["dune" "subst"] {dev}
|
|
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}
|
|
14
|
-
]
|
|
15
17
|
depends: [
|
|
18
|
+
"dune" {>= "2.7"}
|
|
16
19
|
"ocaml" {>= "4.02.3"}
|
|
17
|
-
"dune" {>= "2.0"}
|
|
18
20
|
"cppo" {build}
|
|
19
21
|
"alcotest" {with-test & >= "0.8.5"}
|
|
20
|
-
"odoc" {with-doc}
|
|
21
22
|
"seq" {>= "0.2.2"}
|
|
23
|
+
"odoc" {with-doc}
|
|
22
24
|
]
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
build: [
|
|
26
|
+
["dune" "subst"] {dev}
|
|
27
|
+
[
|
|
28
|
+
"dune"
|
|
29
|
+
"build"
|
|
30
|
+
"-p"
|
|
31
|
+
name
|
|
32
|
+
"-j"
|
|
33
|
+
jobs
|
|
34
|
+
"@install"
|
|
35
|
+
"@runtest" {with-test}
|
|
36
|
+
"@doc" {with-doc}
|
|
37
|
+
]
|
|
38
|
+
]
|
|
39
|
+
dev-repo: "git+https://github.com/ocaml-community/yojson.git"
|
|
30
40
|
url {
|
|
31
41
|
src:
|
|
32
|
-
"https://github.com/ocaml-community/yojson/releases/download/2.0
|
|
42
|
+
"https://github.com/ocaml-community/yojson/releases/download/2.1.0/yojson-2.1.0.tbz"
|
|
33
43
|
checksum: [
|
|
34
|
-
"sha256=
|
|
35
|
-
"sha512=
|
|
44
|
+
"sha256=9fcb1ff2db58ab259f9228796b0ada4794eae97177b1833371380c4e4f90b15d"
|
|
45
|
+
"sha512=31ab8580e0e4e8a05459fbec2fb9424a3df4cf5aef6df21fc577dbe3d32e81103a632c6a511c4dcf1f51819e88b38d2ce7d6888545bc3f359e69e070f8d2e69c"
|
|
36
46
|
]
|
|
37
47
|
}
|
|
38
|
-
x-commit-hash: "
|
|
48
|
+
x-commit-hash: "42fa0887cb870bdbd1751d98cd23f99d6b29751d"
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
--- ./Makefile
|
|
2
|
+
+++ ./Makefile
|
|
3
|
+
@@ -55,7 +55,7 @@
|
|
4
|
+
export USE_CYGPATH; \
|
|
5
|
+
cat findlib.conf.in | \
|
|
6
|
+
$(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' | \
|
|
7
|
+
- $(SH) tools/patch '@FINDLIB_PATH@' '$(FINDLIB_PATH)' -p >findlib.conf
|
|
8
|
+
+ $(SH) tools/patch '@FINDLIB_PATH@' '$(FINDLIB_PATH)' >findlib.conf
|
|
9
|
+
if ./tools/cmd_from_same_dir ocamlc; then \
|
|
10
|
+
echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \
|
|
11
|
+
fi
|
binaryen-archive/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grain/binaryen.ml",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "OCaml bindings for Binaryen.",
|
|
5
5
|
"author": "Oscar Spencer <oscar@grain-lang.org>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"ocaml": ">= 4.12.0",
|
|
9
|
-
"@grain/libbinaryen": ">=
|
|
9
|
+
"@grain/libbinaryen": ">= 112.0.0 < 113.0.0",
|
|
10
10
|
"@opam/dune": ">= 3.0.0",
|
|
11
11
|
"@opam/dune-configurator": ">= 3.0.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@opam/js_of_ocaml-compiler": ">= 4.1.0 <
|
|
14
|
+
"@opam/js_of_ocaml-compiler": ">= 4.1.0 < 6.0.0",
|
|
15
15
|
"@opam/ocamlformat": "0.24.1",
|
|
16
16
|
"@opam/ocaml-lsp-server": ">= 1.9.1 < 1.13.0"
|
|
17
17
|
},
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#define CAML_NAME_SPACE
|
|
2
|
+
#include <caml/mlvalues.h>
|
|
3
|
+
#include <caml/fail.h>
|
|
4
|
+
#include <caml/memory.h>
|
|
5
|
+
|
|
6
|
+
#include "binaryen-c.h"
|
|
7
|
+
#include "ocaml_helpers.h"
|
|
8
|
+
|
|
9
|
+
CAMLprim value
|
|
10
|
+
caml_binaryen_array_type_get_element_type(value _heapType) {
|
|
11
|
+
CAMLparam1(_heapType);
|
|
12
|
+
BinaryenHeapType heapType = BinaryenHeapType_val(_heapType);
|
|
13
|
+
BinaryenType ty = BinaryenArrayTypeGetElementType(heapType);
|
|
14
|
+
CAMLreturn(alloc_BinaryenType(ty));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
CAMLprim value
|
|
18
|
+
caml_binaryen_array_type_get_element_packed_type(value _heapType) {
|
|
19
|
+
CAMLparam1(_heapType);
|
|
20
|
+
BinaryenHeapType heapType = BinaryenHeapType_val(_heapType);
|
|
21
|
+
CAMLreturn(Val_int(BinaryenArrayTypeGetElementPackedType(heapType)));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
CAMLprim value
|
|
25
|
+
caml_binaryen_array_type_is_element_mutable(value _heapType) {
|
|
26
|
+
CAMLparam1(_heapType);
|
|
27
|
+
BinaryenHeapType heapType = BinaryenHeapType_val(_heapType);
|
|
28
|
+
CAMLreturn(Val_bool(BinaryenArrayTypeIsElementMutable(heapType)));
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//Provides: caml_binaryen_array_type_get_element_type
|
|
2
|
+
//Requires: Binaryen
|
|
3
|
+
function caml_binaryen_array_type_get_element_type(heapType) {
|
|
4
|
+
return Binaryen._BinaryenArrayTypeGetElementType(heapType);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
//Provides: caml_binaryen_array_type_get_element_packed_type
|
|
8
|
+
//Requires: Binaryen
|
|
9
|
+
function caml_binaryen_array_type_get_element_packed_type(heapType) {
|
|
10
|
+
return Binaryen._BinaryenArrayTypeGetElementPackedType(heapType);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//Provides: caml_binaryen_array_type_is_element_mutable
|
|
14
|
+
//Requires: Binaryen
|
|
15
|
+
function caml_binaryen_array_type_is_element_mutable(heapType) {
|
|
16
|
+
return Binaryen._BinaryenArrayTypeIsElementMutable(heapType);
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
external get_element_type : Heap_type.t -> Type.t
|
|
2
|
+
= "caml_binaryen_array_type_get_element_type"
|
|
3
|
+
|
|
4
|
+
external get_element_packed_type : Heap_type.t -> Packed_type.t
|
|
5
|
+
= "caml_binaryen_array_type_get_element_packed_type"
|
|
6
|
+
|
|
7
|
+
external is_element_mutable : Heap_type.t -> bool
|
|
8
|
+
= "caml_binaryen_array_type_is_element_mutable"
|
binaryen-archive/src/dune
CHANGED
|
@@ -5,39 +5,45 @@
|
|
|
5
5
|
(foreign_stubs
|
|
6
6
|
(language c)
|
|
7
7
|
(names
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
array_type
|
|
9
|
+
type
|
|
10
|
+
op
|
|
11
|
+
literal
|
|
12
|
+
expression
|
|
13
|
+
function
|
|
14
|
+
import
|
|
15
|
+
export
|
|
16
|
+
global
|
|
17
|
+
table
|
|
18
|
+
memory
|
|
19
|
+
module_feature
|
|
20
|
+
module
|
|
21
|
+
settings
|
|
22
|
+
packed_type
|
|
23
|
+
heap_type
|
|
24
|
+
signature_type
|
|
25
|
+
struct_type
|
|
26
|
+
type_system
|
|
24
27
|
ocaml_helpers)
|
|
25
28
|
(flags :standard -O2 -Wall -Wextra))
|
|
26
29
|
(js_of_ocaml
|
|
27
30
|
(javascript_files
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
array_type.js
|
|
32
|
+
type.js
|
|
33
|
+
op.js
|
|
34
|
+
literal.js
|
|
35
|
+
expression.js
|
|
36
|
+
function.js
|
|
37
|
+
import.js
|
|
38
|
+
export.js
|
|
39
|
+
global.js
|
|
40
|
+
table.js
|
|
41
|
+
memory.js
|
|
42
|
+
module_feature.js
|
|
43
|
+
module.js
|
|
44
|
+
settings.js
|
|
45
|
+
packed_type.js
|
|
46
|
+
heap_type.js
|
|
47
|
+
signature_type.js
|
|
48
|
+
struct_type.js
|
|
49
|
+
type_system.js)))
|
|
@@ -8,14 +8,6 @@
|
|
|
8
8
|
#include "ocaml_helpers.h"
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
/* Allocating an OCaml custom block to hold the given BinaryenExportRef */
|
|
12
|
-
static value alloc_BinaryenExportRef(BinaryenExportRef exp)
|
|
13
|
-
{
|
|
14
|
-
value v = caml_alloc_custom(&binaryen_ops, sizeof(BinaryenExportRef), 0, 1);
|
|
15
|
-
BinaryenExportRef_val(v) = exp;
|
|
16
|
-
return v;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
11
|
CAMLprim value
|
|
20
12
|
caml_binaryen_add_function_export(value _module, value _internalName, value _externalName) {
|
|
21
13
|
CAMLparam3(_module, _internalName, _externalName);
|
|
@@ -7,15 +7,6 @@
|
|
|
7
7
|
#include "binaryen-c.h"
|
|
8
8
|
#include "ocaml_helpers.h"
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
/* Allocating an OCaml custom block to hold the given BinaryenExpressionRef */
|
|
12
|
-
static value alloc_BinaryenExpressionRef(BinaryenExpressionRef exp)
|
|
13
|
-
{
|
|
14
|
-
value v = caml_alloc_custom(&binaryen_ops, sizeof(BinaryenExpressionRef), 0, 1);
|
|
15
|
-
BinaryenExpressionRef_val(v) = exp;
|
|
16
|
-
return v;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
10
|
CAMLprim value
|
|
20
11
|
caml_binaryen_expression_get_id(value _expr) {
|
|
21
12
|
CAMLparam1(_expr);
|
|
@@ -450,6 +441,25 @@ caml_binaryen_pop(value _module, value _ty) {
|
|
|
450
441
|
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
451
442
|
}
|
|
452
443
|
|
|
444
|
+
CAMLprim value
|
|
445
|
+
caml_binaryen_i31_new(value _module, value _val) {
|
|
446
|
+
CAMLparam2(_module, _val);
|
|
447
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
448
|
+
BinaryenExpressionRef val = BinaryenExpressionRef_val(_val);
|
|
449
|
+
BinaryenExpressionRef exp = BinaryenI31New(module, val);
|
|
450
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
CAMLprim value
|
|
454
|
+
caml_binaryen_i31_get(value _module, value _val, value _signed) {
|
|
455
|
+
CAMLparam3(_module, _val, _signed);
|
|
456
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
457
|
+
BinaryenExpressionRef val = BinaryenExpressionRef_val(_val);
|
|
458
|
+
bool isSigned = Bool_val(_signed);
|
|
459
|
+
BinaryenExpressionRef exp = BinaryenI31Get(module, val, isSigned);
|
|
460
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
461
|
+
}
|
|
462
|
+
|
|
453
463
|
CAMLprim value
|
|
454
464
|
caml_binaryen_expression_id_invalid(value unit) {
|
|
455
465
|
CAMLparam1(unit);
|
|
@@ -662,9 +672,9 @@ caml_binaryen_expression_id_ref_null(value unit) {
|
|
|
662
672
|
CAMLreturn(Val_int(BinaryenRefNullId()));
|
|
663
673
|
}
|
|
664
674
|
CAMLprim value
|
|
665
|
-
|
|
675
|
+
caml_binaryen_expression_id_ref_is_null(value unit) {
|
|
666
676
|
CAMLparam1(unit);
|
|
667
|
-
CAMLreturn(Val_int(
|
|
677
|
+
CAMLreturn(Val_int(BinaryenRefIsNullId()));
|
|
668
678
|
}
|
|
669
679
|
CAMLprim value
|
|
670
680
|
caml_binaryen_expression_id_ref_as(value unit) {
|
|
@@ -1836,12 +1846,11 @@ caml_binaryen_ref_null(value _module, value _ty) {
|
|
|
1836
1846
|
}
|
|
1837
1847
|
|
|
1838
1848
|
CAMLprim value
|
|
1839
|
-
|
|
1840
|
-
|
|
1849
|
+
caml_binaryen_ref_is_null(value _module, value _value) {
|
|
1850
|
+
CAMLparam2(_module, _value);
|
|
1841
1851
|
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1842
|
-
BinaryenOp op = BinaryenOp_val(_op);
|
|
1843
1852
|
BinaryenExpressionRef val = BinaryenExpressionRef_val(_value);
|
|
1844
|
-
BinaryenExpressionRef exp =
|
|
1853
|
+
BinaryenExpressionRef exp = BinaryenRefIsNull(module, val);
|
|
1845
1854
|
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1846
1855
|
}
|
|
1847
1856
|
|
|
@@ -541,6 +541,20 @@ function caml_binaryen_pop(wasm_mod, typ) {
|
|
|
541
541
|
return Binaryen._BinaryenPop(wasm_mod, typ);
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
+
//Provides: caml_binaryen_i31_new
|
|
545
|
+
function caml_binaryen_i31_new(wasm_mod, typ) {
|
|
546
|
+
return wasm_mod.i31.new(typ);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
//Provides: caml_binaryen_i31_get
|
|
550
|
+
function caml_binaryen_i31_get(wasm_mod, typ, signed) {
|
|
551
|
+
if (signed) {
|
|
552
|
+
return wasm_mod.i31.get_s(typ);
|
|
553
|
+
} else {
|
|
554
|
+
return wasm_mod.i31.get_u(typ);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
544
558
|
//Provides: caml_binaryen_expression_id_invalid
|
|
545
559
|
//Requires: Binaryen
|
|
546
560
|
function caml_binaryen_expression_id_invalid() {
|
|
@@ -752,10 +766,10 @@ function caml_binaryen_expression_id_pop() {
|
|
|
752
766
|
function caml_binaryen_expression_id_ref_null() {
|
|
753
767
|
return Binaryen.RefNullId;
|
|
754
768
|
}
|
|
755
|
-
//Provides:
|
|
769
|
+
//Provides: caml_binaryen_expression_id_ref_is_null
|
|
756
770
|
//Requires: Binaryen
|
|
757
|
-
function
|
|
758
|
-
return Binaryen.
|
|
771
|
+
function caml_binaryen_expression_id_ref_is_null() {
|
|
772
|
+
return Binaryen.RefIsNullId;
|
|
759
773
|
}
|
|
760
774
|
//Provides: caml_binaryen_expression_id_ref_as
|
|
761
775
|
//Requires: Binaryen
|
|
@@ -1664,10 +1678,10 @@ function caml_binaryen_ref_null(wasm_mod, typ) {
|
|
|
1664
1678
|
return wasm_mod.ref.null(typ);
|
|
1665
1679
|
}
|
|
1666
1680
|
|
|
1667
|
-
//Provides:
|
|
1681
|
+
//Provides: caml_binaryen_ref_is_null
|
|
1668
1682
|
//Requires: Binaryen
|
|
1669
|
-
function
|
|
1670
|
-
return Binaryen.
|
|
1683
|
+
function caml_binaryen_ref_is_null(wasm_mod, value) {
|
|
1684
|
+
return Binaryen.ExpressionIds.RefIsNull(wasm_mod, value);
|
|
1671
1685
|
}
|
|
1672
1686
|
|
|
1673
1687
|
//Provides: caml_binaryen_ref_as
|
|
@@ -251,9 +251,10 @@ external id_ref_null : unit -> int = "caml_binaryen_expression_id_ref_null"
|
|
|
251
251
|
|
|
252
252
|
let id_ref_null = id_ref_null ()
|
|
253
253
|
|
|
254
|
-
external
|
|
254
|
+
external id_ref_is_null : unit -> int
|
|
255
|
+
= "caml_binaryen_expression_id_ref_is_null"
|
|
255
256
|
|
|
256
|
-
let
|
|
257
|
+
let id_ref_is_null = id_ref_is_null ()
|
|
257
258
|
|
|
258
259
|
external id_ref_func : unit -> int = "caml_binaryen_expression_id_ref_func"
|
|
259
260
|
|
|
@@ -385,7 +386,7 @@ let get_kind expr =
|
|
|
385
386
|
| n when n = id_unreachable -> Unreachable
|
|
386
387
|
| n when n = id_pop -> Pop
|
|
387
388
|
| n when n = id_ref_null -> RefNull
|
|
388
|
-
| n when n =
|
|
389
|
+
| n when n = id_ref_is_null -> RefIs
|
|
389
390
|
| n when n = id_ref_func -> RefFunc
|
|
390
391
|
| n when n = id_ref_eq -> RefEq
|
|
391
392
|
| n when n = id_try -> Try
|
|
@@ -799,6 +800,14 @@ module Pop = struct
|
|
|
799
800
|
(** Module, type *)
|
|
800
801
|
end
|
|
801
802
|
|
|
803
|
+
module I31 = struct
|
|
804
|
+
external make : Module.t -> t -> t = "caml_binaryen_i31_new"
|
|
805
|
+
(** Module, value *)
|
|
806
|
+
|
|
807
|
+
external get : Module.t -> t -> bool -> t = "caml_binaryen_i31_get"
|
|
808
|
+
(** Module, i31, is_signed *)
|
|
809
|
+
end
|
|
810
|
+
|
|
802
811
|
module Null = struct
|
|
803
812
|
external make : unit -> t = "caml_binaryen_null_expression"
|
|
804
813
|
(** A null reference. *)
|
|
@@ -808,8 +817,8 @@ module Ref = struct
|
|
|
808
817
|
external null : Module.t -> Type.t -> t = "caml_binaryen_ref_null"
|
|
809
818
|
(** Module, type *)
|
|
810
819
|
|
|
811
|
-
external
|
|
812
|
-
(** Module,
|
|
820
|
+
external is_null : Module.t -> t -> t = "caml_binaryen_ref_is_null"
|
|
821
|
+
(** Module, value *)
|
|
813
822
|
|
|
814
823
|
external as_ : Module.t -> Op.t -> t -> t = "caml_binaryen_ref_as"
|
|
815
824
|
(** Module, op, value *)
|
|
@@ -321,6 +321,14 @@ module Pop : sig
|
|
|
321
321
|
val make : Module.t -> Type.t -> t
|
|
322
322
|
end
|
|
323
323
|
|
|
324
|
+
module I31 : sig
|
|
325
|
+
val make : Module.t -> t -> t
|
|
326
|
+
(** Module, value *)
|
|
327
|
+
|
|
328
|
+
val get : Module.t -> t -> bool -> t
|
|
329
|
+
(** Module, i31, is_signed *)
|
|
330
|
+
end
|
|
331
|
+
|
|
324
332
|
module Null : sig
|
|
325
333
|
val make : unit -> t
|
|
326
334
|
end
|
|
@@ -329,8 +337,8 @@ module Ref : sig
|
|
|
329
337
|
val null : Module.t -> Type.t -> t
|
|
330
338
|
(** Module, type *)
|
|
331
339
|
|
|
332
|
-
val
|
|
333
|
-
(** Module,
|
|
340
|
+
val is_null : Module.t -> t -> t
|
|
341
|
+
(** Module, value *)
|
|
334
342
|
|
|
335
343
|
val as_ : Module.t -> Op.t -> t -> t
|
|
336
344
|
(** Module, op, value *)
|
|
@@ -8,30 +8,6 @@
|
|
|
8
8
|
#include "ocaml_helpers.h"
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
/* Allocating an OCaml custom block to hold the given BinaryenFunctionRef */
|
|
12
|
-
static value alloc_BinaryenFunctionRef(BinaryenFunctionRef fun)
|
|
13
|
-
{
|
|
14
|
-
value v = caml_alloc_custom(&binaryen_ops, sizeof(BinaryenFunctionRef), 0, 1);
|
|
15
|
-
BinaryenFunctionRef_val(v) = fun;
|
|
16
|
-
return v;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* Allocating an OCaml custom block to hold the given BinaryenExpressionRef */
|
|
20
|
-
static value alloc_BinaryenExpressionRef(BinaryenExpressionRef exp)
|
|
21
|
-
{
|
|
22
|
-
value v = caml_alloc_custom(&binaryen_ops, sizeof(BinaryenExpressionRef), 0, 1);
|
|
23
|
-
BinaryenExpressionRef_val(v) = exp;
|
|
24
|
-
return v;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Allocating an OCaml custom block to hold the given BinaryenType */
|
|
28
|
-
static value alloc_BinaryenType(BinaryenType typ)
|
|
29
|
-
{
|
|
30
|
-
value v = caml_alloc_custom(&binaryen_ops, sizeof(BinaryenType), 0, 1);
|
|
31
|
-
BinaryenType_val(v) = typ;
|
|
32
|
-
return v;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
11
|
CAMLprim value
|
|
36
12
|
caml_binaryen_add_function(value _module, value _name, value _params, value _results, value _locals, value _body) {
|
|
37
13
|
CAMLparam5(_module, _name, _params, _results, _locals);
|
|
@@ -7,31 +7,6 @@
|
|
|
7
7
|
#include "binaryen-c.h"
|
|
8
8
|
#include "ocaml_helpers.h"
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
/* Allocating an OCaml custom block to hold the given BinaryenGlobalRef */
|
|
12
|
-
static value alloc_BinaryenGlobalRef(BinaryenGlobalRef exp)
|
|
13
|
-
{
|
|
14
|
-
value v = caml_alloc_custom(&binaryen_ops, sizeof(BinaryenGlobalRef), 0, 1);
|
|
15
|
-
BinaryenGlobalRef_val(v) = exp;
|
|
16
|
-
return v;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* Allocating an OCaml custom block to hold the given BinaryenType */
|
|
20
|
-
static value alloc_BinaryenType(BinaryenType typ)
|
|
21
|
-
{
|
|
22
|
-
value v = caml_alloc_custom(&binaryen_ops, sizeof(BinaryenType), 0, 1);
|
|
23
|
-
BinaryenType_val(v) = typ;
|
|
24
|
-
return v;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/* Allocating an OCaml custom block to hold the given BinaryenExpressionRef */
|
|
28
|
-
static value alloc_BinaryenExpressionRef(BinaryenExpressionRef exp)
|
|
29
|
-
{
|
|
30
|
-
value v = caml_alloc_custom(&binaryen_ops, sizeof(BinaryenExpressionRef), 0, 1);
|
|
31
|
-
BinaryenExpressionRef_val(v) = exp;
|
|
32
|
-
return v;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
10
|
CAMLprim value
|
|
36
11
|
caml_binaryen_add_global(value _module, value _name, value _ty, value _mutable_, value _init) {
|
|
37
12
|
CAMLparam5(_module, _name, _ty, _mutable_, _init);
|