@grain/binaryen.ml 0.9.0 → 0.11.1
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/.gitignore +1 -0
- binaryen-archive/CHANGELOG.md +73 -0
- binaryen-archive/README.md +27 -3
- binaryen-archive/binaryen.opam +8 -8
- binaryen-archive/esy.lock/index.json +537 -460
- binaryen-archive/esy.lock/opam/{base.v0.14.1 → base.v0.14.2}/opam +4 -4
- binaryen-archive/esy.lock/opam/biniou.1.2.1/opam +1 -1
- binaryen-archive/esy.lock/opam/{cppo.1.6.7 → cppo.1.6.8}/opam +4 -6
- binaryen-archive/esy.lock/opam/{csexp.1.4.0 → csexp.1.5.1}/opam +11 -9
- binaryen-archive/esy.lock/opam/{dune-build-info.2.8.2 → dune-build-info.2.9.1}/opam +5 -5
- binaryen-archive/esy.lock/opam/{dune-configurator.2.8.2 → dune-configurator.2.9.1}/opam +5 -5
- binaryen-archive/esy.lock/opam/{dune.2.8.2 → dune.2.9.1}/opam +4 -4
- binaryen-archive/esy.lock/opam/easy-format.1.3.2/opam +1 -1
- binaryen-archive/esy.lock/opam/{fix.20201120 → fix.20211231}/opam +7 -5
- binaryen-archive/esy.lock/opam/js_of_ocaml-compiler.3.11.0/opam +54 -0
- binaryen-archive/esy.lock/opam/js_of_ocaml-ppx.3.11.0/opam +44 -0
- binaryen-archive/esy.lock/opam/js_of_ocaml.3.11.0/opam +45 -0
- binaryen-archive/esy.lock/opam/{menhir.20201216 → menhir.20211128}/opam +8 -6
- binaryen-archive/esy.lock/opam/{menhirLib.20201216 → menhirLib.20211128}/opam +8 -6
- binaryen-archive/esy.lock/opam/{menhirSdk.20201216 → menhirSdk.20211128}/opam +8 -6
- binaryen-archive/esy.lock/opam/ocaml-compiler-libs.v0.12.4/opam +39 -0
- binaryen-archive/esy.lock/opam/{ocaml-lsp-server.1.4.0 → ocaml-lsp-server.1.9.0}/opam +15 -12
- binaryen-archive/esy.lock/opam/{ocaml-migrate-parsetree.2.1.0 → ocaml-migrate-parsetree.2.3.0}/opam +13 -10
- binaryen-archive/esy.lock/opam/ocaml-version.3.4.0/opam +49 -0
- binaryen-archive/esy.lock/opam/ocamlbuild.0.14.0/opam +1 -1
- binaryen-archive/esy.lock/opam/{ocamlfind.1.8.1 → ocamlfind.1.9.1}/opam +19 -39
- binaryen-archive/esy.lock/opam/ocamlformat-rpc-lib.0.19.0/opam +40 -0
- binaryen-archive/esy.lock/opam/ocamlformat.0.18.0/opam +56 -0
- binaryen-archive/esy.lock/opam/{odoc.1.5.2 → odoc.1.5.3}/opam +12 -12
- binaryen-archive/esy.lock/opam/pp.1.1.2/opam +58 -0
- binaryen-archive/esy.lock/opam/ppx_derivers.1.2.1/opam +1 -1
- binaryen-archive/esy.lock/opam/ppx_yojson_conv_lib.v0.14.0/opam +2 -2
- binaryen-archive/esy.lock/opam/{ppxlib.0.21.0 → ppxlib.0.22.2}/opam +40 -32
- binaryen-archive/esy.lock/opam/{re.1.9.0 → re.1.10.3}/opam +8 -4
- binaryen-archive/esy.lock/opam/result.1.5/opam +2 -2
- binaryen-archive/esy.lock/opam/sexplib0.v0.14.0/opam +2 -2
- binaryen-archive/esy.lock/opam/spawn.v0.15.0/opam +56 -0
- binaryen-archive/esy.lock/opam/stdio.v0.14.0/opam +2 -2
- binaryen-archive/esy.lock/opam/{topkg.1.0.3 → topkg.1.0.4}/opam +18 -22
- binaryen-archive/esy.lock/opam/tyxml.4.5.0/opam +42 -0
- binaryen-archive/esy.lock/opam/uucp.14.0.0/opam +41 -0
- binaryen-archive/esy.lock/opam/{uuseg.13.0.0 → uuseg.14.0.0}/opam +22 -28
- binaryen-archive/esy.lock/opam/yojson.1.7.0/opam +1 -1
- binaryen-archive/esy.lock/overrides/{opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch → opam__s__ocamlfind_opam__c__1.9.1_opam_override/files/findlib-1.9.1.patch} +0 -0
- binaryen-archive/esy.lock/overrides/{opam__s__ocamlfind_opam__c__1.8.1_opam_override → opam__s__ocamlfind_opam__c__1.9.1_opam_override}/package.json +1 -1
- binaryen-archive/js/binaryen.es5.js +5 -0
- binaryen-archive/js/dune +1 -6
- binaryen-archive/js/element_segment.ml +33 -0
- binaryen-archive/js/export.ml +37 -0
- binaryen-archive/js/expression.ml +935 -177
- binaryen-archive/js/function.ml +31 -0
- binaryen-archive/js/global.ml +29 -0
- binaryen-archive/js/import.ml +24 -0
- binaryen-archive/js/literal.ml +8 -4
- binaryen-archive/js/module.ml +42 -46
- binaryen-archive/js/op.ml +9 -78
- binaryen-archive/js/settings.ml +60 -0
- binaryen-archive/js/table.ml +20 -3
- binaryen-archive/js/type.ml +3 -0
- binaryen-archive/package.json +14 -20
- binaryen-archive/src/binaryen_stubs_exports.c +78 -0
- binaryen-archive/src/binaryen_stubs_expressions.c +1300 -0
- binaryen-archive/src/binaryen_stubs_features.c +7 -0
- binaryen-archive/src/binaryen_stubs_functions.c +78 -0
- binaryen-archive/src/binaryen_stubs_globals.c +63 -0
- binaryen-archive/src/binaryen_stubs_imports.c +29 -0
- binaryen-archive/src/binaryen_stubs_memory.c +1 -1
- binaryen-archive/src/binaryen_stubs_modules.c +0 -122
- binaryen-archive/src/binaryen_stubs_ops.c +19 -173
- binaryen-archive/src/binaryen_stubs_settings.c +145 -0
- binaryen-archive/src/binaryen_stubs_tables.c +121 -7
- binaryen-archive/src/binaryen_stubs_types.c +18 -0
- binaryen-archive/src/dune +5 -44
- binaryen-archive/src/element_segment.ml +13 -0
- binaryen-archive/src/export.ml +33 -0
- binaryen-archive/src/expression.ml +805 -76
- binaryen-archive/src/function.ml +18 -0
- binaryen-archive/src/global.ml +14 -0
- binaryen-archive/src/import.ml +12 -0
- binaryen-archive/src/literal.ml +2 -2
- binaryen-archive/src/module.ml +64 -38
- binaryen-archive/src/ocaml_helpers.c +0 -8
- binaryen-archive/src/ocaml_helpers.h +2 -3
- binaryen-archive/src/op.ml +18 -131
- binaryen-archive/src/settings.ml +45 -0
- binaryen-archive/src/table.ml +26 -4
- binaryen-archive/src/type.ml +2 -0
- binaryen-archive/test/config/dune +8 -0
- binaryen-archive/test/config/ocamlopt_flags.ml +16 -0
- binaryen-archive/test/dune +4 -0
- binaryen-archive/test/test.expected +38 -3
- binaryen-archive/test/test.ml +90 -18
- binaryen-archive/virtual/dune +2 -2
- binaryen-archive/virtual/element_segment.mli +11 -0
- binaryen-archive/virtual/export.mli +22 -0
- binaryen-archive/virtual/expression.mli +389 -34
- binaryen-archive/virtual/function.mli +16 -0
- binaryen-archive/virtual/global.mli +12 -0
- binaryen-archive/virtual/import.mli +8 -0
- binaryen-archive/virtual/literal.mli +2 -2
- binaryen-archive/virtual/module.mli +25 -27
- binaryen-archive/virtual/op.mli +9 -53
- binaryen-archive/virtual/settings.mli +35 -0
- binaryen-archive/virtual/table.mli +19 -2
- binaryen-archive/virtual/type.mli +2 -0
- binaryen-archive/esy.lock/opam/conf-m4.1/opam +0 -22
- binaryen-archive/esy.lock/opam/dot-merlin-reader.4.1/opam +0 -30
- binaryen-archive/esy.lock/opam/js_of_ocaml-compiler.3.9.1/opam +0 -40
- binaryen-archive/esy.lock/opam/js_of_ocaml-ppx.3.9.0/opam +0 -30
- binaryen-archive/esy.lock/opam/js_of_ocaml.3.9.0/opam +0 -31
- binaryen-archive/esy.lock/opam/ocaml-compiler-libs.v0.12.3/opam +0 -29
- binaryen-archive/esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub +0 -4
- binaryen-archive/esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install +0 -6
- binaryen-archive/esy.lock/opam/ocamlformat.0.15.1/opam +0 -41
- binaryen-archive/esy.lock/opam/tyxml.4.4.0/opam +0 -47
- binaryen-archive/esy.lock/opam/uucp.13.0.0/opam +0 -44
- binaryen-archive/esy.lock/overrides/opam__s__conf_m4_opam__c__1_opam_override/package.json +0 -6
- binaryen-archive/js/features.ml +0 -27
- binaryen-archive/js/function_table.ml +0 -13
- binaryen-archive/src/binaryen_stubs_function_tables.c +0 -25
- binaryen-archive/src/config/dune +0 -8
- binaryen-archive/src/config/library_flags.ml +0 -16
- binaryen-archive/src/features.ml +0 -49
- binaryen-archive/src/function_table.ml +0 -6
- binaryen-archive/vendor/binaryen-c.h +0 -2647
- binaryen-archive/vendor/js/index.es5.js +0 -5
- binaryen-archive/vendor/linux/libbinaryen.a +0 -0
- binaryen-archive/vendor/linux/libbinaryen.so +0 -0
- binaryen-archive/vendor/macosx/libbinaryen.a +0 -0
- binaryen-archive/vendor/macosx/libbinaryen.dylib +0 -0
- binaryen-archive/vendor/mingw64/libbinaryen.a +0 -0
- binaryen-archive/vendor/mingw64/libbinaryen.dll +0 -0
- binaryen-archive/vendor/wasm-delegations.h +0 -85
- binaryen-archive/virtual/features.mli +0 -23
- binaryen-archive/virtual/function_table.mli +0 -4
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
#include "ocaml_helpers.h"
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
CAMLprim value
|
|
11
|
+
caml_binaryen_module_get_features(value _module) {
|
|
12
|
+
CAMLparam1(_module);
|
|
13
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
14
|
+
CAMLreturn(Val_int(BinaryenModuleGetFeatures(module)));
|
|
15
|
+
}
|
|
16
|
+
|
|
10
17
|
CAMLprim value
|
|
11
18
|
caml_binaryen_module_set_features(value _module, value _features) {
|
|
12
19
|
CAMLparam2(_module, _features);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#include <caml/mlvalues.h>
|
|
3
3
|
#include <caml/fail.h>
|
|
4
4
|
#include <caml/memory.h>
|
|
5
|
+
#include <caml/alloc.h>
|
|
5
6
|
|
|
6
7
|
#include "binaryen-c.h"
|
|
7
8
|
#include "ocaml_helpers.h"
|
|
@@ -15,6 +16,22 @@ static value alloc_BinaryenFunctionRef(BinaryenFunctionRef fun)
|
|
|
15
16
|
return v;
|
|
16
17
|
}
|
|
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
|
+
|
|
18
35
|
CAMLprim value
|
|
19
36
|
caml_binaryen_add_function(value _module, value _name, value _params, value _results, value _locals, value _body) {
|
|
20
37
|
CAMLparam5(_module, _name, _params, _results, _locals);
|
|
@@ -62,6 +79,15 @@ caml_binaryen_get_num_functions(value _module) {
|
|
|
62
79
|
CAMLreturn(Val_int(BinaryenGetNumFunctions(module)));
|
|
63
80
|
}
|
|
64
81
|
|
|
82
|
+
CAMLprim value
|
|
83
|
+
caml_binaryen_get_function_by_index(value _module, value _index) {
|
|
84
|
+
CAMLparam2(_module, _index);
|
|
85
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
86
|
+
BinaryenIndex index = Int_val(_index);
|
|
87
|
+
BinaryenFunctionRef fun = BinaryenGetFunctionByIndex(module, index);
|
|
88
|
+
CAMLreturn(alloc_BinaryenFunctionRef(fun));
|
|
89
|
+
}
|
|
90
|
+
|
|
65
91
|
CAMLprim value
|
|
66
92
|
caml_binaryen_set_start(value _module, value _fun) {
|
|
67
93
|
CAMLparam2(_module, _fun);
|
|
@@ -82,3 +108,55 @@ caml_binaryen_function_set_debug_location(value _fun, value _exp, value _file, v
|
|
|
82
108
|
BinaryenFunctionSetDebugLocation(fun, exp, file, line, column);
|
|
83
109
|
CAMLreturn(Val_unit);
|
|
84
110
|
}
|
|
111
|
+
|
|
112
|
+
CAMLprim value
|
|
113
|
+
caml_binaryen_function_get_name(value _fun) {
|
|
114
|
+
CAMLparam1(_fun);
|
|
115
|
+
BinaryenFunctionRef fun = BinaryenFunctionRef_val(_fun);
|
|
116
|
+
CAMLreturn(caml_copy_string(BinaryenFunctionGetName(fun)));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
CAMLprim value
|
|
120
|
+
caml_binaryen_function_get_params(value _fun) {
|
|
121
|
+
CAMLparam1(_fun);
|
|
122
|
+
BinaryenFunctionRef fun = BinaryenFunctionRef_val(_fun);
|
|
123
|
+
CAMLreturn(alloc_BinaryenType(BinaryenFunctionGetParams(fun)));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
CAMLprim value
|
|
127
|
+
caml_binaryen_function_get_results(value _fun) {
|
|
128
|
+
CAMLparam1(_fun);
|
|
129
|
+
BinaryenFunctionRef fun = BinaryenFunctionRef_val(_fun);
|
|
130
|
+
CAMLreturn(alloc_BinaryenType(BinaryenFunctionGetResults(fun)));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
CAMLprim value
|
|
134
|
+
caml_binaryen_function_get_num_vars(value _fun) {
|
|
135
|
+
CAMLparam1(_fun);
|
|
136
|
+
BinaryenFunctionRef fun = BinaryenFunctionRef_val(_fun);
|
|
137
|
+
CAMLreturn(Val_int(BinaryenFunctionGetNumVars(fun)));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
CAMLprim value
|
|
141
|
+
caml_binaryen_function_get_var(value _fun, value _index) {
|
|
142
|
+
CAMLparam2(_fun, _index);
|
|
143
|
+
BinaryenFunctionRef fun = BinaryenFunctionRef_val(_fun);
|
|
144
|
+
BinaryenIndex index = Int_val(_index);
|
|
145
|
+
CAMLreturn(alloc_BinaryenType(BinaryenFunctionGetVar(fun, index)));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
CAMLprim value
|
|
149
|
+
caml_binaryen_function_get_body(value _fun) {
|
|
150
|
+
CAMLparam1(_fun);
|
|
151
|
+
BinaryenFunctionRef fun = BinaryenFunctionRef_val(_fun);
|
|
152
|
+
CAMLreturn(alloc_BinaryenExpressionRef(BinaryenFunctionGetBody(fun)));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
CAMLprim value
|
|
156
|
+
caml_binaryen_function_set_body(value _fun, value _body) {
|
|
157
|
+
CAMLparam2(_fun, _body);
|
|
158
|
+
BinaryenFunctionRef fun = BinaryenFunctionRef_val(_fun);
|
|
159
|
+
BinaryenExpressionRef body = BinaryenExpressionRef_val(_body);
|
|
160
|
+
BinaryenFunctionSetBody(fun, body);
|
|
161
|
+
CAMLreturn(Val_unit);
|
|
162
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#include <caml/mlvalues.h>
|
|
3
3
|
#include <caml/fail.h>
|
|
4
4
|
#include <caml/memory.h>
|
|
5
|
+
#include <caml/alloc.h>
|
|
5
6
|
|
|
6
7
|
#include "binaryen-c.h"
|
|
7
8
|
#include "ocaml_helpers.h"
|
|
@@ -15,6 +16,22 @@ static value alloc_BinaryenGlobalRef(BinaryenGlobalRef exp)
|
|
|
15
16
|
return v;
|
|
16
17
|
}
|
|
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
|
+
|
|
18
35
|
CAMLprim value
|
|
19
36
|
caml_binaryen_add_global(value _module, value _name, value _ty, value _mutable_, value _init) {
|
|
20
37
|
CAMLparam5(_module, _name, _ty, _mutable_, _init);
|
|
@@ -44,3 +61,49 @@ caml_binaryen_remove_global(value _module, value _name) {
|
|
|
44
61
|
BinaryenRemoveGlobal(module, name);
|
|
45
62
|
CAMLreturn(Val_unit);
|
|
46
63
|
}
|
|
64
|
+
|
|
65
|
+
CAMLprim value
|
|
66
|
+
caml_binaryen_get_num_globals(value _module) {
|
|
67
|
+
CAMLparam1(_module);
|
|
68
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
69
|
+
CAMLreturn(Val_int(BinaryenGetNumGlobals(module)));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
CAMLprim value
|
|
73
|
+
caml_binaryen_get_global_by_index(value _module, value _index) {
|
|
74
|
+
CAMLparam2(_module, _index);
|
|
75
|
+
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
|
|
76
|
+
BinaryenIndex index = Int_val(_index);
|
|
77
|
+
CAMLreturn(alloc_BinaryenGlobalRef(BinaryenGetGlobalByIndex(module, index)));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
CAMLprim value
|
|
81
|
+
caml_binaryen_global_get_name(value _global) {
|
|
82
|
+
CAMLparam1(_global);
|
|
83
|
+
BinaryenGlobalRef global = BinaryenGlobalRef_val(_global);
|
|
84
|
+
const char* name = BinaryenGlobalGetName(global);
|
|
85
|
+
CAMLreturn(caml_copy_string(name));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
CAMLprim value
|
|
89
|
+
caml_binaryen_global_get_type(value _global) {
|
|
90
|
+
CAMLparam1(_global);
|
|
91
|
+
BinaryenGlobalRef global = BinaryenGlobalRef_val(_global);
|
|
92
|
+
BinaryenType ty = BinaryenGlobalGetType(global);
|
|
93
|
+
CAMLreturn(alloc_BinaryenType(ty));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
CAMLprim value
|
|
97
|
+
caml_binaryen_global_is_mutable(value _global) {
|
|
98
|
+
CAMLparam1(_global);
|
|
99
|
+
BinaryenGlobalRef global = BinaryenGlobalRef_val(_global);
|
|
100
|
+
CAMLreturn(Val_bool(BinaryenGlobalIsMutable(global)));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
CAMLprim value
|
|
104
|
+
caml_binaryen_global_get_init_expr(value _global) {
|
|
105
|
+
CAMLparam1(_global);
|
|
106
|
+
BinaryenGlobalRef global = BinaryenGlobalRef_val(_global);
|
|
107
|
+
BinaryenExpressionRef exp = BinaryenGlobalGetInitExpr(global);
|
|
108
|
+
CAMLreturn(alloc_BinaryenExpressionRef(exp));
|
|
109
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#include <caml/mlvalues.h>
|
|
3
3
|
#include <caml/fail.h>
|
|
4
4
|
#include <caml/memory.h>
|
|
5
|
+
#include <caml/alloc.h>
|
|
5
6
|
|
|
6
7
|
#include "binaryen-c.h"
|
|
7
8
|
#include "ocaml_helpers.h"
|
|
@@ -65,3 +66,31 @@ CAMLprim value
|
|
|
65
66
|
caml_binaryen_add_global_import__bytecode(value * argv) {
|
|
66
67
|
return caml_binaryen_add_global_import(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
|
|
67
68
|
}
|
|
69
|
+
|
|
70
|
+
CAMLprim value
|
|
71
|
+
caml_binaryen_function_import_get_module(value _fun) {
|
|
72
|
+
CAMLparam1(_fun);
|
|
73
|
+
BinaryenFunctionRef fun = BinaryenFunctionRef_val(_fun);
|
|
74
|
+
CAMLreturn(caml_copy_string(BinaryenFunctionImportGetModule(fun)));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
CAMLprim value
|
|
78
|
+
caml_binaryen_global_import_get_module(value _global) {
|
|
79
|
+
CAMLparam1(_global);
|
|
80
|
+
BinaryenGlobalRef global = BinaryenGlobalRef_val(_global);
|
|
81
|
+
CAMLreturn(caml_copy_string(BinaryenGlobalImportGetModule(global)));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
CAMLprim value
|
|
85
|
+
caml_binaryen_function_import_get_base(value _fun) {
|
|
86
|
+
CAMLparam1(_fun);
|
|
87
|
+
BinaryenFunctionRef fun = BinaryenFunctionRef_val(_fun);
|
|
88
|
+
CAMLreturn(caml_copy_string(BinaryenFunctionImportGetBase(fun)));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
CAMLprim value
|
|
92
|
+
caml_binaryen_global_import_get_base(value _global) {
|
|
93
|
+
CAMLparam1(_global);
|
|
94
|
+
BinaryenGlobalRef global = BinaryenGlobalRef_val(_global);
|
|
95
|
+
CAMLreturn(caml_copy_string(BinaryenGlobalImportGetBase(global)));
|
|
96
|
+
}
|
|
@@ -23,7 +23,7 @@ caml_binaryen_set_memory(value _module, value _initial, value _maximum, value _e
|
|
|
23
23
|
}
|
|
24
24
|
_segmentPassive = array_of_list(_segmentPassive);
|
|
25
25
|
int segmentPassiveLen = array_length(_segmentPassive);
|
|
26
|
-
|
|
26
|
+
bool segmentPassive[segmentPassiveLen];
|
|
27
27
|
for (int i = 0; i < segmentPassiveLen; i++) {
|
|
28
28
|
segmentPassive[i] = Bool_val(Field(_segmentPassive, i));
|
|
29
29
|
}
|
|
@@ -66,128 +66,6 @@ caml_binaryen_module_optimize(value module) {
|
|
|
66
66
|
CAMLreturn(Val_unit);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
CAMLprim value
|
|
70
|
-
caml_binaryen_get_optimize_level(value unit) {
|
|
71
|
-
CAMLparam1(unit);
|
|
72
|
-
int res = BinaryenGetOptimizeLevel();
|
|
73
|
-
CAMLreturn(Val_int(res));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
CAMLprim value
|
|
77
|
-
caml_binaryen_set_optimize_level(value _level) {
|
|
78
|
-
CAMLparam1(_level);
|
|
79
|
-
int level = Int_val(_level);
|
|
80
|
-
BinaryenSetOptimizeLevel(level);
|
|
81
|
-
CAMLreturn(Val_unit);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
CAMLprim value
|
|
85
|
-
caml_binaryen_get_shrink_level(value unit) {
|
|
86
|
-
CAMLparam1(unit);
|
|
87
|
-
int res = BinaryenGetShrinkLevel();
|
|
88
|
-
CAMLreturn(Val_int(res));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
CAMLprim value
|
|
92
|
-
caml_binaryen_set_shrink_level(value _level) {
|
|
93
|
-
CAMLparam1(_level);
|
|
94
|
-
int level = Int_val(_level);
|
|
95
|
-
BinaryenSetShrinkLevel(level);
|
|
96
|
-
CAMLreturn(Val_unit);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
CAMLprim value
|
|
100
|
-
caml_binaryen_get_debug_info(value unit) {
|
|
101
|
-
CAMLparam1(unit);
|
|
102
|
-
int res = BinaryenGetDebugInfo();
|
|
103
|
-
CAMLreturn(Val_int(res));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
CAMLprim value
|
|
107
|
-
caml_binaryen_set_debug_info(value _level) {
|
|
108
|
-
CAMLparam1(_level);
|
|
109
|
-
int level = Int_val(_level);
|
|
110
|
-
BinaryenSetDebugInfo(level);
|
|
111
|
-
CAMLreturn(Val_unit);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
CAMLprim value
|
|
115
|
-
caml_binaryen_get_low_memory_unused(value unit) {
|
|
116
|
-
CAMLparam1(unit);
|
|
117
|
-
int res = BinaryenGetLowMemoryUnused();
|
|
118
|
-
CAMLreturn(Val_int(res));
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
CAMLprim value
|
|
122
|
-
caml_binaryen_set_low_memory_unused(value _level) {
|
|
123
|
-
CAMLparam1(_level);
|
|
124
|
-
int level = Int_val(_level);
|
|
125
|
-
BinaryenSetLowMemoryUnused(level);
|
|
126
|
-
CAMLreturn(Val_unit);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
CAMLprim value
|
|
130
|
-
caml_binaryen_get_pass_argument(value _name) {
|
|
131
|
-
CAMLparam1(_name);
|
|
132
|
-
const char* name = Safe_String_val(_name);
|
|
133
|
-
const char* val = BinaryenGetPassArgument(name);
|
|
134
|
-
CAMLreturn(caml_copy_string(val));
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
CAMLprim value
|
|
138
|
-
caml_binaryen_set_pass_argument(value _name, value _val) {
|
|
139
|
-
CAMLparam2(_name, _val);
|
|
140
|
-
const char* name = Safe_String_val(_name);
|
|
141
|
-
const char* val = Safe_String_val(_val);
|
|
142
|
-
BinaryenSetPassArgument(name, val);
|
|
143
|
-
CAMLreturn(Val_unit);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
CAMLprim value
|
|
147
|
-
caml_binaryen_get_always_inline_max_size(value unit) {
|
|
148
|
-
CAMLparam1(unit);
|
|
149
|
-
int res = BinaryenGetAlwaysInlineMaxSize();
|
|
150
|
-
CAMLreturn(Val_int(res));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
CAMLprim value
|
|
154
|
-
caml_binaryen_set_always_inline_max_size(value _size) {
|
|
155
|
-
CAMLparam1(_size);
|
|
156
|
-
int size = Int_val(_size);
|
|
157
|
-
BinaryenSetAlwaysInlineMaxSize(size);
|
|
158
|
-
CAMLreturn(Val_unit);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
CAMLprim value
|
|
162
|
-
caml_binaryen_get_flexible_inline_max_size(value unit) {
|
|
163
|
-
CAMLparam1(unit);
|
|
164
|
-
int res = BinaryenGetFlexibleInlineMaxSize();
|
|
165
|
-
CAMLreturn(Val_int(res));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
CAMLprim value
|
|
169
|
-
caml_binaryen_set_flexible_inline_max_size(value _size) {
|
|
170
|
-
CAMLparam1(_size);
|
|
171
|
-
int size = Int_val(_size);
|
|
172
|
-
BinaryenSetFlexibleInlineMaxSize(size);
|
|
173
|
-
CAMLreturn(Val_unit);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
CAMLprim value
|
|
177
|
-
caml_binaryen_get_one_caller_inline_max_size(value unit) {
|
|
178
|
-
CAMLparam1(unit);
|
|
179
|
-
int res = BinaryenGetOneCallerInlineMaxSize();
|
|
180
|
-
CAMLreturn(Val_int(res));
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
CAMLprim value
|
|
184
|
-
caml_binaryen_set_one_caller_inline_max_size(value _size) {
|
|
185
|
-
CAMLparam1(_size);
|
|
186
|
-
int size = Int_val(_size);
|
|
187
|
-
BinaryenSetOneCallerInlineMaxSize(size);
|
|
188
|
-
CAMLreturn(Val_unit);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
69
|
CAMLprim value
|
|
192
70
|
caml_binaryen_module_run_passes(value _module, value _passes) {
|
|
193
71
|
CAMLparam2(_module, _passes);
|
|
@@ -1499,13 +1499,6 @@ caml_binaryen_binaryen_neg_vec_i8x16(value unit) {
|
|
|
1499
1499
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
1500
1500
|
}
|
|
1501
1501
|
|
|
1502
|
-
CAMLprim value
|
|
1503
|
-
caml_binaryen_binaryen_any_true_vec_i8x16(value unit) {
|
|
1504
|
-
CAMLparam1(unit);
|
|
1505
|
-
BinaryenOp op = BinaryenAnyTrueVecI8x16();
|
|
1506
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
1502
|
CAMLprim value
|
|
1510
1503
|
caml_binaryen_binaryen_all_true_vec_i8x16(value unit) {
|
|
1511
1504
|
CAMLparam1(unit);
|
|
@@ -1583,13 +1576,6 @@ caml_binaryen_binaryen_sub_sat_u_vec_i8x16(value unit) {
|
|
|
1583
1576
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
1584
1577
|
}
|
|
1585
1578
|
|
|
1586
|
-
CAMLprim value
|
|
1587
|
-
caml_binaryen_binaryen_mul_vec_i8x16(value unit) {
|
|
1588
|
-
CAMLparam1(unit);
|
|
1589
|
-
BinaryenOp op = BinaryenMulVecI8x16();
|
|
1590
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
1579
|
CAMLprim value
|
|
1594
1580
|
caml_binaryen_binaryen_min_s_vec_i8x16(value unit) {
|
|
1595
1581
|
CAMLparam1(unit);
|
|
@@ -1639,13 +1625,6 @@ caml_binaryen_binaryen_neg_vec_i16x8(value unit) {
|
|
|
1639
1625
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
1640
1626
|
}
|
|
1641
1627
|
|
|
1642
|
-
CAMLprim value
|
|
1643
|
-
caml_binaryen_binaryen_any_true_vec_i16x8(value unit) {
|
|
1644
|
-
CAMLparam1(unit);
|
|
1645
|
-
BinaryenOp op = BinaryenAnyTrueVecI16x8();
|
|
1646
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
1628
|
CAMLprim value
|
|
1650
1629
|
caml_binaryen_binaryen_all_true_vec_i16x8(value unit) {
|
|
1651
1630
|
CAMLparam1(unit);
|
|
@@ -1779,13 +1758,6 @@ caml_binaryen_binaryen_neg_vec_i32x4(value unit) {
|
|
|
1779
1758
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
1780
1759
|
}
|
|
1781
1760
|
|
|
1782
|
-
CAMLprim value
|
|
1783
|
-
caml_binaryen_binaryen_any_true_vec_i32x4(value unit) {
|
|
1784
|
-
CAMLparam1(unit);
|
|
1785
|
-
BinaryenOp op = BinaryenAnyTrueVecI32x4();
|
|
1786
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
1761
|
CAMLprim value
|
|
1790
1762
|
caml_binaryen_binaryen_all_true_vec_i32x4(value unit) {
|
|
1791
1763
|
CAMLparam1(unit);
|
|
@@ -1947,20 +1919,6 @@ caml_binaryen_binaryen_sqrt_vec_f32x4(value unit) {
|
|
|
1947
1919
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
1948
1920
|
}
|
|
1949
1921
|
|
|
1950
|
-
CAMLprim value
|
|
1951
|
-
caml_binaryen_binaryen_qfma_vec_f32x4(value unit) {
|
|
1952
|
-
CAMLparam1(unit);
|
|
1953
|
-
BinaryenOp op = BinaryenQFMAVecF32x4();
|
|
1954
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
CAMLprim value
|
|
1958
|
-
caml_binaryen_binaryen_qfms_vec_f32x4(value unit) {
|
|
1959
|
-
CAMLparam1(unit);
|
|
1960
|
-
BinaryenOp op = BinaryenQFMSVecF32x4();
|
|
1961
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
1922
|
CAMLprim value
|
|
1965
1923
|
caml_binaryen_binaryen_add_vec_f32x4(value unit) {
|
|
1966
1924
|
CAMLparam1(unit);
|
|
@@ -2066,20 +2024,6 @@ caml_binaryen_binaryen_sqrt_vec_f64x2(value unit) {
|
|
|
2066
2024
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2067
2025
|
}
|
|
2068
2026
|
|
|
2069
|
-
CAMLprim value
|
|
2070
|
-
caml_binaryen_binaryen_qfma_vec_f64x2(value unit) {
|
|
2071
|
-
CAMLparam1(unit);
|
|
2072
|
-
BinaryenOp op = BinaryenQFMAVecF64x2();
|
|
2073
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
CAMLprim value
|
|
2077
|
-
caml_binaryen_binaryen_qfms_vec_f64x2(value unit) {
|
|
2078
|
-
CAMLparam1(unit);
|
|
2079
|
-
BinaryenOp op = BinaryenQFMSVecF64x2();
|
|
2080
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2083
2027
|
CAMLprim value
|
|
2084
2028
|
caml_binaryen_binaryen_add_vec_f64x2(value unit) {
|
|
2085
2029
|
CAMLparam1(unit);
|
|
@@ -2178,20 +2122,6 @@ caml_binaryen_binaryen_trunc_sat_u_vec_f32x4_to_vec_i32x4(value unit) {
|
|
|
2178
2122
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2179
2123
|
}
|
|
2180
2124
|
|
|
2181
|
-
CAMLprim value
|
|
2182
|
-
caml_binaryen_binaryen_trunc_sat_s_vec_f64x2_to_vec_i64x2(value unit) {
|
|
2183
|
-
CAMLparam1(unit);
|
|
2184
|
-
BinaryenOp op = BinaryenTruncSatSVecF64x2ToVecI64x2();
|
|
2185
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
|
-
CAMLprim value
|
|
2189
|
-
caml_binaryen_binaryen_trunc_sat_u_vec_f64x2_to_vec_i64x2(value unit) {
|
|
2190
|
-
CAMLparam1(unit);
|
|
2191
|
-
BinaryenOp op = BinaryenTruncSatUVecF64x2ToVecI64x2();
|
|
2192
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2193
|
-
}
|
|
2194
|
-
|
|
2195
2125
|
CAMLprim value
|
|
2196
2126
|
caml_binaryen_binaryen_convert_s_vec_i32x4_to_vec_f32x4(value unit) {
|
|
2197
2127
|
CAMLparam1(unit);
|
|
@@ -2206,90 +2136,6 @@ caml_binaryen_binaryen_convert_u_vec_i32x4_to_vec_f32x4(value unit) {
|
|
|
2206
2136
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2207
2137
|
}
|
|
2208
2138
|
|
|
2209
|
-
CAMLprim value
|
|
2210
|
-
caml_binaryen_binaryen_convert_s_vec_i64x2_to_vec_f64x2(value unit) {
|
|
2211
|
-
CAMLparam1(unit);
|
|
2212
|
-
BinaryenOp op = BinaryenConvertSVecI64x2ToVecF64x2();
|
|
2213
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2214
|
-
}
|
|
2215
|
-
|
|
2216
|
-
CAMLprim value
|
|
2217
|
-
caml_binaryen_binaryen_convert_u_vec_i64x2_to_vec_f64x2(value unit) {
|
|
2218
|
-
CAMLparam1(unit);
|
|
2219
|
-
BinaryenOp op = BinaryenConvertUVecI64x2ToVecF64x2();
|
|
2220
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2223
|
-
CAMLprim value
|
|
2224
|
-
caml_binaryen_binaryen_load_splat_vec8x16(value unit) {
|
|
2225
|
-
CAMLparam1(unit);
|
|
2226
|
-
BinaryenOp op = BinaryenLoadSplatVec8x16();
|
|
2227
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2228
|
-
}
|
|
2229
|
-
|
|
2230
|
-
CAMLprim value
|
|
2231
|
-
caml_binaryen_binaryen_load_splat_vec16x8(value unit) {
|
|
2232
|
-
CAMLparam1(unit);
|
|
2233
|
-
BinaryenOp op = BinaryenLoadSplatVec16x8();
|
|
2234
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2235
|
-
}
|
|
2236
|
-
|
|
2237
|
-
CAMLprim value
|
|
2238
|
-
caml_binaryen_binaryen_load_splat_vec32x4(value unit) {
|
|
2239
|
-
CAMLparam1(unit);
|
|
2240
|
-
BinaryenOp op = BinaryenLoadSplatVec32x4();
|
|
2241
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
|
-
CAMLprim value
|
|
2245
|
-
caml_binaryen_binaryen_load_splat_vec64x2(value unit) {
|
|
2246
|
-
CAMLparam1(unit);
|
|
2247
|
-
BinaryenOp op = BinaryenLoadSplatVec64x2();
|
|
2248
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2249
|
-
}
|
|
2250
|
-
|
|
2251
|
-
CAMLprim value
|
|
2252
|
-
caml_binaryen_binaryen_load_ext_s_vec8x8_to_vec_i16x8(value unit) {
|
|
2253
|
-
CAMLparam1(unit);
|
|
2254
|
-
BinaryenOp op = BinaryenLoadExtSVec8x8ToVecI16x8();
|
|
2255
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2256
|
-
}
|
|
2257
|
-
|
|
2258
|
-
CAMLprim value
|
|
2259
|
-
caml_binaryen_binaryen_load_ext_u_vec8x8_to_vec_i16x8(value unit) {
|
|
2260
|
-
CAMLparam1(unit);
|
|
2261
|
-
BinaryenOp op = BinaryenLoadExtUVec8x8ToVecI16x8();
|
|
2262
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
CAMLprim value
|
|
2266
|
-
caml_binaryen_binaryen_load_ext_s_vec16x4_to_vec_i32x4(value unit) {
|
|
2267
|
-
CAMLparam1(unit);
|
|
2268
|
-
BinaryenOp op = BinaryenLoadExtSVec16x4ToVecI32x4();
|
|
2269
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
CAMLprim value
|
|
2273
|
-
caml_binaryen_binaryen_load_ext_u_vec16x4_to_vec_i32x4(value unit) {
|
|
2274
|
-
CAMLparam1(unit);
|
|
2275
|
-
BinaryenOp op = BinaryenLoadExtUVec16x4ToVecI32x4();
|
|
2276
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2277
|
-
}
|
|
2278
|
-
|
|
2279
|
-
CAMLprim value
|
|
2280
|
-
caml_binaryen_binaryen_load_ext_s_vec32x2_to_vec_i64x2(value unit) {
|
|
2281
|
-
CAMLparam1(unit);
|
|
2282
|
-
BinaryenOp op = BinaryenLoadExtSVec32x2ToVecI64x2();
|
|
2283
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2284
|
-
}
|
|
2285
|
-
|
|
2286
|
-
CAMLprim value
|
|
2287
|
-
caml_binaryen_binaryen_load_ext_u_vec32x2_to_vec_i64x2(value unit) {
|
|
2288
|
-
CAMLparam1(unit);
|
|
2289
|
-
BinaryenOp op = BinaryenLoadExtUVec32x2ToVecI64x2();
|
|
2290
|
-
CAMLreturn(alloc_BinaryenOp(op));
|
|
2291
|
-
}
|
|
2292
|
-
|
|
2293
2139
|
CAMLprim value
|
|
2294
2140
|
caml_binaryen_binaryen_narrow_s_vec_i16x8_to_vec_i8x16(value unit) {
|
|
2295
2141
|
CAMLparam1(unit);
|
|
@@ -2319,64 +2165,64 @@ caml_binaryen_binaryen_narrow_u_vec_i32x4_to_vec_i16x8(value unit) {
|
|
|
2319
2165
|
}
|
|
2320
2166
|
|
|
2321
2167
|
CAMLprim value
|
|
2322
|
-
|
|
2168
|
+
caml_binaryen_binaryen_swizzle_vec8x16(value unit) {
|
|
2323
2169
|
CAMLparam1(unit);
|
|
2324
|
-
BinaryenOp op =
|
|
2170
|
+
BinaryenOp op = BinaryenSwizzleVec8x16();
|
|
2325
2171
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2326
2172
|
}
|
|
2327
2173
|
|
|
2328
2174
|
CAMLprim value
|
|
2329
|
-
|
|
2175
|
+
caml_binaryen_binaryen_ref_is_null(value unit) {
|
|
2330
2176
|
CAMLparam1(unit);
|
|
2331
|
-
BinaryenOp op =
|
|
2177
|
+
BinaryenOp op = BinaryenRefIsNull();
|
|
2332
2178
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2333
2179
|
}
|
|
2334
2180
|
|
|
2335
2181
|
CAMLprim value
|
|
2336
|
-
|
|
2182
|
+
caml_binaryen_binaryen_ref_is_func(value unit) {
|
|
2337
2183
|
CAMLparam1(unit);
|
|
2338
|
-
BinaryenOp op =
|
|
2184
|
+
BinaryenOp op = BinaryenRefIsFunc();
|
|
2339
2185
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2340
2186
|
}
|
|
2341
2187
|
|
|
2342
2188
|
CAMLprim value
|
|
2343
|
-
|
|
2189
|
+
caml_binaryen_binaryen_ref_is_data(value unit) {
|
|
2344
2190
|
CAMLparam1(unit);
|
|
2345
|
-
BinaryenOp op =
|
|
2191
|
+
BinaryenOp op = BinaryenRefIsData();
|
|
2346
2192
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2347
2193
|
}
|
|
2348
2194
|
|
|
2349
2195
|
CAMLprim value
|
|
2350
|
-
|
|
2196
|
+
caml_binaryen_binaryen_ref_is_i31(value unit) {
|
|
2351
2197
|
CAMLparam1(unit);
|
|
2352
|
-
BinaryenOp op =
|
|
2198
|
+
BinaryenOp op = BinaryenRefIsI31();
|
|
2353
2199
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2354
2200
|
}
|
|
2355
2201
|
|
|
2356
2202
|
CAMLprim value
|
|
2357
|
-
|
|
2203
|
+
caml_binaryen_binaryen_ref_as_non_null(value unit) {
|
|
2358
2204
|
CAMLparam1(unit);
|
|
2359
|
-
BinaryenOp op =
|
|
2205
|
+
BinaryenOp op = BinaryenRefAsNonNull();
|
|
2360
2206
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2361
2207
|
}
|
|
2362
2208
|
|
|
2363
2209
|
CAMLprim value
|
|
2364
|
-
|
|
2210
|
+
caml_binaryen_binaryen_ref_as_func(value unit) {
|
|
2365
2211
|
CAMLparam1(unit);
|
|
2366
|
-
BinaryenOp op =
|
|
2212
|
+
BinaryenOp op = BinaryenRefAsFunc();
|
|
2367
2213
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2368
2214
|
}
|
|
2369
2215
|
|
|
2370
2216
|
CAMLprim value
|
|
2371
|
-
|
|
2217
|
+
caml_binaryen_binaryen_ref_as_data(value unit) {
|
|
2372
2218
|
CAMLparam1(unit);
|
|
2373
|
-
BinaryenOp op =
|
|
2219
|
+
BinaryenOp op = BinaryenRefAsData();
|
|
2374
2220
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2375
2221
|
}
|
|
2376
2222
|
|
|
2377
2223
|
CAMLprim value
|
|
2378
|
-
|
|
2224
|
+
caml_binaryen_binaryen_ref_as_i31(value unit) {
|
|
2379
2225
|
CAMLparam1(unit);
|
|
2380
|
-
BinaryenOp op =
|
|
2226
|
+
BinaryenOp op = BinaryenRefAsI31();
|
|
2381
2227
|
CAMLreturn(alloc_BinaryenOp(op));
|
|
2382
|
-
}
|
|
2228
|
+
}
|