Skip to content

Commit 5760087

Browse files
committed
feat!: Upgrade to Binaryen v121
1 parent fad6f1c commit 5760087

File tree

8 files changed

+8
-25
lines changed

8 files changed

+8
-25
lines changed

esy.lock/index.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/expression.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,13 @@ caml_binaryen_binary(value _module, value _op, value _p1, value _p2) {
285285
}
286286

287287
CAMLprim value
288-
caml_binaryen_select(value _module, value _cond, value _tru, value _fals, value _ty) {
289-
CAMLparam5(_module, _cond, _tru, _fals, _ty);
288+
caml_binaryen_select(value _module, value _cond, value _tru, value _fals) {
289+
CAMLparam4(_module, _cond, _tru, _fals);
290290
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
291291
BinaryenExpressionRef cond = BinaryenExpressionRef_val(_cond);
292292
BinaryenExpressionRef tru = BinaryenExpressionRef_val(_tru);
293293
BinaryenExpressionRef fals = BinaryenExpressionRef_val(_fals);
294-
BinaryenType ty = BinaryenType_val(_ty);
295-
BinaryenExpressionRef exp = BinaryenSelect(module, cond, tru, fals, ty);
294+
BinaryenExpressionRef exp = BinaryenSelect(module, cond, tru, fals);
296295
CAMLreturn(alloc_BinaryenExpressionRef(exp));
297296
}
298297

src/expression.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ function caml_binaryen_binary(wasm_mod, op, p1, p2) {
403403
}
404404

405405
//Provides: caml_binaryen_select
406-
function caml_binaryen_select(wasm_mod, cond, if_true, if_false, typ) {
407-
return wasm_mod.select(cond, if_true, if_false, typ);
406+
function caml_binaryen_select(wasm_mod, cond, if_true, if_false) {
407+
return wasm_mod.select(cond, if_true, if_false);
408408
}
409409

410410
//Provides: caml_binaryen_drop

src/expression.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,11 +662,11 @@ module Binary = struct
662662
end
663663

664664
module Select = struct
665-
external make : Module.t -> t -> t -> t -> Type.t -> t
665+
external make : Module.t -> t -> t -> t -> t
666666
= "caml_binaryen_select"
667667

668668
(** Module, condition, true branch, false branch. *)
669-
let make wasm_mod cond tru fals = make wasm_mod cond tru fals Type.auto
669+
let make wasm_mod cond tru fals = make wasm_mod cond tru fals
670670

671671
external get_if_true : t -> t = "caml_binaryen_select_get_if_true"
672672
external set_if_true : t -> t -> unit = "caml_binaryen_select_set_if_true"

src/module.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,6 @@ caml_binaryen_module_run_passes(value _module, value _passes) {
7878
CAMLreturn(Val_unit);
7979
}
8080

81-
CAMLprim value
82-
caml_binaryen_module_auto_drop(value _module) {
83-
CAMLparam1(_module);
84-
BinaryenModuleRef module = BinaryenModuleRef_val(_module);
85-
BinaryenModuleAutoDrop(module);
86-
CAMLreturn(Val_unit);
87-
}
88-
8981
CAMLprim value
9082
caml_binaryen_module_write(value _module, value _sourceMapUrl) {
9183
CAMLparam2(_module, _sourceMapUrl);

src/module.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ function caml_binaryen_module_run_passes(wasm_mod, passes) {
6464
);
6565
}
6666

67-
//Provides: caml_binaryen_module_auto_drop
68-
function caml_binaryen_module_auto_drop(wasm_mod) {
69-
return wasm_mod.autoDrop();
70-
}
71-
7267
//Provides: caml_binaryen_module_write
7368
//Requires: to_option
7469
//Requires: caml_jsstring_of_string, caml_string_of_jsstring, caml_bytes_of_array

src/module.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ let set_features wasm_mod features =
115115
external run_passes : t -> Passes.t list -> unit
116116
= "caml_binaryen_module_run_passes"
117117

118-
external auto_drop : t -> unit = "caml_binaryen_module_auto_drop"
119-
120118
external write : t -> string option -> bytes * string option
121119
= "caml_binaryen_module_write"
122120

src/module.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ val optimize : t -> unit
3535
val get_features : t -> Feature.t list
3636
val set_features : t -> Feature.t list -> unit
3737
val run_passes : t -> Passes.t list -> unit
38-
val auto_drop : t -> unit
3938
val write : t -> string option -> bytes * string option
4039
val write_text : t -> string
4140
val write_stack_ir : t -> string

0 commit comments

Comments
 (0)