diff --git a/compiler/lib/inline.ml b/compiler/lib/inline.ml index 3c972c166f..fbcf564151 100644 --- a/compiler/lib/inline.ml +++ b/compiler/lib/inline.ml @@ -311,7 +311,11 @@ let inline ~first_class_primitives live_vars closures name pc (outer, p) = match block with | { body = ( [ (Let (y, Prim (Extern prim, args)), _loc) ] - | [ (Event _, _); (Let (y, Prim (Extern prim, args)), _loc) ] ) + | [ (Event _, _); (Let (y, Prim (Extern prim, args)), _loc) ] + | [ (Event _, _) + ; (Let (y, Prim (Extern prim, args)), _loc) + ; (Event _, _) + ] ) ; branch = Return y', _ ; params = [] } -> diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 33add97355..099faef92e 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -4832,8 +4832,7 @@ cst_String_contains_from_Bytes = "String.contains_from / Bytes.contains_from", cst_String_rcontains_from_Byte = - "String.rcontains_from / Bytes.rcontains_from", - cst_Bytes_of_seq_cannot_grow_b = "Bytes.of_seq: cannot grow bytes"; + "String.rcontains_from / Bytes.rcontains_from"; function copy(s){ var len = /*<>*/ caml_ml_bytes_length(s), @@ -5464,9 +5463,9 @@ /*<>*/ return caml_call1 (Stdlib[1], cst_String_rcontains_from_Byte) /*<>*/ ; } - function compare(x, y){ - /*<>*/ return runtime.caml_bytes_compare(x, y) /*<>*/ ; - } + var + compare = /*<>*/ runtime.caml_bytes_compare, + cst_Bytes_of_seq_cannot_grow_b = "Bytes.of_seq: cannot grow bytes"; function split_on_char(sep, s){ var r = /*<>*/ [0, 0], @@ -6727,9 +6726,7 @@ var _t_ = /*<>*/ r[1]; return [0, sub(s, 0, j[1]), _t_] /*<>*/ ; /*<>*/ } - function compare(x, y){ - /*<>*/ return runtime.caml_string_compare(x, y) /*<>*/ ; - } + var compare = /*<>*/ runtime.caml_string_compare; function to_seq(s){ var _r_ = /*<>*/ caml_call1(bos, s); /*<>*/ return caml_call1(Stdlib_Bytes[47], _r_) /*<>*/ ; @@ -9106,12 +9103,7 @@ /*<>*/ throw caml_maybe_attach_backtrace(_c_, 0); } /*<>*/ } - function compare(x, y){ - /*<>*/ return caml_int_compare(x, y) /*<>*/ ; - } - function equal(x, y){ - /*<>*/ return runtime.caml_equal(x, y) /*<>*/ ; - } + var compare = /*<>*/ caml_int_compare, equal = runtime.caml_equal; function unsigned_compare(n, m){ var y = /*<>*/ m + 2147483648 | 0, @@ -9248,9 +9240,7 @@ function compare(x, y){ /*<>*/ return caml_int64_compare(x, y) /*<>*/ ; } - function equal(x, y){ - /*<>*/ return runtime.caml_equal(x, y) /*<>*/ ; - } + var equal = /*<>*/ runtime.caml_equal; function unsigned_compare(n, m){ var y = /*<>*/ caml_int64_sub(m, min_int), @@ -9379,9 +9369,7 @@ /*<>*/ throw caml_maybe_attach_backtrace(_a_, 0); } /*<>*/ } - function compare(x, y){ - /*<>*/ return caml_int_compare(x, y) /*<>*/ ; - } + var compare = /*<>*/ caml_int_compare; function equal(x, y){ /*<>*/ return 0 === caml_int_compare(x, y) ? 1 : 0 /*<>*/ ; /*<>*/ } @@ -25231,11 +25219,7 @@ cst_Random_full_int = "Random.full_int", cst_Random_int_in_range = "Random.int_in_range", cst_Random_int32 = "Random.int32", - cst_Random_int32_in_range = "Random.int32_in_range", - _f_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), - _g_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), - cst_Random_int64 = "Random.int64", - cst_Random_int64_in_range = "Random.int64_in_range"; + cst_Random_int32_in_range = "Random.int32_in_range"; function bits(s){ /*<>*/ return /*<>*/ caml_int64_to_int32 ( /*<>*/ caml_lxm_next(s)) @@ -25337,9 +25321,12 @@ /*<>*/ return r; } /*<>*/ } - function bits64(s){ - /*<>*/ return caml_lxm_next(s) /*<>*/ ; - } + var + bits64 = /*<>*/ caml_lxm_next, + _f_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), + _g_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), + cst_Random_int64 = "Random.int64", + cst_Random_int64_in_range = "Random.int64_in_range"; function int64aux(s, n){ /*<>*/ for(;;){ var @@ -31759,10 +31746,8 @@ runtime = globalThis.jsoo_runtime, caml_register_named_value = runtime.caml_register_named_value, global_data = runtime.caml_get_global_data(), - Stdlib_Obj = global_data.Stdlib__Obj; - function register(name, v){ - /*<>*/ return caml_register_named_value(name, v) /*<>*/ ; - } + Stdlib_Obj = global_data.Stdlib__Obj, + register = caml_register_named_value; function register_exception(name, exn){ var _a_ = /*<>*/ Stdlib_Obj[10], @@ -31853,15 +31838,11 @@ : accu[1]; /*<>*/ return tag; /*<>*/ } - function compare(x, y){ - /*<>*/ return caml_string_compare(x, y) /*<>*/ ; - } - var Vars = /*<>*/ caml_call1(Stdlib_Map[1], [0, compare]); - function compare$0(x, y){ - /*<>*/ return caml_string_compare(x, y) /*<>*/ ; - } var - Meths = /*<>*/ caml_call1(Stdlib_Map[1], [0, compare$0]), + compare = /*<>*/ caml_string_compare, + Vars = caml_call1(Stdlib_Map[1], [0, compare]), + compare$0 = caml_string_compare, + Meths = caml_call1(Stdlib_Map[1], [0, compare$0]), compare$1 = runtime.caml_int_compare, Labs = caml_call1(Stdlib_Map[1], [0, compare$1]), dummy_table = [0, 0, [0, 0], Meths[1], Labs[1], 0, 0, Vars[1], 0],