@grain/binaryen.ml 0.32.0 → 0.34.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 +25 -0
- binaryen-archive/binaryen.opam +2 -2
- binaryen-archive/esy.lock/index.json +18 -18
- binaryen-archive/esy.lock/opam/{topkg.1.1.0 → topkg.1.1.1}/opam +2 -2
- binaryen-archive/package.json +2 -2
- binaryen-archive/src/expression.c +1 -1
- binaryen-archive/src/expression.ml +2 -1
- binaryen-archive/src/expression.mli +1 -1
- binaryen-archive/src/function.c +8 -0
- binaryen-archive/src/function.js +5 -0
- binaryen-archive/src/function.ml +1 -0
- binaryen-archive/src/function.mli +1 -0
- binaryen-archive/src/module.ml +30 -8
- binaryen-archive/src/module.mli +7 -2
- binaryen-archive/src/module_feature.c +40 -10
- binaryen-archive/src/module_feature.js +42 -12
- binaryen-archive/src/passes.ml +93 -15
- binaryen-archive/src/passes.mli +89 -15
- binaryen-archive/src/settings.c +135 -0
- binaryen-archive/src/settings.js +131 -0
- binaryen-archive/src/settings.ml +45 -0
- binaryen-archive/src/settings.mli +18 -0
- binaryen-archive/test/test.ml +69 -4
binaryen-archive/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.34.0](https://github.com/grain-lang/binaryen.ml/compare/v0.33.0...v0.34.0) (2025-11-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* Update Passes api for Binaryen v124
|
|
9
|
+
* Upgrade to Binaryen v124 ([#241](https://github.com/grain-lang/binaryen.ml/issues/241))
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Update Passes api for Binaryen v124 ([305137a](https://github.com/grain-lang/binaryen.ml/commit/305137a264049f3f38bf8828c57aad190195ca49))
|
|
14
|
+
* Upgrade to Binaryen v124 ([#241](https://github.com/grain-lang/binaryen.ml/issues/241)) ([02829f8](https://github.com/grain-lang/binaryen.ml/commit/02829f805cd3133bb4b04c83abac8380996bd0ec))
|
|
15
|
+
|
|
16
|
+
## [0.33.0](https://github.com/grain-lang/binaryen.ml/compare/v0.32.0...v0.33.0) (2025-11-12)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### ⚠ BREAKING CHANGES
|
|
20
|
+
|
|
21
|
+
* Upgrade to Binaryen v123 ([#256](https://github.com/grain-lang/binaryen.ml/issues/256))
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* Implement optimization settings api ([#243](https://github.com/grain-lang/binaryen.ml/issues/243)) ([1f25caf](https://github.com/grain-lang/binaryen.ml/commit/1f25cafc96a1f6969a1ecca8ea778aeefae893a8))
|
|
26
|
+
* Upgrade to Binaryen v123 ([#256](https://github.com/grain-lang/binaryen.ml/issues/256)) ([dd6bfa7](https://github.com/grain-lang/binaryen.ml/commit/dd6bfa7bd1c072b33bbc1731a046d169ceb9ea39))
|
|
27
|
+
|
|
3
28
|
## [0.32.0](https://github.com/grain-lang/binaryen.ml/compare/v0.31.0...v0.32.0) (2025-11-12)
|
|
4
29
|
|
|
5
30
|
|
binaryen-archive/binaryen.opam
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
opam-version: "2.0"
|
|
2
|
-
version: "0.
|
|
2
|
+
version: "0.34.0"
|
|
3
3
|
synopsis: "OCaml bindings for Binaryen"
|
|
4
4
|
maintainer: "oscar@grain-lang.org"
|
|
5
5
|
author: "Oscar Spencer"
|
|
@@ -16,6 +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" {>= "
|
|
19
|
+
"libbinaryen" {>= "124.0.1" < "125.0.0"}
|
|
20
20
|
]
|
|
21
21
|
x-maintenance-intent: ["0.(latest)"]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"checksum": "
|
|
2
|
+
"checksum": "43b607828957b76c0263dc0b329d0237",
|
|
3
3
|
"root": "@grain/binaryen.ml@link-dev:./package.json",
|
|
4
4
|
"node": {
|
|
5
5
|
"ocaml@5.3.0@d41d8cd9": {
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
},
|
|
103
103
|
"overrides": [],
|
|
104
104
|
"dependencies": [
|
|
105
|
-
"ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.
|
|
105
|
+
"ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.1@2377d2f8",
|
|
106
106
|
"@opam/ocamlfind@opam:1.9.8@ee910ff5",
|
|
107
107
|
"@opam/ocamlbuild@opam:0.16.1@b3fc8209",
|
|
108
108
|
"@opam/cmdliner@opam:1.3.0@8e6dd99f",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"overrides": [],
|
|
136
136
|
"dependencies": [
|
|
137
137
|
"ocaml@5.3.0@d41d8cd9", "@opam/uutf@opam:1.0.4@ba7fbef7",
|
|
138
|
-
"@opam/uucp@opam:17.0.0@843de755", "@opam/topkg@opam:1.1.
|
|
138
|
+
"@opam/uucp@opam:17.0.0@843de755", "@opam/topkg@opam:1.1.1@2377d2f8",
|
|
139
139
|
"@opam/ocamlfind@opam:1.9.8@ee910ff5",
|
|
140
140
|
"@opam/ocamlbuild@opam:0.16.1@b3fc8209",
|
|
141
141
|
"@opam/cmdliner@opam:1.3.0@8e6dd99f",
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
},
|
|
170
170
|
"overrides": [],
|
|
171
171
|
"dependencies": [
|
|
172
|
-
"ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.
|
|
172
|
+
"ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.1@2377d2f8",
|
|
173
173
|
"@opam/ocamlfind@opam:1.9.8@ee910ff5",
|
|
174
174
|
"@opam/ocamlbuild@opam:0.16.1@b3fc8209",
|
|
175
175
|
"@opam/cmdliner@opam:1.3.0@8e6dd99f",
|
|
@@ -183,20 +183,20 @@
|
|
|
183
183
|
[ "windows", "x86_64" ]
|
|
184
184
|
]
|
|
185
185
|
},
|
|
186
|
-
"@opam/topkg@opam:1.1.
|
|
187
|
-
"id": "@opam/topkg@opam:1.1.
|
|
186
|
+
"@opam/topkg@opam:1.1.1@2377d2f8": {
|
|
187
|
+
"id": "@opam/topkg@opam:1.1.1@2377d2f8",
|
|
188
188
|
"name": "@opam/topkg",
|
|
189
|
-
"version": "opam:1.1.
|
|
189
|
+
"version": "opam:1.1.1",
|
|
190
190
|
"source": {
|
|
191
191
|
"type": "install",
|
|
192
192
|
"source": [
|
|
193
|
-
"archive:https://opam.ocaml.org/cache/sha512/
|
|
194
|
-
"archive:https://erratique.ch/software/topkg/releases/topkg-1.1.
|
|
193
|
+
"archive:https://opam.ocaml.org/cache/sha512/c3/c36c549a362ddf5b7fe3f6ff91c79b7ab531c43633bb9737576370bcbd69db7e1625d247c278a869b503d45a175e9753231ccf595e5bfa4e3b7e2602ac3d3b42#sha512:c36c549a362ddf5b7fe3f6ff91c79b7ab531c43633bb9737576370bcbd69db7e1625d247c278a869b503d45a175e9753231ccf595e5bfa4e3b7e2602ac3d3b42",
|
|
194
|
+
"archive:https://erratique.ch/software/topkg/releases/topkg-1.1.1.tbz#sha512:c36c549a362ddf5b7fe3f6ff91c79b7ab531c43633bb9737576370bcbd69db7e1625d247c278a869b503d45a175e9753231ccf595e5bfa4e3b7e2602ac3d3b42"
|
|
195
195
|
],
|
|
196
196
|
"opam": {
|
|
197
197
|
"name": "topkg",
|
|
198
|
-
"version": "1.1.
|
|
199
|
-
"path": "esy.lock/opam/topkg.1.1.
|
|
198
|
+
"version": "1.1.1",
|
|
199
|
+
"path": "esy.lock/opam/topkg.1.1.1"
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
202
|
"overrides": [],
|
|
@@ -1394,7 +1394,7 @@
|
|
|
1394
1394
|
},
|
|
1395
1395
|
"overrides": [],
|
|
1396
1396
|
"dependencies": [
|
|
1397
|
-
"ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.
|
|
1397
|
+
"ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.1@2377d2f8",
|
|
1398
1398
|
"@opam/ocamlfind@opam:1.9.8@ee910ff5",
|
|
1399
1399
|
"@opam/ocamlbuild@opam:0.16.1@b3fc8209",
|
|
1400
1400
|
"@opam/astring@opam:0.8.5@9975798d",
|
|
@@ -1947,7 +1947,7 @@
|
|
|
1947
1947
|
},
|
|
1948
1948
|
"overrides": [],
|
|
1949
1949
|
"dependencies": [
|
|
1950
|
-
"ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.
|
|
1950
|
+
"ocaml@5.3.0@d41d8cd9", "@opam/topkg@opam:1.1.1@2377d2f8",
|
|
1951
1951
|
"@opam/ocamlfind@opam:1.9.8@ee910ff5",
|
|
1952
1952
|
"@opam/ocamlbuild@opam:0.16.1@b3fc8209",
|
|
1953
1953
|
"@esy-ocaml/substs@0.0.1@d41d8cd9"
|
|
@@ -1960,14 +1960,14 @@
|
|
|
1960
1960
|
[ "windows", "x86_64" ]
|
|
1961
1961
|
]
|
|
1962
1962
|
},
|
|
1963
|
-
"@grain/libbinaryen@
|
|
1964
|
-
"id": "@grain/libbinaryen@
|
|
1963
|
+
"@grain/libbinaryen@124.0.1@d41d8cd9": {
|
|
1964
|
+
"id": "@grain/libbinaryen@124.0.1@d41d8cd9",
|
|
1965
1965
|
"name": "@grain/libbinaryen",
|
|
1966
|
-
"version": "
|
|
1966
|
+
"version": "124.0.1",
|
|
1967
1967
|
"source": {
|
|
1968
1968
|
"type": "install",
|
|
1969
1969
|
"source": [
|
|
1970
|
-
"archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-
|
|
1970
|
+
"archive:https://registry.npmjs.org/@grain/libbinaryen/-/libbinaryen-124.0.1.tgz#sha1:7b29acc4a62ab5a849c6e01c3d8e90c78efd05f2"
|
|
1971
1971
|
]
|
|
1972
1972
|
},
|
|
1973
1973
|
"overrides": [],
|
|
@@ -1999,7 +1999,7 @@
|
|
|
1999
1999
|
"ocaml@5.3.0@d41d8cd9",
|
|
2000
2000
|
"@opam/dune-configurator@opam:3.20.2@7eb6ff01",
|
|
2001
2001
|
"@opam/dune@opam:3.20.2@8daef28d",
|
|
2002
|
-
"@grain/libbinaryen@
|
|
2002
|
+
"@grain/libbinaryen@124.0.1@d41d8cd9"
|
|
2003
2003
|
],
|
|
2004
2004
|
"devDependencies": [
|
|
2005
2005
|
"@opam/ocamlformat@opam:0.27.0@c40d4612",
|
|
@@ -43,8 +43,8 @@ depends: [
|
|
|
43
43
|
build: ["ocaml" "pkg/pkg.ml" "build" "--pkg-name" name "--dev-pkg" "%{dev}%"]
|
|
44
44
|
dev-repo: "git+https://erratique.ch/repos/topkg.git"
|
|
45
45
|
url {
|
|
46
|
-
src: "https://erratique.ch/software/topkg/releases/topkg-1.1.
|
|
46
|
+
src: "https://erratique.ch/software/topkg/releases/topkg-1.1.1.tbz"
|
|
47
47
|
checksum:
|
|
48
|
-
"sha512=
|
|
48
|
+
"sha512=c36c549a362ddf5b7fe3f6ff91c79b7ab531c43633bb9737576370bcbd69db7e1625d247c278a869b503d45a175e9753231ccf595e5bfa4e3b7e2602ac3d3b42"
|
|
49
49
|
}
|
|
50
50
|
x-maintenance-intent: ["(latest)"]
|
binaryen-archive/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grain/binaryen.ml",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.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.13.0 < 5.4.0",
|
|
9
|
-
"@grain/libbinaryen": ">=
|
|
9
|
+
"@grain/libbinaryen": ">= 124.0.0 < 125.0.0",
|
|
10
10
|
"@opam/dune": ">= 3.0.0",
|
|
11
11
|
"@opam/dune-configurator": ">= 3.0.0"
|
|
12
12
|
},
|
|
@@ -1868,7 +1868,7 @@ caml_binaryen_ref_func(value _module, value _name, value _ty) {
|
|
|
1868
1868
|
CAMLparam3(_module, _name, _ty);
|
|
1869
1869
|
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
1870
1870
|
char* name = Safe_String_val(_name);
|
|
1871
|
-
|
|
1871
|
+
BinaryenHeapType ty = BinaryenHeapType_val(_ty);
|
|
1872
1872
|
BinaryenExpressionRef exp = BinaryenRefFunc(module, name, ty);
|
|
1873
1873
|
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
1874
1874
|
}
|
|
@@ -824,7 +824,8 @@ module Ref = struct
|
|
|
824
824
|
external as_ : Module.t -> Op.t -> t -> t = "caml_binaryen_ref_as"
|
|
825
825
|
(** Module, op, value *)
|
|
826
826
|
|
|
827
|
-
external func : Module.t -> string ->
|
|
827
|
+
external func : Module.t -> string -> Heap_type.t -> t
|
|
828
|
+
= "caml_binaryen_ref_func"
|
|
828
829
|
(** Module, func, type *)
|
|
829
830
|
|
|
830
831
|
external eq : Module.t -> t -> t -> t = "caml_binaryen_ref_eq"
|
|
@@ -343,7 +343,7 @@ module Ref : sig
|
|
|
343
343
|
val as_ : Module.t -> Op.t -> t -> t
|
|
344
344
|
(** Module, op, value *)
|
|
345
345
|
|
|
346
|
-
val func : Module.t -> string ->
|
|
346
|
+
val func : Module.t -> string -> Heap_type.t -> t
|
|
347
347
|
(** Module, func, type *)
|
|
348
348
|
|
|
349
349
|
val eq : Module.t -> t -> t -> t
|
binaryen-archive/src/function.c
CHANGED
|
@@ -73,6 +73,14 @@ caml_binaryen_set_start(value _module, value _fun) {
|
|
|
73
73
|
CAMLreturn(Val_unit);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
CAMLprim value
|
|
77
|
+
caml_binaryen_get_start(value _module) {
|
|
78
|
+
CAMLparam1(_module);
|
|
79
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
80
|
+
BinaryenFunctionRef fun = BinaryenGetStart(module);
|
|
81
|
+
CAMLreturn(alloc_BinaryenFunctionRef(fun));
|
|
82
|
+
}
|
|
83
|
+
|
|
76
84
|
CAMLprim value
|
|
77
85
|
caml_binaryen_function_set_debug_location(value _fun, value _exp, value _file, value _line, value _column) {
|
|
78
86
|
CAMLparam5(_fun, _exp, _file, _line, _column);
|
binaryen-archive/src/function.js
CHANGED
|
@@ -56,6 +56,11 @@ function caml_binaryen_set_start(wasm_mod, func) {
|
|
|
56
56
|
return wasm_mod.setStart(func);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
//Provides: caml_binaryen_get_start
|
|
60
|
+
function caml_binaryen_get_start(wasm_mod) {
|
|
61
|
+
return wasm_mod.getStart();
|
|
62
|
+
}
|
|
63
|
+
|
|
59
64
|
//Provides: caml_binaryen_function_set_debug_location
|
|
60
65
|
//Requires: Binaryen
|
|
61
66
|
function caml_binaryen_function_set_debug_location(
|
binaryen-archive/src/function.ml
CHANGED
|
@@ -6,6 +6,7 @@ external add_function :
|
|
|
6
6
|
(** Module, name, params type, results type, locals types, body. *)
|
|
7
7
|
|
|
8
8
|
external set_start : Module.t -> t -> unit = "caml_binaryen_set_start"
|
|
9
|
+
external get_start : Module.t -> t = "caml_binaryen_get_start"
|
|
9
10
|
|
|
10
11
|
external set_debug_location : t -> Expression.t -> int -> int -> int -> unit
|
|
11
12
|
= "caml_binaryen_function_set_debug_location"
|
|
@@ -4,6 +4,7 @@ val add_function :
|
|
|
4
4
|
Module.t -> string -> Type.t -> Type.t -> Type.t array -> Expression.t -> t
|
|
5
5
|
|
|
6
6
|
val set_start : Module.t -> t -> unit
|
|
7
|
+
val get_start : Module.t -> t
|
|
7
8
|
val set_debug_location : t -> Expression.t -> int -> int -> int -> unit
|
|
8
9
|
val get_function : Module.t -> string -> t
|
|
9
10
|
val get_function_by_index : Module.t -> int -> t
|
binaryen-archive/src/module.ml
CHANGED
|
@@ -14,10 +14,6 @@ module Feature = struct
|
|
|
14
14
|
|
|
15
15
|
let atomics = atomics ()
|
|
16
16
|
|
|
17
|
-
external bulk_memory : unit -> t = "caml_binaryen_feature_bulk_memory"
|
|
18
|
-
|
|
19
|
-
let bulk_memory = bulk_memory ()
|
|
20
|
-
|
|
21
17
|
external mutable_globals : unit -> t = "caml_binaryen_feature_mutable_globals"
|
|
22
18
|
|
|
23
19
|
let mutable_globals = mutable_globals ()
|
|
@@ -27,14 +23,18 @@ module Feature = struct
|
|
|
27
23
|
|
|
28
24
|
let nontrapping_fp_to_int = nontrapping_fp_to_int ()
|
|
29
25
|
|
|
30
|
-
external sign_ext : unit -> t = "caml_binaryen_feature_sign_ext"
|
|
31
|
-
|
|
32
|
-
let sign_ext = sign_ext ()
|
|
33
|
-
|
|
34
26
|
external simd128 : unit -> t = "caml_binaryen_feature_simd128"
|
|
35
27
|
|
|
36
28
|
let simd128 = simd128 ()
|
|
37
29
|
|
|
30
|
+
external bulk_memory : unit -> t = "caml_binaryen_feature_bulk_memory"
|
|
31
|
+
|
|
32
|
+
let bulk_memory = bulk_memory ()
|
|
33
|
+
|
|
34
|
+
external sign_ext : unit -> t = "caml_binaryen_feature_sign_ext"
|
|
35
|
+
|
|
36
|
+
let sign_ext = sign_ext ()
|
|
37
|
+
|
|
38
38
|
external exception_handling : unit -> t
|
|
39
39
|
= "caml_binaryen_feature_exception_handling"
|
|
40
40
|
|
|
@@ -76,6 +76,28 @@ module Feature = struct
|
|
|
76
76
|
|
|
77
77
|
let multi_memory = multi_memory ()
|
|
78
78
|
|
|
79
|
+
external stack_switching : unit -> t = "caml_binaryen_feature_stack_switching"
|
|
80
|
+
|
|
81
|
+
let stack_switching = stack_switching ()
|
|
82
|
+
|
|
83
|
+
external shared_everything : unit -> t
|
|
84
|
+
= "caml_binaryen_feature_shared_everything"
|
|
85
|
+
|
|
86
|
+
let shared_everything = shared_everything ()
|
|
87
|
+
|
|
88
|
+
external fp16 : unit -> t = "caml_binaryen_feature_fp16"
|
|
89
|
+
|
|
90
|
+
let fp16 = fp16 ()
|
|
91
|
+
|
|
92
|
+
external bulk_memory_opt : unit -> t = "caml_binaryen_feature_bulk_memory_opt"
|
|
93
|
+
|
|
94
|
+
let bulk_memory_opt = bulk_memory_opt ()
|
|
95
|
+
|
|
96
|
+
external call_indirect_overlong : unit -> t
|
|
97
|
+
= "caml_binaryen_feature_call_indirect_overlong"
|
|
98
|
+
|
|
99
|
+
let call_indirect_overlong = call_indirect_overlong ()
|
|
100
|
+
|
|
79
101
|
external all : unit -> t = "caml_binaryen_feature_all"
|
|
80
102
|
|
|
81
103
|
let all = all ()
|
binaryen-archive/src/module.mli
CHANGED
|
@@ -5,11 +5,11 @@ module Feature : sig
|
|
|
5
5
|
|
|
6
6
|
val mvp : t
|
|
7
7
|
val atomics : t
|
|
8
|
-
val bulk_memory : t
|
|
9
8
|
val mutable_globals : t
|
|
10
9
|
val nontrapping_fp_to_int : t
|
|
11
|
-
val sign_ext : t
|
|
12
10
|
val simd128 : t
|
|
11
|
+
val bulk_memory : t
|
|
12
|
+
val sign_ext : t
|
|
13
13
|
val exception_handling : t
|
|
14
14
|
val tail_call : t
|
|
15
15
|
val reference_types : t
|
|
@@ -20,6 +20,11 @@ module Feature : sig
|
|
|
20
20
|
val extended_const : t
|
|
21
21
|
val strings : t
|
|
22
22
|
val multi_memory : t
|
|
23
|
+
val stack_switching : t
|
|
24
|
+
val shared_everything : t
|
|
25
|
+
val fp16 : t
|
|
26
|
+
val bulk_memory_opt : t
|
|
27
|
+
val call_indirect_overlong : t
|
|
23
28
|
val all : t
|
|
24
29
|
end
|
|
25
30
|
|
|
@@ -35,12 +35,6 @@ caml_binaryen_feature_atomics(value unit) {
|
|
|
35
35
|
CAMLreturn(Val_int(BinaryenFeatureAtomics()));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
CAMLprim value
|
|
39
|
-
caml_binaryen_feature_bulk_memory(value unit) {
|
|
40
|
-
CAMLparam1(unit);
|
|
41
|
-
CAMLreturn(Val_int(BinaryenFeatureBulkMemory()));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
38
|
CAMLprim value
|
|
45
39
|
caml_binaryen_feature_mutable_globals(value unit) {
|
|
46
40
|
CAMLparam1(unit);
|
|
@@ -54,15 +48,21 @@ caml_binaryen_feature_nontrapping_fp_to_int(value unit) {
|
|
|
54
48
|
}
|
|
55
49
|
|
|
56
50
|
CAMLprim value
|
|
57
|
-
|
|
51
|
+
caml_binaryen_feature_simd128(value unit) {
|
|
58
52
|
CAMLparam1(unit);
|
|
59
|
-
CAMLreturn(Val_int(
|
|
53
|
+
CAMLreturn(Val_int(BinaryenFeatureSIMD128()));
|
|
60
54
|
}
|
|
61
55
|
|
|
62
56
|
CAMLprim value
|
|
63
|
-
|
|
57
|
+
caml_binaryen_feature_bulk_memory(value unit) {
|
|
64
58
|
CAMLparam1(unit);
|
|
65
|
-
CAMLreturn(Val_int(
|
|
59
|
+
CAMLreturn(Val_int(BinaryenFeatureBulkMemory()));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
CAMLprim value
|
|
63
|
+
caml_binaryen_feature_sign_ext(value unit) {
|
|
64
|
+
CAMLparam1(unit);
|
|
65
|
+
CAMLreturn(Val_int(BinaryenFeatureSignExt()));
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
CAMLprim value
|
|
@@ -125,6 +125,36 @@ caml_binaryen_feature_multi_memory(value unit) {
|
|
|
125
125
|
CAMLreturn(Val_int(BinaryenFeatureMultiMemory()));
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
CAMLprim value
|
|
129
|
+
caml_binaryen_feature_stack_switching(value unit) {
|
|
130
|
+
CAMLparam1(unit);
|
|
131
|
+
CAMLreturn(Val_int(BinaryenFeatureStackSwitching()));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
CAMLprim value
|
|
135
|
+
caml_binaryen_feature_shared_everything(value unit) {
|
|
136
|
+
CAMLparam1(unit);
|
|
137
|
+
CAMLreturn(Val_int(BinaryenFeatureSharedEverything()));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
CAMLprim value
|
|
141
|
+
caml_binaryen_feature_fp16(value unit) {
|
|
142
|
+
CAMLparam1(unit);
|
|
143
|
+
CAMLreturn(Val_int(BinaryenFeatureFP16()));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
CAMLprim value
|
|
147
|
+
caml_binaryen_feature_bulk_memory_opt(value unit) {
|
|
148
|
+
CAMLparam1(unit);
|
|
149
|
+
CAMLreturn(Val_int(BinaryenFeatureBulkMemoryOpt()));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
CAMLprim value
|
|
153
|
+
caml_binaryen_feature_call_indirect_overlong(value unit) {
|
|
154
|
+
CAMLparam1(unit);
|
|
155
|
+
CAMLreturn(Val_int(BinaryenFeatureCallIndirectOverlong()));
|
|
156
|
+
}
|
|
157
|
+
|
|
128
158
|
CAMLprim value
|
|
129
159
|
caml_binaryen_feature_all(value unit) {
|
|
130
160
|
CAMLparam1(unit);
|
|
@@ -20,12 +20,6 @@ function caml_binaryen_feature_atomics() {
|
|
|
20
20
|
return Binaryen.Features.Atomics;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
//Provides: caml_binaryen_feature_bulk_memory
|
|
24
|
-
//Requires: Binaryen
|
|
25
|
-
function caml_binaryen_feature_bulk_memory() {
|
|
26
|
-
return Binaryen.Features.BulkMemory;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
23
|
//Provides: caml_binaryen_feature_mutable_globals
|
|
30
24
|
//Requires: Binaryen
|
|
31
25
|
function caml_binaryen_feature_mutable_globals() {
|
|
@@ -38,18 +32,24 @@ function caml_binaryen_feature_nontrapping_fp_to_int() {
|
|
|
38
32
|
return Binaryen.Features.NontrappingFPToInt;
|
|
39
33
|
}
|
|
40
34
|
|
|
41
|
-
//Provides: caml_binaryen_feature_sign_ext
|
|
42
|
-
//Requires: Binaryen
|
|
43
|
-
function caml_binaryen_feature_sign_ext() {
|
|
44
|
-
return Binaryen.Features.SignExt;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
35
|
//Provides: caml_binaryen_feature_simd128
|
|
48
36
|
//Requires: Binaryen
|
|
49
37
|
function caml_binaryen_feature_simd128() {
|
|
50
38
|
return Binaryen.Features.SIMD128;
|
|
51
39
|
}
|
|
52
40
|
|
|
41
|
+
//Provides: caml_binaryen_feature_bulk_memory
|
|
42
|
+
//Requires: Binaryen
|
|
43
|
+
function caml_binaryen_feature_bulk_memory() {
|
|
44
|
+
return Binaryen.Features.BulkMemory;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//Provides: caml_binaryen_feature_sign_ext
|
|
48
|
+
//Requires: Binaryen
|
|
49
|
+
function caml_binaryen_feature_sign_ext() {
|
|
50
|
+
return Binaryen.Features.SignExt;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
53
|
//Provides: caml_binaryen_feature_exception_handling
|
|
54
54
|
//Requires: Binaryen
|
|
55
55
|
function caml_binaryen_feature_exception_handling() {
|
|
@@ -110,6 +110,36 @@ function caml_binaryen_feature_multi_memory() {
|
|
|
110
110
|
return Binaryen.Features.MultiMemory;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
//Provides: caml_binaryen_feature_stack_switching
|
|
114
|
+
//Requires: Binaryen
|
|
115
|
+
function caml_binaryen_feature_stack_switching() {
|
|
116
|
+
return Binaryen.Features.StackSwitching;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//Provides: caml_binaryen_feature_shared_everything
|
|
120
|
+
//Requires: Binaryen
|
|
121
|
+
function caml_binaryen_feature_shared_everything() {
|
|
122
|
+
return Binaryen.Features.SharedEverything;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
//Provides: caml_binaryen_feature_fp16
|
|
126
|
+
//Requires: Binaryen
|
|
127
|
+
function caml_binaryen_feature_fp16() {
|
|
128
|
+
return Binaryen.Features.FP16;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
//Provides: caml_binaryen_feature_bulk_memory_opt
|
|
132
|
+
//Requires: Binaryen
|
|
133
|
+
function caml_binaryen_feature_bulk_memory_opt() {
|
|
134
|
+
return Binaryen.Features.BulkMemoryOpt;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
//Provides: caml_binaryen_feature_call_indirect_overlong
|
|
138
|
+
//Requires: Binaryen
|
|
139
|
+
function caml_binaryen_feature_call_indirect_overlong() {
|
|
140
|
+
return Binaryen.Features.BulkMemoryOpt;
|
|
141
|
+
}
|
|
142
|
+
|
|
113
143
|
//Provides: caml_binaryen_feature_all
|
|
114
144
|
//Requires: Binaryen
|
|
115
145
|
function caml_binaryen_feature_all() {
|