From 625c604fbad1a319e40138ddd480a41e13ec52eb Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Tue, 14 Feb 2023 18:41:42 +0100 Subject: [PATCH 01/10] Compiler: use Object.is for phys_equal --- compiler/lib/generate.ml | 18 ++++++++++++++++-- compiler/tests-jsoo/test_obj.ml | 11 ++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 7d1c9f7a78..93cd0060ec 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -1351,11 +1351,25 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = | Eq, [ x; y ] -> let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in - bool (J.EBin (J.EqEqEq, cx, cy)), or_p px py, queue + ( bool + (J.call + (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) + [ cx; cy ] + loc) + , or_p px py + , queue ) | Neq, [ x; y ] -> let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in - bool (J.EBin (J.NotEqEq, cx, cy)), or_p px py, queue + ( J.EBin + ( J.Minus + , one + , J.call + (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) + [ cx; cy ] + loc ) + , or_p px py + , queue ) | IsInt, [ x ] -> let (px, cx), queue = access_queue' ~ctx queue x in bool (Mlvalue.is_immediate cx), px, queue diff --git a/compiler/tests-jsoo/test_obj.ml b/compiler/tests-jsoo/test_obj.ml index 84ea39f0da..ebd3888ab2 100644 --- a/compiler/tests-jsoo/test_obj.ml +++ b/compiler/tests-jsoo/test_obj.ml @@ -72,14 +72,7 @@ let%expect_test "dup" = |}] let%expect_test "sameness" = - (* FIXME: Jsoo returns the wrong opposite result for cases below. - Would be fixed by GH#1410 *) - let f x = - match Sys.backend_type with - | Other "js_of_ocaml" -> not x - | Other _ | Native | Bytecode -> x - in - print_bool (f (nan == nan)); + print_bool (nan == nan); [%expect {| true |}]; - print_bool (f (-0. == 0.)); + print_bool (-0. == 0.); [%expect {| false |}] From e771c0f00a66db6c6b038fc0f4eff3fb6e65101e Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Mon, 20 Feb 2023 16:44:42 +0100 Subject: [PATCH 02/10] fix --- compiler/lib/generate.ml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 93cd0060ec..878f120fd7 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -343,6 +343,8 @@ let plus_int x y = let bool e = J.ECond (e, one, zero) +let bool_not e = J.ECond (e, zero, one) + (****) let source_location debug ?force (pc : Code.loc) = @@ -1361,13 +1363,11 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = | Neq, [ x; y ] -> let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in - ( J.EBin - ( J.Minus - , one - , J.call - (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) - [ cx; cy ] - loc ) + ( bool_not + (J.call + (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) + [ cx; cy ] + loc) , or_p px py , queue ) | IsInt, [ x ] -> From 1c364e24b948a6c267955c2b3e7e66b1919fe450 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Mon, 20 Feb 2023 16:46:10 +0100 Subject: [PATCH 03/10] promote --- compiler/lib/generate.ml | 41 ++++++++++++------- compiler/lib/javascript.ml | 9 ++++ compiler/lib/javascript.mli | 2 + compiler/tests-compiler/effects.ml | 2 +- .../tests-compiler/effects_continuations.ml | 6 +-- compiler/tests-compiler/effects_exceptions.ml | 6 +-- compiler/tests-compiler/gh1354.ml | 6 +-- compiler/tests-compiler/gh747.ml | 2 +- compiler/tests-compiler/global_deadcode.ml | 4 +- compiler/tests-compiler/loops.ml | 9 ++-- compiler/tests-compiler/match_with_exn.ml | 7 +++- compiler/tests-compiler/tailcall.ml | 4 +- 12 files changed, 63 insertions(+), 35 deletions(-) diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 878f120fd7..785ba99ff7 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -1056,6 +1056,11 @@ let remove_unused_tail_args ctx exact trampolined args = else args else args +let is_int = function + | J.ENum n -> J.Num.is_int n + | J.EBin ((J.Bor | J.Lsr), _, _) -> true + | _ -> false + let rec translate_expr ctx queue loc x e level : _ * J.statement_list = match e with | Apply { f; args; exact } -> @@ -1353,23 +1358,31 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = | Eq, [ x; y ] -> let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in - ( bool - (J.call - (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) - [ cx; cy ] - loc) - , or_p px py - , queue ) + let e = + if is_int cx || is_int cy + then bool (J.EBin (J.EqEqEq, cx, cy)) + else + bool + (J.call + (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) + [ cx; cy ] + loc) + in + e, or_p px py, queue | Neq, [ x; y ] -> let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in - ( bool_not - (J.call - (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) - [ cx; cy ] - loc) - , or_p px py - , queue ) + let e = + if is_int cx || is_int cy + then bool (J.EBin (J.NotEqEq, cx, cy)) + else + bool_not + (J.call + (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) + [ cx; cy ] + loc) + in + e, or_p px py, queue | IsInt, [ x ] -> let (px, cx), queue = access_queue' ~ctx queue x in bool (Mlvalue.is_immediate cx), px, queue diff --git a/compiler/lib/javascript.ml b/compiler/lib/javascript.ml index 952b196769..22ce1b3892 100644 --- a/compiler/lib/javascript.ml +++ b/compiler/lib/javascript.ml @@ -42,6 +42,8 @@ module Num : sig val is_neg : t -> bool + val is_int : t -> bool + (** Arithmetic *) val add : t -> t -> t @@ -133,6 +135,13 @@ end = struct let is_neg s = Char.equal s.[0] '-' + let is_int = function + | "-0" -> false + | s -> + String.for_all s ~f:(function + | '0' .. '9' | '-' | '+' -> true + | _ -> false) + let neg s = match String.drop_prefix s ~prefix:"-" with | None -> "-" ^ s diff --git a/compiler/lib/javascript.mli b/compiler/lib/javascript.mli index af02260783..bab8689abf 100644 --- a/compiler/lib/javascript.mli +++ b/compiler/lib/javascript.mli @@ -43,6 +43,8 @@ module Num : sig val is_neg : t -> bool + val is_int : t -> bool + (** Arithmetic *) val add : t -> t -> t diff --git a/compiler/tests-compiler/effects.ml b/compiler/tests-compiler/effects.ml index 95892eb396..d0f2335b0e 100644 --- a/compiler/tests-compiler/effects.ml +++ b/compiler/tests-compiler/effects.ml @@ -49,7 +49,7 @@ let fff () = 10, [0, function(e, cont){ - return e === E + return Object.is(e, E) ? cont([0, function(k, cont){return cont(11);}]) : cont(0); }], diff --git a/compiler/tests-compiler/effects_continuations.ml b/compiler/tests-compiler/effects_continuations.ml index 0da72bd5ee..c742c54991 100644 --- a/compiler/tests-compiler/effects_continuations.ml +++ b/compiler/tests-compiler/effects_continuations.ml @@ -106,7 +106,7 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = try{var _t_ = runtime.caml_int_of_string(s), n = _t_;} catch(_x_){ var _p_ = caml_wrap_exception(_x_); - if(_p_[1] !== Stdlib[7]){ + if(! Object.is(_p_[1], Stdlib[7])){ var raise$1 = caml_pop_trap(); return raise$1(caml_maybe_attach_backtrace(_p_, 0)); } @@ -119,7 +119,7 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = } catch(_w_){ var _q_ = caml_wrap_exception(_w_); - if(_q_ !== Stdlib[8]){ + if(! Object.is(_q_, Stdlib[8])){ var raise$0 = caml_pop_trap(); return raise$0(caml_maybe_attach_backtrace(_q_, 0)); } @@ -127,7 +127,7 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = } runtime.caml_push_trap (function(_v_){ - if(_v_ === Stdlib[8]) return cont(0); + if(Object.is(_v_, Stdlib[8])) return cont(0); var raise = caml_pop_trap(); return raise(caml_maybe_attach_backtrace(_v_, 0)); }); diff --git a/compiler/tests-compiler/effects_exceptions.ml b/compiler/tests-compiler/effects_exceptions.ml index f227b7b881..4749f7e165 100644 --- a/compiler/tests-compiler/effects_exceptions.ml +++ b/compiler/tests-compiler/effects_exceptions.ml @@ -60,7 +60,7 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = try{var _k_ = runtime.caml_int_of_string(s), n = _k_;} catch(_o_){ var _g_ = caml_wrap_exception(_o_); - if(_g_[1] !== Stdlib[7]){ + if(! Object.is(_g_[1], Stdlib[7])){ var raise$1 = caml_pop_trap(); return raise$1(caml_maybe_attach_backtrace(_g_, 0)); } @@ -73,7 +73,7 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = } catch(_n_){ var _h_ = caml_wrap_exception(_n_); - if(_h_ !== Stdlib[8]){ + if(! Object.is(_h_, Stdlib[8])){ var raise$0 = caml_pop_trap(); return raise$0(caml_maybe_attach_backtrace(_h_, 0)); } @@ -81,7 +81,7 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = } caml_push_trap (function(_m_){ - if(_m_ === Stdlib[8]) return cont(0); + if(Object.is(_m_, Stdlib[8])) return cont(0); var raise = caml_pop_trap(); return raise(caml_maybe_attach_backtrace(_m_, 0)); }); diff --git a/compiler/tests-compiler/gh1354.ml b/compiler/tests-compiler/gh1354.ml index 472a13d750..d82c6f3377 100644 --- a/compiler/tests-compiler/gh1354.ml +++ b/compiler/tests-compiler/gh1354.ml @@ -66,7 +66,7 @@ with Exit -> try{0; _b_ = _a_ + 1 | 0; throw caml_maybe_attach_backtrace(Stdlib[3], 1);} catch(_e_){ var _c_ = caml_wrap_exception(_e_); - if(_c_ !== Stdlib[3]) throw caml_maybe_attach_backtrace(_c_, 0); + if(! Object.is(_c_, Stdlib[3])) throw caml_maybe_attach_backtrace(_c_, 0); caml_call2(Stdlib_Printf[3], _d_, _b_ | 0); var Test = [0]; runtime.caml_register_global(3, Test, "Test"); @@ -154,7 +154,7 @@ with Exit -> } catch(_j_){ var _d_ = caml_wrap_exception(_j_); - if(_d_ !== Stdlib[3]) throw caml_maybe_attach_backtrace(_d_, 0); + if(! Object.is(_d_, Stdlib[3])) throw caml_maybe_attach_backtrace(_d_, 0); caml_call3(Stdlib_Printf[3], _e_, _c_ | 0, _b_); var Test = [0]; runtime.caml_register_global(4, Test, "Test"); @@ -231,7 +231,7 @@ with Exit -> } catch(_h_){ var _c_ = caml_wrap_exception(_h_); - if(_c_ !== Stdlib[3]) throw caml_maybe_attach_backtrace(_c_, 0); + if(! Object.is(_c_, Stdlib[3])) throw caml_maybe_attach_backtrace(_c_, 0); caml_call2(Stdlib_Printf[3], _d_, _b_); var Test = [0]; runtime.caml_register_global(4, Test, "Test"); diff --git a/compiler/tests-compiler/gh747.ml b/compiler/tests-compiler/gh747.ml index adbb4cc285..4c5a3fc4f0 100644 --- a/compiler/tests-compiler/gh747.ml +++ b/compiler/tests-compiler/gh747.ml @@ -351,7 +351,7 @@ end 125: (Stdlib_Printf[1], outchan, _c_, str); 126: } 127: /*<>*/ /*<>*/ var _g_ = i + 1 | 0; - 128: if(_f_ === i) break; + 128: if(Object.is(_f_, i)) break; 129: i = _g_; 130: } 131: } diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index 4103bea426..8cce86a2a8 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -69,9 +69,9 @@ let%expect_test "Eliminates unused functions from functor" = if(! t) return [0, 0, x, 0, 1]; var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); if(0 === c) return t; - if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} + if(0 <= c){var rr = add(x, r); return Object.is(r, rr) ? t : bal(l, v, rr);} var ll = add(x, l); - return l === ll ? t : bal(ll, v, r); + return Object.is(l, ll) ? t : bal(ll, v, r); } function singleton(x){return [0, 0, x, 0, 1];} function find(x, param){ diff --git a/compiler/tests-compiler/loops.ml b/compiler/tests-compiler/loops.ml index eefa2ef721..408825e5bc 100644 --- a/compiler/tests-compiler/loops.ml +++ b/compiler/tests-compiler/loops.ml @@ -254,7 +254,7 @@ let f t x = try{var val$0 = caml_call2(Stdlib_Hashtbl[6], t, x);} catch(_f_){ var _c_ = caml_wrap_exception(_f_); - if(_c_ === Stdlib[8]) return - 1; + if(Object.is(_c_, Stdlib[8])) return - 1; throw caml_maybe_attach_backtrace(_c_, 0); } if(val$0 && ! val$0[2]){ @@ -265,7 +265,8 @@ let f t x = try{var val = caml_call2(Stdlib_Hashtbl[6], t, x$0);} catch(_e_){ var _a_ = caml_wrap_exception(_e_); - if(_a_ !== Stdlib[3]) throw caml_maybe_attach_backtrace(_a_, 0); + if(! Object.is(_a_, Stdlib[3])) + throw caml_maybe_attach_backtrace(_a_, 0); var _d_ = 0; break a; } @@ -500,12 +501,12 @@ let add_substitute = var lim = caml_ml_string_length(s), k = k$2, stop = new_start; for(;;){ if(lim <= stop) throw caml_maybe_attach_backtrace(Stdlib[8], 1); - if(caml_string_get(s, stop) === opening){ + if(Object.is(caml_string_get(s, stop), opening)){ var i = stop + 1 | 0, k$0 = k + 1 | 0; k = k$0; stop = i; } - else if(caml_string_get(s, stop) === closing){ + else if(Object.is(caml_string_get(s, stop), closing)){ if(0 === k) break; var i$0 = stop + 1 | 0, k$1 = k - 1 | 0; k = k$1; diff --git a/compiler/tests-compiler/match_with_exn.ml b/compiler/tests-compiler/match_with_exn.ml index 73d2be5761..bf236d72db 100644 --- a/compiler/tests-compiler/match_with_exn.ml +++ b/compiler/tests-compiler/match_with_exn.ml @@ -78,7 +78,7 @@ let fun2 () = try{var i$1 = caml_call1(Stdlib_Random[5], 2);} catch(_e_){ var _d_ = caml_wrap_exception(_e_); - if(_d_[1] !== A) throw caml_maybe_attach_backtrace(_d_, 0); + if(! Object.is(_d_[1], A)) throw caml_maybe_attach_backtrace(_d_, 0); var i = _d_[2]; if(2 !== i) return i + 2 | 0; var i$0 = i; @@ -96,7 +96,10 @@ let fun2 () = try{var i$0 = caml_call1(Stdlib_Random[5], 2);} catch(_c_){ var _a_ = caml_wrap_exception(_c_); - if(_a_[1] === A){var _b_ = _a_[2]; if(2 === _b_){var i = _b_; break a;}} + if(Object.is(_a_[1], A)){ + var _b_ = _a_[2]; + if(2 === _b_){var i = _b_; break a;} + } throw caml_maybe_attach_backtrace(_a_, 0); } if(0 !== i$0) return i$0 + 1 | 0; diff --git a/compiler/tests-compiler/tailcall.ml b/compiler/tests-compiler/tailcall.ml index 9daa98c7f7..f11ef022e4 100644 --- a/compiler/tests-compiler/tailcall.ml +++ b/compiler/tests-compiler/tailcall.ml @@ -62,7 +62,7 @@ let%expect_test _ = } function even(x){return caml_trampoline(even$0(0, x));} var _b_ = even(1); - if(odd(1) === _b_) + if(Object.is(odd(1), _b_)) throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); try{odd(5000); var _c_ = log_success(0); return _c_;} catch(_d_){return caml_call1(log_failure, cst_too_much_recursion);} @@ -103,7 +103,7 @@ let%expect_test _ = } function even(x){return caml_trampoline(even$0(x));} var _b_ = even(1); - if(odd(1) === _b_) + if(Object.is(odd(1), _b_)) throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); try{odd(5000); var _c_ = log_success(0); return _c_;} catch(_d_){return caml_call1(log_failure, cst_too_much_recursion);} From 8b12e8edebea499fcef0e56a2cab1237ba1cfc5c Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Tue, 28 Feb 2023 14:57:55 +0100 Subject: [PATCH 04/10] accept --- compiler/tests-full/stdlib.cma.expected.js | 845 +++++++++++---------- 1 file changed, 459 insertions(+), 386 deletions(-) diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index ddd25fb271..16d672a549 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -445,7 +445,7 @@ } catch(_x_){ var _v_ = caml_wrap_exception(_x_); - if(_v_[1] === Failure) /*<>*/ return 0; + if(Object.is(_v_[1], Failure)) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_v_, 0); } /*<>*/ } @@ -476,7 +476,7 @@ } catch(_u_){ var _s_ = caml_wrap_exception(_u_); - if(_s_[1] === Failure) /*<>*/ return 0; + if(Object.is(_s_[1], Failure)) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_s_, 0); } /*<>*/ } @@ -560,7 +560,8 @@ } catch(_p_){ var _o_ = caml_wrap_exception(_p_); - if(_o_[1] !== Sys_error) throw caml_maybe_attach_backtrace(_o_, 0); + if(! Object.is(_o_[1], Sys_error)) + throw caml_maybe_attach_backtrace(_o_, 0); } param$0 = l; } @@ -1135,7 +1136,7 @@ } catch(_e_){ var _c_ = caml_wrap_exception(_e_); - if(_c_ === Stdlib[8]) /*<>*/ return 0; + if(Object.is(_c_, Stdlib[8])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_c_, 0); } /*<>*/ } @@ -1419,7 +1420,7 @@ (Stdlib_Obj[22][3], _b_); /*<>*/ } function provably_equal(A, B){ - /*<>*/ return A[1] === B[1] ? _a_ : 0; + /*<>*/ return Object.is(A[1], B[1]) ? _a_ : 0; /*<>*/ } /*<>*/ var /*<>*/ Id = [0, make, uid, provably_equal], @@ -1534,12 +1535,14 @@ function force_gen(only_val, lzv){ /*<>*/ /*<>*/ var t = /*<>*/ runtime.caml_obj_tag(lzv); - if(t === Stdlib_Obj[12]) + if(Object.is(t, Stdlib_Obj[12])) /*<>*/ return lzv[1]; - if(t === Stdlib_Obj[6]) + if(Object.is(t, Stdlib_Obj[6])) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Undefined, 1); - return t !== Stdlib_Obj[8] ? lzv : force_gen_lazy_block(only_val, lzv); + return ! Object.is(t, Stdlib_Obj[8]) + ? lzv + : force_gen_lazy_block(only_val, lzv); /*<>*/ } var CamlinternalLazy = [0, Undefined, force_lazy_block, force_gen]; runtime.caml_register_global(2, CamlinternalLazy, "CamlinternalLazy"); @@ -1582,18 +1585,22 @@ /*<>*/ /*<>*/ var t = /*<>*/ caml_obj_tag(v); if - (t !== Stdlib_Obj[12] - && t !== Stdlib_Obj[8] && t !== Stdlib_Obj[6] && t !== Stdlib_Obj[16]) + (! + Object.is(t, Stdlib_Obj[12]) + && + ! + Object.is(t, Stdlib_Obj[8]) + && ! Object.is(t, Stdlib_Obj[6]) && ! Object.is(t, Stdlib_Obj[16])) /*<>*/ return v; /*<>*/ return /*<>*/ runtime.caml_lazy_make_forward (v); /*<>*/ } function is_val(l){ /*<>*/ /*<>*/ var _i_ = Stdlib_Obj[8]; - /*<>*/ return /*<>*/ caml_obj_tag(l) - !== _i_ - ? 1 - : 0; + /*<>*/ return /*<>*/ Object.is + ( /*<>*/ caml_obj_tag(l), _i_) + ? 0 + : 1; /*<>*/ } function map(f, x){ /*<>*/ return [246, @@ -2900,7 +2907,7 @@ (function(globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, caml_hash = runtime.caml_hash; - function equal(_d_, _c_){ /*<>*/ return _d_ === _c_ ? 1 : 0;} + function equal(_d_, _c_){ /*<>*/ return Object.is(_d_, _c_) ? 1 : 0;} var compare = runtime.caml_int_compare, cst_true = "true", @@ -3119,7 +3126,7 @@ (Stdlib[1], _l_); /*<>*/ } function unsafe_to_char(_j_){ /*<>*/ return _j_;} - function equal(_i_, _h_){ /*<>*/ return _i_ === _h_ ? 1 : 0;} + function equal(_i_, _h_){ /*<>*/ return Object.is(_i_, _h_) ? 1 : 0;} var compare = runtime.caml_int_compare, _a_ = [0, cst_uchar_ml, 85, 7], @@ -3338,7 +3345,7 @@ if(last < i) dst[1 + offset] = 0; else{ - if(i !== last){ + if(! Object.is(i, last)){ /*<>*/ var /*<>*/ r1$0 = /*<>*/ caml_call1(f, i), /*<>*/ r2$0 = @@ -3750,7 +3757,7 @@ var param$0 = param; for(;;){ if(! param$0) /*<>*/ return 0; - var l = param$0[2], a = param$0[1], _A_ = a === x ? 1 : 0; + var l = param$0[2], a = param$0[1], _A_ = Object.is(a, x) ? 1 : 0; if(_A_) return _A_; param$0 = l; } @@ -3786,7 +3793,7 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; - if(a === x) /*<>*/ return b; + if(Object.is(a, x)) /*<>*/ return b; param$0 = l; } } @@ -3795,7 +3802,7 @@ for(;;){ if(! param$0) /*<>*/ return 0; var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; - if(a === x) /*<>*/ return [0, b]; + if(Object.is(a, x)) /*<>*/ return [0, b]; param$0 = l; } } @@ -3815,7 +3822,7 @@ var param$0 = param; for(;;){ if(! param$0) /*<>*/ return 0; - var l = param$0[2], a = param$0[1][1], _y_ = a === x ? 1 : 0; + var l = param$0[2], a = param$0[1][1], _y_ = Object.is(a, x) ? 1 : 0; if(_y_) return _y_; param$0 = l; } @@ -3831,7 +3838,7 @@ function remove_assq(x, param){ /*<>*/ if(! param) /*<>*/ return 0; var l = param[2], pair = param[1], a = pair[1]; - return a === x ? l : [0, pair, remove_assq(x, l)]; + return Object.is(a, x) ? l : [0, pair, remove_assq(x, l)]; } function find(p, param){ var param$0 = param; @@ -4798,7 +4805,7 @@ function lognot(x){ /*<>*/ return x ^ -1; /*<>*/ } - function equal(_b_, _a_){ /*<>*/ return _b_ === _a_ ? 1 : 0;} + function equal(_b_, _a_){ /*<>*/ return Object.is(_b_, _a_) ? 1 : 0;} var compare = runtime.caml_int_compare; function min(x, y){ /*<>*/ return x <= y ? x : y; @@ -4905,7 +4912,7 @@ for(;;){ caml_bytes_unsafe_set(s, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; - if(_ap_ === i) break; + if(Object.is(_ap_, i)) break; i = _aq_; } } @@ -5040,7 +5047,7 @@ /*<>*/ /*<>*/ caml_call1 (f, caml_bytes_unsafe_get(a, i)); /*<>*/ /*<>*/ var _am_ = i + 1 | 0; - if(_al_ === i) break; + if(Object.is(_al_, i)) break; i = _am_; } } @@ -5056,7 +5063,7 @@ /*<>*/ /*<>*/ caml_call2 (f, i, caml_bytes_unsafe_get(a, i)); /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; - if(_ai_ === i) break; + if(Object.is(_ai_, i)) break; i = _aj_; } } @@ -5189,11 +5196,12 @@ } n[1] = n[1] + _ad_ | 0; /*<>*/ /*<>*/ var _ae_ = i$0 + 1 | 0; - if(___ === i$0) break; + if(Object.is(___, i$0)) break; i$0 = _ae_; } } - if(n[1] === caml_ml_bytes_length(s)) /*<>*/ return s; + if(Object.is(n[1], caml_ml_bytes_length(s))) + /*<>*/ return s; /*<>*/ /*<>*/ var s$0 = /*<>*/ caml_create_bytes(n[1]); n[1] = 0; @@ -5260,7 +5268,7 @@ } n[1]++; /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ === i) break; + if(Object.is(_aa_, i)) break; i = _ab_; } } @@ -5286,7 +5294,7 @@ i, /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, i))); /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; - if(_X_ === i) break; + if(Object.is(_X_, i)) break; i = _Y_; } } @@ -5308,7 +5316,7 @@ i, /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(s, i))); /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(_U_ === i) break; + if(Object.is(_U_, i)) break; i = _V_; } } @@ -5326,7 +5334,7 @@ /*<>*/ caml_call2 (f, r[1], caml_bytes_unsafe_get(a, i)); /*<>*/ /*<>*/ var _S_ = i + 1 | 0; - if(_R_ === i) break; + if(Object.is(_R_, i)) break; i = _S_; } } @@ -5353,7 +5361,7 @@ function exists(p, s){ /*<>*/ var n = caml_ml_bytes_length(s), i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call1(p, caml_bytes_unsafe_get(s, i))) /*<>*/ return 1; @@ -5364,7 +5372,7 @@ function for_all(p, s){ /*<>*/ var n = caml_ml_bytes_length(s), i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 1; + if(Object.is(i, n)) /*<>*/ return 1; /*<>*/ if (! /*<>*/ caml_call1(p, caml_bytes_unsafe_get(s, i))) /*<>*/ return 0; @@ -5402,8 +5410,11 @@ if(! _N_) return _N_; var i = 0; /*<>*/ for(;;){ - if(i === len_pre) /*<>*/ return 1; - if(caml_bytes_unsafe_get(s, i) !== caml_bytes_unsafe_get(prefix, i)) + if(Object.is(i, len_pre)) /*<>*/ return 1; + if + (! + Object.is + (caml_bytes_unsafe_get(s, i), caml_bytes_unsafe_get(prefix, i))) /*<>*/ return 0; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -5418,10 +5429,12 @@ if(! _M_) return _M_; var i = 0; /*<>*/ for(;;){ - if(i === len_suf) /*<>*/ return 1; + if(Object.is(i, len_suf)) /*<>*/ return 1; if - (caml_bytes_unsafe_get(s, diff + i | 0) - !== caml_bytes_unsafe_get(suffix, i)) + (! + Object.is + (caml_bytes_unsafe_get(s, diff + i | 0), + caml_bytes_unsafe_get(suffix, i))) /*<>*/ return 0; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -5433,7 +5446,7 @@ if(lim <= i$0) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if(caml_bytes_unsafe_get(s, i$0) === c) + if(Object.is(caml_bytes_unsafe_get(s, i$0), c)) /*<>*/ return i$0; var i$1 = i$0 + 1 | 0; i$0 = i$1; @@ -5447,7 +5460,7 @@ /*<>*/ var i$0 = i; /*<>*/ for(;;){ if(lim <= i$0) /*<>*/ return 0; - if(caml_bytes_unsafe_get(s, i$0) === c) + if(Object.is(caml_bytes_unsafe_get(s, i$0), c)) /*<>*/ return [0, i$0]; var i$1 = i$0 + 1 | 0; i$0 = i$1; @@ -5476,7 +5489,7 @@ if(0 > i$0) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if(caml_bytes_unsafe_get(s, i$0) === c) + if(Object.is(caml_bytes_unsafe_get(s, i$0), c)) /*<>*/ return i$0; var i$1 = i$0 - 1 | 0; i$0 = i$1; @@ -5496,7 +5509,7 @@ /*<>*/ var i$0 = i; /*<>*/ for(;;){ if(0 > i$0) /*<>*/ return 0; - if(caml_bytes_unsafe_get(s, i$0) === c) + if(Object.is(caml_bytes_unsafe_get(s, i$0), c)) /*<>*/ return [0, i$0]; var i$1 = i$0 - 1 | 0; i$0 = i$1; @@ -5522,7 +5535,7 @@ } catch(_L_){ var _J_ = caml_wrap_exception(_L_); - if(_J_ === Stdlib[8]) /*<>*/ return 0; + if(Object.is(_J_, Stdlib[8])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_J_, 0); } /*<>*/ return /*<>*/ caml_call1 @@ -5540,7 +5553,7 @@ } catch(_I_){ var _G_ = caml_wrap_exception(_I_); - if(_G_ === Stdlib[8]) /*<>*/ return 0; + if(Object.is(_G_, Stdlib[8])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_G_, 0); } /*<>*/ return /*<>*/ caml_call1 @@ -5559,7 +5572,7 @@ if(_C_ >= 0){ var i = _C_; for(;;){ - if(caml_bytes_unsafe_get(s, i) === sep){ + if(Object.is(caml_bytes_unsafe_get(s, i), sep)){ var _E_ = r[1]; r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _E_]; j[1] = i; @@ -5574,7 +5587,7 @@ /*<>*/ } function to_seq(s){ function aux(i, param){ - /*<>*/ if(i === caml_ml_bytes_length(s)) + /*<>*/ if(Object.is(i, caml_ml_bytes_length(s))) /*<>*/ return 0; /*<>*/ var /*<>*/ x = @@ -5590,7 +5603,7 @@ /*<>*/ } function to_seqi(s){ function aux(i, param){ - /*<>*/ if(i === caml_ml_bytes_length(s)) + /*<>*/ if(Object.is(i, caml_ml_bytes_length(s))) /*<>*/ return 0; /*<>*/ var /*<>*/ x = @@ -5611,14 +5624,15 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Seq[4], function(c){ - /*<>*/ if(n[1] === caml_ml_bytes_length(buf[1])){ + /*<>*/ if + (Object.is(n[1], caml_ml_bytes_length(buf[1]))){ /*<>*/ /*<>*/ var new_len = /*<>*/ caml_call2 (Stdlib_Int[10], 2 * caml_ml_bytes_length(buf[1]) | 0, Stdlib_Sys[12]); - if(caml_ml_bytes_length(buf[1]) === new_len) + if(Object.is(caml_ml_bytes_length(buf[1]), new_len)) /*<>*/ /*<>*/ caml_call1 (Stdlib[2], cst_Bytes_of_seq_cannot_grow_b); /*<>*/ /*<>*/ var @@ -6156,7 +6170,7 @@ /*<>*/ /*<>*/ var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; if(0 <= i && max >= i){ - if(i === max) + if(Object.is(i, max)) /*<>*/ return /*<>*/ caml_call1 (dec_invalid, 1); /*<>*/ /*<>*/ var @@ -6214,7 +6228,7 @@ /*<>*/ var max = caml_ml_bytes_length(b) - 1 | 0, i = 0; /*<>*/ for(;;){ if(max < i) /*<>*/ return 1; - if(i === max) /*<>*/ return 0; + if(Object.is(i, max)) /*<>*/ return 0; /*<>*/ /*<>*/ var u = unsafe_get_uint16_be(b, i); if(55296 <= u && 57343 >= u){ @@ -6239,7 +6253,7 @@ /*<>*/ /*<>*/ var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; if(0 <= i && max >= i){ - if(i === max) + if(Object.is(i, max)) /*<>*/ return /*<>*/ caml_call1 (dec_invalid, 1); /*<>*/ /*<>*/ var @@ -6297,7 +6311,7 @@ /*<>*/ var max = caml_ml_bytes_length(b) - 1 | 0, i = 0; /*<>*/ for(;;){ if(max < i) /*<>*/ return 1; - if(i === max) /*<>*/ return 0; + if(Object.is(i, max)) /*<>*/ return 0; /*<>*/ /*<>*/ var u = unsafe_get_uint16_le(b, i); if(55296 <= u && 57343 >= u){ @@ -6548,7 +6562,7 @@ /*<>*/ /*<>*/ caml_call1 (f, caml_string_unsafe_get(s, i)); /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(_U_ === i) break; + if(Object.is(_U_, i)) break; i = _V_; } } @@ -6564,7 +6578,7 @@ /*<>*/ /*<>*/ caml_call2 (f, i, caml_string_unsafe_get(s, i)); /*<>*/ /*<>*/ var _S_ = i + 1 | 0; - if(_R_ === i) break; + if(Object.is(_R_, i)) break; i = _S_; } } @@ -6644,7 +6658,7 @@ if(lim <= i$0) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if(caml_string_unsafe_get(s, i$0) === c) + if(Object.is(caml_string_unsafe_get(s, i$0), c)) /*<>*/ return i$0; var i$1 = i$0 + 1 | 0; i$0 = i$1; @@ -6658,7 +6672,7 @@ /*<>*/ var i$0 = i; /*<>*/ for(;;){ if(lim <= i$0) /*<>*/ return 0; - if(caml_string_unsafe_get(s, i$0) === c) + if(Object.is(caml_string_unsafe_get(s, i$0), c)) /*<>*/ return [0, i$0]; var i$1 = i$0 + 1 | 0; i$0 = i$1; @@ -6688,7 +6702,7 @@ if(0 > i$0) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if(caml_string_unsafe_get(s, i$0) === c) + if(Object.is(caml_string_unsafe_get(s, i$0), c)) /*<>*/ return i$0; var i$1 = i$0 - 1 | 0; i$0 = i$1; @@ -6708,7 +6722,7 @@ /*<>*/ var i$0 = i; /*<>*/ for(;;){ if(0 > i$0) /*<>*/ return 0; - if(caml_string_unsafe_get(s, i$0) === c) + if(Object.is(caml_string_unsafe_get(s, i$0), c)) /*<>*/ return [0, i$0]; var i$1 = i$0 - 1 | 0; i$0 = i$1; @@ -6734,7 +6748,7 @@ } catch(_H_){ var _F_ = caml_wrap_exception(_H_); - if(_F_ === Stdlib[8]) /*<>*/ return 0; + if(Object.is(_F_, Stdlib[8])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_F_, 0); } /*<>*/ return /*<>*/ caml_call1 @@ -6752,7 +6766,7 @@ } catch(_E_){ var _C_ = caml_wrap_exception(_E_); - if(_C_ === Stdlib[8]) /*<>*/ return 0; + if(Object.is(_C_, Stdlib[8])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_C_, 0); } /*<>*/ return /*<>*/ caml_call1 @@ -6790,8 +6804,11 @@ if(! _x_) return _x_; var i = 0; /*<>*/ for(;;){ - if(i === len_pre) /*<>*/ return 1; - if(caml_string_unsafe_get(s, i) !== caml_string_unsafe_get(prefix, i)) + if(Object.is(i, len_pre)) /*<>*/ return 1; + if + (! + Object.is + (caml_string_unsafe_get(s, i), caml_string_unsafe_get(prefix, i))) /*<>*/ return 0; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -6806,10 +6823,12 @@ if(! _w_) return _w_; var i = 0; /*<>*/ for(;;){ - if(i === len_suf) /*<>*/ return 1; + if(Object.is(i, len_suf)) /*<>*/ return 1; if - (caml_string_unsafe_get(s, diff + i | 0) - !== caml_string_unsafe_get(suffix, i)) + (! + Object.is + (caml_string_unsafe_get(s, diff + i | 0), + caml_string_unsafe_get(suffix, i))) /*<>*/ return 0; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -6829,7 +6848,7 @@ if(_s_ >= 0){ var i = _s_; for(;;){ - if(caml_string_unsafe_get(s, i) === sep){ + if(Object.is(caml_string_unsafe_get(s, i), sep)){ var _u_ = r[1]; r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _u_]; j[1] = i; @@ -7188,7 +7207,7 @@ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); /*<>*/ /*<>*/ var _aF_ = i + 1 | 0; - if(_aE_ === i) break; + if(Object.is(_aE_, i)) break; i = _aF_; } } @@ -7209,7 +7228,7 @@ for(;;){ res[1 + x] = /*<>*/ caml_make_vect(sy, init); /*<>*/ /*<>*/ var _aC_ = x + 1 | 0; - if(_aB_ === x) break; + if(Object.is(_aB_, x)) break; x = _aC_; } } @@ -7241,13 +7260,13 @@ /*<>*/ row[1 + y] = /*<>*/ caml_call2(f, x, y); /*<>*/ /*<>*/ var _az_ = y + 1 | 0; - if(_ax_ === y) break; + if(Object.is(_ax_, y)) break; y = _az_; } } res[1 + x] = row; /*<>*/ /*<>*/ var _ay_ = x + 1 | 0; - if(_av_ === x) break; + if(Object.is(_av_, x)) break; x = _ay_; } } @@ -7308,14 +7327,14 @@ /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); /*<>*/ /*<>*/ var _at_ = i + 1 | 0; - if(_as_ === i) break; + if(Object.is(_as_, i)) break; i = _at_; } } return 0; /*<>*/ } function iter2(f, a, b){ - /*<>*/ if(a.length - 1 !== b.length - 1) + /*<>*/ if(! Object.is(a.length - 1, b.length - 1)) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_iter2_arrays_must_ha); /*<>*/ var @@ -7327,7 +7346,7 @@ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; - if(_ap_ === i) break; + if(Object.is(_ap_, i)) break; i = _aq_; } } @@ -7348,7 +7367,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ === i) break; + if(Object.is(_am_, i)) break; i = _an_; } } @@ -7364,7 +7383,7 @@ /*<>*/ a[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; + if(Object.is(_aj_, i)) break; i = _ak_; } } @@ -7380,7 +7399,7 @@ /*<>*/ a[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_ag_ === i) break; + if(Object.is(_ag_, i)) break; i = _ah_; } } @@ -7390,7 +7409,7 @@ /*<>*/ var la = a.length - 1, /*<>*/ lb = b.length - 1; - if(la !== lb) + if(! Object.is(la, lb)) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_map2_arrays_must_hav); if(0 === la) /*<>*/ return [0]; @@ -7406,7 +7425,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ === i) break; + if(Object.is(_ad_, i)) break; i = _ae_; } } @@ -7422,7 +7441,7 @@ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(_aa_ === i) break; + if(Object.is(_aa_, i)) break; i = _ab_; } } @@ -7443,7 +7462,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(_Z_ === i) break; + if(Object.is(_Z_, i)) break; i = ___; } } @@ -7499,7 +7518,7 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(_W_ === i) break; + if(Object.is(_W_, i)) break; i = _X_; } } @@ -7530,7 +7549,7 @@ acc$1[1] = acc$2; /*<>*/ output_array[1 + i] = elt$0; /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_T_ === i) break; + if(Object.is(_T_, i)) break; i = _U_; } } @@ -7554,7 +7573,7 @@ function exists(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return 1; @@ -7565,7 +7584,7 @@ function for_all(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 1; + if(Object.is(i, n)) /*<>*/ return 1; /*<>*/ if (! /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return 0; @@ -7575,12 +7594,12 @@ /*<>*/ } function for_all2(p, l1, l2){ /*<>*/ var n1 = l1.length - 1, n2 = l2.length - 1; - if(n1 !== n2) + if(! Object.is(n1, n2)) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_for_all2); var i = 0; /*<>*/ for(;;){ - if(i === n1) /*<>*/ return 1; + if(Object.is(i, n1)) /*<>*/ return 1; /*<>*/ if (! /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) /*<>*/ return 0; @@ -7590,12 +7609,12 @@ /*<>*/ } function exists2(p, l1, l2){ /*<>*/ var n1 = l1.length - 1, n2 = l2.length - 1; - if(n1 !== n2) + if(! Object.is(n1, n2)) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_exists2); var i = 0; /*<>*/ for(;;){ - if(i === n1) /*<>*/ return 0; + if(Object.is(i, n1)) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) /*<>*/ return 1; @@ -7606,7 +7625,7 @@ function mem(x, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ if (0 === /*<>*/ runtime.caml_compare(a[1 + i], x)) /*<>*/ return 1; @@ -7617,8 +7636,8 @@ function memq(x, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - if(x === a[1 + i]) /*<>*/ return 1; + if(Object.is(i, n)) /*<>*/ return 0; + if(Object.is(x, a[1 + i])) /*<>*/ return 1; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; } @@ -7626,7 +7645,7 @@ function find_opt(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ /*<>*/ var x = a[1 + i]; /*<>*/ if( /*<>*/ caml_call1(p, x)) /*<>*/ return [0, x]; @@ -7637,7 +7656,7 @@ function find_index(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return [0, i]; @@ -7648,7 +7667,7 @@ function find_map(f, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ /*<>*/ var r = /*<>*/ caml_call1(f, a[1 + i]); if(r) /*<>*/ return r; @@ -7659,7 +7678,7 @@ function find_mapi(f, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ /*<>*/ var r = /*<>*/ caml_call2(f, i, a[1 + i]); if(r) /*<>*/ return r; @@ -7689,7 +7708,7 @@ /*<>*/ a[1 + i] = ai; /*<>*/ b[1 + i] = bi; /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_O_ === i) break; + if(Object.is(_O_, i)) break; i = _P_; } } @@ -7699,7 +7718,7 @@ /*<>*/ var na = a.length - 1, /*<>*/ nb = b.length - 1; - if(na !== nb) + if(! Object.is(na, nb)) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Array_combine); if(0 === na) /*<>*/ return [0]; @@ -7713,7 +7732,7 @@ for(;;){ x[1 + i] = [0, a[1 + i], b[1 + i]]; /*<>*/ /*<>*/ var _M_ = i + 1 | 0; - if(_L_ === i) break; + if(Object.is(_L_, i)) break; i = _M_; } } @@ -7789,7 +7808,8 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); + if(! Object.is(exn[1], Bottom)) + throw caml_maybe_attach_backtrace(exn, 0); var i$0 = exn[2]; /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } @@ -7818,7 +7838,8 @@ } catch(exn){ var exn$0 = caml_wrap_exception(exn); - if(exn$0[1] !== Bottom) throw caml_maybe_attach_backtrace(exn$0, 0); + if(! Object.is(exn$0[1], Bottom)) + throw caml_maybe_attach_backtrace(exn$0, 0); var i$2 = exn$0[2]; a: { @@ -7827,7 +7848,7 @@ var i$3 = i$2; /*<>*/ for(;;){ var father = (i$3 - 1 | 0) / 3 | 0; - if(i$3 === father) + if(Object.is(i$3, father)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); /*<>*/ if @@ -7935,7 +7956,7 @@ var _s_ = j[1] + 1 | 0; /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; /*<>*/ /*<>*/ var _t_ = i + 1 | 0; - if(_m_ === i) break; + if(Object.is(_m_, i)) break; i = _t_; } } @@ -8272,7 +8293,7 @@ for(;;){ /*<>*/ a[1 + i] = v; /*<>*/ /*<>*/ var _aW_ = i + 1 | 0; - if(_aV_ === i) break; + if(Object.is(_aV_, i)) break; i = _aW_; } } @@ -8314,7 +8335,7 @@ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); /*<>*/ /*<>*/ var _aQ_ = i + 1 | 0; - if(_aP_ === i) break; + if(Object.is(_aP_, i)) break; i = _aQ_; } } @@ -8337,7 +8358,7 @@ for(;;){ /*<>*/ res[1 + x] = make(sy, v); /*<>*/ /*<>*/ var _aN_ = x + 1 | 0; - if(_aM_ === x) break; + if(Object.is(_aM_, x)) break; x = _aN_; } } @@ -8371,13 +8392,13 @@ /*<>*/ caml_call2(f, x, y); /*<>*/ /*<>*/ var _aK_ = y + 1 | 0; - if(_aI_ === y) break; + if(Object.is(_aI_, y)) break; y = _aK_; } } /*<>*/ res[1 + x] = row; /*<>*/ /*<>*/ var _aJ_ = x + 1 | 0; - if(_aG_ === x) break; + if(Object.is(_aG_, x)) break; x = _aJ_; } } @@ -8419,7 +8440,7 @@ i = 0; /*<>*/ for(;;){ if(! l$0){ - if(i === acc) /*<>*/ return result; + if(Object.is(i, acc)) /*<>*/ return result; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); } @@ -8493,14 +8514,14 @@ /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); /*<>*/ /*<>*/ var _aD_ = i + 1 | 0; - if(_aC_ === i) break; + if(Object.is(_aC_, i)) break; i = _aD_; } } return 0; /*<>*/ } function iter2(f, a, b){ - /*<>*/ if(a.length - 1 !== b.length - 1) + /*<>*/ if(! Object.is(a.length - 1, b.length - 1)) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_iter2_arrays_m); /*<>*/ var @@ -8512,7 +8533,7 @@ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _aA_ = i + 1 | 0; - if(_az_ === i) break; + if(Object.is(_az_, i)) break; i = _aA_; } } @@ -8531,7 +8552,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _ax_ = i + 1 | 0; - if(_aw_ === i) break; + if(Object.is(_aw_, i)) break; i = _ax_; } } @@ -8547,7 +8568,7 @@ /*<>*/ a[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _au_ = i + 1 | 0; - if(_at_ === i) break; + if(Object.is(_at_, i)) break; i = _au_; } } @@ -8557,7 +8578,7 @@ /*<>*/ var la = a.length - 1, /*<>*/ lb = b.length - 1; - if(la !== lb) + if(! Object.is(la, lb)) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_map2_arrays_mu); /*<>*/ var @@ -8571,7 +8592,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; - if(_aq_ === i) break; + if(Object.is(_aq_, i)) break; i = _ar_; } } @@ -8587,7 +8608,7 @@ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; - if(_an_ === i) break; + if(Object.is(_an_, i)) break; i = _ao_; } } @@ -8606,7 +8627,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); /*<>*/ /*<>*/ var _al_ = i + 1 | 0; - if(_ak_ === i) break; + if(Object.is(_ak_, i)) break; i = _al_; } } @@ -8622,7 +8643,7 @@ /*<>*/ a[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); /*<>*/ /*<>*/ var _ai_ = i + 1 | 0; - if(_ah_ === i) break; + if(Object.is(_ah_, i)) break; i = _ai_; } } @@ -8638,7 +8659,7 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); /*<>*/ /*<>*/ var _af_ = i + 1 | 0; - if(_ae_ === i) break; + if(Object.is(_ae_, i)) break; i = _af_; } } @@ -8662,7 +8683,7 @@ function exists(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return 1; @@ -8673,7 +8694,7 @@ function for_all(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 1; + if(Object.is(i, n)) /*<>*/ return 1; /*<>*/ if (! /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return 0; @@ -8684,7 +8705,7 @@ function mem(x, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; if(0 === /*<>*/ caml_float_compare(a[1 + i], x)) /*<>*/ return 1; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; @@ -8694,7 +8715,7 @@ function mem_ieee(x, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; if(x === a[1 + i]) /*<>*/ return 1; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -8703,7 +8724,7 @@ function find_opt(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ /*<>*/ var x = a[1 + i]; /*<>*/ if( /*<>*/ caml_call1(p, x)) /*<>*/ return [0, x]; @@ -8714,7 +8735,7 @@ function find_index(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return [0, i]; @@ -8725,7 +8746,7 @@ function find_map(f, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ /*<>*/ var r = /*<>*/ caml_call1(f, a[1 + i]); if(r) /*<>*/ return r; @@ -8736,7 +8757,7 @@ function find_mapi(f, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; + if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ /*<>*/ var r = /*<>*/ caml_call2(f, i, a[1 + i]); if(r) /*<>*/ return r; @@ -8814,7 +8835,8 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); + if(! Object.is(exn[1], Bottom)) + throw caml_maybe_attach_backtrace(exn, 0); var i$0 = exn[2]; /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } @@ -8843,7 +8865,8 @@ } catch(exn){ var exn$0 = caml_wrap_exception(exn); - if(exn$0[1] !== Bottom) throw caml_maybe_attach_backtrace(exn$0, 0); + if(! Object.is(exn$0[1], Bottom)) + throw caml_maybe_attach_backtrace(exn$0, 0); var i$2 = exn$0[2]; a: { @@ -8852,7 +8875,7 @@ var i$3 = i$2; /*<>*/ for(;;){ var father = (i$3 - 1 | 0) / 3 | 0; - if(i$3 === father) + if(Object.is(i$3, father)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _b_], 1); /*<>*/ if @@ -8962,7 +8985,7 @@ var _L_ = j[1] + 1 | 0; /*<>*/ caml_check_bound(dst, _L_)[1 + _L_] = e; /*<>*/ /*<>*/ var _M_ = i + 1 | 0; - if(_F_ === i) break; + if(Object.is(_F_, i)) break; i = _M_; } } @@ -9077,7 +9100,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _t_ = i + 1 | 0; - if(_s_ === i) break; + if(Object.is(_s_, i)) break; i = _t_; } } @@ -9096,7 +9119,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _q_ = i + 1 | 0; - if(_p_ === i) break; + if(Object.is(_p_, i)) break; i = _q_; } } @@ -9313,7 +9336,7 @@ } catch(_e_){ var _c_ = caml_wrap_exception(_e_); - if(_c_[1] === Stdlib[7]) /*<>*/ return 0; + if(Object.is(_c_[1], Stdlib[7])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_c_, 0); } /*<>*/ } @@ -9462,7 +9485,7 @@ } catch(_h_){ var _f_ = caml_wrap_exception(_h_); - if(_f_[1] === Stdlib[7]) /*<>*/ return 0; + if(Object.is(_f_[1], Stdlib[7])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_f_, 0); } /*<>*/ } @@ -9615,7 +9638,7 @@ } catch(_c_){ var _a_ = caml_wrap_exception(_c_); - if(_a_[1] === Stdlib[7]) /*<>*/ return 0; + if(Object.is(_a_[1], Stdlib[7])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_a_, 0); } /*<>*/ } @@ -9754,7 +9777,7 @@ /*<>*/ result = /*<>*/ runtime.caml_lex_engine(tbl, state, buf), _n_ = 0 <= result ? 1 : 0, - _o_ = _n_ ? buf[12] !== dummy_pos ? 1 : 0 : _n_; + _o_ = _n_ ? Object.is(buf[12], dummy_pos) ? 0 : 1 : _n_; if(_o_){ buf[11] = buf[12]; var _p_ = buf[12]; @@ -9767,7 +9790,7 @@ /*<>*/ result = /*<>*/ runtime.caml_new_lex_engine(tbl, state, buf), _k_ = 0 <= result ? 1 : 0, - _l_ = _k_ ? buf[12] !== dummy_pos ? 1 : 0 : _k_; + _l_ = _k_ ? Object.is(buf[12], dummy_pos) ? 0 : 1 : _k_; if(_l_){ buf[11] = buf[12]; var _m_ = buf[12]; @@ -9837,7 +9860,7 @@ /*<>*/ caml_check_bound(t, i)[1 + i] = v - s | 0; /*<>*/ /*<>*/ var _j_ = i + 1 | 0; - if(_i_ === i) break; + if(Object.is(_i_, i)) break; i = _j_; } } @@ -9901,7 +9924,7 @@ return 0; /*<>*/ } function with_positions(lexbuf){ - /*<>*/ return lexbuf[12] !== dummy_pos ? 1 : 0; + /*<>*/ return Object.is(lexbuf[12], dummy_pos) ? 0 : 1; /*<>*/ } function lexeme(lexbuf){ /*<>*/ var len = lexbuf[6] - lexbuf[5] | 0; @@ -9948,7 +9971,7 @@ function new_line(lexbuf){ /*<>*/ var lcp = lexbuf[12], - _a_ = lcp !== dummy_pos ? 1 : 0, + _a_ = Object.is(lcp, dummy_pos) ? 0 : 1, _b_ = _a_ ? (lexbuf[12] = [0, lcp[1], lcp[2] + 1 | 0, lcp[4], lcp[4]], 0) @@ -9959,7 +9982,7 @@ /*<>*/ lb[6] = 0; lb[4] = 0; var lcp = lb[12]; - if(lcp !== dummy_pos) + if(! Object.is(lcp, dummy_pos)) lb[12] = [0, lcp[1], zero_pos[2], zero_pos[3], zero_pos[4]]; lb[3] = 0; return 0; @@ -10133,7 +10156,8 @@ } catch(_m_){ var _h_ = caml_wrap_exception(_m_); - if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); + if(! Object.is(_h_, Parse_error)) + throw caml_maybe_attach_backtrace(_h_, 0); var value = 0, action = 5; } cmd = action; @@ -10157,7 +10181,7 @@ env[7] = init_curr_char; env[8] = init_lval; env[16] = init_errflag; - if(exn[1] === YYexit){ + if(Object.is(exn[1], YYexit)){ var v = exn[2]; /*<>*/ return v; } @@ -10165,16 +10189,14 @@ function(tok){ /*<>*/ if (! /*<>*/ caml_call1(Stdlib_Obj[1], tok)) - /*<>*/ return caml_check_bound(tables[2], tok) - [1 + tok] - === curr_char + /*<>*/ return /*<>*/ Object.is + (caml_check_bound(tables[2], tok)[1 + tok], curr_char) ? 1 : 0; /*<>*/ /*<>*/ var _l_ = /*<>*/ runtime.caml_obj_tag(tok); - /*<>*/ return caml_check_bound(tables[3], _l_) - [1 + _l_] - === curr_char + /*<>*/ return /*<>*/ Object.is + (caml_check_bound(tables[3], _l_)[1 + _l_], curr_char) ? 1 : 0; /*<>*/ }; @@ -10375,10 +10397,10 @@ /*<>*/ if(0 === c) /*<>*/ return t; if(0 <= c){ /*<>*/ /*<>*/ var rr = add(x, r); - return r === rr ? t : bal(l, v, rr); + return Object.is(r, rr) ? t : bal(l, v, rr); } /*<>*/ /*<>*/ var ll = add(x, l); - return l === ll ? t : bal(ll, v, r); + return Object.is(l, ll) ? t : bal(ll, v, r); } function singleton(x){ /*<>*/ return [0, 0, x, 0, 1]; @@ -10543,10 +10565,10 @@ if(0 <= c){ /*<>*/ /*<>*/ var rr = remove(x, t2); - return t2 === rr ? t : bal(t1, v, rr); + return Object.is(t2, rr) ? t : bal(t1, v, rr); } /*<>*/ /*<>*/ var ll = remove(x, t1); - return t1 === ll ? t : bal(ll, v, t2); + return Object.is(t1, ll) ? t : bal(ll, v, t2); } function union(s1, s2){ /*<>*/ if(! s1) /*<>*/ return s2; @@ -10633,7 +10655,7 @@ /*<>*/ for(;;){ if(s1$0 && s2$0){ var r1 = s1$0[3], v1 = s1$0[2], l1 = s1$0[1]; - if(s1$0 === s2$0) /*<>*/ return 0; + if(Object.is(s1$0, s2$0)) /*<>*/ return 0; /*<>*/ /*<>*/ var match = split_bis(v1, s2$0); if(! match) /*<>*/ return 0; @@ -10824,7 +10846,8 @@ /*<>*/ r$0 = filter(p, r); /*<>*/ if(! pv) /*<>*/ return concat(l$0, r$0); - if(l === l$0 && r === r$0) /*<>*/ return t; + if(Object.is(l, l$0) && Object.is(r, r$0)) + /*<>*/ return t; /*<>*/ return join(l$0, v, r$0); } function partition(p, param){ @@ -11022,7 +11045,7 @@ /*<>*/ l$0 = map(f, l), /*<>*/ v$0 = /*<>*/ caml_call1(f, v), /*<>*/ r$0 = map(f, r); - if(l === l$0 && v === v$0 && r === r$0) + if(Object.is(l, l$0) && Object.is(v, v$0) && Object.is(r, r$0)) /*<>*/ return t; /*<>*/ return try_join(l$0, v$0, r$0); } @@ -11037,7 +11060,7 @@ /*<>*/ t2 = filter_map(f, r); /*<>*/ if(v$0){ var v$1 = v$0[1]; - if(l === t1 && v === v$1 && r === t2) + if(Object.is(l, t1) && Object.is(v, v$1) && Object.is(r, t2)) /*<>*/ return t; /*<>*/ return try_join(t1, v$1, t2); } @@ -11399,15 +11422,15 @@ /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); /*<>*/ if(0 === c) - return d === data ? m : [0, l, x, data, r, h]; + return Object.is(d, data) ? m : [0, l, x, data, r, h]; if(0 <= c){ /*<>*/ /*<>*/ var rr = add(x, data, r); - return r === rr ? m : bal(l, v, d, rr); + return Object.is(r, rr) ? m : bal(l, v, d, rr); } /*<>*/ /*<>*/ var ll = add(x, data, l); - return l === ll ? m : bal(ll, v, d, r); + return Object.is(l, ll) ? m : bal(ll, v, d, r); } function find(x, param){ var param$0 = param; @@ -11650,10 +11673,10 @@ /*<>*/ return _d_(l, r); if(0 <= c){ /*<>*/ /*<>*/ var rr = remove(x, r); - return r === rr ? m : bal(l, v, d, rr); + return Object.is(r, rr) ? m : bal(l, v, d, rr); } /*<>*/ /*<>*/ var ll = remove(x, l); - return l === ll ? m : bal(ll, v, d, r); + return Object.is(l, ll) ? m : bal(ll, v, d, r); } function update(x, f, m){ /*<>*/ if(! m){ @@ -11676,16 +11699,16 @@ match = /*<>*/ caml_call1(f, [0, d]); if(! match) /*<>*/ return _d_(l, r); var data = match[1]; - return d === data ? m : [0, l, x, data, r, h]; + return Object.is(d, data) ? m : [0, l, x, data, r, h]; } if(0 <= c){ /*<>*/ /*<>*/ var rr = update(x, f, r); - return r === rr ? m : bal(l, v, d, rr); + return Object.is(r, rr) ? m : bal(l, v, d, rr); } /*<>*/ /*<>*/ var ll = update(x, f, l); - return l === ll ? m : bal(ll, v, d, r); + return Object.is(l, ll) ? m : bal(ll, v, d, r); } function add_to_list(x, data, m){ function add(param){ @@ -11968,7 +11991,8 @@ /*<>*/ r$0 = filter(p, r); /*<>*/ if(! pvd) /*<>*/ return concat(l$0, r$0); - if(l === l$0 && r === r$0) /*<>*/ return m; + if(Object.is(l, l$0) && Object.is(r, r$0)) + /*<>*/ return m; /*<>*/ return join(l$0, v, d, r$0); } function filter_map(f, param){ @@ -12987,7 +13011,7 @@ } var stop$0 = lim$0; } - if(stop$0 === start) + if(Object.is(stop$0, start)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var @@ -13014,9 +13038,12 @@ if(lim <= stop) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if( /*<>*/ caml_string_get(s, stop) === opening){var i = stop + 1 | 0, k$0 = k + 1 | 0; k = k$0; stop = i;} + if + ( /*<>*/ Object.is + ( /*<>*/ caml_string_get(s, stop), opening)){var i = stop + 1 | 0, k$0 = k + 1 | 0; k = k$0; stop = i;} else if - ( /*<>*/ caml_string_get(s, stop) === closing){ + ( /*<>*/ Object.is + ( /*<>*/ caml_string_get(s, stop), closing)){ if(0 === k) break; var i$0 = stop + 1 | 0, k$1 = k - 1 | 0; k = k$1; @@ -13034,7 +13061,8 @@ } catch(_p_){ var _n_ = caml_wrap_exception(_p_); - if(_n_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_n_, 0); + if(! Object.is(_n_, Stdlib[8])) + throw caml_maybe_attach_backtrace(_n_, 0); /*<>*/ add_char(b, 36); previous = 32; i$4 = start; @@ -13548,7 +13576,7 @@ idx = param[1], /*<>*/ st = maybe_grow(idx), /*<>*/ oldval = caml_check_bound(st, idx)[1 + idx]; - /*<>*/ if(oldval !== none) + /*<>*/ if(! Object.is(oldval, none)) /*<>*/ return oldval; /*<>*/ var /*<>*/ new_obj = @@ -13556,11 +13584,11 @@ /*<>*/ st$0 = /*<>*/ caml_domain_dls_get(0), /*<>*/ curval = caml_check_bound(st$0, idx)[1 + idx], - _e_ = curval === oldval ? (st$0[1 + idx] = new_obj, 1) : 0; + _e_ = Object.is(curval, oldval) ? (st$0[1 + idx] = new_obj, 1) : 0; /*<>*/ if(_e_) /*<>*/ return new_obj; /*<>*/ /*<>*/ var updated_obj = caml_check_bound(st$0, idx)[1 + idx]; - /*<>*/ if(updated_obj !== none) + /*<>*/ if(! Object.is(updated_obj, none)) /*<>*/ return updated_obj; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); @@ -14224,7 +14252,7 @@ (buf, /*<>*/ caml_string_get(str, i)); /*<>*/ /*<>*/ var _cP_ = i + 1 | 0; - if(_cO_ === i) break; + if(Object.is(_cO_, i)) break; i = _cP_; } } @@ -14767,7 +14795,7 @@ /*<>*/ buffer_add_char(buf, 63); /*<>*/ /*<>*/ var _cI_ = i$8 + 1 | 0; - if(_cH_ === i$8) break; + if(Object.is(_cH_, i$8)) break; i$8 = _cI_; } } @@ -16914,7 +16942,7 @@ if(9 >= caml_string_unsafe_get(s, i$0) - 48 >>> 0) n[1]++; /*<>*/ /*<>*/ var _ct_ = i$0 + 1 | 0; - if(_cp_ === i$0) break; + if(Object.is(_cp_, i$0)) break; i$0 = _ct_; } } @@ -16950,7 +16978,7 @@ } /*<>*/ /*<>*/ var _cs_ = i + 1 | 0; - if(_cr_ === i) break; + if(Object.is(_cr_, i)) break; i = _cs_; } } @@ -17123,7 +17151,7 @@ len = caml_ml_string_length(str), i = 0; /*<>*/ for(;;){ - if(i === len) + if(Object.is(i, len)) var _ch_ = 0; else{ /*<>*/ /*<>*/ var @@ -18436,7 +18464,8 @@ function parse_spaces(i){ /*<>*/ var i$0 = i; /*<>*/ for(;;){ - if(i$0 === len) /*<>*/ return i$0; + if(Object.is(i$0, len)) + /*<>*/ return i$0; /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(str, i$0); @@ -18454,7 +18483,7 @@ { var wend = wstart; /*<>*/ for(;;){ - if(wend === len) break b; + if(Object.is(wend, len)) break b; if (25 < @@ -18478,7 +18507,7 @@ { var nend = nstart; /*<>*/ for(;;){ - if(nend === len) break b; + if(Object.is(nend, len)) break b; /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(str, nend); @@ -18489,7 +18518,7 @@ } break a; } - if(nstart === nend) + if(Object.is(nstart, nend)) var indent = 0; else /*<>*/ try{ @@ -18502,12 +18531,14 @@ } catch(_bt_){ var _br_ = caml_wrap_exception(_bt_); - if(_br_[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(_br_, 0); + if(! Object.is(_br_[1], Stdlib[7])) + throw caml_maybe_attach_backtrace(_br_, 0); var indent = invalid_box(0); } /*<>*/ /*<>*/ var exp_end = parse_spaces(nend); - if(exp_end !== len) /*<>*/ invalid_box(0); + if(! Object.is(exp_end, len)) + /*<>*/ invalid_box(0); a: { if(box_name !== cst$43 && box_name !== "b"){ @@ -18569,7 +18600,7 @@ { var str_ind = lit_start; /*<>*/ for(;;){ - if(str_ind === end_ind) + if(Object.is(str_ind, end_ind)) /*<>*/ return add_literal (lit_start, str_ind, 0); /*<>*/ /*<>*/ var @@ -18581,7 +18612,7 @@ str_ind = str_ind$1; } var str_ind$2 = str_ind + 1 | 0; - if(str_ind$2 === end_ind) + if(Object.is(str_ind$2, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); var @@ -18598,7 +18629,7 @@ } var str_ind$0 = str_ind + 1 | 0; a: - if(str_ind$0 === end_ind) + if(Object.is(str_ind$0, end_ind)) var match$0 = _N_; else{ /*<>*/ /*<>*/ var @@ -18679,7 +18710,7 @@ b: try{ var - _bg_ = str_ind$3 === end_ind ? 1 : 0, + _bg_ = Object.is(str_ind$3, end_ind) ? 1 : 0, _bh_ = _bg_ || @@ -18769,7 +18800,8 @@ } catch(_bq_){ var _bf_ = caml_wrap_exception(_bq_); - if(_bf_ !== Stdlib[8] && _bf_[1] !== Stdlib[7]) + if + (! Object.is(_bf_, Stdlib[8]) && ! Object.is(_bf_[1], Stdlib[7])) throw caml_maybe_attach_backtrace(_bf_, 0); var formatting_lit$0 = formatting_lit, next_ind = str_ind$3; } @@ -18824,7 +18856,8 @@ } catch(_bp_){ var _bm_ = caml_wrap_exception(_bp_); - if(_bm_ !== Stdlib[8] && _bm_[1] !== Stdlib[7]) + if + (! Object.is(_bm_, Stdlib[8]) && ! Object.is(_bm_[1], Stdlib[7])) throw caml_maybe_attach_backtrace(_bm_, 0); var _bn_ = 0; } @@ -18887,7 +18920,7 @@ var str_ind$0 = str_ind; c: /*<>*/ for(;;){ - if(str_ind$0 === end_ind) + if(Object.is(str_ind$0, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ /*<>*/ var @@ -18939,7 +18972,7 @@ plus$0 = plus[1], minus$0 = minus[1], zero$0 = zero[1]; - if(str_ind$0 === end_ind) + if(Object.is(str_ind$0, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ var @@ -19024,7 +19057,7 @@ /*<>*/ } function parse_after_padding (pct_ind, str_ind, end_ind, minus, plus, hash, space, ign, pad){ - /*<>*/ if(str_ind === end_ind) + /*<>*/ if(Object.is(str_ind, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ /*<>*/ var @@ -19044,7 +19077,7 @@ pad, symb); var str_ind$0 = str_ind + 1 | 0; - if(str_ind$0 === end_ind) + if(Object.is(str_ind$0, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); function parse_literal(minus, str_ind){ @@ -19114,7 +19147,7 @@ /*<>*/ } function parse_after_precision (pct_ind, str_ind, end_ind, minus, plus, hash, space, ign, pad, prec){ - /*<>*/ if(str_ind === end_ind) + /*<>*/ if(Object.is(str_ind, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); function parse_conv(padprec){ @@ -19324,7 +19357,7 @@ var fmt_result = _aS_; break a; case 91: - if(str_ind === end_ind) + if(Object.is(str_ind, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ var @@ -19341,7 +19374,7 @@ (Stdlib[29], i)); /*<>*/ /*<>*/ var _a$_ = i + 1 | 0; - if(c === i) break; + if(Object.is(c, i)) break; i = _a$_; } } @@ -19355,7 +19388,7 @@ function(counter, str_ind, end_ind){ /*<>*/ var str_ind$0 = str_ind; /*<>*/ for(;;){ - if(str_ind$0 === end_ind) + if(Object.is(str_ind$0, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ /*<>*/ var @@ -19386,7 +19419,7 @@ str_ind$0 = str_ind, c$0 = c; /*<>*/ for(;;){ - if(str_ind$0 === end_ind) + if(Object.is(str_ind$0, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ /*<>*/ var @@ -19407,7 +19440,7 @@ else if(37 !== c$1){ if(45 > c$1) break a; var str_ind$2 = str_ind$0 + 1 | 0; - if(str_ind$2 === end_ind) + if(Object.is(str_ind$2, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ /*<>*/ var @@ -19478,7 +19511,7 @@ /*<>*/ return caml_trampoline (parse_char_set_after_char$0(0, str_ind, end_ind, c)); }; - if(str_ind === end_ind) + if(Object.is(str_ind, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); if @@ -19492,7 +19525,7 @@ str_ind$1 = str_ind$0; else var reverse = 0, str_ind$1 = str_ind; - if(str_ind$1 === end_ind) + if(Object.is(str_ind$1, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ var @@ -19626,7 +19659,7 @@ case 76: case 108: case 110: - if(str_ind !== end_ind){ + if(! Object.is(str_ind, end_ind)){ /*<>*/ var /*<>*/ symb$0 = /*<>*/ caml_string_get @@ -19952,7 +19985,7 @@ } function parse_tag(is_open_tag, str_ind, end_ind){ /*<>*/ try{ - if(str_ind === end_ind) + if(Object.is(str_ind, end_ind)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); if @@ -19984,7 +20017,8 @@ } catch(_aj_){ var _ah_ = caml_wrap_exception(_aj_); - if(_ah_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ah_, 0); + if(! Object.is(_ah_, Stdlib[8])) + throw caml_maybe_attach_backtrace(_ah_, 0); /*<>*/ var fmt_rest = parse(str_ind, end_ind)[1], /*<>*/ formatting = @@ -19996,7 +20030,7 @@ function parse_spaces(str_ind, end_ind){ /*<>*/ var str_ind$0 = str_ind; /*<>*/ for(;;){ - if(str_ind$0 === end_ind) + if(Object.is(str_ind$0, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ if @@ -20013,7 +20047,7 @@ str_ind$0 = str_ind, acc$0 = acc; /*<>*/ for(;;){ - if(str_ind$0 === end_ind) + if(Object.is(str_ind$0, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ /*<>*/ var @@ -20035,7 +20069,7 @@ } /*<>*/ } function parse_integer(str_ind, end_ind){ - /*<>*/ if(str_ind === end_ind) + /*<>*/ if(Object.is(str_ind, end_ind)) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ /*<>*/ var @@ -20088,7 +20122,7 @@ function search_subformat_end(str_ind, end_ind, c){ /*<>*/ var str_ind$0 = str_ind; /*<>*/ for(;;){ - if(str_ind$0 === end_ind) + if(Object.is(str_ind$0, end_ind)) /*<>*/ /*<>*/ caml_call3 (failwith_message(_U_), str, c, end_ind); if @@ -20100,9 +20134,10 @@ /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); if - ( /*<>*/ caml_string_get - (str, str_ind$0 + 1 | 0) - === c) + ( /*<>*/ Object.is + ( /*<>*/ caml_string_get + (str, str_ind$0 + 1 | 0), + c)) /*<>*/ return str_ind$0; /*<>*/ /*<>*/ var match = @@ -20305,7 +20340,8 @@ } catch(_af_){ var _ac_ = caml_wrap_exception(_af_); - if(_ac_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ac_, 0); + if(! Object.is(_ac_, Type_mismatch)) + throw caml_maybe_attach_backtrace(_ac_, 0); /*<>*/ /*<>*/ var _ad_ = string_of_fmtty(fmtty); /*<>*/ return /*<>*/ caml_call2 @@ -20324,7 +20360,7 @@ } catch(_ab_){ var _$_ = caml_wrap_exception(_ab_); - if(_$_ === Type_mismatch) + if(Object.is(_$_, Type_mismatch)) /*<>*/ return /*<>*/ caml_call2 (failwith_message(___), str, str$0); throw caml_maybe_attach_backtrace(_$_, 0); @@ -20671,7 +20707,7 @@ function check_same_length(f, a, expected){ /*<>*/ var length_a = a[1], - _W_ = expected !== length_a ? 1 : 0; + _W_ = Object.is(expected, length_a) ? 0 : 1; return _W_ ? /*<>*/ caml_call5 (Stdlib_Printf[10], Stdlib[1], _h_, f, expected, length_a) @@ -20790,7 +20826,7 @@ } catch(_U_){ var _T_ = caml_wrap_exception(_U_); - if(_T_ === Stdlib[8]) /*<>*/ return 0; + if(Object.is(_T_, Stdlib[8])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_T_, 0); } /*<>*/ return [0, x]; @@ -20870,7 +20906,7 @@ /*<>*/ } function fit_capacity(a){ /*<>*/ var _N_ = a[1]; - return capacity(a) === _N_ + return /*<>*/ Object.is(capacity(a), _N_) ? 0 : (a [2] @@ -20970,7 +21006,7 @@ arr[1 + (length_a + i | 0)] = [0, x]; /*<>*/ /*<>*/ var _J_ = i + 1 | 0; - if(_I_ === i) break; + if(Object.is(_I_, i)) break; i = _J_; } } @@ -21004,7 +21040,7 @@ arr_a[1 + (length_a + i | 0)] = [0, x]; /*<>*/ /*<>*/ var _F_ = i + 1 | 0; - if(_E_ === i) break; + if(Object.is(_E_, i)) break; i = _F_; } } @@ -21036,7 +21072,7 @@ (k, unsafe_get(arr, i, length)); /*<>*/ /*<>*/ var _B_ = i + 1 | 0; - if(_A_ === i) break; + if(Object.is(_A_, i)) break; i = _B_; } } @@ -21058,7 +21094,7 @@ (k, i, unsafe_get(arr, i, length)); /*<>*/ /*<>*/ var _y_ = i + 1 | 0; - if(_x_ === i) break; + if(Object.is(_x_, i)) break; i = _y_; } } @@ -21115,7 +21151,7 @@ r[1] = /*<>*/ caml_call2(f, r[1], v); /*<>*/ /*<>*/ var _v_ = i + 1 | 0; - if(_u_ === i) break; + if(Object.is(_u_, i)) break; i = _v_; } } @@ -21148,7 +21184,7 @@ /*<>*/ check_valid_length(length, arr); var i = 0; /*<>*/ for(;;){ - if(i === length) + if(Object.is(i, length)) var res = 0; else{ /*<>*/ /*<>*/ var @@ -21170,7 +21206,7 @@ /*<>*/ check_valid_length(length, arr); var i = 0; /*<>*/ for(;;){ - if(i === length) + if(Object.is(i, length)) var res = 1; else{ /*<>*/ /*<>*/ var @@ -21513,7 +21549,8 @@ } catch(_ay_){ var _as_ = caml_wrap_exception(_ay_); - if(_as_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_as_, 0); + if(! Object.is(_as_, Stdlib[8])) + throw caml_maybe_attach_backtrace(_as_, 0); var add1 = [0, @@ -21526,7 +21563,8 @@ } catch(_ax_){ var _at_ = caml_wrap_exception(_ax_); - if(_at_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_at_, 0); + if(! Object.is(_at_, Stdlib[8])) + throw caml_maybe_attach_backtrace(_at_, 0); var add2 = [0, @@ -21626,7 +21664,7 @@ } catch(_an_){ var _al_ = caml_wrap_exception(_an_); - if(_al_[1] === Stdlib[7]) /*<>*/ return 0; + if(Object.is(_al_[1], Stdlib[7])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_al_, 0); } /*<>*/ } @@ -21638,7 +21676,7 @@ } catch(_ak_){ var _ai_ = caml_wrap_exception(_ak_); - if(_ai_[1] === Stdlib[7]) /*<>*/ return 0; + if(Object.is(_ai_[1], Stdlib[7])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_ai_, 0); } /*<>*/ } @@ -21705,7 +21743,8 @@ } catch(_ag_){ var _W_ = caml_wrap_exception(_ag_); - if(_W_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_W_, 0); + if(! Object.is(_W_, Stdlib[8])) + throw caml_maybe_attach_backtrace(_W_, 0); /*<>*/ try{ /*<>*/ var /*<>*/ i = @@ -21724,7 +21763,7 @@ } catch(_ah_){ var _X_ = caml_wrap_exception(_ah_); - if(_X_ === Stdlib[8]) + if(Object.is(_X_, Stdlib[8])) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stop, [0, s]], 1); throw caml_maybe_attach_backtrace(_X_, 0); @@ -21777,7 +21816,7 @@ } catch(_ae_){ var ___ = caml_wrap_exception(_ae_); - if(___[1] !== Stdlib[6]) + if(! Object.is(___[1], Stdlib[6])) throw caml_maybe_attach_backtrace(___, 0); var match = 0; } @@ -21944,12 +21983,12 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(exn[1] === Bad){ + if(Object.is(exn[1], Bad)){ var m = exn[2]; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (convert_error([3, m]), 1); } - if(exn[1] !== Stop) throw caml_maybe_attach_backtrace(exn, 0); + if(! Object.is(exn[1], Stop)) throw caml_maybe_attach_backtrace(exn, 0); var e = exn[2]; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (convert_error(e), 1); @@ -21980,14 +22019,14 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(exn[1] === Bad){ + if(Object.is(exn[1], Bad)){ var msg$0 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[3], _l_, msg$0); /*<>*/ return /*<>*/ caml_call1 (Stdlib[99], 2); } - if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); + if(! Object.is(exn[1], Help)) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[2], _m_, msg$1); @@ -22003,14 +22042,14 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(exn[1] === Bad){ + if(Object.is(exn[1], Bad)){ var msg$0 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[3], _n_, msg$0); /*<>*/ return /*<>*/ caml_call1 (Stdlib[99], 2); } - if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); + if(! Object.is(exn[1], Help)) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[2], _o_, msg$1); @@ -22030,14 +22069,14 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(exn[1] === Bad){ + if(Object.is(exn[1], Bad)){ var msg$0 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[3], _p_, msg$0); /*<>*/ return /*<>*/ caml_call1 (Stdlib[99], 2); } - if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); + if(! Object.is(exn[1], Help)) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[2], _q_, msg$1); @@ -22064,14 +22103,15 @@ } catch(_Q_){ var _O_ = caml_wrap_exception(_Q_); - if(_O_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_O_, 0); + if(! Object.is(_O_, Stdlib[8])) + throw caml_maybe_attach_backtrace(_O_, 0); /*<>*/ try{ /*<>*/ /*<>*/ var n = /*<>*/ caml_call2(Stdlib_String[36], s, 32); } catch(_R_){ var _P_ = caml_wrap_exception(_R_); - if(_P_ === Stdlib[8]) /*<>*/ return len; + if(Object.is(_P_, Stdlib[8])) /*<>*/ return len; throw caml_maybe_attach_backtrace(_P_, 0); } /*<>*/ return loop(n + 1 | 0); @@ -22202,7 +22242,7 @@ for(;;){ /*<>*/ /*<>*/ var c = /*<>*/ caml_call1(Stdlib[82], ic); - if(c === sep) + if(Object.is(c, sep)) /*<>*/ stash(0); else /*<>*/ /*<>*/ caml_call2 @@ -22211,7 +22251,8 @@ } catch(_G_){ var _E_ = caml_wrap_exception(_G_); - if(_E_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_E_, 0); + if(! Object.is(_E_, Stdlib[12])) + throw caml_maybe_attach_backtrace(_E_, 0); if(0 < /*<>*/ caml_call1(Stdlib_Buffer[7], buf)) /*<>*/ stash(0); /*<>*/ /*<>*/ caml_call1(Stdlib[93], ic); @@ -22411,12 +22452,15 @@ (Stdlib_Printf[4], _b_, f); /*<>*/ /*<>*/ var _ah_ = Stdlib_Obj[15]; - if( /*<>*/ caml_obj_tag(f) === _ah_) + if + ( /*<>*/ Object.is + ( /*<>*/ caml_obj_tag(f), _ah_)) /*<>*/ return /*<>*/ caml_call2 (Stdlib_Printf[4], _a_, f); /*<>*/ /*<>*/ var _ai_ = Stdlib_Obj[16]; - return /*<>*/ caml_obj_tag(f) === _ai_ + return /*<>*/ Object.is + ( /*<>*/ caml_obj_tag(f), _ai_) ? /*<>*/ caml_call1(Stdlib[35], f) : cst; /*<>*/ } @@ -22484,10 +22528,11 @@ (Stdlib[28], constructor$0, f); /*<>*/ } function to_string_default(x){ - /*<>*/ if(x === Stdlib[9]) + /*<>*/ if(Object.is(x, Stdlib[9])) /*<>*/ return cst_Out_of_memory; - if(x === Stdlib[10]) /*<>*/ return cst_Stack_overflow; - if(x[1] === Stdlib[4]){ + if(Object.is(x, Stdlib[10])) + /*<>*/ return cst_Stack_overflow; + if(Object.is(x[1], Stdlib[4])){ var match = x[2], char$0 = match[3], line = match[2], file = match[1]; /*<>*/ return /*<>*/ caml_call6 (Stdlib_Printf[4], @@ -22498,7 +22543,7 @@ char$0 + 5 | 0, cst_Pattern_matching_failed); } - if(x[1] === Stdlib[5]){ + if(Object.is(x[1], Stdlib[5])){ var match$0 = x[2], char$1 = match$0[3], @@ -22513,7 +22558,7 @@ char$1 + 6 | 0, cst_Assertion_failed); } - if(x[1] !== Stdlib[15]) + if(! Object.is(x[1], Stdlib[15])) /*<>*/ return string_of_extension_constructo(x); var match$1 = x[2], @@ -22588,7 +22633,7 @@ /*<>*/ if(0 === slot[0]){ /*<>*/ var lines = - slot[3] === slot[6] + Object.is(slot[3], slot[6]) ? /*<>*/ caml_call2 (Stdlib_Printf[4], _h_, slot[3]) : /*<>*/ caml_call3 @@ -22627,7 +22672,7 @@ } /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; - if(_P_ === i) break; + if(Object.is(_P_, i)) break; i = _Q_; } } @@ -22661,7 +22706,7 @@ } /*<>*/ /*<>*/ var _N_ = i + 1 | 0; - if(_M_ === i) break; + if(Object.is(_M_, i)) break; i = _N_; } } @@ -22839,7 +22884,8 @@ } catch(_D_){ var _w_ = caml_wrap_exception(_D_); - if(_w_ !== Stdlib[9]) throw caml_maybe_attach_backtrace(_w_, 0); + if(! Object.is(_w_, Stdlib[9])) + throw caml_maybe_attach_backtrace(_w_, 0); var _B_ = /*<>*/ caml_call1 @@ -22940,7 +22986,7 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Printexc[9], function(param){ - /*<>*/ if(param[1] !== Finally_raised) + /*<>*/ if(! Object.is(param[1], Finally_raised)) /*<>*/ return 0; /*<>*/ var exn = param[2], @@ -23300,7 +23346,7 @@ } catch(_x_){ var _w_ = caml_wrap_exception(_x_); - if(_w_ === Stdlib[12]) /*<>*/ return 0; + if(Object.is(_w_, Stdlib[12])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_w_, 0); } /*<>*/ return [0, c]; @@ -23312,7 +23358,7 @@ } catch(_v_){ var _u_ = caml_wrap_exception(_v_); - if(_u_ === Stdlib[12]) /*<>*/ return 0; + if(Object.is(_u_, Stdlib[12])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_u_, 0); } /*<>*/ return [0, n]; @@ -23324,7 +23370,7 @@ } catch(_t_){ var _s_ = caml_wrap_exception(_t_); - if(_s_ === Stdlib[12]) /*<>*/ return 0; + if(Object.is(_s_, Stdlib[12])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_s_, 0); } /*<>*/ return [0, s]; @@ -23356,7 +23402,7 @@ } catch(_r_){ var _q_ = caml_wrap_exception(_r_); - if(_q_ === Stdlib[12]) /*<>*/ return 0; + if(Object.is(_q_, Stdlib[12])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_q_, 0); } /*<>*/ } @@ -23391,7 +23437,7 @@ } catch(_p_){ var _o_ = caml_wrap_exception(_p_); - if(_o_ === Stdlib[12]) /*<>*/ return 0; + if(Object.is(_o_, Stdlib[12])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_o_, 0); } /*<>*/ return [0, s]; @@ -23452,7 +23498,8 @@ } catch(_n_){ var _i_ = caml_wrap_exception(_n_); - if(_i_[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(_i_, 0); + if(! Object.is(_i_[1], Stdlib[11])) + throw caml_maybe_attach_backtrace(_i_, 0); var initial_size = -1; } /*<>*/ var @@ -23473,7 +23520,7 @@ } catch(_m_){ var _j_ = caml_wrap_exception(_m_); - if(_j_ === Stdlib[12]) + if(Object.is(_j_, Stdlib[12])) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], buf); throw caml_maybe_attach_backtrace(_j_, 0); @@ -23506,7 +23553,7 @@ } catch(_h_){ var _e_ = caml_wrap_exception(_h_); - if(_e_ === Stdlib[12]) /*<>*/ return 0; + if(Object.is(_e_, Stdlib[12])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_e_, 0); } /*<>*/ var @@ -23520,7 +23567,8 @@ } catch(_g_){ var _f_ = caml_wrap_exception(_g_); - if(_f_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_f_, 0); + if(! Object.is(_f_, Stdlib[12])) + throw caml_maybe_attach_backtrace(_f_, 0); dst[1 + offset] = 0; /*<>*/ return block; } @@ -23540,7 +23588,8 @@ } catch(_d_){ var _c_ = caml_wrap_exception(_d_); - if(_c_ === Stdlib[12]) /*<>*/ return accu$0; + if(Object.is(_c_, Stdlib[12])) + /*<>*/ return accu$0; throw caml_maybe_attach_backtrace(_c_, 0); } /*<>*/ /*<>*/ var @@ -23768,7 +23817,7 @@ caml_bytes_unsafe_set(result, i * 2 | 0, char_hex(x >>> 4 | 0)); caml_bytes_unsafe_set(result, (i * 2 | 0) + 1 | 0, char_hex(x & 15)); /*<>*/ /*<>*/ var _k_ = i + 1 | 0; - if(_j_ === i) break; + if(Object.is(_j_, i)) break; i = _k_; } } @@ -23907,7 +23956,8 @@ (Stdlib[86], chan, hash_length); /*<>*/ } function to_hex(d){ - /*<>*/ if(caml_ml_string_length(d) !== hash_length) + /*<>*/ if + (! Object.is(caml_ml_string_length(d), hash_length)) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Digest_to_hex); /*<>*/ return hex_of_string(d); @@ -24118,7 +24168,7 @@ cst_Bigarray_array2_of_genarra = "Bigarray.array2_of_genarray", cst_Bigarray_array3_of_genarra = "Bigarray.array3_of_genarray"; function cloop(arr, idx, f, col, max){ - /*<>*/ if(col === idx.length - 1){ + /*<>*/ if(Object.is(col, idx.length - 1)){ /*<>*/ /*<>*/ caml_ba_set_generic (arr, idx, /*<>*/ caml_call1(f, idx)); /*<>*/ return; @@ -24134,7 +24184,7 @@ /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); /*<>*/ /*<>*/ var _an_ = j + 1 | 0; - if(_am_ === j) break; + if(Object.is(_am_, j)) break; j = _an_; } } @@ -24155,7 +24205,7 @@ /*<>*/ floop(arr, idx, f, col - 1 | 0, max); /*<>*/ /*<>*/ var _ak_ = j + 1 | 0; - if(_aj_ === j) break; + if(Object.is(_aj_, j)) break; j = _ak_; } } @@ -24197,7 +24247,7 @@ /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_af_ === i) break; + if(Object.is(_af_, i)) break; i = _ah_; } } @@ -24265,7 +24315,7 @@ (arr, i$0, /*<>*/ caml_call1(f, i$0)); /*<>*/ /*<>*/ var ___ = i$0 + 1 | 0; - if(dim === i$0) break; + if(Object.is(dim, i$0)) break; i$0 = ___; } } @@ -24281,7 +24331,7 @@ (arr, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; - if(_X_ === i) break; + if(Object.is(_X_, i)) break; i = _Y_; } } @@ -24300,7 +24350,7 @@ (ba, i + ofs | 0, caml_check_bound(data, i)[1 + i]); /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(_U_ === i) break; + if(Object.is(_U_, i)) break; i = _V_; } } @@ -24347,13 +24397,13 @@ (arr, i$0, j$0, /*<>*/ caml_call2(f, i$0, j$0)); /*<>*/ /*<>*/ var _Q_ = i$0 + 1 | 0; - if(dim1 === i$0) break; + if(Object.is(dim1, i$0)) break; i$0 = _Q_; } } /*<>*/ /*<>*/ var _P_ = j$0 + 1 | 0; - if(dim2 === j$0) break; + if(Object.is(dim2, j$0)) break; j$0 = _P_; } } @@ -24375,13 +24425,13 @@ (arr, i, j, /*<>*/ caml_call2(f, i, j)); /*<>*/ /*<>*/ var _M_ = j + 1 | 0; - if(_K_ === j) break; + if(Object.is(_K_, j)) break; j = _M_; } } /*<>*/ /*<>*/ var _L_ = i + 1 | 0; - if(_I_ === i) break; + if(Object.is(_I_, i)) break; i = _L_; } } @@ -24401,7 +24451,7 @@ for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; - if(row.length - 1 !== dim2) + if(! Object.is(row.length - 1, dim2)) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array2_of_array_n); /*<>*/ var @@ -24414,13 +24464,13 @@ (ba, i + ofs | 0, j + ofs | 0, caml_check_bound(row, j)[1 + j]); /*<>*/ /*<>*/ var _G_ = j + 1 | 0; - if(_E_ === j) break; + if(Object.is(_E_, j)) break; j = _G_; } } /*<>*/ /*<>*/ var _F_ = i + 1 | 0; - if(_C_ === i) break; + if(Object.is(_C_, i)) break; i = _F_; } } @@ -24487,19 +24537,19 @@ /*<>*/ caml_call3(f, i$0, j$0, k$0)); /*<>*/ /*<>*/ var _x_ = i$0 + 1 | 0; - if(dim1 === i$0) break; + if(Object.is(dim1, i$0)) break; i$0 = _x_; } } /*<>*/ /*<>*/ var _w_ = j$0 + 1 | 0; - if(dim2 === j$0) break; + if(Object.is(dim2, j$0)) break; j$0 = _w_; } } /*<>*/ /*<>*/ var _u_ = k$0 + 1 | 0; - if(dim3 === k$0) break; + if(Object.is(dim3, k$0)) break; k$0 = _u_; } } @@ -24527,19 +24577,19 @@ (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); /*<>*/ /*<>*/ var _r_ = k + 1 | 0; - if(_p_ === k) break; + if(Object.is(_p_, k)) break; k = _r_; } } /*<>*/ /*<>*/ var _q_ = j + 1 | 0; - if(_m_ === j) break; + if(Object.is(_m_, j)) break; j = _q_; } } /*<>*/ /*<>*/ var _n_ = i + 1 | 0; - if(_k_ === i) break; + if(Object.is(_k_, i)) break; i = _n_; } } @@ -24563,7 +24613,7 @@ for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; - if(row.length - 1 !== dim2) + if(! Object.is(row.length - 1, dim2)) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n); /*<>*/ var @@ -24574,7 +24624,7 @@ for(;;){ /*<>*/ /*<>*/ var col = caml_check_bound(row, j)[1 + j]; - if(col.length - 1 !== dim3) + if(! Object.is(col.length - 1, dim3)) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n$0); /*<>*/ var @@ -24591,19 +24641,19 @@ caml_check_bound(col, k)[1 + k]); /*<>*/ /*<>*/ var _i_ = k + 1 | 0; - if(_g_ === k) break; + if(Object.is(_g_, k)) break; k = _i_; } } /*<>*/ /*<>*/ var _h_ = j + 1 | 0; - if(_d_ === j) break; + if(Object.is(_d_, j)) break; j = _h_; } } /*<>*/ /*<>*/ var _e_ = i + 1 | 0; - if(_b_ === i) break; + if(Object.is(_b_, i)) break; i = _e_; } } @@ -24881,7 +24931,7 @@ /*<>*/ /*<>*/ caml_call3 (Stdlib_Bytes[86], b, i * 8 | 0, _t_); /*<>*/ /*<>*/ var _u_ = i + 1 | 0; - if(_p_ === i) break; + if(Object.is(_p_, i)) break; i = _u_; } } @@ -25398,7 +25448,7 @@ } catch(_al_){ var _a_ = caml_wrap_exception(_al_); - if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); + if(! Object.is(_a_, Stdlib[8])) throw caml_maybe_attach_backtrace(_a_, 0); /*<>*/ try{ /*<>*/ var /*<>*/ _e_ = @@ -25407,7 +25457,8 @@ } catch(_am_){ var _b_ = caml_wrap_exception(_am_); - if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); + if(! Object.is(_b_, Stdlib[8])) + throw caml_maybe_attach_backtrace(_b_, 0); var _c_ = cst; } var params = _c_; @@ -25472,7 +25523,9 @@ /*<>*/ var len = h[2].length - 1; if (4 <= h.length - 1 - && len !== /*<>*/ caml_call1(Stdlib[18], h[4])){ + && + ! + Object.is(len, /*<>*/ caml_call1(Stdlib[18], h[4]))){ h[1] = 0; h[2] = /*<>*/ caml_make_vect @@ -25549,7 +25602,7 @@ } /*<>*/ /*<>*/ var _af_ = i$0 + 1 | 0; - if(_aa_ === i$0) break; + if(Object.is(_aa_, i$0)) break; i$0 = _af_; } } @@ -25565,7 +25618,7 @@ if(match$0) match$0[3] = 0; /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ac_ === i) break; + if(Object.is(_ac_, i)) break; i = _ae_; } } @@ -25612,7 +25665,7 @@ } /*<>*/ /*<>*/ var _Z_ = i + 1 | 0; - if(_W_ === i) break; + if(Object.is(_W_, i)) break; i = _Z_; } } @@ -25668,7 +25721,7 @@ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(_R_ === i) break; + if(Object.is(_R_, i)) break; i = _U_; } } @@ -25716,7 +25769,7 @@ accu$1[1] = accu; /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(_N_ === i) break; + if(Object.is(_N_, i)) break; i = _P_; } } @@ -25782,7 +25835,8 @@ [0, key, data], function(_K_){ /*<>*/ return aux(i$0, next, _K_);}]; } - if(i$0 === tbl_data.length - 1) /*<>*/ return 0; + if(Object.is(i$0, tbl_data.length - 1)) + /*<>*/ return 0; /*<>*/ var /*<>*/ buck$1 = caml_check_bound(tbl_data, i$0)[1 + i$0], @@ -26501,7 +26555,7 @@ for(;;){ /*<>*/ set(ar, i, x); /*<>*/ /*<>*/ var _D_ = i + 1 | 0; - if(_C_ === i) break; + if(Object.is(_C_, i)) break; i = _D_; } } @@ -26538,7 +26592,7 @@ /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; /*<>*/ /*<>*/ var _B_ = i + 1 | 0; - if(_A_ === i) break; + if(Object.is(_A_, i)) break; i = _B_; } } @@ -26792,7 +26846,7 @@ if(sz <= i) /*<>*/ return /*<>*/ caml_call2 (notfound, h, index); - if(h === caml_check_bound(hashes, i)[1 + i]){ + if(Object.is(h, caml_check_bound(hashes, i)[1 + i])){ /*<>*/ /*<>*/ var opt = get(bucket, i); if(opt){ @@ -26881,7 +26935,7 @@ accu = 0; /*<>*/ for(;;){ if(sz <= i) /*<>*/ return accu; - if(h === caml_check_bound(hashes, i)[1 + i]){ + if(Object.is(h, caml_check_bound(hashes, i)[1 + i])){ /*<>*/ /*<>*/ var match = get(bucket, i); if(match){ @@ -27334,7 +27388,7 @@ /*<>*/ elem = [0, size, [3, indent, br_ty], 0]; /*<>*/ return scan_push(state, 0, elem); } - var _a4_ = state[14] === state[15] ? 1 : 0; + var _a4_ = Object.is(state[14], state[15]) ? 1 : 0; if(! _a4_) return _a4_; var s = state[16], x = caml_ml_string_length(s); /*<>*/ return enqueue_string_as(state, x, s); @@ -27604,7 +27658,7 @@ /*<>*/ return state[15]; /*<>*/ } function pp_over_max_boxes(state, param){ - /*<>*/ return state[14] === state[15] ? 1 : 0; + /*<>*/ return Object.is(state[14], state[15]) ? 1 : 0; /*<>*/ } function pp_set_ellipsis_text(state, s){ /*<>*/ state[16] = s; @@ -27757,7 +27811,7 @@ return 0; /*<>*/ } function default_pp_mark_open_tag(param){ - /*<>*/ if(param[1] !== String_tag) + /*<>*/ if(! Object.is(param[1], String_tag)) /*<>*/ return cst$10; /*<>*/ var s = param[2], @@ -27767,7 +27821,7 @@ (Stdlib[28], cst$9, _aD_); /*<>*/ } function default_pp_mark_close_tag(param){ - /*<>*/ if(param[1] !== String_tag) + /*<>*/ if(! Object.is(param[1], String_tag)) /*<>*/ return cst$13; /*<>*/ var s = param[2], @@ -28471,8 +28525,8 @@ return 0; /*<>*/ } for(;;){ - if(right[1] === len){ - var _O_ = left[1] !== len ? 1 : 0; + if(Object.is(right[1], len)){ + var _O_ = Object.is(left[1], len) ? 0 : 1; return _O_ ? flush(0) : _O_; } /*<>*/ /*<>*/ var @@ -29191,7 +29245,8 @@ } catch(_aY_){ var _aX_ = caml_wrap_exception(_aY_); - if(_aX_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_aX_, 0); + if(! Object.is(_aX_, Stdlib[12])) + throw caml_maybe_attach_backtrace(_aX_, 0); ib[2] = null_char; ib[3] = 0; ib[1] = 1; @@ -29491,7 +29546,9 @@ function check_this_char(ib, c){ /*<>*/ /*<>*/ var ci = checked_peek_char(ib); - return ci === c ? invalidate_current_char(ib) : character_mismatch(c, ci); + return Object.is(ci, c) + ? invalidate_current_char(ib) + : character_mismatch(c, ci); /*<>*/ } function token_char(ib){ /*<>*/ return /*<>*/ caml_string_get @@ -29784,13 +29841,13 @@ /*<>*/ c = peek_char(ib), /*<>*/ _aL_ = lowercase( /*<>*/ caml_string_get(str, i)); - if(lowercase(c) !== _aL_) + if(! /*<>*/ Object.is(lowercase(c), _aL_)) /*<>*/ /*<>*/ caml_call1(error, 0); if(0 === width$0[1]) /*<>*/ /*<>*/ caml_call1(error, 0); width$0[1] = store_char(width$0[1], ib, c); /*<>*/ /*<>*/ var _aM_ = i + 1 | 0; - if(_aK_ === i) break; + if(Object.is(_aK_, i)) break; i = _aM_; } } @@ -30102,7 +30159,7 @@ /*<>*/ return width$0; } var c$0 = stp[1]; - if(c === c$0){ + if(Object.is(c, c$0)){ /*<>*/ invalidate_current_char(ib); /*<>*/ return width$0; } @@ -30314,7 +30371,7 @@ /*<>*/ _W_ = /*<>*/ caml_call2 (CamlinternalFormat[1], char_set, c), - /*<>*/ _X_ = _W_ ? c !== stp ? 1 : 0 : _W_; + /*<>*/ _X_ = _W_ ? Object.is(c, stp) ? 0 : 1 : _W_; else var _X_ = _V_; } @@ -30333,13 +30390,15 @@ if(! _T_) /*<>*/ return _T_; /*<>*/ /*<>*/ var ci = peek_char(ib); - return c === ci ? invalidate_current_char(ib) : character_mismatch(c, ci); + return Object.is(c, ci) + ? invalidate_current_char(ib) + : character_mismatch(c, ci); /*<>*/ } function scanf_bad_input(ib, x){ - /*<>*/ if(x[1] === Scan_failure) + /*<>*/ if(Object.is(x[1], Scan_failure)) var s = x[2]; else{ - if(x[1] !== Stdlib[7]) + if(! Object.is(x[1], Stdlib[7])) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (x, 1); var s = x[2]; @@ -30908,7 +30967,8 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(exn[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(exn, 0); + if(! Object.is(exn[1], Stdlib[7])) + throw caml_maybe_attach_backtrace(exn, 0); var msg = exn[2], fmt$3 = bad_input(msg); } /*<>*/ return [0, @@ -30950,7 +31010,7 @@ } catch(exn){ var exn$0 = caml_wrap_exception(exn); - if(exn$0[1] !== Stdlib[7]) + if(! Object.is(exn$0[1], Stdlib[7])) throw caml_maybe_attach_backtrace(exn$0, 0); var msg$0 = exn$0[2], @@ -31145,8 +31205,11 @@ catch(exc$0){ var exc = caml_wrap_exception(exc$0); if - (exc[1] !== Scan_failure && exc[1] !== Stdlib[7] && exc !== Stdlib[12]){ - if(exc[1] !== Stdlib[6]) throw caml_maybe_attach_backtrace(exc, 0); + (! + Object.is(exc[1], Scan_failure) + && ! Object.is(exc[1], Stdlib[7]) && ! Object.is(exc, Stdlib[12])){ + if(! Object.is(exc[1], Stdlib[6])) + throw caml_maybe_attach_backtrace(exc, 0); /*<>*/ var msg = exc[2], /*<>*/ _z_ = @@ -31234,7 +31297,8 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(exn[1] !== Stdlib[7]) throw caml_maybe_attach_backtrace(exn, 0); + if(! Object.is(exn[1], Stdlib[7])) + throw caml_maybe_attach_backtrace(exn, 0); var msg = exn[2], fmt = bad_input(msg); } /*<>*/ return /*<>*/ caml_call1 @@ -31316,7 +31380,8 @@ /*<>*/ var _a_ = Stdlib_Obj[10], slot = - /*<>*/ runtime.caml_obj_tag(exn) === _a_ + /*<>*/ Object.is + ( /*<>*/ runtime.caml_obj_tag(exn), _a_) ? exn : exn[1]; /*<>*/ return /*<>*/ caml_register_named_value @@ -31395,7 +31460,7 @@ accu[1] = (223 * accu[1] | 0) + _am_ | 0; /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_al_ === i) break; + if(Object.is(_al_, i)) break; i = _an_; } } @@ -31454,7 +31519,7 @@ = _ah_; /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; - if(_ag_ === i) break; + if(Object.is(_ag_, i)) break; i = _aj_; } } @@ -31509,7 +31574,8 @@ } catch(_aa_){ var ___ = caml_wrap_exception(_aa_); - if(___ !== Stdlib[8]) throw caml_maybe_attach_backtrace(___, 0); + if(! Object.is(___, Stdlib[8])) + throw caml_maybe_attach_backtrace(___, 0); /*<>*/ /*<>*/ var label = new_method(table); table[3] = @@ -31547,7 +31613,7 @@ } catch(_Y_){ var _W_ = caml_wrap_exception(_Y_); - if(_W_ === Stdlib[8]) + if(Object.is(_W_, Stdlib[8])) /*<>*/ return caml_check_bound (table[2], label) [1 + label]; @@ -31610,7 +31676,8 @@ } catch(_T_){ var _Q_ = caml_wrap_exception(_T_); - if(_Q_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Q_, 0); + if(! Object.is(_Q_, Stdlib[8])) + throw caml_maybe_attach_backtrace(_Q_, 0); var _R_ = 1; } by_label[1] = @@ -31697,7 +31764,8 @@ } catch(_N_){ var _L_ = caml_wrap_exception(_N_); - if(_L_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_L_, 0); + if(! Object.is(_L_, Stdlib[8])) + throw caml_maybe_attach_backtrace(_L_, 0); var index = table[1]; table[1] = index + 1 | 0; /*<>*/ if(name !== "") @@ -31730,7 +31798,7 @@ /*<>*/ caml_check_bound(res, i$0)[1 + i$0] = _J_; /*<>*/ /*<>*/ var _K_ = i$0 + 1 | 0; - if(_D_ === i$0) break; + if(Object.is(_D_, i$0)) break; i$0 = _K_; } } @@ -31747,7 +31815,7 @@ /*<>*/ caml_check_bound(res, _H_)[1 + _H_] = _G_; /*<>*/ /*<>*/ var _I_ = i + 1 | 0; - if(_F_ === i) break; + if(Object.is(_F_, i)) break; i = _I_; } } @@ -31762,7 +31830,7 @@ } catch(_B_){ var _z_ = caml_wrap_exception(_B_); - if(_z_ === Stdlib[8]) + if(Object.is(_z_, Stdlib[8])) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); throw caml_maybe_attach_backtrace(_z_, 0); @@ -31945,7 +32013,7 @@ r[1] = [0, caml_check_bound(keys, i)[1 + i], _p_, 0]; /*<>*/ /*<>*/ var _q_ = i + 1 | 0; - if(n === i) break; + if(Object.is(n, i)) break; i = _q_; } } @@ -31972,7 +32040,7 @@ if(! tables$1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _d_], 1); - if(tables$1[1] === key) break; + if( /*<>*/ Object.is(tables$1[1], key)) break; if(! tables$1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _f_], 1); @@ -32471,7 +32539,7 @@ function(x){ /*<>*/ /*<>*/ var fn = modu[1 + i$1]; - if(fn$0 === fn) + if(Object.is(fn$0, fn)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stdlib[15], loc], 1); /*<>*/ return /*<>*/ caml_call1 @@ -32489,7 +32557,7 @@ function(param){ /*<>*/ /*<>*/ var l = modu[1 + i$0]; - if(l$0 === l) + if(Object.is(l$0, l)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stdlib[15], loc], 1); var _j_ = caml_obj_tag(l); @@ -32514,7 +32582,7 @@ /*<>*/ modu[1 + i] = init; /*<>*/ /*<>*/ var _i_ = i + 1 | 0; - if(_h_ === i) break; + if(Object.is(_h_, i)) break; i = _i_; } } @@ -32573,7 +32641,7 @@ } /*<>*/ /*<>*/ var _f_ = i + 1 | 0; - if(_e_ === i) break; + if(Object.is(_e_, i)) break; i = _f_; } } @@ -32695,7 +32763,7 @@ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; - if(_ap_ === i) break; + if(Object.is(_ap_, i)) break; i = _aq_; } } @@ -32703,7 +32771,7 @@ /*<>*/ } function reset(h){ /*<>*/ var len = h[2].length - 1; - return len === h[4] + return Object.is(len, h[4]) ? clear(h) : (h [1] @@ -32745,7 +32813,7 @@ do_bucket(caml_check_bound(d, i)[1 + i]); /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; + if(Object.is(_aj_, i)) break; i = _ak_; } } @@ -32785,7 +32853,7 @@ (caml_check_bound(odata, i)[1 + i]); /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_af_ === i) break; + if(Object.is(_af_, i)) break; i = _ah_; } } @@ -32817,7 +32885,7 @@ /*<>*/ for(;;){ if(! param$0) /*<>*/ return 0; var hk = param$0[1], next = param$0[3], c = param$0[2]; - if(hkey !== hk){ + if(! Object.is(hkey, hk)){ var next$0 = param$0[3], c$0 = param$0[2]; /*<>*/ return [0, hk, @@ -32851,7 +32919,7 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var hk = param[1], rest = param[3], c = param[2]; - if(hkey === hk) + if(Object.is(hkey, hk)) switch( /*<>*/ caml_call2(H[3], c, key)){ case 0: /*<>*/ /*<>*/ var @@ -32875,7 +32943,7 @@ for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; - if(hkey === hk) + if(Object.is(hkey, hk)) switch( /*<>*/ caml_call2(H[3], c, key)){ case 0: /*<>*/ /*<>*/ var @@ -32898,7 +32966,7 @@ /*<>*/ for(;;){ if(! param$0) /*<>*/ return 0; var hk = param$0[1], rest = param$0[3], c = param$0[2]; - if(hkey === hk) + if(Object.is(hkey, hk)) switch( /*<>*/ caml_call2(H[3], c, key)){ case 0: /*<>*/ /*<>*/ var @@ -32934,7 +33002,7 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var hk = param[1], next = param[3], c = param[2]; - if(hkey === hk){ + if(Object.is(hkey, hk)){ if(! /*<>*/ caml_call2(H[3], c, key)){ /*<>*/ /*<>*/ var _V_ = /*<>*/ caml_call3(H[5], c, key, info); @@ -32947,7 +33015,8 @@ } catch(_Y_){ var _W_ = caml_wrap_exception(_Y_); - if(_W_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_W_, 0); + if(! Object.is(_W_, Stdlib[8])) + throw caml_maybe_attach_backtrace(_W_, 0); /*<>*/ /*<>*/ var container = /*<>*/ caml_call2(H[1], key, info); /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, hkey, container, l]; @@ -32965,7 +33034,7 @@ /*<>*/ for(;;){ if(! param) /*<>*/ return 0; var hk = param[1], rest = param[3], c = param[2]; - if(hk === hkey){ + if(Object.is(hk, hkey)){ if(! /*<>*/ caml_call2(H[3], c, key)) /*<>*/ return 1; param = rest; @@ -33143,7 +33212,7 @@ match = get_key(eph); if(! match) /*<>*/ return 0; var k = match[1]; - return k === key ? get_data(eph) : 0; + return Object.is(k, key) ? get_data(eph) : 0; /*<>*/ } function MakeSeeded$0(H){ function create$0(k, d){ @@ -33248,7 +33317,7 @@ match = get_key(e); if(match){ var x = match[1]; - if(x === k) /*<>*/ return 1; + if(Object.is(x, k)) /*<>*/ return 1; } /*<>*/ return 0; /*<>*/ } @@ -33330,12 +33399,12 @@ match = get_key1(eph); if(! match) /*<>*/ return 0; var k = match[1]; - if(k !== key1) /*<>*/ return 0; + if(! Object.is(k, key1)) /*<>*/ return 0; /*<>*/ /*<>*/ var match$0 = get_key2(eph); if(! match$0) /*<>*/ return 0; var k$0 = match$0[1]; - return k$0 === key2 ? get_data$0(eph) : 0; + return Object.is(k$0, key2) ? get_data$0(eph) : 0; /*<>*/ } function MakeSeeded$1(H1, H2){ function create(param, d){ @@ -33476,7 +33545,8 @@ /*<>*/ match$0 = get_key2(e); if(match && match$0){ var x2 = match$0[1], x1 = match[1]; - if(x1 === k1 && x2 === k2) /*<>*/ return 1; + if(Object.is(x1, k1) && Object.is(x2, k2)) + /*<>*/ return 1; } /*<>*/ return 0; /*<>*/ } @@ -33555,7 +33625,7 @@ (eph, i, caml_check_bound(keys, i)[1 + i]); /*<>*/ /*<>*/ var _J_ = i + 1 | 0; - if(_I_ === i) break; + if(Object.is(_I_, i)) break; i = _J_; } } @@ -33565,7 +33635,7 @@ /*<>*/ /*<>*/ var l = length$1(eph); /*<>*/ try{ - if(l !== keys.length - 1) + if(! Object.is(l, keys.length - 1)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var @@ -33580,12 +33650,12 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); var k = match[1]; - if(k !== caml_check_bound(keys, i)[1 + i]) + if(! Object.is(k, caml_check_bound(keys, i)[1 + i])) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ /*<>*/ var _F_ = i + 1 | 0; - if(_D_ === i) break; + if(Object.is(_D_, i)) break; i = _F_; } } @@ -33595,7 +33665,7 @@ } catch(_G_){ var _B_ = caml_wrap_exception(_G_); - if(_B_ === Stdlib[3]) /*<>*/ return 0; + if(Object.is(_B_, Stdlib[3])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_B_, 0); } /*<>*/ } @@ -33614,7 +33684,7 @@ (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var _A_ = i + 1 | 0; - if(_z_ === i) break; + if(Object.is(_z_, i)) break; i = _A_; } } @@ -33637,7 +33707,7 @@ | 0; /*<>*/ /*<>*/ var _x_ = i + 1 | 0; - if(_u_ === i) break; + if(Object.is(_u_, i)) break; i = _x_; } } @@ -33647,7 +33717,7 @@ /*<>*/ var len = k.length - 1, /*<>*/ len$0 = length$1(c); - if(len !== len$0) /*<>*/ return 1; + if(! Object.is(len, len$0)) /*<>*/ return 1; /*<>*/ var /*<>*/ i$1 = len - 1 | 0, i = i$1; @@ -33680,7 +33750,7 @@ (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var _r_ = i + 1 | 0; - if(_q_ === i) break; + if(Object.is(_q_, i)) break; i = _r_; } } @@ -33782,7 +33852,7 @@ /*<>*/ } function test_keys$0(k, e){ /*<>*/ try{ - if(length$1(e) !== k.length - 1) + if(! /*<>*/ Object.is(length$1(e), k.length - 1)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var @@ -33795,10 +33865,10 @@ match = get_key$0(e, i); if(match){ var x = match[1]; - if(x === caml_check_bound(k, i)[1 + i]){ + if(Object.is(x, caml_check_bound(k, i)[1 + i])){ /*<>*/ /*<>*/ var _i_ = i + 1 | 0; - if(_g_ === i) break; + if(Object.is(_g_, i)) break; i = _i_; continue; } @@ -33812,7 +33882,7 @@ } catch(_j_){ var _e_ = caml_wrap_exception(_j_); - if(_e_ === Stdlib[3]) /*<>*/ return 0; + if(Object.is(_e_, Stdlib[3])) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_e_, 0); } /*<>*/ } @@ -34122,7 +34192,7 @@ } catch(_aB_){ var _a_ = caml_wrap_exception(_aB_); - if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); + if(! Object.is(_a_, Stdlib[8])) throw caml_maybe_attach_backtrace(_a_, 0); var temp_dir_name = cst_tmp; } /*<>*/ function quote(s){ @@ -34150,7 +34220,7 @@ } /*<>*/ /*<>*/ var _az_ = i + 1 | 0; - if(_ay_ === i) break; + if(Object.is(_ay_, i)) break; i = _az_; } } @@ -34364,7 +34434,7 @@ } catch(_P_){ var _b_ = caml_wrap_exception(_P_); - if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); + if(! Object.is(_b_, Stdlib[8])) throw caml_maybe_attach_backtrace(_b_, 0); var temp_dir_name$0 = cst$5; } function quote$0(s){ @@ -34377,7 +34447,7 @@ function loop$0(counter, i){ /*<>*/ var i$0 = i; /*<>*/ for(;;){ - if(i$0 === l) + if(Object.is(i$0, l)) /*<>*/ return /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ /*<>*/ var @@ -34409,7 +34479,7 @@ function loop_bs(counter, n, i){ /*<>*/ var n$0 = n, i$0 = i; /*<>*/ for(;;){ - if(i$0 === l){ + if(Object.is(i$0, l)){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ return add_bs(n$0); @@ -34452,7 +34522,7 @@ (Stdlib_Buffer[12], b, 92); /*<>*/ /*<>*/ var _L_ = j + 1 | 0; - if(n === j) break; + if(Object.is(n, j)) break; j = _L_; } } @@ -34813,7 +34883,8 @@ } catch(e$0){ var e = caml_wrap_exception(e$0); - if(e[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(e, 0); + if(! Object.is(e[1], Stdlib[11])) + throw caml_maybe_attach_backtrace(e, 0); if(20 <= counter) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (e, 0); @@ -34847,7 +34918,8 @@ } catch(e$0){ var e = caml_wrap_exception(e$0); - if(e[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(e, 0); + if(! Object.is(e[1], Stdlib[11])) + throw caml_maybe_attach_backtrace(e, 0); if(20 <= counter) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (e, 0); @@ -34876,7 +34948,8 @@ } catch(e$0){ var e = caml_wrap_exception(e$0); - if(e[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(e, 0); + if(! Object.is(e[1], Stdlib[11])) + throw caml_maybe_attach_backtrace(e, 0); if(20 <= counter) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (e, 0); @@ -35697,7 +35770,7 @@ [11, "Stdlib.Effect.Unhandled(", [2, 0, [12, 41, 0]]], "Stdlib.Effect.Unhandled(%s)"]; function printer(param){ - /*<>*/ if(param[1] !== Unhandled) + /*<>*/ if(! Object.is(param[1], Unhandled)) /*<>*/ return 0; /*<>*/ var x = param[2], @@ -35817,7 +35890,7 @@ (Stdlib[2], cst_impossible); /*<>*/ } function effc(eff, k, last_fiber){ - /*<>*/ if(eff !== Initial_setup) + /*<>*/ if(! Object.is(eff, Initial_setup)) /*<>*/ return error(0); k[2] = last_fiber; /*<>*/ throw [0, E, k]; @@ -35831,7 +35904,7 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(exn[1] !== E) throw caml_maybe_attach_backtrace(exn, 0); + if(! Object.is(exn[1], E)) throw caml_maybe_attach_backtrace(exn, 0); var k = exn[2]; /*<>*/ return k; } From 3bf39e3f0f012b2e7b34a8304ff9fdc67401dd26 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 20 Apr 2023 18:31:53 +0200 Subject: [PATCH 05/10] fix --- compiler/lib/generate.ml | 1 - compiler/tests-compiler/compact.ml | 2 +- compiler/tests-compiler/effects_toplevel.ml | 2 +- compiler/tests-compiler/es6.ml | 8 +- compiler/tests-compiler/gh1007.ml | 14 +- compiler/tests-compiler/gh1320.ml | 4 +- compiler/tests-compiler/gh1559.ml | 18 +- compiler/tests-compiler/gh747.ml | 170 +-- compiler/tests-compiler/global_deadcode.ml | 4 +- compiler/tests-compiler/lazy.ml | 6 +- compiler/tests-compiler/loops.ml | 38 +- compiler/tests-compiler/match_with_exn.ml | 8 +- compiler/tests-compiler/mutable_closure.ml | 10 +- compiler/tests-compiler/side_effect.ml | 2 +- compiler/tests-compiler/tailcall.ml | 8 +- .../variable_declaration_output.ml | 4 +- compiler/tests-full/stdlib.cma.expected.js | 1040 ++++++++++------- compiler/tests-jsoo/test_obj.ml | 5 + 18 files changed, 762 insertions(+), 582 deletions(-) diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 785ba99ff7..93d12ed598 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -1057,7 +1057,6 @@ let remove_unused_tail_args ctx exact trampolined args = else args let is_int = function - | J.ENum n -> J.Num.is_int n | J.EBin ((J.Bor | J.Lsr), _, _) -> true | _ -> false diff --git a/compiler/tests-compiler/compact.ml b/compiler/tests-compiler/compact.ml index e91423da88..3c77eaacaa 100644 --- a/compiler/tests-compiler/compact.ml +++ b/compiler/tests-compiler/compact.ml @@ -42,7 +42,7 @@ let rec f x y z = function(a, b, c){ var f = a, e = b, d = c; for(;;){ - if(0 === f && 0 === e && 0 === d) return 1; + if(Object.is(0, f) && Object.is(0, e) && Object.is(0, d)) return 1; var g = (d + f | 0) + e | 0; f = f + d | 0; e = e - d | 0; diff --git a/compiler/tests-compiler/effects_toplevel.ml b/compiler/tests-compiler/effects_toplevel.ml index 20eb72768b..b44240c79e 100644 --- a/compiler/tests-compiler/effects_toplevel.ml +++ b/compiler/tests-compiler/effects_toplevel.ml @@ -81,7 +81,7 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = dummy, function(_c_){ var _d_ = i + 1 | 0; - if(5 !== i) return caml_cps_exact_call1(_b_, _d_); + if(! Object.is(5, i)) return caml_cps_exact_call1(_b_, _d_); caml_callback(g, [dummy]); var Test = [0]; runtime.caml_register_global(2, Test, "Test"); diff --git a/compiler/tests-compiler/es6.ml b/compiler/tests-compiler/es6.ml index 464a1d7d37..091a4e8ac1 100644 --- a/compiler/tests-compiler/es6.ml +++ b/compiler/tests-compiler/es6.ml @@ -59,8 +59,8 @@ let rec odd n' = function (a, b)=>{ var d = a, c = b; for(;;){ - if(0 === c) return [0, d, 0]; - if(1 === c) return [0, d, 1]; + if(Object.is(0, c)) return [0, d, 0]; + if(Object.is(1, c)) return [0, d, 1]; [c, d] = [(d - 1 | 0) - 1 | 0, (c - 1 | 0) - 1 | 0]; }}], "Test"); @@ -80,8 +80,8 @@ let rec odd n' = function function(a, b){ var d = a, c = b; for(;;){ - if(0 === c) return [0, d, 0]; - if(1 === c) return [0, d, 1]; + if(Object.is(0, c)) return [0, d, 0]; + if(Object.is(1, c)) return [0, d, 1]; var e = (d - 1 | 0) - 1 | 0; d = (c - 1 | 0) - 1 | 0; c = e; diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index b18c496ff5..35b9ffff9b 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -162,7 +162,7 @@ let () = M.myfun M.x next = x$0[1], sort = function(n, l){ - if(2 === n){ + if(Object.is(2, n)){ if(l){ var match = l[2]; if(match){ @@ -178,7 +178,7 @@ let () = M.myfun M.x } } } - else if(3 === n && l){ + else if(Object.is(3, n) && l){ var _d_ = l[2]; if(_d_){ var match$2 = _d_[2]; @@ -244,7 +244,7 @@ let () = M.myfun M.x }, rev_sort = function(n, l){ - if(2 === n){ + if(Object.is(2, n)){ if(l){ var match = l[2]; if(match){ @@ -260,7 +260,7 @@ let () = M.myfun M.x } } } - else if(3 === n && l){ + else if(Object.is(3, n) && l){ var _b_ = l[2]; if(_b_){ var match$2 = _b_[2]; @@ -401,7 +401,7 @@ let () = M.run () let odd$0 = odd, even$0 = even; if(even(i)) caml_call1(Stdlib[42], cst); var _a_ = i + 1 | 0; - if(4 === i) return 0; + if(Object.is(4, i)) return 0; i = _a_; } } @@ -507,7 +507,7 @@ let () = M.run () let odd$0 = odd, even$0 = even; if(even(i)) caml_call1(Stdlib[42], cst); var _c_ = i + 1 | 0; - if(4 === i) break; + if(Object.is(4, i)) break; i = _c_; } return caml_call2 @@ -638,7 +638,7 @@ let () = M.run () param$0 = f(0); } var _e_ = i + 1 | 0; - if(4 === i) break; + if(Object.is(4, i)) break; i = _e_; } return caml_call2 diff --git a/compiler/tests-compiler/gh1320.ml b/compiler/tests-compiler/gh1320.ml index b29ce75b07..bad19f90eb 100644 --- a/compiler/tests-compiler/gh1320.ml +++ b/compiler/tests-compiler/gh1320.ml @@ -50,14 +50,14 @@ let () = myfun () var f = function(x){ - return 0 === x ? 1 : runtime.caml_mul(i$0, app(g$0, x - 1 | 0)); + return Object.is(0, x) ? 1 : runtime.caml_mul(i$0, app(g$0, x - 1 | 0)); }, g = function(x){return app(f$0, x);}; let f$0 = f, g$0 = g; var _c_ = app(f, i); caml_call2(Stdlib_Printf[3], _a_, _c_); var _b_ = i + 1 | 0; - if(4 === i) return 0; + if(Object.is(4, i)) return 0; i = _b_; } } diff --git a/compiler/tests-compiler/gh1559.ml b/compiler/tests-compiler/gh1559.ml index 9f83d8b258..262cd56f95 100644 --- a/compiler/tests-compiler/gh1559.ml +++ b/compiler/tests-compiler/gh1559.ml @@ -94,10 +94,13 @@ let () = my_ref := 2 let t$1 = t; var this_will_be_undefined = - function(param){var _c_ = 1 === t$1[1] ? 1 : 0; return _c_ ? 1 : 2;}, + function(param){ + var _c_ = Object.is(1, t$1[1]) ? 1 : 0; + return _c_ ? 1 : 2; + }, i = t[1]; - if(0 === i){var _a_ = this_will_be_undefined(0); break a;} - if(1 === i) break; + if(Object.is(0, i)){var _a_ = this_will_be_undefined(0); break a;} + if(Object.is(1, i)) break; t = t$0; } var @@ -202,10 +205,13 @@ let () = my_ref := 2 let t$1 = t; var this_will_be_undefined = - function(param){var _e_ = 1 === t$1[1] ? 1 : 0; return _e_ ? 1 : 2;}, + function(param){ + var _e_ = Object.is(1, t$1[1]) ? 1 : 0; + return _e_ ? 1 : 2; + }, i = t[1]; - if(0 === i) break; - if(1 === i) break b; + if(Object.is(0, i)) break; + if(Object.is(1, i)) break b; t = t$0; } var diff --git a/compiler/tests-compiler/gh747.ml b/compiler/tests-compiler/gh747.ml index 4c5a3fc4f0..f16cbbf5f4 100644 --- a/compiler/tests-compiler/gh747.ml +++ b/compiler/tests-compiler/gh747.ml @@ -314,87 +314,89 @@ end 88: function format_backtrace_slot(pos, slot){ 89: function info(is_raise){ 90: /*<>*/ return is_raise - 91: ? 0 === pos ? cst_Raised_at : cst_Re_raised_at - 92: : 0 === pos ? cst_Raised_by_primitive_operat : cst_Called_from; - 93: /*<>*/ } - 94: /*<>*/ if(0 === slot[0]){ - 95: /*<>*/ var - 96: _h_ = slot[5], - 97: _i_ = slot[4], - 98: _j_ = slot[3], - 99: _k_ = slot[6] ? cst_inlined : cst, - 100: _l_ = slot[2], - 101: _m_ = slot[7], - 102: /*<>*/ _n_ = info(slot[1]); - 103: /*<>*/ return [0, - 104: /*<>*/ caml_call8 - 105: (Stdlib_Printf[4], _a_, _n_, _m_, _l_, _k_, _j_, _i_, _h_)]; - 106: } - 107: if(slot[1]) /*<>*/ return 0; - 108: /*<>*/ /*<>*/ var _o_ = info(0); - 109: /*<>*/ return [0, - 110: /*<>*/ caml_call2(Stdlib_Printf[4], _b_, _o_)]; - 111: /*<>*/ } - 112: function print_exception_backtrace(outchan, backtrace){ - 113: /*<>*/ if(! backtrace) - 114: /*<>*/ return /*<>*/ caml_call2 - 115: (Stdlib_Printf[1], outchan, _d_); - 116: var a = backtrace[1], _f_ = a.length - 2 | 0, _e_ = 0; - 117: if(_f_ >= 0){ - 118: var i = _e_; - 119: for(;;){ - 120: /*<>*/ /*<>*/ var - 121: match = format_backtrace_slot(i, runtime.caml_check_bound(a, i)[1 + i]); - 122: if(match){ - 123: var str = match[1]; - 124: /*<>*/ /*<>*/ caml_call3 - 125: (Stdlib_Printf[1], outchan, _c_, str); - 126: } - 127: /*<>*/ /*<>*/ var _g_ = i + 1 | 0; - 128: if(Object.is(_f_, i)) break; - 129: i = _g_; - 130: } - 131: } - 132: return 0; - 133: /*<>*/ } - 134: function compare(left, right, e1, e2){ - 135: /*<>*/ if(0 === e1[0]){ - 136: var v1 = e1[1]; - 137: if(0 !== e2[0]) /*<>*/ return -1; - 138: var v2 = e2[1]; - 139: /*<>*/ return /*<>*/ caml_call2 - 140: (left, v1, v2); - 141: } - 142: var v1$0 = e1[1]; - 143: if(0 === e2[0]) /*<>*/ return 1; - 144: var v2$0 = e2[1]; - 145: /*<>*/ return /*<>*/ caml_call2 - 146: (right, v1$0, v2$0); - 147: /*<>*/ } - 148: /*<>*/ var - 149: /*<>*/ Either = [0, compare], - 150: Test = - 151: [0, - 152: executable_name, - 153: os_type, - 154: backend_type, - 155: 0, - 156: 32, - 157: 32, - 158: unix, - 159: win32, - 160: cygwin, - 161: max_array_length, - 162: max_floatarray_length, - 163: max_string_length, - 164: Unhandled, - 165: format_backtrace_slot, - 166: print_exception_backtrace, - 167: Either]; - 168: runtime.caml_register_global(12, Test, "Test"); - 169: return; - 170: /*<>*/ } - 171: (globalThis)); - 172: - 173: //# sourceMappingURL=test.map - |}] + 91: ? Object.is(0, pos) ? cst_Raised_at : cst_Re_raised_at + 92: : Object.is + 93: (0, pos) + 94: ? cst_Raised_by_primitive_operat + 95: : cst_Called_from; + 96: /*<>*/ } + 97: /*<>*/ if(0 === slot[0]){ + 98: /*<>*/ var + 99: _h_ = slot[5], + 100: _i_ = slot[4], + 101: _j_ = slot[3], + 102: _k_ = slot[6] ? cst_inlined : cst, + 103: _l_ = slot[2], + 104: _m_ = slot[7], + 105: /*<>*/ _n_ = info(slot[1]); + 106: /*<>*/ return [0, + 107: /*<>*/ caml_call8 + 108: (Stdlib_Printf[4], _a_, _n_, _m_, _l_, _k_, _j_, _i_, _h_)]; + 109: } + 110: if(slot[1]) /*<>*/ return 0; + 111: /*<>*/ /*<>*/ var _o_ = info(0); + 112: /*<>*/ return [0, + 113: /*<>*/ caml_call2(Stdlib_Printf[4], _b_, _o_)]; + 114: /*<>*/ } + 115: function print_exception_backtrace(outchan, backtrace){ + 116: /*<>*/ if(! backtrace) + 117: /*<>*/ return /*<>*/ caml_call2 + 118: (Stdlib_Printf[1], outchan, _d_); + 119: var a = backtrace[1], _f_ = a.length - 2 | 0, _e_ = 0; + 120: if(_f_ >= 0){ + 121: var i = _e_; + 122: for(;;){ + 123: /*<>*/ /*<>*/ var + 124: match = format_backtrace_slot(i, runtime.caml_check_bound(a, i)[1 + i]); + 125: if(match){ + 126: var str = match[1]; + 127: /*<>*/ /*<>*/ caml_call3 + 128: (Stdlib_Printf[1], outchan, _c_, str); + 129: } + 130: /*<>*/ /*<>*/ var _g_ = i + 1 | 0; + 131: if(Object.is(_f_, i)) break; + 132: i = _g_; + 133: } + 134: } + 135: return 0; + 136: /*<>*/ } + 137: function compare(left, right, e1, e2){ + 138: /*<>*/ if(0 === e1[0]){ + 139: var v1 = e1[1]; + 140: if(0 !== e2[0]) /*<>*/ return -1; + 141: var v2 = e2[1]; + 142: /*<>*/ return /*<>*/ caml_call2 + 143: (left, v1, v2); + 144: } + 145: var v1$0 = e1[1]; + 146: if(0 === e2[0]) /*<>*/ return 1; + 147: var v2$0 = e2[1]; + 148: /*<>*/ return /*<>*/ caml_call2 + 149: (right, v1$0, v2$0); + 150: /*<>*/ } + 151: /*<>*/ var + 152: /*<>*/ Either = [0, compare], + 153: Test = + 154: [0, + 155: executable_name, + 156: os_type, + 157: backend_type, + 158: 0, + 159: 32, + 160: 32, + 161: unix, + 162: win32, + 163: cygwin, + 164: max_array_length, + 165: max_floatarray_length, + 166: max_string_length, + 167: Unhandled, + 168: format_backtrace_slot, + 169: print_exception_backtrace, + 170: Either]; + 171: runtime.caml_register_global(12, Test, "Test"); + 172: return; + 173: /*<>*/ } + 174: (globalThis)); + 175: + 176: //# sourceMappingURL=test.map |}] diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index 8cce86a2a8..807c47a3f8 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -68,7 +68,7 @@ let%expect_test "Eliminates unused functions from functor" = function add(x, t){ if(! t) return [0, 0, x, 0, 1]; var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); - if(0 === c) return t; + if(Object.is(0, c)) return t; if(0 <= c){var rr = add(x, r); return Object.is(r, rr) ? t : bal(l, v, rr);} var ll = add(x, l); return Object.is(l, ll) ? t : bal(ll, v, r); @@ -83,7 +83,7 @@ let%expect_test "Eliminates unused functions from functor" = v = param$0[2], l = param$0[1], c = caml_call2(Ord[1], x, v); - if(0 === c) return v; + if(Object.is(0, c)) return v; var r$0 = 0 <= c ? r : l; param$0 = r$0; } diff --git a/compiler/tests-compiler/lazy.ml b/compiler/tests-compiler/lazy.ml index 1ec728acd6..56d6a8845e 100644 --- a/compiler/tests-compiler/lazy.ml +++ b/compiler/tests-compiler/lazy.ml @@ -34,13 +34,13 @@ let%expect_test "static eval of string get" = [%expect {| function do_the_lazy_rec(n){ - if(0 === n) return 0; + if(Object.is(0, n)) return 0; var _b_ = do_the_lazy_rec(n - 1 | 0), _c_ = runtime.caml_obj_tag(lz); a: - if(250 === _c_) + if(Object.is(250, _c_)) var _d_ = lz[1]; else{ - if(246 !== _c_ && 244 !== _c_){var _d_ = lz; break a;} + if(! Object.is(246, _c_) && ! Object.is(244, _c_)){var _d_ = lz; break a;} var _d_ = caml_call1(CamlinternalLazy[2], lz); } return [0, _d_, _b_]; diff --git a/compiler/tests-compiler/loops.ml b/compiler/tests-compiler/loops.ml index 408825e5bc..a1d4436d8a 100644 --- a/compiler/tests-compiler/loops.ml +++ b/compiler/tests-compiler/loops.ml @@ -84,12 +84,12 @@ let rec fun_with_loop acc = function return caml_call1 (list_rev, caml_call1(list_rev, caml_call1(list_rev, acc$0))); var x = param$0[1]; - if(1 === x && ! param$0[2]){ + if(Object.is(1, x) && ! param$0[2]){ var a$0 = [0, acc$0], i$0 = 0; for(;;){ a$0[1] = [0, 1, a$0[1]]; var _b_ = i$0 + 1 | 0; - if(10 === i$0) return a$0[1]; + if(Object.is(10, i$0)) return a$0[1]; i$0 = _b_; } } @@ -97,7 +97,7 @@ let rec fun_with_loop acc = function for(;;){ a[1] = [0, 1, a[1]]; var _a_ = i + 1 | 0; - if(10 === i) break; + if(Object.is(10, i)) break; i = _a_; } var acc$1 = [0, x, a[1]]; @@ -133,11 +133,11 @@ let for_for_while () = for(;;){ for(;;){if(10 <= runtime.caml_mul(k, j)) break; id[1]++;} var _b_ = j + 1 | 0; - if(10 === j) break; + if(Object.is(10, j)) break; j = _b_; } var _a_ = k + 1 | 0; - if(10 === k) return 0; + if(Object.is(10, k)) return 0; k = _a_; } } @@ -174,11 +174,11 @@ let for_for_while () = id[1]++; } var _b_ = j + 1 | 0; - if(10 === j) break; + if(Object.is(10, j)) break; j = _b_; } var _a_ = k + 1 | 0; - if(10 === k) return 0; + if(Object.is(10, k)) return 0; k = _a_; } } @@ -311,8 +311,8 @@ in loop x function inspect(x){ var x$1 = x; for(;;){ - if(0 === x$1) return 1; - if(1 === x$1) break; + if(Object.is(0, x$1)) return 1; + if(Object.is(1, x$1)) break; var x$2 = x$1 + 1 | 0; x$1 = x$2; } @@ -437,12 +437,12 @@ let add_substitute = var lim$1 = caml_ml_string_length(s), previous = 32, i$4 = 0; for(;;){ if(i$4 >= lim$1){ - var _b_ = 92 === previous ? 1 : 0; + var _b_ = Object.is(92, previous) ? 1 : 0; return _b_ ? caml_call2(add_char, b, previous) : _b_; } var previous$0 = caml_string_get(s, i$4); - if(36 === previous$0) - if(92 === previous){ + if(Object.is(36, previous$0)) + if(Object.is(92, previous)){ caml_call2(add_char, b, previous$0); var i$5 = i$4 + 1 | 0; previous = 32; @@ -454,7 +454,7 @@ let add_substitute = var opening = caml_string_get(s, start$0); a: { - if(40 !== opening && 123 !== opening){ + if(! Object.is(40, opening) && ! Object.is(123, opening)){ var start = start$0 + 1 | 0, lim$0 = caml_ml_string_length(s); b: { @@ -470,7 +470,7 @@ let add_substitute = if(97 <= match){ if(123 <= match) break d; } - else if(95 !== match) break d; + else if(! Object.is(95, match)) break d; } else if(58 <= match){ if(65 > match) break; @@ -491,10 +491,10 @@ let add_substitute = break a; } var new_start = start$0 + 1 | 0, k$2 = 0; - if(40 === opening) + if(Object.is(40, opening)) var closing = 41; else{ - if(123 !== opening) + if(! Object.is(123, opening)) throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); var closing = 125; } @@ -507,7 +507,7 @@ let add_substitute = stop = i; } else if(Object.is(caml_string_get(s, stop), closing)){ - if(0 === k) break; + if(Object.is(0, k)) break; var i$0 = stop + 1 | 0, k$1 = k - 1 | 0; k = k$1; stop = i$0; @@ -525,14 +525,14 @@ let add_substitute = previous = 32; i$4 = next_i; } - else if(92 === previous){ + else if(Object.is(92, previous)){ caml_call2(add_char, b, 92); caml_call2(add_char, b, previous$0); var i$6 = i$4 + 1 | 0; previous = 32; i$4 = i$6; } - else if(92 === previous$0){ + else if(Object.is(92, previous$0)){ var i$7 = i$4 + 1 | 0; previous = previous$0; i$4 = i$7; diff --git a/compiler/tests-compiler/match_with_exn.ml b/compiler/tests-compiler/match_with_exn.ml index bf236d72db..9d7056a773 100644 --- a/compiler/tests-compiler/match_with_exn.ml +++ b/compiler/tests-compiler/match_with_exn.ml @@ -80,11 +80,11 @@ let fun2 () = var _d_ = caml_wrap_exception(_e_); if(! Object.is(_d_[1], A)) throw caml_maybe_attach_backtrace(_d_, 0); var i = _d_[2]; - if(2 !== i) return i + 2 | 0; + if(! Object.is(2, i)) return i + 2 | 0; var i$0 = i; break a; } - if(0 !== i$1) return i$1 + 1 | 0; + if(! Object.is(0, i$1)) return i$1 + 1 | 0; var i$0 = i$1; } return i$0; @@ -98,11 +98,11 @@ let fun2 () = var _a_ = caml_wrap_exception(_c_); if(Object.is(_a_[1], A)){ var _b_ = _a_[2]; - if(2 === _b_){var i = _b_; break a;} + if(Object.is(2, _b_)){var i = _b_; break a;} } throw caml_maybe_attach_backtrace(_a_, 0); } - if(0 !== i$0) return i$0 + 1 | 0; + if(! Object.is(0, i$0)) return i$0 + 1 | 0; var i = i$0; } return i; diff --git a/compiler/tests-compiler/mutable_closure.ml b/compiler/tests-compiler/mutable_closure.ml index f35c6dcd64..e975fcc57e 100644 --- a/compiler/tests-compiler/mutable_closure.ml +++ b/compiler/tests-compiler/mutable_closure.ml @@ -124,13 +124,13 @@ let%expect_test _ = var f$0 = function(counter, n){ - if(- 1 === n){ + if(Object.is(- 1, n)){ var _f_ = - 2; if(counter >= 50) return caml_trampoline_return(g$0, [0, _f_]); var counter$1 = counter + 1 | 0; return g$0(counter$1, _f_); } - if(0 === n) return i$0; + if(Object.is(0, n)) return i$0; var _g_ = n - 1 | 0; if(counter >= 50) return caml_trampoline_return(g$0, [0, _g_]); var counter$0 = counter + 1 | 0; @@ -139,13 +139,13 @@ let%expect_test _ = f = function(n){return caml_trampoline(f$1(0, n));}, g = function(counter, n){ - if(- 1 === n){ + if(Object.is(- 1, n)){ var _d_ = - 2; if(counter >= 50) return caml_trampoline_return(f$1, [0, _d_]); var counter$1 = counter + 1 | 0; return f$1(counter$1, _d_); } - if(0 === n) return i$0; + if(Object.is(0, n)) return i$0; var _e_ = n - 1 | 0; if(counter >= 50) return caml_trampoline_return(f$1, [0, _e_]); var counter$0 = counter + 1 | 0; @@ -157,7 +157,7 @@ let%expect_test _ = let f$2 = f; indirect[1] = [0, function(param){return f$2(i$0);}, indirect[1]]; var _c_ = i + 1 | 0; - if(3 === i) break; + if(Object.is(3, i)) break; i = _c_; } var diff --git a/compiler/tests-compiler/side_effect.ml b/compiler/tests-compiler/side_effect.ml index d59c6f5534..bf3d2de9d5 100644 --- a/compiler/tests-compiler/side_effect.ml +++ b/compiler/tests-compiler/side_effect.ml @@ -110,7 +110,7 @@ let%expect_test _ = >>> 0 ? caml_call1(Stdlib_Printf[2], _b_) : caml_call1(Stdlib_Printf[2], _c_); - if(1 === i[1]) + if(Object.is(1, i[1])) log_success(0); else caml_call1(log_failure, cst_side_effect_computed_twice); diff --git a/compiler/tests-compiler/tailcall.ml b/compiler/tests-compiler/tailcall.ml index f11ef022e4..a2b067c30b 100644 --- a/compiler/tests-compiler/tailcall.ml +++ b/compiler/tests-compiler/tailcall.ml @@ -46,7 +46,7 @@ let%expect_test _ = {| function fun1(param){ function odd$0(counter, x){ - if(0 === x) return 0; + if(Object.is(0, x)) return 0; var _f_ = x - 1 | 0; if(counter >= 50) return caml_trampoline_return(even$0, [0, _f_]); var counter$0 = counter + 1 | 0; @@ -54,7 +54,7 @@ let%expect_test _ = } function odd(x){return caml_trampoline(odd$0(0, x));} function even$0(counter, x){ - if(0 === x) return 1; + if(Object.is(0, x)) return 1; var _e_ = x - 1 | 0; if(counter >= 50) return caml_trampoline_return(odd$0, [0, _e_]); var counter$0 = counter + 1 | 0; @@ -95,11 +95,11 @@ let%expect_test _ = {| function fun1(param){ function odd$0(x){ - return 0 === x ? 0 : caml_trampoline_return(even$0, [0, x - 1 | 0]); + return Object.is(0, x) ? 0 : caml_trampoline_return(even$0, [0, x - 1 | 0]); } function odd(x){return caml_trampoline(odd$0(x));} function even$0(x){ - return 0 === x ? 1 : caml_trampoline_return(odd$0, [0, x - 1 | 0]); + return Object.is(0, x) ? 1 : caml_trampoline_return(odd$0, [0, x - 1 | 0]); } function even(x){return caml_trampoline(even$0(x));} var _b_ = even(1); diff --git a/compiler/tests-compiler/variable_declaration_output.ml b/compiler/tests-compiler/variable_declaration_output.ml index f4275e9d77..5d6c185a2a 100644 --- a/compiler/tests-compiler/variable_declaration_output.ml +++ b/compiler/tests-compiler/variable_declaration_output.ml @@ -131,7 +131,7 @@ let%expect_test _ = if(_a_){ _b_ = _a_[1]; if(_b_){ - if(2 === _b_[1] && ! param[2]) return 3; + if(Object.is(2, _b_[1]) && ! param[2]) return 3; } else if(! param[2]) return 2; } @@ -153,7 +153,7 @@ let%expect_test _ = if(_a_){ var _b_ = _a_[1]; if(_b_){ - if(2 === _b_[1] && ! param[2]) return 3; + if(Object.is(2, _b_[1]) && ! param[2]) return 3; } else if(! param[2]) return 2; } diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 16d672a549..0121a012e8 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -457,7 +457,10 @@ match = /*<>*/ runtime.caml_string_get(s1, i); a: { - if(48 <= match){if(58 > match) break a;} else if(45 === match) break a; + if(48 <= match){ + if(58 > match) break a; + } + else if(Object.is(45, match)) break a; /*<>*/ return s1; } /*<>*/ /*<>*/ var i$0 = i + 1 | 0; @@ -637,7 +640,7 @@ if(0 >= len$0) /*<>*/ return 0; /*<>*/ /*<>*/ var r = /*<>*/ caml_ml_input(ic, s, ofs$0, len$0); - /*<>*/ if(0 === r) + /*<>*/ if( /*<>*/ Object.is(0, r)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (End_of_file, 1); var len$1 = len$0 - r | 0, ofs$1 = ofs$0 + r | 0; @@ -678,7 +681,7 @@ /*<>*/ for(;;){ /*<>*/ /*<>*/ var n = /*<>*/ runtime.caml_ml_input_scan_line(chan); - /*<>*/ if(0 === n){ + /*<>*/ if( /*<>*/ Object.is(0, n)){ if(! accu) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (End_of_file, 1); @@ -1246,18 +1249,30 @@ { if (is_block(x) - && /*<>*/ caml_obj_tag(x) !== 248 && 1 <= x.length - 1){var slot = x[1]; break a;} + && + ! + /*<>*/ Object.is + ( /*<>*/ caml_obj_tag(x), 248) + && 1 <= x.length - 1){ + var slot = x[1]; + break a; + } var slot = x; } a: { - if(is_block(slot) && /*<>*/ caml_obj_tag(slot) === 248){var name = slot[1]; break a;} + if + (is_block(slot) + && + /*<>*/ Object.is + ( /*<>*/ caml_obj_tag(slot), 248)){var name = slot[1]; break a;} var name = /*<>*/ caml_call1 (Stdlib[1], cst_Obj_extension_constructor$0); } - return /*<>*/ caml_obj_tag(name) === 252 + return /*<>*/ Object.is + ( /*<>*/ caml_obj_tag(name), 252) ? slot : /*<>*/ caml_call1 (Stdlib[1], cst_Obj_extension_constructor); @@ -1335,7 +1350,7 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _a_ = 0 !== l ? 1 : 0, + _a_ = Object.is(0, l) ? 0 : 1, _b_ = _a_ ? /*<>*/ runtime.caml_ephe_blit_key @@ -1488,10 +1503,11 @@ [248, "CamlinternalLazy.Undefined", runtime.caml_fresh_oo_id(0)]; function force_gen_lazy_block(only_val, blk){ /*<>*/ if - (0 - !== - /*<>*/ runtime.caml_lazy_update_to_forcing - (blk)) + (! + Object.is + (0, + /*<>*/ runtime.caml_lazy_update_to_forcing + (blk))) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Undefined, 1); if(only_val){ @@ -1607,10 +1623,10 @@ function(_f_){ var _g_ = caml_obj_tag(x); a: - if(250 === _g_) + if(Object.is(250, _g_)) var _h_ = x[1]; else{ - if(246 !== _g_ && 244 !== _g_){var _h_ = x; break a;} + if(! Object.is(246, _g_) && ! Object.is(244, _g_)){var _h_ = x; break a;} var _h_ = caml_call1(CamlinternalLazy[2], x); } /*<>*/ return /*<>*/ caml_call1 @@ -1623,10 +1639,10 @@ function(_c_){ var _d_ = caml_obj_tag(x); a: - if(250 === _d_) + if(Object.is(250, _d_)) var _e_ = x[1]; else{ - if(246 !== _d_ && 244 !== _d_){var _e_ = x; break a;} + if(! Object.is(246, _d_) && ! Object.is(244, _d_)){var _e_ = x; break a;} var _e_ = caml_call1(CamlinternalLazy[2], x); } /*<>*/ return /*<>*/ caml_call1 @@ -1634,10 +1650,10 @@ }]; var _a_ = caml_obj_tag(x); a: - if(250 === _a_) + if(Object.is(250, _a_)) var _b_ = x[1]; else{ - if(246 !== _a_ && 244 !== _a_){var _b_ = x; break a;} + if(! Object.is(246, _a_) && ! Object.is(244, _a_)){var _b_ = x; break a;} var _b_ = caml_call1(CamlinternalLazy[2], x); } /*<>*/ return from_val @@ -2058,7 +2074,8 @@ ys$1 = match$0[2], y = match$0[1], /*<>*/ c = /*<>*/ caml_call2(cmp, x, y); - /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ if(! /*<>*/ Object.is(0, c)) + /*<>*/ return c; xs$0 = xs$1; ys$0 = ys$1; } @@ -2154,7 +2171,7 @@ /*<>*/ return [0, s, next];}; /*<>*/ } function take_aux(n, xs){ - /*<>*/ return 0 === n + /*<>*/ return Object.is(0, n) ? empty : function (param){ @@ -2173,8 +2190,8 @@ /*<>*/ } function drop(n, xs){ /*<>*/ return 0 <= n - ? 0 - === n + ? Object.is + (0, n) ? xs : function (param){ @@ -2186,7 +2203,8 @@ /*<>*/ var xs$1 = match[2], /*<>*/ n$1 = n$0 - 1 | 0; - /*<>*/ if(0 === n$1) + /*<>*/ if + ( /*<>*/ Object.is(0, n$1)) /*<>*/ return /*<>*/ caml_call1 (xs$1, 0); n$0 = n$1; @@ -2258,8 +2276,9 @@ s = /*<>*/ caml_call1(to_lazy, s$0); /*<>*/ return function(param){ /*<>*/ var _I_ = runtime.caml_obj_tag(s); - if(250 === _I_) return s[1]; - if(246 !== _I_ && 244 !== _I_) /*<>*/ return s; + if(Object.is(250, _I_)) return s[1]; + if(! Object.is(246, _I_) && ! Object.is(244, _I_)) + /*<>*/ return s; /*<>*/ return /*<>*/ caml_call1 (CamlinternalLazy[2], s); /*<>*/ }; /*<>*/ } @@ -2978,7 +2997,7 @@ /*<>*/ a: { if(40 <= c){ - if(92 === c) /*<>*/ return cst; + if(Object.is(92, c)) /*<>*/ return cst; if(127 > c) break a; } else{ @@ -3076,14 +3095,17 @@ lo_bound = 55295, hi_bound = 57344; function succ(u){ - /*<>*/ return u === 55295 + /*<>*/ return Object.is(u, 55295) ? hi_bound - : u === 1114111 ? caml_call1(Stdlib[1], err_no_succ) : u + 1 | 0; + : Object.is + (u, 1114111) + ? caml_call1(Stdlib[1], err_no_succ) + : u + 1 | 0; /*<>*/ } function pred(u){ - /*<>*/ return u === 57344 + /*<>*/ return Object.is(u, 57344) ? lo_bound - : u === 0 ? caml_call1(Stdlib[1], err_no_pred) : u - 1 | 0; + : Object.is(u, 0) ? caml_call1(Stdlib[1], err_no_pred) : u - 1 | 0; /*<>*/ } function is_valid(i){ /*<>*/ var @@ -3275,7 +3297,8 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[2], cst_nth); var l$1 = l$0[2], a = l$0[1]; - /*<>*/ if(0 === n$0) /*<>*/ return a; + /*<>*/ if( /*<>*/ Object.is(0, n$0)) + /*<>*/ return a; /*<>*/ /*<>*/ var n$1 = n$0 - 1 | 0; l$0 = l$1; n$0 = n$1; @@ -3289,7 +3312,7 @@ /*<>*/ for(;;){ if(! l$0) /*<>*/ return 0; var l$1 = l$0[2], a = l$0[1]; - /*<>*/ if(0 === n$0) + /*<>*/ if( /*<>*/ Object.is(0, n$0)) /*<>*/ return [0, a]; /*<>*/ /*<>*/ var n$1 = n$0 - 1 | 0; l$0 = l$1; @@ -3330,7 +3353,7 @@ (Stdlib[1], cst_List_init); var last = len - 1 | 0, i$1 = 0; if(last < 0) /*<>*/ return 0; - if(0 === last) + if(Object.is(0, last)) /*<>*/ return [0, /*<>*/ caml_call1(f, i$1), 0]; @@ -3748,7 +3771,7 @@ var l = param$0[2], a = param$0[1], - _B_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; + _B_ = Object.is(0, /*<>*/ caml_compare(a, x)) ? 1 : 0; if(_B_) return _B_; param$0 = l; } @@ -3770,7 +3793,8 @@ (Stdlib[8], 1); var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; /*<>*/ if - (0 === /*<>*/ caml_compare(a, x)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(a, x))) /*<>*/ return b; param$0 = l; } @@ -3781,7 +3805,8 @@ if(! param$0) /*<>*/ return 0; var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; /*<>*/ if - (0 === /*<>*/ caml_compare(a, x)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(a, x))) /*<>*/ return [0, b]; param$0 = l; } @@ -3813,7 +3838,7 @@ var l = param$0[2], a = param$0[1][1], - _z_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; + _z_ = Object.is(0, /*<>*/ caml_compare(a, x)) ? 1 : 0; if(_z_) return _z_; param$0 = l; } @@ -3830,8 +3855,8 @@ function remove_assoc(x, param){ /*<>*/ if(! param) /*<>*/ return 0; var l = param[2], pair = param[1], a = pair[1]; - /*<>*/ return 0 - === /*<>*/ caml_compare(a, x) + /*<>*/ return /*<>*/ Object.is + (0, /*<>*/ caml_compare(a, x)) ? l : [0, pair, remove_assoc(x, l)]; } @@ -4159,7 +4184,7 @@ /*<>*/ } function stable_sort(cmp, l){ function sort(n, l){ - /*<>*/ if(2 === n){ + /*<>*/ if(Object.is(2, n)){ if(l){ var match = l[2]; if(match){ @@ -4175,7 +4200,7 @@ } } } - else if(3 === n && l){ + else if(Object.is(3, n) && l){ var _v_ = l[2]; if(_v_){ var match$2 = _v_[2]; @@ -4243,7 +4268,7 @@ } /*<>*/ } function rev_sort(n, l){ - /*<>*/ if(2 === n){ + /*<>*/ if(Object.is(2, n)){ if(l){ var match = l[2]; if(match){ @@ -4259,7 +4284,7 @@ } } } - else if(3 === n && l){ + else if(Object.is(3, n) && l){ var _t_ = l[2]; if(_t_){ var match$2 = _t_[2]; @@ -4331,7 +4356,7 @@ /*<>*/ } function sort_uniq(cmp, l){ function sort(n, l){ - /*<>*/ if(2 === n){ + /*<>*/ if(Object.is(2, n)){ if(l){ var match = l[2]; if(match){ @@ -4342,14 +4367,14 @@ /*<>*/ c$0 = /*<>*/ caml_call2(cmp, x1, x2), /*<>*/ s = - 0 === c$0 + /*<>*/ Object.is(0, c$0) ? [0, x1, 0] : 0 <= c$0 ? [0, x2, [0, x1, 0]] : [0, x1, [0, x2, 0]]; /*<>*/ return [0, s, tl]; } } } - else if(3 === n && l){ + else if(Object.is(3, n) && l){ var _m_ = l[2]; if(_m_){ var match$2 = _m_[2]; @@ -4361,26 +4386,26 @@ x1$0 = l[1], /*<>*/ c$1 = /*<>*/ caml_call2(cmp, x1$0, x2$0); - /*<>*/ if(0 === c$1) + /*<>*/ if( /*<>*/ Object.is(0, c$1)) /*<>*/ var /*<>*/ c$2 = /*<>*/ caml_call2(cmp, x2$0, x3), /*<>*/ _n_ = - 0 === c$2 + /*<>*/ Object.is(0, c$2) ? [0, x2$0, 0] : 0 <= c$2 ? [0, x3, [0, x2$0, 0]] : [0, x2$0, [0, x3, 0]], s$0 = _n_; else if(0 <= c$1){ /*<>*/ /*<>*/ var c$3 = /*<>*/ caml_call2(cmp, x1$0, x3); - /*<>*/ if(0 === c$3) + /*<>*/ if( /*<>*/ Object.is(0, c$3)) var _o_ = [0, x2$0, [0, x1$0, 0]]; else if(0 <= c$3) /*<>*/ var /*<>*/ c$4 = /*<>*/ caml_call2(cmp, x2$0, x3), /*<>*/ _p_ = - 0 === c$4 + /*<>*/ Object.is(0, c$4) ? [0, x2$0, [0, x1$0, 0]] : 0 <= c$4 @@ -4394,14 +4419,14 @@ else{ /*<>*/ /*<>*/ var c$5 = /*<>*/ caml_call2(cmp, x2$0, x3); - /*<>*/ if(0 === c$5) + /*<>*/ if( /*<>*/ Object.is(0, c$5)) var _q_ = [0, x1$0, [0, x2$0, 0]]; else if(0 <= c$5) /*<>*/ var /*<>*/ c$6 = /*<>*/ caml_call2(cmp, x1$0, x3), /*<>*/ _r_ = - 0 === c$6 + /*<>*/ Object.is(0, c$6) ? [0, x1$0, [0, x2$0, 0]] : 0 <= c$6 @@ -4438,7 +4463,7 @@ h1 = l1[1], /*<>*/ c = /*<>*/ caml_call2(cmp, h1, h2); - /*<>*/ if(0 === c){ + /*<>*/ if( /*<>*/ Object.is(0, c)){ /*<>*/ /*<>*/ var accu$0 = [0, h1, accu]; l1 = t1; @@ -4467,7 +4492,7 @@ } /*<>*/ } function rev_sort(n, l){ - /*<>*/ if(2 === n){ + /*<>*/ if(Object.is(2, n)){ if(l){ var match = l[2]; if(match){ @@ -4478,14 +4503,14 @@ /*<>*/ c$0 = /*<>*/ caml_call2(cmp, x1, x2), /*<>*/ s = - 0 === c$0 + /*<>*/ Object.is(0, c$0) ? [0, x1, 0] : 0 < c$0 ? [0, x1, [0, x2, 0]] : [0, x2, [0, x1, 0]]; /*<>*/ return [0, s, tl]; } } } - else if(3 === n && l){ + else if(Object.is(3, n) && l){ var _f_ = l[2]; if(_f_){ var match$2 = _f_[2]; @@ -4497,19 +4522,19 @@ x1$0 = l[1], /*<>*/ c$1 = /*<>*/ caml_call2(cmp, x1$0, x2$0); - /*<>*/ if(0 === c$1) + /*<>*/ if( /*<>*/ Object.is(0, c$1)) /*<>*/ var /*<>*/ c$2 = /*<>*/ caml_call2(cmp, x2$0, x3), /*<>*/ _g_ = - 0 === c$2 + /*<>*/ Object.is(0, c$2) ? [0, x2$0, 0] : 0 < c$2 ? [0, x2$0, [0, x3, 0]] : [0, x3, [0, x2$0, 0]], s$0 = _g_; else if(0 < c$1){ /*<>*/ /*<>*/ var c$3 = /*<>*/ caml_call2(cmp, x2$0, x3); - /*<>*/ if(0 === c$3) + /*<>*/ if( /*<>*/ Object.is(0, c$3)) var _h_ = [0, x1$0, [0, x2$0, 0]]; else if(0 < c$3) var _h_ = [0, x1$0, [0, x2$0, [0, x3, 0]]]; @@ -4518,7 +4543,7 @@ /*<>*/ c$4 = /*<>*/ caml_call2(cmp, x1$0, x3), /*<>*/ _i_ = - 0 === c$4 + /*<>*/ Object.is(0, c$4) ? [0, x1$0, [0, x2$0, 0]] : 0 < c$4 @@ -4530,7 +4555,7 @@ else{ /*<>*/ /*<>*/ var c$5 = /*<>*/ caml_call2(cmp, x1$0, x3); - /*<>*/ if(0 === c$5) + /*<>*/ if( /*<>*/ Object.is(0, c$5)) var _j_ = [0, x2$0, [0, x1$0, 0]]; else if(0 < c$5) var _j_ = [0, x2$0, [0, x1$0, [0, x3, 0]]]; @@ -4539,7 +4564,7 @@ /*<>*/ c$6 = /*<>*/ caml_call2(cmp, x2$0, x3), /*<>*/ _k_ = - 0 === c$6 + /*<>*/ Object.is(0, c$6) ? [0, x2$0, [0, x1$0, 0]] : 0 < c$6 @@ -4574,7 +4599,7 @@ h1 = l1[1], /*<>*/ c = /*<>*/ caml_call2(cmp, h1, h2); - /*<>*/ if(0 === c){ + /*<>*/ if( /*<>*/ Object.is(0, c)){ /*<>*/ /*<>*/ var accu$0 = [0, h1, accu]; l1 = t1; @@ -4618,7 +4643,7 @@ function compare_length_with(l, n){ /*<>*/ var l$0 = l, n$0 = n; /*<>*/ for(;;){ - if(! l$0) return 0 === n$0 ? 0 : 0 < n$0 ? -1 : 1; + if(! l$0) return Object.is(0, n$0) ? 0 : 0 < n$0 ? -1 : 1; var l$1 = l$0[2]; /*<>*/ if(0 >= n$0) /*<>*/ return 1; /*<>*/ /*<>*/ var n$1 = n$0 - 1 | 0; @@ -4662,7 +4687,8 @@ a2 = l2$0[1], /*<>*/ c = /*<>*/ caml_call2(cmp, a1, a2); - /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ if(! /*<>*/ Object.is(0, c)) + /*<>*/ return c; l1$0 = l1$1; l2$0 = l2$1; } @@ -5137,7 +5163,10 @@ _af_ = param - 9 | 0; a: { - if(4 < _af_ >>> 0){if(23 !== _af_) break a;} else if(2 === _af_) break a; + if(4 < _af_ >>> 0){ + if(! Object.is(23, _af_)) break a; + } + else if(Object.is(2, _af_)) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -5185,7 +5214,7 @@ break a; } if(11 <= match){ - if(13 === match) break b; + if(Object.is(13, match)) break b; } else if(8 <= match) break b; } @@ -5219,7 +5248,7 @@ c: { if(35 <= c){ - if(92 !== c){if(127 <= c) break c; break b;} + if(! Object.is(92, c)){if(127 <= c) break c; break b;} } else{ if(32 > c){ @@ -5280,7 +5309,8 @@ /*<>*/ } function map(f, s){ /*<>*/ var l = caml_ml_bytes_length(s); - /*<>*/ if(0 === l) /*<>*/ return s; + /*<>*/ if( /*<>*/ Object.is(0, l)) + /*<>*/ return s; /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), @@ -5302,7 +5332,8 @@ /*<>*/ } function mapi(f, s){ /*<>*/ var l = caml_ml_bytes_length(s); - /*<>*/ if(0 === l) /*<>*/ return s; + /*<>*/ if( /*<>*/ Object.is(0, l)) + /*<>*/ return s; /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), @@ -5352,7 +5383,7 @@ /*<>*/ caml_call2 (f, caml_bytes_unsafe_get(a, i), r[1]); /*<>*/ /*<>*/ var _P_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; i = _P_; } } @@ -5387,7 +5418,7 @@ /*<>*/ return map(Stdlib_Char[3], s); /*<>*/ } function apply1(f, s){ - /*<>*/ if(0 === caml_ml_bytes_length(s)) + /*<>*/ if(Object.is(0, caml_ml_bytes_length(s))) /*<>*/ return s; /*<>*/ /*<>*/ var r = copy(s); caml_bytes_unsafe_set @@ -5578,7 +5609,7 @@ j[1] = i; } /*<>*/ /*<>*/ var _F_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; i = _F_; } } @@ -6626,7 +6657,10 @@ /*<>*/ /*<>*/ var _J_ = param - 9 | 0; a: { - if(4 < _J_ >>> 0){if(23 !== _J_) break a;} else if(2 === _J_) break a; + if(4 < _J_ >>> 0){ + if(! Object.is(23, _J_)) break a; + } + else if(Object.is(2, _J_)) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -6854,7 +6888,7 @@ j[1] = i; } /*<>*/ /*<>*/ var _v_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; i = _v_; } } @@ -7191,7 +7225,8 @@ cst_Array_exists2 = "Array.exists2", cst_Array_combine = "Array.combine"; function init(l, f){ - /*<>*/ if(0 === l) /*<>*/ return [0]; + /*<>*/ if(Object.is(0, l)) + /*<>*/ return [0]; if(0 > l) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_init); @@ -7275,16 +7310,16 @@ /*<>*/ } function copy(a){ /*<>*/ var l = a.length - 1; - /*<>*/ return 0 === l + /*<>*/ return /*<>*/ Object.is(0, l) ? [0] : /*<>*/ caml_array_sub(a, 0, l); /*<>*/ } function append(a1, a2){ /*<>*/ var l1 = a1.length - 1; - /*<>*/ return 0 === l1 + /*<>*/ return /*<>*/ Object.is(0, l1) ? copy(a2) - : 0 - === a2.length - 1 + : Object.is + (0, a2.length - 1) ? /*<>*/ caml_array_sub(a1, 0, l1) : /*<>*/ runtime.caml_array_append(a1, a2); /*<>*/ } @@ -7354,7 +7389,8 @@ /*<>*/ } function map(f, a){ /*<>*/ var l = a.length - 1; - /*<>*/ if(0 === l) /*<>*/ return [0]; + /*<>*/ if( /*<>*/ Object.is(0, l)) + /*<>*/ return [0]; /*<>*/ var /*<>*/ r = /*<>*/ caml_make_vect @@ -7412,7 +7448,7 @@ if(! Object.is(la, lb)) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_map2_arrays_must_hav); - if(0 === la) /*<>*/ return [0]; + if(Object.is(0, la)) /*<>*/ return [0]; /*<>*/ var /*<>*/ r = /*<>*/ caml_make_vect @@ -7449,7 +7485,8 @@ /*<>*/ } function mapi(f, a){ /*<>*/ var l = a.length - 1; - /*<>*/ if(0 === l) /*<>*/ return [0]; + /*<>*/ if( /*<>*/ Object.is(0, l)) + /*<>*/ return [0]; /*<>*/ var /*<>*/ r = /*<>*/ caml_make_vect @@ -7526,7 +7563,7 @@ /*<>*/ } function fold_left_map(f, acc, input_array){ /*<>*/ var len = input_array.length - 1; - /*<>*/ if(0 === len) + /*<>*/ if( /*<>*/ Object.is(0, len)) /*<>*/ return [0, acc, [0]]; /*<>*/ var /*<>*/ match = @@ -7564,7 +7601,7 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); /*<>*/ /*<>*/ var _R_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; i = _R_; } } @@ -7627,7 +7664,8 @@ /*<>*/ for(;;){ if(Object.is(i, n)) /*<>*/ return 0; /*<>*/ if - (0 === /*<>*/ runtime.caml_compare(a[1 + i], x)) + ( /*<>*/ Object.is + (0, /*<>*/ runtime.caml_compare(a[1 + i], x))) /*<>*/ return 1; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -7721,7 +7759,7 @@ if(! Object.is(na, nb)) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Array_combine); - if(0 === na) /*<>*/ return [0]; + if(Object.is(0, na)) /*<>*/ return [0]; /*<>*/ var /*<>*/ x = /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), @@ -7814,7 +7852,7 @@ /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; - if(0 === i$6) break; + if(Object.is(0, i$6)) break; i$6 = _C_; } } @@ -7869,7 +7907,7 @@ /*<>*/ caml_check_bound(a, 0)[1] = e$0; } /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; - if(2 === i$4) break; + if(Object.is(2, i$4)) break; i$4 = _B_; } } @@ -7994,7 +8032,7 @@ /*<>*/ a[1 + i] = caml_check_bound(a, j)[1 + j]; /*<>*/ a[1 + j] = v; var _k_ = i - 1 | 0; - if(1 === i) break; + if(Object.is(1, i)) break; i = _k_; } } @@ -8197,7 +8235,9 @@ (x, neg_infinity); /*<>*/ } function equal(x, y){ - /*<>*/ return 0 === caml_float_compare(x, y) ? 1 : 0; + /*<>*/ return Object.is(0, caml_float_compare(x, y)) + ? 1 + : 0; /*<>*/ } function min(x, y){ /*<>*/ a: @@ -8674,7 +8714,7 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); /*<>*/ /*<>*/ var _ac_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; i = _ac_; } } @@ -8706,7 +8746,8 @@ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ if(Object.is(i, n)) /*<>*/ return 0; - if(0 === /*<>*/ caml_float_compare(a[1 + i], x)) + if + (Object.is(0, /*<>*/ caml_float_compare(a[1 + i], x))) /*<>*/ return 1; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -8841,7 +8882,7 @@ /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } /*<>*/ /*<>*/ var _V_ = i$6 - 1 | 0; - if(0 === i$6) break; + if(Object.is(0, i$6)) break; i$6 = _V_; } } @@ -8896,7 +8937,7 @@ /*<>*/ caml_check_bound(a, 0)[1] = e$0; } /*<>*/ /*<>*/ var _U_ = i$4 - 1 | 0; - if(2 === i$4) break; + if(Object.is(2, i$4)) break; i$4 = _U_; } } @@ -9023,7 +9064,7 @@ /*<>*/ a[1 + i] = caml_check_bound(a, j)[1 + j]; /*<>*/ a[1 + j] = v; var _D_ = i - 1 | 0; - if(1 === i) break; + if(Object.is(1, i)) break; i = _D_; } } @@ -9087,7 +9128,8 @@ /*<>*/ } function map_to_array(f, a){ /*<>*/ var l = a.length - 1; - /*<>*/ if(0 === l) /*<>*/ return [0]; + /*<>*/ if( /*<>*/ Object.is(0, l)) + /*<>*/ return [0]; /*<>*/ var /*<>*/ r = /*<>*/ caml_make_vect @@ -9303,7 +9345,7 @@ minus_one = -1, min_int = -2147483648, max_int = 2147483647; - if(32 === _a_) + if(Object.is(32, _a_)) /*<>*/ var /*<>*/ max_int$0 = Stdlib[19], unsigned_to_int = @@ -9315,7 +9357,7 @@ /*<>*/ return 0; /*<>*/ }; else{ - if(64 !== _a_) + if(! Object.is(64, _a_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _b_], 1); var @@ -9644,8 +9686,8 @@ /*<>*/ } var compare = caml_int_compare; function equal(x, y){ - /*<>*/ return 0 - === /*<>*/ caml_int_compare(x, y) + /*<>*/ return Object.is + (0, /*<>*/ caml_int_compare(x, y)) ? 1 : 0; /*<>*/ } @@ -10394,7 +10436,8 @@ l = t[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return t; + /*<>*/ if( /*<>*/ Object.is(0, c)) + /*<>*/ return t; if(0 <= c){ /*<>*/ /*<>*/ var rr = add(x, r); return Object.is(r, rr) ? t : bal(l, v, rr); @@ -10510,7 +10553,7 @@ l = param[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) + /*<>*/ if( /*<>*/ Object.is(0, c)) /*<>*/ return [0, l, 1, r]; if(0 <= c){ /*<>*/ var @@ -10541,7 +10584,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v), - _R_ = 0 === c ? 1 : 0; + _R_ = Object.is(0, c) ? 1 : 0; if(_R_) return _R_; var r$0 = 0 <= c ? r : l; param$0 = r$0; @@ -10555,7 +10598,7 @@ t1 = t[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c){ + /*<>*/ if( /*<>*/ Object.is(0, c)){ if(! t1) /*<>*/ return t2; if(! t2) /*<>*/ return t1; /*<>*/ /*<>*/ var @@ -10583,7 +10626,7 @@ v1 = s1[2], l1 = s1[1]; if(h2 <= h1){ - if(1 === h2) /*<>*/ return add(v2, s1); + if(Object.is(1, h2)) /*<>*/ return add(v2, s1); /*<>*/ var /*<>*/ match = split(v1, s2), r2$0 = match[3], @@ -10591,7 +10634,7 @@ /*<>*/ _O_ = union(r1, r2$0); /*<>*/ return join(union(l1, l2$0), v1, _O_); } - if(1 === h1) /*<>*/ return add(v1, s2); + if(Object.is(1, h1)) /*<>*/ return add(v1, s2); /*<>*/ var /*<>*/ match$0 = split(v2, s1), r1$0 = match$0[3], @@ -10632,7 +10675,8 @@ l = param[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return 0; + /*<>*/ if( /*<>*/ Object.is(0, c)) + /*<>*/ return 0; if(0 <= c){ /*<>*/ /*<>*/ var match = split_bis(x, r); @@ -10723,7 +10767,8 @@ v1 = e1[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ if(! /*<>*/ Object.is(0, c)) + /*<>*/ return c; /*<>*/ var /*<>*/ e2$1 = cons_enum(r2, e2$0), /*<>*/ e1$1 = cons_enum(r1, e1$0); @@ -10732,7 +10777,7 @@ } /*<>*/ } function equal(s1, s2){ - /*<>*/ return 0 === compare(s1, s2) ? 1 : 0; + /*<>*/ return Object.is(0, compare(s1, s2)) ? 1 : 0; /*<>*/ } function subset(s1, s2){ /*<>*/ var s1$0 = s1, s2$0 = s2; @@ -10748,7 +10793,7 @@ l1 = s1$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(0 === c){ + /*<>*/ if( /*<>*/ Object.is(0, c)){ /*<>*/ /*<>*/ var _E_ = subset(l1, l2); /*<>*/ if(! _E_) /*<>*/ return _E_; @@ -10908,7 +10953,8 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return v; + /*<>*/ if( /*<>*/ Object.is(0, c)) + /*<>*/ return v; var r$0 = 0 <= c ? r : l; param$0 = r$0; } @@ -11011,7 +11057,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) + /*<>*/ if( /*<>*/ Object.is(0, c)) /*<>*/ return [0, v]; var r$0 = 0 <= c ? r : l; param$0 = r$0; @@ -11020,13 +11066,13 @@ function try_join(l, v, r){ /*<>*/ a: { - if(0 !== l){ + if(! Object.is(0, l)){ /*<>*/ /*<>*/ var _u_ = max_elt(l); /*<>*/ if (0 <= /*<>*/ caml_call2(Ord[1], _u_, v)) break a; } - if(0 !== r){ + if(! Object.is(0, r)){ /*<>*/ /*<>*/ var _t_ = min_elt(r); /*<>*/ if (0 <= /*<>*/ caml_call2(Ord[1], v, _t_)) @@ -11226,7 +11272,7 @@ l = s$0[1], /*<>*/ n = /*<>*/ caml_call2(Ord[1], v, low); - if(0 === n) break b; + if(Object.is(0, n)) break b; if(0 <= n){ /*<>*/ /*<>*/ var c$0 = [0, v, r, c]; @@ -11421,7 +11467,7 @@ l = m[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) + /*<>*/ if( /*<>*/ Object.is(0, c)) return Object.is(d, data) ? m : [0, l, x, data, r, h]; if(0 <= c){ /*<>*/ /*<>*/ var @@ -11445,7 +11491,8 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return d; + /*<>*/ if( /*<>*/ Object.is(0, c)) + /*<>*/ return d; var r$0 = 0 <= c ? r : l; param$0 = r$0; } @@ -11565,7 +11612,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) + /*<>*/ if( /*<>*/ Object.is(0, c)) /*<>*/ return [0, d]; var r$0 = 0 <= c ? r : l; param$0 = r$0; @@ -11581,7 +11628,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v), - _E_ = 0 === c ? 1 : 0; + _E_ = Object.is(0, c) ? 1 : 0; if(_E_) return _E_; var r$0 = 0 <= c ? r : l; param$0 = r$0; @@ -11669,7 +11716,7 @@ l = m[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) + /*<>*/ if( /*<>*/ Object.is(0, c)) /*<>*/ return _d_(l, r); if(0 <= c){ /*<>*/ /*<>*/ var rr = remove(x, r); @@ -11694,7 +11741,7 @@ l = m[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c){ + /*<>*/ if( /*<>*/ Object.is(0, c)){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(f, [0, d]); if(! match) /*<>*/ return _d_(l, r); @@ -11873,7 +11920,7 @@ l = param[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) + /*<>*/ if( /*<>*/ Object.is(0, c)) /*<>*/ return [0, l, [0, d], r]; if(0 <= c){ /*<>*/ var @@ -12069,10 +12116,12 @@ v1 = e1[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ if(! /*<>*/ Object.is(0, c)) + /*<>*/ return c; /*<>*/ /*<>*/ var c$0 = /*<>*/ caml_call2(cmp, d1, d2); - /*<>*/ if(0 !== c$0) + /*<>*/ if + (! /*<>*/ Object.is(0, c$0)) /*<>*/ return c$0; /*<>*/ var /*<>*/ e2$1 = cons_enum(r2, e2$0), @@ -12100,7 +12149,9 @@ d1 = e1[2], v1 = e1[1], _p_ = - 0 === /*<>*/ caml_call2(Ord[1], v1, v2) ? 1 : 0; + Object.is(0, /*<>*/ caml_call2(Ord[1], v1, v2)) + ? 1 + : 0; if(_p_){ /*<>*/ /*<>*/ var _q_ = /*<>*/ caml_call2(cmp, d1, d2); @@ -12233,7 +12284,7 @@ l = m$0[1], /*<>*/ n = /*<>*/ caml_call2(Ord[1], v, low); - if(0 === n) break b; + if(Object.is(0, n)) break b; if(0 <= n){ /*<>*/ /*<>*/ var c$0 = [0, v, d, r, c]; @@ -12389,7 +12440,7 @@ /*<>*/ return [0, hd]; /*<>*/ } function is_empty(s){ - /*<>*/ return 0 === s[1] ? 1 : 0; + /*<>*/ return Object.is(0, s[1]) ? 1 : 0; /*<>*/ } function length(s){ /*<>*/ return s[2]; @@ -12544,7 +12595,7 @@ } /*<>*/ } function is_empty(q){ - /*<>*/ return 0 === q[1] ? 1 : 0; + /*<>*/ return Object.is(0, q[1]) ? 1 : 0; /*<>*/ } function length(q){ /*<>*/ return q[1]; @@ -12813,7 +12864,7 @@ n = /*<>*/ caml_call3 (Stdlib_Bytes[51], b[1][1], pos, u); - /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} + /*<>*/ if(! /*<>*/ Object.is(0, n)){b[2] = pos + n | 0; return 0;} /*<>*/ resize(b, uchar_utf_8_byte_length_max); } /*<>*/ } @@ -12826,7 +12877,7 @@ n = /*<>*/ caml_call3 (Stdlib_Bytes[54], b[1][1], pos, u); - /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} + /*<>*/ if(! /*<>*/ Object.is(0, n)){b[2] = pos + n | 0; return 0;} /*<>*/ resize(b, uchar_utf_16_byte_length_max); } /*<>*/ } @@ -12839,7 +12890,7 @@ n = /*<>*/ caml_call3 (Stdlib_Bytes[57], b[1][1], pos, u); - /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} + /*<>*/ if(! /*<>*/ Object.is(0, n)){b[2] = pos + n | 0; return 0;} /*<>*/ resize(b, uchar_utf_16_byte_length_max); } /*<>*/ } @@ -12920,12 +12971,12 @@ ofs = ofs$1, to_read = to_read$1; /*<>*/ for(;;){ - if(0 !== to_read){ + if(! Object.is(0, to_read)){ /*<>*/ /*<>*/ var r = /*<>*/ caml_call4 (Stdlib[84], ic, buf, ofs, to_read); - /*<>*/ if(0 !== r){ + /*<>*/ if(! /*<>*/ Object.is(0, r)){ var already_read$0 = already_read + r | 0, ofs$0 = ofs + r | 0, @@ -12954,13 +13005,13 @@ i$4 = 0; /*<>*/ for(;;){ if(i$4 >= lim$1){ - var _o_ = 92 === previous ? 1 : 0; + var _o_ = Object.is(92, previous) ? 1 : 0; return _o_ ? add_char(b, previous) : _o_; } /*<>*/ /*<>*/ var previous$0 = /*<>*/ caml_string_get(s, i$4); - if(36 === previous$0) - if(92 === previous){ + if(Object.is(36, previous$0)) + if(Object.is(92, previous)){ /*<>*/ add_char(b, previous$0); /*<>*/ /*<>*/ var i$5 = i$4 + 1 | 0; @@ -12978,7 +13029,7 @@ opening = /*<>*/ caml_string_get(s, start); a: { - if(40 !== opening && 123 !== opening){ + if(! Object.is(40, opening) && ! Object.is(123, opening)){ var lim$0 = caml_ml_string_length(s); b: { @@ -12995,7 +13046,7 @@ if(97 <= match){ if(123 <= match) break d; } - else if(95 !== match) break d; + else if(! Object.is(95, match)) break d; } else if(58 <= match){ @@ -13025,10 +13076,10 @@ /*<>*/ var /*<>*/ new_start = start + 1 | 0, k$2 = 0; - if(40 === opening) + if(Object.is(40, opening)) var closing = 41; else{ - if(123 !== opening) + if(! Object.is(123, opening)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); var closing = 125; @@ -13044,7 +13095,7 @@ else if ( /*<>*/ Object.is ( /*<>*/ caml_string_get(s, stop), closing)){ - if(0 === k) break; + if(Object.is(0, k)) break; var i$0 = stop + 1 | 0, k$1 = k - 1 | 0; k = k$1; stop = i$0; @@ -13075,8 +13126,10 @@ i$4 = next_i; } else{ - if(92 === previous) /*<>*/ add_char(b, previous); - if(92 !== previous$0) /*<>*/ add_char(b, previous$0); + if(Object.is(92, previous)) + /*<>*/ add_char(b, previous); + if(! Object.is(92, previous$0)) + /*<>*/ add_char(b, previous$0); /*<>*/ /*<>*/ var i$6 = i$4 + 1 | 0; previous = previous$0; @@ -13392,7 +13445,7 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], s[1]); /*<>*/ for(;;){ - if(0 !== s[2]){ + if(! Object.is(0, s[2])){ s[2] = s[2] - 1 | 0; return caml_call1(Stdlib_Mutex[4], s[1]); } @@ -13403,7 +13456,7 @@ function try_acquire(s){ /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], s[1]); - var ret = 0 === s[2] ? 0 : (s[2] = s[2] - 1 | 0, 1); + var ret = Object.is(0, s[2]) ? 0 : (s[2] = s[2] - 1 | 0, 1); /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[4], s[1]); /*<>*/ return ret; @@ -13435,7 +13488,10 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], s[1]); /*<>*/ for(;;){ - if(0 !== s[2]){s[2] = 0; return caml_call1(Stdlib_Mutex[4], s[1]);} + if(! Object.is(0, s[2])){ + s[2] = 0; + return caml_call1(Stdlib_Mutex[4], s[1]); + } /*<>*/ /*<>*/ caml_call2 (Stdlib_Condition[2], s[3], s[1]); } @@ -13443,7 +13499,7 @@ function try_acquire$0(s){ /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], s[1]); - var ret = 0 === s[2] ? 0 : (s[2] = 0, 1); + var ret = Object.is(0, s[2]) ? 0 : (s[2] = 0, 1); /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[4], s[1]); /*<>*/ return ret; @@ -13602,8 +13658,8 @@ (0); /*<>*/ } function is_main_domain(param){ - /*<>*/ return 0 - === /*<>*/ caml_ml_domain_id(0) + /*<>*/ return Object.is + (0, /*<>*/ caml_ml_domain_id(0)) ? 1 : 0; /*<>*/ } @@ -13937,7 +13993,7 @@ /*<>*/ caml_call1(Stdlib[29], _cS_)); /*<>*/ /*<>*/ var _cT_ = i + 1 | 0; - if(31 === i) + if(Object.is(31, i)) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], char_set$0); i = _cT_; @@ -13947,13 +14003,13 @@ /*<>*/ var str_ind = c >>> 3 | 0, mask = 1 << (c & 7); - return 0 - !== - ( /*<>*/ caml_string_get - (char_set, str_ind) - & mask) - ? 1 - : 0; + return Object.is + (0, + /*<>*/ caml_string_get + (char_set, str_ind) + & mask) + ? 0 + : 1; /*<>*/ } function pad_of_pad_opt(pad_opt){ /*<>*/ if(! pad_opt) @@ -14027,7 +14083,9 @@ } /*<>*/ } function default_float_precision(fconv){ - /*<>*/ return 5 === fconv[2] ? 12 : -6; + /*<>*/ return Object.is(5, fconv[2]) + ? 12 + : -6; /*<>*/ } function buffer_create(init_size){ /*<>*/ return [0, @@ -14237,7 +14295,7 @@ } /*<>*/ } function bprint_char_literal(buf, chr){ - /*<>*/ return 37 === chr + /*<>*/ return Object.is(37, chr) ? buffer_add_string(buf, cst$8) : buffer_add_char(buf, chr); /*<>*/ } @@ -14576,10 +14634,10 @@ c = /*<>*/ caml_call1 (Stdlib[29], i); - return 37 === c + return Object.is(37, c) ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37)) - : 64 - === c + : Object.is + (64, c) ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64)) : buffer_add_char(buf, c); /*<>*/ }; @@ -14686,7 +14744,7 @@ i$3 = i$1 - 1 | 0, j$0 = j; /*<>*/ for(;;){ - if(256 === j$0) break; + if(Object.is(256, j$0)) break; /*<>*/ if (! is_in_char_set @@ -16739,7 +16797,7 @@ /*<>*/ caml_call1(Stdlib[18], width); if(width$0 <= len) /*<>*/ return str; /*<>*/ var - _cu_ = 2 === padty$0 ? 48 : 32, + _cu_ = Object.is(2, padty$0) ? 48 : 32, /*<>*/ res = /*<>*/ caml_call2 (Stdlib_Bytes[1], width$0, _cu_); @@ -16756,14 +16814,20 @@ a: if(0 < len){ /*<>*/ if - (43 - !== /*<>*/ caml_string_get(str, 0) + (! + /*<>*/ Object.is + (43, + /*<>*/ caml_string_get(str, 0)) && - 45 - !== /*<>*/ caml_string_get(str, 0) + ! + /*<>*/ Object.is + (45, + /*<>*/ caml_string_get(str, 0)) && - 32 - !== /*<>*/ caml_string_get(str, 0)) + ! + /*<>*/ Object.is + (32, + /*<>*/ caml_string_get(str, 0))) break a; /*<>*/ /*<>*/ caml_bytes_set (res, @@ -16782,14 +16846,19 @@ if (1 < len && - 48 - === /*<>*/ caml_string_get(str, 0)){ + /*<>*/ Object.is + (48, + /*<>*/ caml_string_get(str, 0))){ /*<>*/ if - (120 - !== /*<>*/ caml_string_get(str, 1) + (! + /*<>*/ Object.is + (120, + /*<>*/ caml_string_get(str, 1)) && - 88 - !== /*<>*/ caml_string_get(str, 1)) + ! + /*<>*/ Object.is + (88, + /*<>*/ caml_string_get(str, 1))) break a; /*<>*/ /*<>*/ caml_bytes_set (res, @@ -16823,20 +16892,23 @@ b: { if(58 > c){ - if(32 !== c){ + if(! Object.is(32, c)){ if(43 > c) break a; switch(c - 43 | 0){ case 5: c: if(len < (prec$0 + 2 | 0) && 1 < len){ /*<>*/ if - (120 - !== - /*<>*/ caml_string_get(str, 1) + (! + /*<>*/ Object.is + (120, + /*<>*/ caml_string_get(str, 1)) && - 88 - !== - /*<>*/ caml_string_get(str, 1)) + ! + /*<>*/ Object.is + (88, + /*<>*/ caml_string_get + (str, 1))) break c; /*<>*/ /*<>*/ var res$1 = @@ -16969,7 +17041,7 @@ if(9 < c - 48 >>> 0) /*<>*/ put(c); else{ - if(0 === left[1]){ + if(Object.is(0, left[1])){ /*<>*/ put(95); left[1] = 3; } @@ -17138,7 +17210,7 @@ /*<>*/ /*<>*/ var match = /*<>*/ runtime.caml_classify_float(x); - return 3 === match + return Object.is(3, match) ? x < 0. ? cst_neg_infinity : cst_infinity : 4 <= match ? cst_nan : str; /*<>*/ } @@ -17162,7 +17234,7 @@ a: { if(23 < _cg_ >>> 0){ - if(55 === _cg_) break a; + if(Object.is(55, _cg_)) break a; } else if(21 < _cg_ - 1 >>> 0) break a; /*<>*/ /*<>*/ var @@ -18469,7 +18541,7 @@ /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(str, i$0); - if(9 !== match && 32 !== match) + if(! Object.is(9, match) && ! Object.is(32, match)) /*<>*/ return i$0; /*<>*/ /*<>*/ var i$1 = i$0 + 1 | 0; @@ -18511,7 +18583,10 @@ /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(str, nend); - if(48 <= match){if(58 <= match) break;} else if(45 !== match) break; + if(48 <= match){ + if(58 <= match) break; + } + else if(! Object.is(45, match)) break; /*<>*/ /*<>*/ var j$0 = nend + 1 | 0; nend = j$0; @@ -18606,8 +18681,8 @@ /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(str, str_ind); - if(37 === match) break; - if(64 === match) break a; + if(Object.is(37, match)) break; + if(Object.is(64, match)) break a; var str_ind$1 = str_ind + 1 | 0; str_ind = str_ind$1; } @@ -18617,10 +18692,10 @@ (end_ind, cst_unexpected_end_of_format); var match$1 = - 95 - === - /*<>*/ caml_string_get - (str, str_ind$2) + Object.is + (95, + /*<>*/ caml_string_get + (str, str_ind$2)) ? parse_flags(str_ind, str_ind$2 + 1 | 0, end_ind, 1) : parse_flags(str_ind, str_ind$2, end_ind, 0), fmt_rest = match$1[1]; @@ -18665,7 +18740,7 @@ } } else{ - if(10 === c){ + if(Object.is(10, c)){ var fmt_rest$4 = parse(str_ind$0 + 1 | 0, end_ind)[1], match$0 = [0, [17, 3, fmt_rest$4]]; @@ -18682,10 +18757,10 @@ /*<>*/ if ((str_ind$0 + 1 | 0) < end_ind && - 37 - === - /*<>*/ caml_string_get - (str, str_ind$0 + 1 | 0)){ + /*<>*/ Object.is + (37, + /*<>*/ caml_string_get + (str, str_ind$0 + 1 | 0))){ var fmt_rest$6 = parse(str_ind$0 + 2 | 0, end_ind)[1], match$0 = [0, [17, 6, fmt_rest$6]]; @@ -18714,12 +18789,12 @@ _bh_ = _bg_ || - (60 - !== - /*<>*/ caml_string_get - (str, str_ind$3) - ? 1 - : 0); + (Object.is + (60, + /*<>*/ caml_string_get + (str, str_ind$3)) + ? 0 + : 1); if(_bh_) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); @@ -18734,7 +18809,7 @@ if(48 <= match$2){ if(58 > match$2) break c; } - else if(45 === match$2) break c; + else if(Object.is(45, match$2)) break c; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); } @@ -18751,7 +18826,7 @@ - 45 | 0; if(12 < switcher$0 >>> 0){ - if(17 === switcher$0){ + if(Object.is(17, switcher$0)){ /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 @@ -18775,10 +18850,11 @@ /*<>*/ str_ind_5 = parse_spaces(str_ind_4, end_ind); if - (62 - !== - /*<>*/ caml_string_get - (str, str_ind_5)) + (! + Object.is + (62, + /*<>*/ caml_string_get + (str, str_ind_5))) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -18825,7 +18901,7 @@ if(48 <= match$6){ if(58 > match$6) break c; } - else if(45 === match$6) break c; + else if(Object.is(45, match$6)) break c; var _bo_ = 0; break b; } @@ -18837,10 +18913,11 @@ /*<>*/ str_ind_3$0 = parse_spaces(str_ind_2$0, end_ind); if - (62 - !== - /*<>*/ caml_string_get - (str, str_ind_3$0)) + (! + Object.is + (62, + /*<>*/ caml_string_get + (str, str_ind_3$0))) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -19005,7 +19082,7 @@ [0, padty, width]); } } - else if(42 === match) + else if(Object.is(42, match)) /*<>*/ return parse_after_padding (pct_ind, str_ind$0 + 1 | 0, @@ -19063,7 +19140,7 @@ /*<>*/ /*<>*/ var symb = /*<>*/ caml_string_get(str, str_ind); - if(46 !== symb) + if(! Object.is(46, symb)) /*<>*/ return parse_conversion (pct_ind, str_ind + 1 | 0, @@ -19125,7 +19202,7 @@ if(legacy_behavior$0){ /*<>*/ var /*<>*/ _ba_ = str_ind$0 + 1 | 0, - minus$0 = minus || (45 === symb$0 ? 1 : 0); + minus$0 = minus || (Object.is(45, symb$0) ? 1 : 0); /*<>*/ return parse_literal (minus$0, _ba_); } @@ -19395,8 +19472,8 @@ c = /*<>*/ caml_string_get (str, str_ind$0); - if(45 !== c){ - if(93 === c) + if(! Object.is(45, c)){ + if(Object.is(93, c)) /*<>*/ return str_ind$0 + 1 | 0; var _a__ = str_ind$0 + 1 | 0; @@ -19429,15 +19506,15 @@ a: { if(46 <= c$1){ - if(64 !== c$1){ - if(93 !== c$1) break a; + if(! Object.is(64, c$1)){ + if(! Object.is(93, c$1)) break a; /*<>*/ add_in_char_set (char_set, c$0); /*<>*/ return str_ind$0 + 1 | 0; } } - else if(37 !== c$1){ + else if(! Object.is(37, c$1)){ if(45 > c$1) break a; var str_ind$2 = str_ind$0 + 1 | 0; if(Object.is(str_ind$2, end_ind)) @@ -19447,7 +19524,7 @@ c$2 = /*<>*/ caml_string_get (str, str_ind$2); - if(37 === c$2){ + if(Object.is(37, c$2)){ if((str_ind$2 + 1 | 0) === end_ind) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); @@ -19455,7 +19532,7 @@ c$3 = /*<>*/ caml_string_get (str, str_ind$2 + 1 | 0); - if(37 !== c$3 && 64 !== c$3) + if(! Object.is(37, c$3) && ! Object.is(64, c$3)) /*<>*/ return fail_single_percent (str_ind$2); /*<>*/ add_range(c$0, c$3); @@ -19467,7 +19544,7 @@ /*<>*/ return parse_char_set_content (counter$1, _a8_, end_ind); } - if(93 === c$2){ + if(Object.is(93, c$2)){ /*<>*/ add_in_char_set (char_set, c$0); /*<>*/ add_in_char_set @@ -19484,7 +19561,7 @@ /*<>*/ return parse_char_set_content (counter$0, _a9_, end_ind); } - if(37 === c$0){ + if(Object.is(37, c$0)){ /*<>*/ add_in_char_set (char_set, c$1); var _a7_ = str_ind$0 + 1 | 0; @@ -19496,7 +19573,7 @@ (counter$2, _a7_, end_ind); } } - if(37 === c$0) + if(Object.is(37, c$0)) /*<>*/ fail_single_percent (str_ind$0); /*<>*/ add_in_char_set @@ -19515,10 +19592,10 @@ /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); if - (94 - === - /*<>*/ caml_string_get - (str, str_ind)) + (Object.is + (94, + /*<>*/ caml_string_get + (str, str_ind))) var str_ind$0 = str_ind + 1 | 0, reverse = 1, @@ -19564,7 +19641,7 @@ fmt_rest$21 = parse(str_ind, end_ind)[1], /*<>*/ match$7 = get_pad_opt(99); if(match$7){ - if(0 === match$7[1]) + if(Object.is(0, match$7[1])) /*<>*/ var /*<>*/ _aY_ = get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], @@ -19693,7 +19770,7 @@ default: var counter = 1; break b; } } - else if(76 === symb){var counter = 2; break b;} + else if(Object.is(76, symb)){var counter = 2; break b;} /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _V_], 1); } @@ -19796,9 +19873,9 @@ break b; } if(hash$1){ - if(70 === symb){var kind = 8; break b;} + if(Object.is(70, symb)){var kind = 8; break b;} } - else if(70 === symb){var kind = 5; break b;} + else if(Object.is(70, symb)){var kind = 5; break b;} /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _X_], 1); } @@ -19895,7 +19972,7 @@ break a; } } - else if(76 === symb){ + else if(Object.is(76, symb)){ /*<>*/ var /*<>*/ _aE_ = /*<>*/ caml_string_get(str, str_ind), @@ -19973,9 +20050,9 @@ b: { if(38 <= symb){ - if(44 !== symb && 64 !== symb) break b; + if(! Object.is(44, symb) && ! Object.is(64, symb)) break b; } - else if(33 !== symb && 37 > symb) break b; + else if(! Object.is(33, symb) && 37 > symb) break b; if(legacy_behavior$0) break a; } /*<>*/ incompatible_flag @@ -19989,9 +20066,10 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); if - (60 - !== - /*<>*/ caml_string_get(str, str_ind)) + (! + Object.is + (60, + /*<>*/ caml_string_get(str, str_ind))) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ /*<>*/ var @@ -20034,9 +20112,11 @@ /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ if - (32 - !== - /*<>*/ caml_string_get(str, str_ind$0)) + (! + /*<>*/ Object.is + (32, + /*<>*/ caml_string_get + (str, str_ind$0))) /*<>*/ return str_ind$0; var str_ind$1 = str_ind$0 + 1 | 0; str_ind$0 = str_ind$1; @@ -20080,7 +20160,7 @@ /*<>*/ return parse_positive (str_ind, end_ind, 0); } - else if(45 === match){ + else if(Object.is(45, match)){ if((str_ind + 1 | 0) === end_ind) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); @@ -20104,10 +20184,10 @@ function add_literal(lit_start, str_ind, fmt){ /*<>*/ var size = str_ind - lit_start | 0; - return 0 === size + return Object.is(0, size) ? [0, fmt] - : 1 - === size + : Object.is + (1, size) ? [0, [12, /*<>*/ caml_string_get @@ -20126,10 +20206,10 @@ /*<>*/ /*<>*/ caml_call3 (failwith_message(_U_), str, c, end_ind); if - (37 - === - /*<>*/ caml_string_get - (str, str_ind$0)){ + (Object.is + (37, + /*<>*/ caml_string_get + (str, str_ind$0))){ if((str_ind$0 + 1 | 0) === end_ind) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); @@ -20169,7 +20249,7 @@ match$0 = /*<>*/ caml_string_get (str, str_ind$0 + 2 | 0); - if(40 === match$0){ + if(Object.is(40, match$0)){ /*<>*/ var /*<>*/ sub_end$0 = search_subformat_end(str_ind$0 + 3 | 0, end_ind, 41), @@ -20178,7 +20258,7 @@ str_ind$0 = str_ind$3; continue; } - if(123 === match$0){ + if(Object.is(123, match$0)){ /*<>*/ var /*<>*/ sub_end$1 = search_subformat_end(str_ind$0 + 3 | 0, end_ind, 125), @@ -20193,7 +20273,7 @@ } } else{ - if(40 === match){ + if(Object.is(40, match)){ /*<>*/ var /*<>*/ sub_end$2 = search_subformat_end(str_ind$0 + 2 | 0, end_ind, 41), @@ -20201,7 +20281,7 @@ str_ind$0 = str_ind$6; continue; } - if(41 === match) + if(Object.is(41, match)) /*<>*/ return expected_character (str_ind$0 + 1 | 0, cst_character$0, 41); } @@ -20222,16 +20302,20 @@ if(plus$0){ if(! hash$0){ if(space$0) break a; - if(100 === symb) /*<>*/ return 1; - if(105 === symb) /*<>*/ return 4; + if(Object.is(100, symb)) + /*<>*/ return 1; + if(Object.is(105, symb)) + /*<>*/ return 4; break a; } } else{ if(! hash$0){ if(space$0){ - if(100 === symb) /*<>*/ return 2; - if(105 === symb) /*<>*/ return 5; + if(Object.is(100, symb)) + /*<>*/ return 2; + if(Object.is(105, symb)) + /*<>*/ return 5; break a; } var switcher$1 = symb - 88 | 0; @@ -20697,8 +20781,8 @@ function unexpected_empty_element(f, i, length){ /*<>*/ return i < length ? missing_element(i, length) - : 0 - === length + : Object.is + (0, length) ? /*<>*/ caml_call4 (Stdlib_Printf[10], Stdlib[1], _a_, f, i) : /*<>*/ caml_call5 @@ -20777,7 +20861,7 @@ /*<>*/ return a[1]; /*<>*/ } function is_empty(a){ - /*<>*/ return 0 === a[1] ? 1 : 0; + /*<>*/ return Object.is(0, a[1]) ? 1 : 0; /*<>*/ } function copy(param){ var length = param[1], arr = param[2]; @@ -20796,7 +20880,7 @@ function get_last(a){ /*<>*/ var length = a[1], arr = a[2]; /*<>*/ check_valid_length(length, arr); - if(0 === length) + if(Object.is(0, length)) /*<>*/ /*<>*/ caml_call3 (Stdlib_Printf[10], Stdlib[1], _i_, f); /*<>*/ return unsafe_get(arr, length - 1 | 0, length); @@ -20804,12 +20888,14 @@ function find_last(a){ /*<>*/ var length = a[1], arr = a[2]; /*<>*/ check_valid_length(length, arr); - return 0 === length ? 0 : [0, unsafe_get(arr, length - 1 | 0, length)]; + return Object.is(0, length) + ? 0 + : [0, unsafe_get(arr, length - 1 | 0, length)]; /*<>*/ } function pop_last(a){ /*<>*/ var length = a[1], arr = a[2]; /*<>*/ check_valid_length(length, arr); - if(0 === length) + if(Object.is(0, length)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -21172,7 +21258,7 @@ r[1] = /*<>*/ caml_call2(f, v, r[1]); /*<>*/ /*<>*/ var _s_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; i = _s_; } } @@ -21297,7 +21383,7 @@ l[1] = [0, unsafe_get(arr, i, length), _m_]; /*<>*/ /*<>*/ var _n_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; i = _n_; } } @@ -22091,7 +22177,9 @@ /*<>*/ for(;;){ if(len <= n$0) /*<>*/ return len; /*<>*/ if - (32 !== /*<>*/ caml_string_get(s, n$0)) + (! + /*<>*/ Object.is + (32, /*<>*/ caml_string_get(s, n$0))) /*<>*/ return n$0; /*<>*/ /*<>*/ var n$1 = n$0 + 1 | 0; n$0 = n$1; @@ -22130,7 +22218,7 @@ /*<>*/ return /*<>*/ caml_call2 (Stdlib_String[18], function(c){ - /*<>*/ if(9 === c && ! seen[1]){ + /*<>*/ if(Object.is(9, c) && ! seen[1]){ seen[1] = 1; /*<>*/ return 32; } @@ -22221,7 +22309,9 @@ { /*<>*/ if (0 < len - && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ + && + /*<>*/ Object.is + (13, /*<>*/ caml_string_get(word, len - 1 | 0))){ var _H_ = /*<>*/ caml_call3 @@ -22493,7 +22583,8 @@ /*<>*/ } function string_of_extension_constructo(t){ /*<>*/ if - (0 === /*<>*/ caml_obj_tag(t)){ + ( /*<>*/ Object.is + (0, /*<>*/ caml_obj_tag(t))){ /*<>*/ var /*<>*/ constructor = t[1][1], match = t.length - 1; @@ -22627,8 +22718,11 @@ function format_backtrace_slot(pos, slot){ function info(is_raise){ /*<>*/ return is_raise - ? 0 === pos ? cst_Raised_at : cst_Re_raised_at - : 0 === pos ? cst_Raised_by_primitive_operat : cst_Called_from; + ? Object.is(0, pos) ? cst_Raised_at : cst_Re_raised_at + : Object.is + (0, pos) + ? cst_Raised_by_primitive_operat + : cst_Called_from; /*<>*/ } /*<>*/ if(0 === slot[0]){ /*<>*/ var @@ -22736,7 +22830,7 @@ if(! match) /*<>*/ return 0; var backtrace = match[1], i$1 = backtrace.length - 2 | 0, i = i$1; /*<>*/ for(;;){ - if(-1 === i) + if(Object.is(-1, i)) var _K_ = 0; else{ var _J_ = 0 === caml_check_bound(backtrace, i)[1 + i][0] ? 1 : 0; @@ -22774,8 +22868,8 @@ } /*<>*/ } function exn_slot(x){ - /*<>*/ return 0 - === /*<>*/ caml_obj_tag(x) + /*<>*/ return /*<>*/ Object.is + (0, /*<>*/ caml_obj_tag(x)) ? x[1] : x; /*<>*/ } @@ -23420,7 +23514,8 @@ r = /*<>*/ caml_ml_input_bigarray (ic, buf, ofs, len); - /*<>*/ if(0 === r) + /*<>*/ if + ( /*<>*/ Object.is(0, r)) /*<>*/ return 0; var len$0 = len - r | 0, ofs$0 = ofs + r | 0; ofs = ofs$0; @@ -23445,12 +23540,13 @@ function read_upto(ic, buf, ofs, len){ /*<>*/ var ofs$0 = ofs, len$0 = len; /*<>*/ for(;;){ - if(0 !== len$0){ + if(! Object.is(0, len$0)){ /*<>*/ /*<>*/ var r = /*<>*/ caml_call4 (Stdlib[84], ic, buf, ofs$0, len$0); - /*<>*/ if(0 !== r){ + /*<>*/ if + (! /*<>*/ Object.is(0, r)){ var len$1 = len$0 - r | 0, ofs$1 = ofs$0 + r | 0; ofs$0 = ofs$1; len$0 = len$1; @@ -23901,7 +23997,7 @@ /*<>*/ if(0 <= toread){ var toread$0 = toread; /*<>*/ for(;;){ - if(0 === toread$0) + if(Object.is(0, toread$0)) /*<>*/ return /*<>*/ caml_blake2_final (ctx, hash_length); /*<>*/ var @@ -23911,7 +24007,7 @@ /*<>*/ n = /*<>*/ caml_call4 (Stdlib_In_channel[16], ic, buf, 0, _c_); - /*<>*/ if(0 === n) + /*<>*/ if( /*<>*/ Object.is(0, n)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[12], 1); /*<>*/ /*<>*/ caml_blake2_update @@ -23929,7 +24025,7 @@ n$0 = /*<>*/ caml_call4 (Stdlib_In_channel[16], ic, buf, 0, buf_size); - /*<>*/ if(0 === n$0) + /*<>*/ if( /*<>*/ Object.is(0, n$0)) /*<>*/ return /*<>*/ caml_blake2_final (ctx, hash_length); /*<>*/ /*<>*/ caml_blake2_update @@ -24033,13 +24129,13 @@ (Stdlib[86], chan, 16); /*<>*/ } function to_hex(d){ - /*<>*/ if(16 !== caml_ml_string_length(d)) + /*<>*/ if(! Object.is(16, caml_ml_string_length(d))) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Digest_to_hex$0); /*<>*/ return hex_of_string(d); /*<>*/ } function of_hex(s){ - /*<>*/ if(32 !== caml_ml_string_length(s)) + /*<>*/ if(! Object.is(32, caml_ml_string_length(s))) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Digest_from_hex); /*<>*/ return string_of_hex(s); @@ -24441,7 +24537,9 @@ /*<>*/ var dim1 = data.length - 1, /*<>*/ dim2 = - 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, + /*<>*/ Object.is(0, dim1) + ? 0 + : caml_check_bound(data, 0)[1].length - 1, /*<>*/ ba = create$1(kind, layout, dim1, dim2), /*<>*/ ofs = layout ? 1 : 0, /*<>*/ _C_ = dim1 - 1 | 0, @@ -24599,9 +24697,11 @@ /*<>*/ var dim1 = data.length - 1, /*<>*/ dim2 = - 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, + /*<>*/ Object.is(0, dim1) + ? 0 + : caml_check_bound(data, 0)[1].length - 1, /*<>*/ dim3 = - 0 === dim2 + /*<>*/ Object.is(0, dim2) ? 0 : caml_check_bound(caml_check_bound(data, 0)[1], 0)[1].length - 1, /*<>*/ ba = create$2(kind, layout, dim1, dim2, dim3), @@ -24660,29 +24760,29 @@ /*<>*/ return ba; /*<>*/ } function array0_of_genarray(a){ - /*<>*/ return 0 - === /*<>*/ caml_ba_num_dims(a) + /*<>*/ return /*<>*/ Object.is + (0, /*<>*/ caml_ba_num_dims(a)) ? a : /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_array0_of_genarra); /*<>*/ } function array1_of_genarray(a){ - /*<>*/ return 1 - === /*<>*/ caml_ba_num_dims(a) + /*<>*/ return /*<>*/ Object.is + (1, /*<>*/ caml_ba_num_dims(a)) ? a : /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_array1_of_genarra); /*<>*/ } function array2_of_genarray(a){ - /*<>*/ return 2 - === /*<>*/ caml_ba_num_dims(a) + /*<>*/ return /*<>*/ Object.is + (2, /*<>*/ caml_ba_num_dims(a)) ? a : /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_array2_of_genarra); /*<>*/ } function array3_of_genarray(a){ - /*<>*/ return 3 - === /*<>*/ caml_ba_num_dims(a) + /*<>*/ return /*<>*/ Object.is + (3, /*<>*/ caml_ba_num_dims(a)) ? a : /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_array3_of_genarra); @@ -24874,7 +24974,7 @@ /*<>*/ /*<>*/ caml_call3 (Stdlib_Bytes[86], buf, 5 + (i * 8 | 0) | 0, _y_); /*<>*/ /*<>*/ var _z_ = i + 1 | 0; - if(3 === i) + if(Object.is(3, i)) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], buf); i = _z_; @@ -24882,7 +24982,7 @@ /*<>*/ } function of_binary_string(buf){ /*<>*/ var - _v_ = runtime.caml_ml_string_length(buf) !== 37 ? 1 : 0, + _v_ = Object.is(runtime.caml_ml_string_length(buf), 37) ? 0 : 1, _w_ = _v_ || @@ -25140,7 +25240,7 @@ _h_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), _i_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), nativebits = - 32 === Stdlib_Nativeint[9] + Object.is(32, Stdlib_Nativeint[9]) ? function (s){ /*<>*/ return bits32(s); @@ -25151,7 +25251,7 @@ ( /*<>*/ caml_lxm_next(s)); /*<>*/ }, nativeint = - 32 === Stdlib_Nativeint[9] + Object.is(32, Stdlib_Nativeint[9]) ? function (s, bound){ /*<>*/ return int32(s, bound); @@ -25163,7 +25263,7 @@ (s, /*<>*/ caml_int64_of_int32(bound))); /*<>*/ }, nativeint_in_range = - 32 === Stdlib_Nativeint[9] + Object.is(32, Stdlib_Nativeint[9]) ? function (s, min, max){ /*<>*/ return int32_in_range(s, min, max); @@ -26194,7 +26294,8 @@ if(! prec) /*<>*/ return 0; var k = prec[1], next = prec[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(k, key)){ + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(k, key))){ h[1] = h[1] - 1 | 0; return prec$0 ? (prec$0[3] = next, 0) @@ -26213,21 +26314,24 @@ (Stdlib[8], 1); var k1 = match[1], d1 = match[2], next1 = match[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(key, k1)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(key, k1))) /*<>*/ return d1; if(! next1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var k2 = next1[1], d2 = next1[2], next2 = next1[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(key, k2)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(key, k2))) /*<>*/ return d2; if(! next2) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var k3 = next2[1], d3 = next2[2], next3 = next2[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(key, k3)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(key, k3))) /*<>*/ return d3; var param = next3; for(;;){ @@ -26236,7 +26340,8 @@ (Stdlib[8], 1); var k = param[1], data = param[2], next = param[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(key, k)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(key, k))) /*<>*/ return data; param = next; } @@ -26248,24 +26353,28 @@ if(! match) /*<>*/ return 0; var k1 = match[1], d1 = match[2], next1 = match[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(key, k1)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(key, k1))) /*<>*/ return [0, d1]; if(! next1) /*<>*/ return 0; var k2 = next1[1], d2 = next1[2], next2 = next1[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(key, k2)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(key, k2))) /*<>*/ return [0, d2]; if(! next2) /*<>*/ return 0; var k3 = next2[1], d3 = next2[2], next3 = next2[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(key, k3)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(key, k3))) /*<>*/ return [0, d3]; var param = next3; for(;;){ if(! param) /*<>*/ return 0; var k = param[1], data = param[2], next = param[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(key, k)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(key, k))) /*<>*/ return [0, data]; param = next; } @@ -26278,7 +26387,8 @@ if(! param) /*<>*/ return 0; var k = param[1], data = param[2], next = param[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(k, key)) + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(k, key))) break; param = next; } @@ -26294,7 +26404,8 @@ } var k$0 = param$0[1], data$0 = param$0[2], next$0 = param$0[3]; /*<>*/ if - (0 === /*<>*/ caml_compare(k$0, key)){ + ( /*<>*/ Object.is + (0, /*<>*/ caml_compare(k$0, key))){ /*<>*/ /*<>*/ var dst$0 = [0, data$0, 24029]; dst[1 + offset] = dst$0; @@ -26315,7 +26426,9 @@ if(slot){ var k = slot[1], next = slot[3]; /*<>*/ if - (0 !== /*<>*/ caml_compare(k, key)){slot = next; continue;} + (! + /*<>*/ Object.is + (0, /*<>*/ caml_compare(k, key))){slot = next; continue;} slot[1] = key; slot[2] = data; var _l_ = 0; @@ -26343,7 +26456,8 @@ var k = param[1], next = param[3], - _j_ = 0 === /*<>*/ caml_compare(k, key) ? 1 : 0; + _j_ = + Object.is(0, /*<>*/ caml_compare(k, key)) ? 1 : 0; if(_j_) return _j_; param = next; } @@ -26535,7 +26649,7 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _E_ = 0 !== l ? 1 : 0, + _E_ = Object.is(0, l) ? 0 : 1, _F_ = _E_ ? /*<>*/ runtime.caml_ephe_blit_key @@ -26749,7 +26863,7 @@ j = j$1; } } - if(0 === prev_len){ + if(Object.is(0, prev_len)){ var _k_ = t[5]; /*<>*/ caml_check_bound(t[1], _k_)[1 + _k_] = emptybucket; var _l_ = t[5]; @@ -26775,7 +26889,7 @@ } t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); /*<>*/ /*<>*/ var _u_ = i$4 + 1 | 0; - if(2 === i$4) break; + if(Object.is(2, i$4)) break; i$4 = _u_; } } @@ -27285,7 +27399,9 @@ /*<>*/ var width$2 = state[9] - off$1 | 0, /*<>*/ box_type$1 = - 1 === ty ? 1 : state[9] < size$0 ? ty : 5; + /*<>*/ Object.is(1, ty) + ? 1 + : state[9] < size$0 ? ty : 5; /*<>*/ return /*<>*/ caml_call2 (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]); case 4: @@ -28531,11 +28647,11 @@ } /*<>*/ /*<>*/ var match = /*<>*/ runtime.caml_string_get(s, right[1]); - if(10 === match){ + if(Object.is(10, match)){ /*<>*/ flush(0); /*<>*/ pp_force_newline(ppf, 0); } - else if(32 === match){ + else if(Object.is(32, match)){ /*<>*/ flush(0); /*<>*/ pp_print_space(ppf, 0); } @@ -29240,7 +29356,7 @@ ib[2] = c; ib[3] = 1; ib[4] = ib[4] + 1 | 0; - if(10 === c) ib[5] = ib[5] + 1 | 0; + if(Object.is(10, c)) ib[5] = ib[5] + 1 | 0; /*<>*/ return c; } catch(_aY_){ @@ -29268,7 +29384,7 @@ return ib[1]; /*<>*/ } function beginning_of_input(ib){ - /*<>*/ return 0 === ib[4] ? 1 : 0; + /*<>*/ return Object.is(0, ib[4]) ? 1 : 0; /*<>*/ } function name_of_input(ib){ /*<>*/ var match = ib[9]; @@ -29369,7 +29485,7 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[12], 1); lim[1] = /*<>*/ caml_call4(Stdlib[84], ic, buf, 0, len); - return 0 === lim[1] + return Object.is(0, lim[1]) ? (eof[1] = 1, caml_call1(scan_close_ic, ic)) : (i[1] = 1, /*<>*/ caml_bytes_get(buf, 0)); /*<>*/ } @@ -29515,17 +29631,18 @@ ( /*<>*/ caml_call3(Stdlib_Printf[4], _g_, c, ci)); /*<>*/ } function check_char(ib, c$0){ - /*<>*/ if(10 === c$0){ + /*<>*/ if(Object.is(10, c$0)){ /*<>*/ /*<>*/ var ci = checked_peek_char(ib); - /*<>*/ return 10 === ci + /*<>*/ return /*<>*/ Object.is(10, ci) ? invalidate_current_char(ib) - : 13 - === ci + : Object.is + (13, ci) ? (invalidate_current_char(ib), check_this_char(ib, 10)) : character_mismatch(10, ci); } - if(32 !== c$0) /*<>*/ return check_this_char(ib, c$0); + if(! Object.is(32, c$0)) + /*<>*/ return check_this_char(ib, c$0); /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), @@ -29535,7 +29652,7 @@ a: { if(4 < _aT_ >>> 0){ - if(23 === _aT_) break a; + if(Object.is(23, _aT_)) break a; } else if(1 < _aT_ - 2 >>> 0) break a; /*<>*/ return 0; @@ -29613,7 +29730,11 @@ /*<>*/ /*<>*/ var l = /*<>*/ caml_ml_string_length(tok); /*<>*/ if - (0 !== l && 43 === /*<>*/ caml_string_get(tok, 0)) + (! + /*<>*/ Object.is(0, l) + && + /*<>*/ Object.is + (43, /*<>*/ caml_string_get(tok, 0))) /*<>*/ return /*<>*/ caml_call3 (Stdlib_String[16], tok, 1, l - 1 | 0); /*<>*/ return tok; @@ -29625,12 +29746,12 @@ function scan_decimal_digit_star(width, ib){ /*<>*/ var width$0 = width; /*<>*/ for(;;){ - if(0 === width$0) /*<>*/ return width$0; + if(Object.is(0, width$0)) /*<>*/ return width$0; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width$0; if(58 <= c){ - if(95 === c){ + if(Object.is(95, c)){ /*<>*/ /*<>*/ var width$1 = ignore_char(width$0, ib); width$0 = width$1; @@ -29647,7 +29768,7 @@ } /*<>*/ } function scan_decimal_digit_plus(width, ib){ - /*<>*/ if(0 === width) + /*<>*/ if(Object.is(0, width)) /*<>*/ return bad_token_length(cst_decimal_digits); /*<>*/ /*<>*/ var c = checked_peek_char(ib); @@ -29659,7 +29780,7 @@ /*<>*/ return scan_decimal_digit_star(width$0, ib); /*<>*/ } function scan_digit_plus(basis, digitp, width$2, ib){ - /*<>*/ if(0 === width$2) + /*<>*/ if(Object.is(0, width$2)) /*<>*/ return bad_token_length(cst_digits); /*<>*/ /*<>*/ var c$0 = checked_peek_char(ib); @@ -29672,7 +29793,7 @@ /*<>*/ width$3 = store_char(width$2, ib, c$0), width = width$3; /*<>*/ for(;;){ - if(0 === width) /*<>*/ return width; + if(Object.is(0, width)) /*<>*/ return width; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width; /*<>*/ if @@ -29682,7 +29803,7 @@ width = width$0; } else{ - if(95 !== c) /*<>*/ return width; + if(! Object.is(95, c)) /*<>*/ return width; /*<>*/ /*<>*/ var width$1 = ignore_char(width, ib); width = width$1; @@ -29737,11 +29858,11 @@ /*<>*/ var /*<>*/ width$0 = scan_sign(width$1, ib), /*<>*/ c = checked_peek_char(ib); - if(48 !== c) + if(! Object.is(48, c)) /*<>*/ return scan_decimal_digit_plus(width$0, ib); /*<>*/ /*<>*/ var width = store_char(width$0, ib, c); - /*<>*/ if(0 === width) + /*<>*/ if( /*<>*/ Object.is(0, width)) /*<>*/ return width; /*<>*/ /*<>*/ var c$0 = peek_char(ib); @@ -29750,13 +29871,13 @@ a: { if(99 <= c$0){ - if(111 === c$0) + if(Object.is(111, c$0)) return scan_digit_plus (cst_octal, is_octal_digit, store_char(width, ib, c$0), ib); - if(120 === c$0) break a; + if(Object.is(120, c$0)) break a; } else{ - if(88 === c$0) break a; + if(Object.is(88, c$0)) break a; if(98 <= c$0) return scan_digit_plus (cst_binary, @@ -29780,7 +29901,7 @@ } /*<>*/ } function scan_fractional_part(width, ib){ - /*<>*/ if(0 === width) + /*<>*/ if(Object.is(0, width)) /*<>*/ return width; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ return ib[1] @@ -29791,11 +29912,12 @@ : scan_decimal_digit_star(store_char(width, ib, c), ib); /*<>*/ } function scan_exponent_part(width, ib){ - /*<>*/ if(0 === width) + /*<>*/ if(Object.is(0, width)) /*<>*/ return width; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width; - if(69 !== c && 101 !== c) /*<>*/ return width; + if(! Object.is(69, c) && ! Object.is(101, c)) + /*<>*/ return width; /*<>*/ return scan_optionally_signed_decimal (store_char(width, ib, c), ib); /*<>*/ } @@ -29803,12 +29925,12 @@ /*<>*/ var /*<>*/ width = scan_sign(width$1, ib), /*<>*/ width$0 = scan_decimal_digit_star(width, ib); - /*<>*/ if(0 === width$0) + /*<>*/ if( /*<>*/ Object.is(0, width$0)) /*<>*/ return [0, width$0, precision]; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return [0, width$0, precision]; - if(46 !== c) + if(! Object.is(46, c)) /*<>*/ return [0, scan_exponent_part(width$0, ib), precision]; @@ -29843,7 +29965,7 @@ lowercase( /*<>*/ caml_string_get(str, i)); if(! /*<>*/ Object.is(lowercase(c), _aL_)) /*<>*/ /*<>*/ caml_call1(error, 0); - if(0 === width$0[1]) + if(Object.is(0, width$0[1])) /*<>*/ /*<>*/ caml_call1(error, 0); width$0[1] = store_char(width$0[1], ib, c); /*<>*/ /*<>*/ var _aM_ = i + 1 | 0; @@ -29855,13 +29977,13 @@ /*<>*/ } function scan_hex_float(width, precision, ib){ /*<>*/ var - _aw_ = 0 === width ? 1 : 0, + _aw_ = Object.is(0, width) ? 1 : 0, _ax_ = _aw_ || end_of_input(ib); /*<>*/ if(_ax_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _ay_ = 0 === width$0 ? 1 : 0, + _ay_ = Object.is(0, width$0) ? 1 : 0, _az_ = _ay_ || end_of_input(ib); /*<>*/ if(_az_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); @@ -29875,27 +29997,28 @@ if(32 <= switcher) break a; /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _aA_ = 0 === width$1 ? 1 : 0, + _aA_ = Object.is(0, width$1) ? 1 : 0, _aB_ = _aA_ || end_of_input(ib); /*<>*/ if(_aB_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); /*<>*/ return check_case_insensitive_string (width$1, ib, bad_hex_float, cst_an); } - if(26 !== switcher) break a; + if(! Object.is(26, switcher)) break a; } else{ - if(48 === c){ + if(Object.is(48, c)){ /*<>*/ var /*<>*/ width$3 = store_char(width$0, ib, c), - _aE_ = 0 === width$3 ? 1 : 0, + _aE_ = Object.is(0, width$3) ? 1 : 0, _aF_ = _aE_ || end_of_input(ib); /*<>*/ if(_aF_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); /*<>*/ /*<>*/ var width$4 = check_case_insensitive_string(width$3, ib, bad_hex_float, cst_x); - /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ + /*<>*/ if + (! /*<>*/ Object.is(0, width$4) && ! end_of_input(ib)){ /*<>*/ /*<>*/ var _aG_ = peek_char(ib) - 46 | 0; b: @@ -29903,7 +30026,7 @@ c: { if(34 < _aG_ >>> 0){ - if(66 === _aG_) break c; + if(Object.is(66, _aG_)) break c; } else if(32 < _aG_ - 1 >>> 0) break c; var @@ -29913,20 +30036,26 @@ } var width$5 = width$4; } - /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ + /*<>*/ if + (! + /*<>*/ Object.is(0, width$5) + && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$0 = peek_char(ib); - if(46 === c$0){ + if(Object.is(46, c$0)){ /*<>*/ /*<>*/ var width$6 = store_char(width$5, ib, c$0); b: { - /*<>*/ if(0 !== width$6 && ! end_of_input(ib)){ + /*<>*/ if + (! + /*<>*/ Object.is(0, width$6) + && ! end_of_input(ib)){ /*<>*/ /*<>*/ var match = peek_char(ib); c: { - if(80 !== match && 112 !== match){ + if(! Object.is(80, match) && ! Object.is(112, match)){ /*<>*/ var /*<>*/ precision$0 = /*<>*/ caml_call2 @@ -29953,14 +30082,17 @@ } else var width$8 = width$5; - /*<>*/ if(0 !== width$8 && ! end_of_input(ib)){ + /*<>*/ if + (! + /*<>*/ Object.is(0, width$8) + && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$1 = peek_char(ib); - if(80 !== c$1 && 112 !== c$1) + if(! Object.is(80, c$1) && ! Object.is(112, c$1)) /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$1), - _aH_ = 0 === width$9 ? 1 : 0, + _aH_ = Object.is(0, width$9) ? 1 : 0, _aI_ = _aH_ || end_of_input(ib); /*<>*/ if(_aI_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); @@ -29973,11 +30105,11 @@ } /*<>*/ return width$4; } - if(73 !== c) break a; + if(! Object.is(73, c)) break a; } /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _aC_ = 0 === width$2 ? 1 : 0, + _aC_ = Object.is(0, width$2) ? 1 : 0, _aD_ = _aC_ || end_of_input(ib); /*<>*/ if(_aD_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); @@ -29988,13 +30120,13 @@ /*<>*/ } function scan_caml_float_rest(width, precision, ib){ /*<>*/ var - _as_ = 0 === width ? 1 : 0, + _as_ = Object.is(0, width) ? 1 : 0, _at_ = _as_ || end_of_input(ib); /*<>*/ if(_at_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); /*<>*/ var /*<>*/ width$0 = scan_decimal_digit_star(width, ib), - _au_ = 0 === width$0 ? 1 : 0, + _au_ = Object.is(0, width$0) ? 1 : 0, _av_ = _au_ || end_of_input(ib); /*<>*/ if(_av_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); @@ -30002,7 +30134,7 @@ /*<>*/ c = peek_char(ib), /*<>*/ switcher = c - 69 | 0; if(32 < switcher >>> 0){ - if(-23 === switcher){ + if(Object.is(-23, switcher)){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), /*<>*/ precision$0 = @@ -30021,13 +30153,13 @@ /*<>*/ } function scan_caml_float(width, precision, ib){ /*<>*/ var - _ae_ = 0 === width ? 1 : 0, + _ae_ = Object.is(0, width) ? 1 : 0, _af_ = _ae_ || end_of_input(ib); /*<>*/ if(_af_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _ag_ = 0 === width$0 ? 1 : 0, + _ag_ = Object.is(0, width$0) ? 1 : 0, _ah_ = _ag_ || end_of_input(ib); /*<>*/ if(_ah_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); @@ -30036,7 +30168,7 @@ if(58 > c){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _ai_ = 0 === width$1 ? 1 : 0, + _ai_ = Object.is(0, width$1) ? 1 : 0, _aj_ = _ai_ || end_of_input(ib); /*<>*/ if(_aj_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); @@ -30047,24 +30179,24 @@ else if(48 <= c){ /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _ak_ = 0 === width$2 ? 1 : 0, + _ak_ = Object.is(0, width$2) ? 1 : 0, _al_ = _ak_ || end_of_input(ib); /*<>*/ if(_al_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); /*<>*/ /*<>*/ var c$0 = peek_char(ib); - if(88 !== c$0 && 120 !== c$0) + if(! Object.is(88, c$0) && ! Object.is(120, c$0)) /*<>*/ return scan_caml_float_rest (width$2, precision, ib); /*<>*/ var /*<>*/ width$3 = store_char(width$2, ib, c$0), - _am_ = 0 === width$3 ? 1 : 0, + _am_ = Object.is(0, width$3) ? 1 : 0, _an_ = _am_ || end_of_input(ib); /*<>*/ if(_an_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); var width$10 = scan_digit_plus(cst_hexadecimal, is_hexa_digit, width$3, ib), - _ao_ = 0 === width$10 ? 1 : 0, + _ao_ = Object.is(0, width$10) ? 1 : 0, _ap_ = _ao_ || end_of_input(ib); /*<>*/ if(_ap_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); @@ -30076,17 +30208,20 @@ b: { if(32 < switcher >>> 0){ - if(-34 === switcher){ + if(Object.is(-34, switcher)){ /*<>*/ /*<>*/ var width$4 = store_char(width$10, ib, c$1); c: { - /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ + /*<>*/ if + (! + /*<>*/ Object.is(0, width$4) + && ! end_of_input(ib)){ /*<>*/ /*<>*/ var match = peek_char(ib); d: { - if(80 !== match && 112 !== match){ + if(! Object.is(80, match) && ! Object.is(112, match)){ /*<>*/ var /*<>*/ precision$0 = /*<>*/ caml_call2 @@ -30119,13 +30254,15 @@ } var width$7 = width$6; } - /*<>*/ if(0 !== width$7 && ! end_of_input(ib)){ + /*<>*/ if + (! /*<>*/ Object.is(0, width$7) && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$2 = peek_char(ib); - if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$7; + if(! Object.is(80, c$2) && ! Object.is(112, c$2)) + /*<>*/ return width$7; /*<>*/ var /*<>*/ width$8 = store_char(width$7, ib, c$2), - _aq_ = 0 === width$8 ? 1 : 0, + _aq_ = Object.is(0, width$8) ? 1 : 0, _ar_ = _aq_ || end_of_input(ib); /*<>*/ if(_ar_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); @@ -30139,7 +30276,7 @@ function scan_string(stp, width, ib){ /*<>*/ var width$0 = width; /*<>*/ for(;;){ - if(0 === width$0) /*<>*/ return width$0; + if(Object.is(0, width$0)) /*<>*/ return width$0; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width$0; @@ -30148,7 +30285,7 @@ a: { if(4 < _ad_ >>> 0){ - if(23 === _ad_) break a; + if(Object.is(23, _ad_)) break a; } else if(1 < _ad_ - 2 >>> 0) break a; /*<>*/ /*<>*/ var @@ -30174,7 +30311,7 @@ : 65 <= c ? c - 55 | 0 : c - 48 | 0; /*<>*/ } function check_next_char(message, width, ib){ - /*<>*/ if(0 === width) + /*<>*/ if(Object.is(0, width)) /*<>*/ return bad_token_length(message); /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ return ib[1] @@ -30263,7 +30400,7 @@ default: break a; } } - else if(34 !== c0 && 39 > c0) break a; + else if(! Object.is(34, c0) && 39 > c0) break a; b: { if(110 <= c0){ @@ -30277,7 +30414,7 @@ var _$_ = 9; break b; } } - else if(98 === c0){var _$_ = 8; break b;} + else if(Object.is(98, c0)){var _$_ = 8; break b;} var _$_ = c0; } /*<>*/ return store_char(width, ib, _$_); @@ -30289,12 +30426,13 @@ /*<>*/ var width$0 = width; /*<>*/ for(;;){ var c = check_next_char(cst_a_String, width$0, ib); - if(34 === c) /*<>*/ return ignore_char(width$0, ib); - if(92 === c){ + if(Object.is(34, c)) + /*<>*/ return ignore_char(width$0, ib); + if(Object.is(92, c)){ /*<>*/ var /*<>*/ width$1 = ignore_char(width$0, ib), match = check_next_char(cst_a_String, width$1, ib); - if(10 === match){ + if(Object.is(10, match)){ /*<>*/ /*<>*/ var _Y_ = ignore_char(width$1, ib); /*<>*/ if(counter >= 50) @@ -30303,10 +30441,10 @@ var counter$0 = counter + 1 | 0; /*<>*/ return skip_spaces(counter$0, _Y_); } - if(13 === match){ + if(Object.is(13, match)){ /*<>*/ /*<>*/ var width$3 = ignore_char(width$1, ib); - if(10 === check_next_char(cst_a_String, width$3, ib)){ + if(Object.is(10, check_next_char(cst_a_String, width$3, ib))){ /*<>*/ /*<>*/ var _Z_ = ignore_char(width$3, ib); /*<>*/ if(counter >= 50) @@ -30338,7 +30476,7 @@ function skip_spaces(counter, width){ /*<>*/ var width$0 = width; /*<>*/ for(;;){ - if(32 !== check_next_char(cst_a_String, width$0, ib)){ + if(! Object.is(32, check_next_char(cst_a_String, width$0, ib))){ /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return (find_stop$0, [0, width$0]); @@ -30352,7 +30490,7 @@ /*<>*/ } /*<>*/ /*<>*/ var c = checked_peek_char(ib); - return 34 === c + return Object.is(34, c) ? find_stop(ignore_char(width, ib)) : character_mismatch(34, c); /*<>*/ } @@ -30415,7 +30553,7 @@ /*<>*/ return width; /*<>*/ } function stopper_of_formatting_lit(fmting){ - /*<>*/ if(6 === fmting) + /*<>*/ if(Object.is(6, fmting)) /*<>*/ return _p_; /*<>*/ var /*<>*/ str = @@ -30675,17 +30813,17 @@ function(width){ /*<>*/ var c = check_next_char(cst_a_Char, width, ib); - return 39 === c + return Object.is(39, c) ? ignore_char(width, ib) : character_mismatch(39, c); /*<>*/ }, /*<>*/ c = checked_peek_char(ib), /*<>*/ width$0 = 0; - if(39 === c){ + if(Object.is(39, c)){ /*<>*/ var /*<>*/ width = ignore_char(width$0, ib), c$3 = check_next_char(cst_a_Char, width, ib); - if(92 === c$3) + if(Object.is(92, c$3)) /*<>*/ find_stop (scan_backslash_char(ignore_char(width, ib), ib)); else @@ -30921,10 +31059,10 @@ /*<>*/ var /*<>*/ c = checked_peek_char(ib), /*<>*/ m = - 102 === c + /*<>*/ Object.is(102, c) ? 5 - : 116 - === c + : Object.is + (116, c) ? 4 : bad_input ( /*<>*/ caml_call2 @@ -31621,7 +31759,7 @@ } /*<>*/ } function to_list(arr){ - /*<>*/ return 0 === arr + /*<>*/ return Object.is(0, arr) ? 0 : /*<>*/ caml_call1 (Stdlib_Array[10], arr); @@ -31847,7 +31985,7 @@ return 0; /*<>*/ } function create_table(public_methods){ - /*<>*/ if(0 === public_methods) + /*<>*/ if(Object.is(0, public_methods)) /*<>*/ return new_table([0]); /*<>*/ var /*<>*/ tags = @@ -31977,14 +32115,15 @@ function run_initializers(obj, table){ /*<>*/ var inits = table[8], - _r_ = 0 !== inits ? 1 : 0; + _r_ = Object.is(0, inits) ? 0 : 1; return _r_ ? iter_f(obj, inits) : _r_; /*<>*/ } function run_initializers_opt(obj_0, obj, table){ /*<>*/ if(obj_0) /*<>*/ return obj; var inits = table[8]; - if(0 !== inits) /*<>*/ iter_f(obj, inits); + if(! Object.is(0, inits)) + /*<>*/ iter_f(obj, inits); /*<>*/ return obj; /*<>*/ } function create_object_and_run_initiali(obj_0, table){ @@ -32561,8 +32700,8 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stdlib[15], loc], 1); var _j_ = caml_obj_tag(l); - if(250 === _j_) return l[1]; - if(246 !== _j_ && 244 !== _j_) + if(Object.is(250, _j_)) return l[1]; + if(! Object.is(246, _j_) && ! Object.is(244, _j_)) /*<>*/ return l; /*<>*/ return /*<>*/ caml_call1 (CamlinternalLazy[2], l); @@ -32599,7 +32738,8 @@ /*<>*/ } function update_mod_block(comps$0, modu, n){ /*<>*/ if - (0 === /*<>*/ caml_obj_tag(n) + ( /*<>*/ Object.is + (0, /*<>*/ caml_obj_tag(n)) && comps$0.length - 1 <= n.length - 1){ /*<>*/ var _e_ = comps$0.length - 2 | 0, @@ -32615,8 +32755,9 @@ if(typeof shape === "number"){ if(2 === shape){ if - (0 === /*<>*/ caml_obj_tag(n$0) - && 4 === n$0.length - 1){ + ( /*<>*/ Object.is + (0, /*<>*/ caml_obj_tag(n$0)) + && Object.is(4, n$0.length - 1)){ /*<>*/ var /*<>*/ cl = modu[1 + i], j = 0; @@ -32624,7 +32765,7 @@ /*<>*/ cl[1 + j] = n$0[1 + j]; /*<>*/ /*<>*/ var _c_ = j + 1 | 0; - if(3 === j) break; + if(Object.is(3, j)) break; j = _c_; } break a; @@ -32733,10 +32874,10 @@ /*<>*/ if(random){ var _ar_ = runtime.caml_obj_tag(prng); a: - if(250 === _ar_) + if(Object.is(250, _ar_)) var _as_ = prng[1]; else{ - if(246 !== _ar_ && 244 !== _ar_){var _as_ = prng; break a;} + if(! Object.is(246, _ar_) && ! Object.is(244, _ar_)){var _as_ = prng; break a;} var _as_ = caml_call1(CamlinternalLazy[2], prng); } var @@ -34107,8 +34248,8 @@ } /*<>*/ } function is_dir_sep(s, i){ - /*<>*/ return 47 - === /*<>*/ caml_string_get(s, i) + /*<>*/ return Object.is + (47, /*<>*/ caml_string_get(s, i)) ? 1 : 0; /*<>*/ } @@ -34117,7 +34258,10 @@ _aH_ = caml_ml_string_length(n) < 1 ? 1 : 0, _aI_ = _aH_ - || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + || + (Object.is(47, /*<>*/ caml_string_get(n, 0)) + ? 0 + : 1); return _aI_; /*<>*/ } function is_implicit(n){ @@ -34209,7 +34353,8 @@ var i = _ax_; for(;;){ /*<>*/ if - (39 === /*<>*/ caml_string_get(s, i)) + ( /*<>*/ Object.is + (39, /*<>*/ caml_string_get(s, i))) /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[16], b, quotequote); else{ @@ -34297,11 +34442,13 @@ /*<>*/ var /*<>*/ c = /*<>*/ caml_string_get(s, i), - _ah_ = 47 === c ? 1 : 0; + _ah_ = Object.is(47, c) ? 1 : 0; if(_ah_) var _ai_ = _ah_; else - var _aj_ = 92 === c ? 1 : 0, _ai_ = _aj_ || (58 === c ? 1 : 0); + var + _aj_ = Object.is(92, c) ? 1 : 0, + _ai_ = _aj_ || (Object.is(58, c) ? 1 : 0); return _ai_; /*<>*/ } function is_relative$0(n){ @@ -34309,19 +34456,28 @@ _ab_ = caml_ml_string_length(n) < 1 ? 1 : 0, _ac_ = _ab_ - || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + || + (Object.is(47, /*<>*/ caml_string_get(n, 0)) + ? 0 + : 1); if(_ac_){ var _ad_ = caml_ml_string_length(n) < 1 ? 1 : 0, _ae_ = _ad_ - || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + || + (Object.is(92, /*<>*/ caml_string_get(n, 0)) + ? 0 + : 1); if(_ae_) var _af_ = caml_ml_string_length(n) < 2 ? 1 : 0, _ag_ = _af_ - || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); + || + (Object.is(58, /*<>*/ caml_string_get(n, 1)) + ? 0 + : 1); else var _ag_ = _ae_; } @@ -34452,7 +34608,7 @@ (Stdlib_Buffer[12], b, 34); /*<>*/ /*<>*/ var c = /*<>*/ caml_string_get(s, i$0); - if(34 === c){ + if(Object.is(34, c)){ var _N_ = 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -34460,7 +34616,7 @@ var counter$1 = counter + 1 | 0; /*<>*/ return loop_bs(counter$1, _N_, i$0); } - if(92 === c){ + if(Object.is(92, c)){ var _O_ = 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -34486,7 +34642,7 @@ } /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(s, i$0); - if(34 === match){ + if(Object.is(34, match)){ /*<>*/ add_bs((2 * n$0 | 0) + 1 | 0); /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); @@ -34498,7 +34654,7 @@ var counter$1 = counter + 1 | 0; /*<>*/ return loop$0(counter$1, _M_); } - if(92 !== match){ + if(! Object.is(92, match)){ /*<>*/ add_bs(n$0); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -34537,7 +34693,8 @@ /*<>*/ caml_call2 (Stdlib_String[23], function(param){ - /*<>*/ if(34 !== param && 37 !== param) + /*<>*/ if + (! Object.is(34, param) && ! Object.is(37, param)) /*<>*/ return 0; /*<>*/ return 1; /*<>*/ }, @@ -34602,11 +34759,11 @@ if(60 < _I_ >>> 0){ if(62 <= _I_) break a; } - else if(31 !== _I_) break a; + else if(! Object.is(31, _I_)) break a; } else if(42 <= c){ - if(60 !== c) break a; + if(! Object.is(60, c)) break a; } else{ if(33 > c) break a; @@ -34656,7 +34813,10 @@ /*<>*/ /*<>*/ var _u_ = _t_ - ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 + ? Object.is + (58, /*<>*/ caml_string_get(s, 1)) + ? 1 + : 0 : _t_; } else @@ -34745,7 +34905,9 @@ function concat(dirname, filename){ /*<>*/ var l = caml_ml_string_length(dirname); /*<>*/ if - (0 !== l && ! is_dir_sep$1(dirname, l - 1 | 0)){ + (! + /*<>*/ Object.is(0, l) + && ! is_dir_sep$1(dirname, l - 1 | 0)){ /*<>*/ /*<>*/ var _p_ = /*<>*/ caml_call2 @@ -34773,7 +34935,8 @@ /*<>*/ for(;;){ /*<>*/ if(0 <= i0 && ! is_dir_sep$1(name, i0)){ /*<>*/ if - (46 === /*<>*/ caml_string_get(name, i0)) + ( /*<>*/ Object.is + (46, /*<>*/ caml_string_get(name, i0))) break; /*<>*/ /*<>*/ var i$2 = i0 - 1 | 0; @@ -34788,7 +34951,9 @@ /*<>*/ for(;;){ /*<>*/ if(0 <= i && ! is_dir_sep$1(name, i)){ /*<>*/ if - (46 !== /*<>*/ caml_string_get(name, i)) + (! + /*<>*/ Object.is + (46, /*<>*/ caml_string_get(name, i))) return caml_ml_string_length(name) - i0 | 0; /*<>*/ /*<>*/ var i$0 = i - 1 | 0; @@ -34801,7 +34966,8 @@ function extension(name){ /*<>*/ /*<>*/ var l = extension_len(name); - /*<>*/ return 0 === l + /*<>*/ return /*<>*/ Object.is + (0, l) ? cst$18 : /*<>*/ caml_call3 (Stdlib_String[16], @@ -34812,7 +34978,8 @@ function chop_extension(name){ /*<>*/ /*<>*/ var l = extension_len(name); - /*<>*/ return 0 === l + /*<>*/ return /*<>*/ Object.is + (0, l) ? /*<>*/ caml_call1 (Stdlib[1], cst_Filename_chop_extension) : caml_call3 @@ -34824,7 +34991,8 @@ function remove_extension(name){ /*<>*/ /*<>*/ var l = extension_len(name); - /*<>*/ return 0 === l + /*<>*/ return /*<>*/ Object.is + (0, l) ? name : caml_call3 (Stdlib_String[16], diff --git a/compiler/tests-jsoo/test_obj.ml b/compiler/tests-jsoo/test_obj.ml index ebd3888ab2..a5a3029863 100644 --- a/compiler/tests-jsoo/test_obj.ml +++ b/compiler/tests-jsoo/test_obj.ml @@ -72,7 +72,12 @@ let%expect_test "dup" = |}] let%expect_test "sameness" = + let mzero = 1. /. neg_infinity in print_bool (nan == nan); [%expect {| true |}]; print_bool (-0. == 0.); + [%expect {| false |}]; + print_bool (mzero == float_of_int 0); + [%expect {| false |}]; + print_bool (float_of_int 0 == ~-.(float_of_int 0)); [%expect {| false |}] From bc5cfe6b1a193a0a03dc26e7dc7f9ed7c2cf32f3 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Sat, 2 Dec 2023 08:32:46 +0100 Subject: [PATCH 06/10] fix --- compiler/lib/generate.ml | 1 + compiler/tests-compiler/effects_toplevel.ml | 5 + compiler/tests-compiler/es6.ml | 4 +- compiler/tests-compiler/gh1007.ml | 14 +- compiler/tests-compiler/gh1320.ml | 2 +- compiler/tests-compiler/gh1559.ml | 14 +- compiler/tests-compiler/lazy.ml | 4 +- compiler/tests-compiler/loops.ml | 34 +- compiler/tests-compiler/match_with_exn.ml | 4 +- compiler/tests-compiler/mutable_closure.ml | 6 +- compiler/tests-compiler/side_effect.ml | 2 +- .../variable_declaration_output.ml | 4 +- compiler/tests-full/stdlib.cma.expected.js | 567 ++++++++---------- 13 files changed, 286 insertions(+), 375 deletions(-) diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 93d12ed598..4cd78552e2 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -1057,6 +1057,7 @@ let remove_unused_tail_args ctx exact trampolined args = else args let is_int = function + | J.ENum n -> J.Num.is_int n && not (J.Num.is_zero n) | J.EBin ((J.Bor | J.Lsr), _, _) -> true | _ -> false diff --git a/compiler/tests-compiler/effects_toplevel.ml b/compiler/tests-compiler/effects_toplevel.ml index b44240c79e..b6eecc20c9 100644 --- a/compiler/tests-compiler/effects_toplevel.ml +++ b/compiler/tests-compiler/effects_toplevel.ml @@ -81,8 +81,13 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = dummy, function(_c_){ var _d_ = i + 1 | 0; +<<<<<<< HEAD if(! Object.is(5, i)) return caml_cps_exact_call1(_b_, _d_); caml_callback(g, [dummy]); +======= + if(5 !== i) return caml_cps_exact_call1(_b_, _d_); + caml_callback(g, [undef]); +>>>>>>> 21ff3c88d1 (fix) var Test = [0]; runtime.caml_register_global(2, Test, "Test"); }); diff --git a/compiler/tests-compiler/es6.ml b/compiler/tests-compiler/es6.ml index 091a4e8ac1..c9a505a6f0 100644 --- a/compiler/tests-compiler/es6.ml +++ b/compiler/tests-compiler/es6.ml @@ -60,7 +60,7 @@ let rec odd n' = function var d = a, c = b; for(;;){ if(Object.is(0, c)) return [0, d, 0]; - if(Object.is(1, c)) return [0, d, 1]; + if(1 === c) return [0, d, 1]; [c, d] = [(d - 1 | 0) - 1 | 0, (c - 1 | 0) - 1 | 0]; }}], "Test"); @@ -81,7 +81,7 @@ let rec odd n' = function var d = a, c = b; for(;;){ if(Object.is(0, c)) return [0, d, 0]; - if(Object.is(1, c)) return [0, d, 1]; + if(1 === c) return [0, d, 1]; var e = (d - 1 | 0) - 1 | 0; d = (c - 1 | 0) - 1 | 0; c = e; diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index 35b9ffff9b..b18c496ff5 100644 --- a/compiler/tests-compiler/gh1007.ml +++ b/compiler/tests-compiler/gh1007.ml @@ -162,7 +162,7 @@ let () = M.myfun M.x next = x$0[1], sort = function(n, l){ - if(Object.is(2, n)){ + if(2 === n){ if(l){ var match = l[2]; if(match){ @@ -178,7 +178,7 @@ let () = M.myfun M.x } } } - else if(Object.is(3, n) && l){ + else if(3 === n && l){ var _d_ = l[2]; if(_d_){ var match$2 = _d_[2]; @@ -244,7 +244,7 @@ let () = M.myfun M.x }, rev_sort = function(n, l){ - if(Object.is(2, n)){ + if(2 === n){ if(l){ var match = l[2]; if(match){ @@ -260,7 +260,7 @@ let () = M.myfun M.x } } } - else if(Object.is(3, n) && l){ + else if(3 === n && l){ var _b_ = l[2]; if(_b_){ var match$2 = _b_[2]; @@ -401,7 +401,7 @@ let () = M.run () let odd$0 = odd, even$0 = even; if(even(i)) caml_call1(Stdlib[42], cst); var _a_ = i + 1 | 0; - if(Object.is(4, i)) return 0; + if(4 === i) return 0; i = _a_; } } @@ -507,7 +507,7 @@ let () = M.run () let odd$0 = odd, even$0 = even; if(even(i)) caml_call1(Stdlib[42], cst); var _c_ = i + 1 | 0; - if(Object.is(4, i)) break; + if(4 === i) break; i = _c_; } return caml_call2 @@ -638,7 +638,7 @@ let () = M.run () param$0 = f(0); } var _e_ = i + 1 | 0; - if(Object.is(4, i)) break; + if(4 === i) break; i = _e_; } return caml_call2 diff --git a/compiler/tests-compiler/gh1320.ml b/compiler/tests-compiler/gh1320.ml index bad19f90eb..7ff1c559eb 100644 --- a/compiler/tests-compiler/gh1320.ml +++ b/compiler/tests-compiler/gh1320.ml @@ -57,7 +57,7 @@ let () = myfun () var _c_ = app(f, i); caml_call2(Stdlib_Printf[3], _a_, _c_); var _b_ = i + 1 | 0; - if(Object.is(4, i)) return 0; + if(4 === i) return 0; i = _b_; } } diff --git a/compiler/tests-compiler/gh1559.ml b/compiler/tests-compiler/gh1559.ml index 262cd56f95..1546ed9159 100644 --- a/compiler/tests-compiler/gh1559.ml +++ b/compiler/tests-compiler/gh1559.ml @@ -94,13 +94,10 @@ let () = my_ref := 2 let t$1 = t; var this_will_be_undefined = - function(param){ - var _c_ = Object.is(1, t$1[1]) ? 1 : 0; - return _c_ ? 1 : 2; - }, + function(param){var _c_ = 1 === t$1[1] ? 1 : 0; return _c_ ? 1 : 2;}, i = t[1]; if(Object.is(0, i)){var _a_ = this_will_be_undefined(0); break a;} - if(Object.is(1, i)) break; + if(1 === i) break; t = t$0; } var @@ -205,13 +202,10 @@ let () = my_ref := 2 let t$1 = t; var this_will_be_undefined = - function(param){ - var _e_ = Object.is(1, t$1[1]) ? 1 : 0; - return _e_ ? 1 : 2; - }, + function(param){var _e_ = 1 === t$1[1] ? 1 : 0; return _e_ ? 1 : 2;}, i = t[1]; if(Object.is(0, i)) break; - if(Object.is(1, i)) break b; + if(1 === i) break b; t = t$0; } var diff --git a/compiler/tests-compiler/lazy.ml b/compiler/tests-compiler/lazy.ml index 56d6a8845e..6c6a966712 100644 --- a/compiler/tests-compiler/lazy.ml +++ b/compiler/tests-compiler/lazy.ml @@ -37,10 +37,10 @@ let%expect_test "static eval of string get" = if(Object.is(0, n)) return 0; var _b_ = do_the_lazy_rec(n - 1 | 0), _c_ = runtime.caml_obj_tag(lz); a: - if(Object.is(250, _c_)) + if(250 === _c_) var _d_ = lz[1]; else{ - if(! Object.is(246, _c_) && ! Object.is(244, _c_)){var _d_ = lz; break a;} + if(246 !== _c_ && 244 !== _c_){var _d_ = lz; break a;} var _d_ = caml_call1(CamlinternalLazy[2], lz); } return [0, _d_, _b_]; diff --git a/compiler/tests-compiler/loops.ml b/compiler/tests-compiler/loops.ml index a1d4436d8a..a4ea92682b 100644 --- a/compiler/tests-compiler/loops.ml +++ b/compiler/tests-compiler/loops.ml @@ -84,12 +84,12 @@ let rec fun_with_loop acc = function return caml_call1 (list_rev, caml_call1(list_rev, caml_call1(list_rev, acc$0))); var x = param$0[1]; - if(Object.is(1, x) && ! param$0[2]){ + if(1 === x && ! param$0[2]){ var a$0 = [0, acc$0], i$0 = 0; for(;;){ a$0[1] = [0, 1, a$0[1]]; var _b_ = i$0 + 1 | 0; - if(Object.is(10, i$0)) return a$0[1]; + if(10 === i$0) return a$0[1]; i$0 = _b_; } } @@ -97,7 +97,7 @@ let rec fun_with_loop acc = function for(;;){ a[1] = [0, 1, a[1]]; var _a_ = i + 1 | 0; - if(Object.is(10, i)) break; + if(10 === i) break; i = _a_; } var acc$1 = [0, x, a[1]]; @@ -133,11 +133,11 @@ let for_for_while () = for(;;){ for(;;){if(10 <= runtime.caml_mul(k, j)) break; id[1]++;} var _b_ = j + 1 | 0; - if(Object.is(10, j)) break; + if(10 === j) break; j = _b_; } var _a_ = k + 1 | 0; - if(Object.is(10, k)) return 0; + if(10 === k) return 0; k = _a_; } } @@ -174,11 +174,11 @@ let for_for_while () = id[1]++; } var _b_ = j + 1 | 0; - if(Object.is(10, j)) break; + if(10 === j) break; j = _b_; } var _a_ = k + 1 | 0; - if(Object.is(10, k)) return 0; + if(10 === k) return 0; k = _a_; } } @@ -312,7 +312,7 @@ in loop x var x$1 = x; for(;;){ if(Object.is(0, x$1)) return 1; - if(Object.is(1, x$1)) break; + if(1 === x$1) break; var x$2 = x$1 + 1 | 0; x$1 = x$2; } @@ -437,12 +437,12 @@ let add_substitute = var lim$1 = caml_ml_string_length(s), previous = 32, i$4 = 0; for(;;){ if(i$4 >= lim$1){ - var _b_ = Object.is(92, previous) ? 1 : 0; + var _b_ = 92 === previous ? 1 : 0; return _b_ ? caml_call2(add_char, b, previous) : _b_; } var previous$0 = caml_string_get(s, i$4); - if(Object.is(36, previous$0)) - if(Object.is(92, previous)){ + if(36 === previous$0) + if(92 === previous){ caml_call2(add_char, b, previous$0); var i$5 = i$4 + 1 | 0; previous = 32; @@ -454,7 +454,7 @@ let add_substitute = var opening = caml_string_get(s, start$0); a: { - if(! Object.is(40, opening) && ! Object.is(123, opening)){ + if(40 !== opening && 123 !== opening){ var start = start$0 + 1 | 0, lim$0 = caml_ml_string_length(s); b: { @@ -470,7 +470,7 @@ let add_substitute = if(97 <= match){ if(123 <= match) break d; } - else if(! Object.is(95, match)) break d; + else if(95 !== match) break d; } else if(58 <= match){ if(65 > match) break; @@ -491,10 +491,10 @@ let add_substitute = break a; } var new_start = start$0 + 1 | 0, k$2 = 0; - if(Object.is(40, opening)) + if(40 === opening) var closing = 41; else{ - if(! Object.is(123, opening)) + if(123 !== opening) throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); var closing = 125; } @@ -525,14 +525,14 @@ let add_substitute = previous = 32; i$4 = next_i; } - else if(Object.is(92, previous)){ + else if(92 === previous){ caml_call2(add_char, b, 92); caml_call2(add_char, b, previous$0); var i$6 = i$4 + 1 | 0; previous = 32; i$4 = i$6; } - else if(Object.is(92, previous$0)){ + else if(92 === previous$0){ var i$7 = i$4 + 1 | 0; previous = previous$0; i$4 = i$7; diff --git a/compiler/tests-compiler/match_with_exn.ml b/compiler/tests-compiler/match_with_exn.ml index 9d7056a773..3a2146f938 100644 --- a/compiler/tests-compiler/match_with_exn.ml +++ b/compiler/tests-compiler/match_with_exn.ml @@ -80,7 +80,7 @@ let fun2 () = var _d_ = caml_wrap_exception(_e_); if(! Object.is(_d_[1], A)) throw caml_maybe_attach_backtrace(_d_, 0); var i = _d_[2]; - if(! Object.is(2, i)) return i + 2 | 0; + if(2 !== i) return i + 2 | 0; var i$0 = i; break a; } @@ -98,7 +98,7 @@ let fun2 () = var _a_ = caml_wrap_exception(_c_); if(Object.is(_a_[1], A)){ var _b_ = _a_[2]; - if(Object.is(2, _b_)){var i = _b_; break a;} + if(2 === _b_){var i = _b_; break a;} } throw caml_maybe_attach_backtrace(_a_, 0); } diff --git a/compiler/tests-compiler/mutable_closure.ml b/compiler/tests-compiler/mutable_closure.ml index e975fcc57e..e782177626 100644 --- a/compiler/tests-compiler/mutable_closure.ml +++ b/compiler/tests-compiler/mutable_closure.ml @@ -124,7 +124,7 @@ let%expect_test _ = var f$0 = function(counter, n){ - if(Object.is(- 1, n)){ + if(- 1 === n){ var _f_ = - 2; if(counter >= 50) return caml_trampoline_return(g$0, [0, _f_]); var counter$1 = counter + 1 | 0; @@ -139,7 +139,7 @@ let%expect_test _ = f = function(n){return caml_trampoline(f$1(0, n));}, g = function(counter, n){ - if(Object.is(- 1, n)){ + if(- 1 === n){ var _d_ = - 2; if(counter >= 50) return caml_trampoline_return(f$1, [0, _d_]); var counter$1 = counter + 1 | 0; @@ -157,7 +157,7 @@ let%expect_test _ = let f$2 = f; indirect[1] = [0, function(param){return f$2(i$0);}, indirect[1]]; var _c_ = i + 1 | 0; - if(Object.is(3, i)) break; + if(3 === i) break; i = _c_; } var diff --git a/compiler/tests-compiler/side_effect.ml b/compiler/tests-compiler/side_effect.ml index bf3d2de9d5..d59c6f5534 100644 --- a/compiler/tests-compiler/side_effect.ml +++ b/compiler/tests-compiler/side_effect.ml @@ -110,7 +110,7 @@ let%expect_test _ = >>> 0 ? caml_call1(Stdlib_Printf[2], _b_) : caml_call1(Stdlib_Printf[2], _c_); - if(Object.is(1, i[1])) + if(1 === i[1]) log_success(0); else caml_call1(log_failure, cst_side_effect_computed_twice); diff --git a/compiler/tests-compiler/variable_declaration_output.ml b/compiler/tests-compiler/variable_declaration_output.ml index 5d6c185a2a..f4275e9d77 100644 --- a/compiler/tests-compiler/variable_declaration_output.ml +++ b/compiler/tests-compiler/variable_declaration_output.ml @@ -131,7 +131,7 @@ let%expect_test _ = if(_a_){ _b_ = _a_[1]; if(_b_){ - if(Object.is(2, _b_[1]) && ! param[2]) return 3; + if(2 === _b_[1] && ! param[2]) return 3; } else if(! param[2]) return 2; } @@ -153,7 +153,7 @@ let%expect_test _ = if(_a_){ var _b_ = _a_[1]; if(_b_){ - if(Object.is(2, _b_[1]) && ! param[2]) return 3; + if(2 === _b_[1] && ! param[2]) return 3; } else if(! param[2]) return 2; } diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 0121a012e8..349c6671a4 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -457,10 +457,7 @@ match = /*<>*/ runtime.caml_string_get(s1, i); a: { - if(48 <= match){ - if(58 > match) break a; - } - else if(Object.is(45, match)) break a; + if(48 <= match){if(58 > match) break a;} else if(45 === match) break a; /*<>*/ return s1; } /*<>*/ /*<>*/ var i$0 = i + 1 | 0; @@ -1249,30 +1246,18 @@ { if (is_block(x) - && - ! - /*<>*/ Object.is - ( /*<>*/ caml_obj_tag(x), 248) - && 1 <= x.length - 1){ - var slot = x[1]; - break a; - } + && /*<>*/ caml_obj_tag(x) !== 248 && 1 <= x.length - 1){var slot = x[1]; break a;} var slot = x; } a: { - if - (is_block(slot) - && - /*<>*/ Object.is - ( /*<>*/ caml_obj_tag(slot), 248)){var name = slot[1]; break a;} + if(is_block(slot) && /*<>*/ caml_obj_tag(slot) === 248){var name = slot[1]; break a;} var name = /*<>*/ caml_call1 (Stdlib[1], cst_Obj_extension_constructor$0); } - return /*<>*/ Object.is - ( /*<>*/ caml_obj_tag(name), 252) + return /*<>*/ caml_obj_tag(name) === 252 ? slot : /*<>*/ caml_call1 (Stdlib[1], cst_Obj_extension_constructor); @@ -1623,10 +1608,10 @@ function(_f_){ var _g_ = caml_obj_tag(x); a: - if(Object.is(250, _g_)) + if(250 === _g_) var _h_ = x[1]; else{ - if(! Object.is(246, _g_) && ! Object.is(244, _g_)){var _h_ = x; break a;} + if(246 !== _g_ && 244 !== _g_){var _h_ = x; break a;} var _h_ = caml_call1(CamlinternalLazy[2], x); } /*<>*/ return /*<>*/ caml_call1 @@ -1639,10 +1624,10 @@ function(_c_){ var _d_ = caml_obj_tag(x); a: - if(Object.is(250, _d_)) + if(250 === _d_) var _e_ = x[1]; else{ - if(! Object.is(246, _d_) && ! Object.is(244, _d_)){var _e_ = x; break a;} + if(246 !== _d_ && 244 !== _d_){var _e_ = x; break a;} var _e_ = caml_call1(CamlinternalLazy[2], x); } /*<>*/ return /*<>*/ caml_call1 @@ -1650,10 +1635,10 @@ }]; var _a_ = caml_obj_tag(x); a: - if(Object.is(250, _a_)) + if(250 === _a_) var _b_ = x[1]; else{ - if(! Object.is(246, _a_) && ! Object.is(244, _a_)){var _b_ = x; break a;} + if(246 !== _a_ && 244 !== _a_){var _b_ = x; break a;} var _b_ = caml_call1(CamlinternalLazy[2], x); } /*<>*/ return from_val @@ -2276,9 +2261,8 @@ s = /*<>*/ caml_call1(to_lazy, s$0); /*<>*/ return function(param){ /*<>*/ var _I_ = runtime.caml_obj_tag(s); - if(Object.is(250, _I_)) return s[1]; - if(! Object.is(246, _I_) && ! Object.is(244, _I_)) - /*<>*/ return s; + if(250 === _I_) return s[1]; + if(246 !== _I_ && 244 !== _I_) /*<>*/ return s; /*<>*/ return /*<>*/ caml_call1 (CamlinternalLazy[2], s); /*<>*/ }; /*<>*/ } @@ -2997,7 +2981,7 @@ /*<>*/ a: { if(40 <= c){ - if(Object.is(92, c)) /*<>*/ return cst; + if(92 === c) /*<>*/ return cst; if(127 > c) break a; } else{ @@ -3095,15 +3079,12 @@ lo_bound = 55295, hi_bound = 57344; function succ(u){ - /*<>*/ return Object.is(u, 55295) + /*<>*/ return u === 55295 ? hi_bound - : Object.is - (u, 1114111) - ? caml_call1(Stdlib[1], err_no_succ) - : u + 1 | 0; + : u === 1114111 ? caml_call1(Stdlib[1], err_no_succ) : u + 1 | 0; /*<>*/ } function pred(u){ - /*<>*/ return Object.is(u, 57344) + /*<>*/ return u === 57344 ? lo_bound : Object.is(u, 0) ? caml_call1(Stdlib[1], err_no_pred) : u - 1 | 0; /*<>*/ } @@ -4184,7 +4165,7 @@ /*<>*/ } function stable_sort(cmp, l){ function sort(n, l){ - /*<>*/ if(Object.is(2, n)){ + /*<>*/ if(2 === n){ if(l){ var match = l[2]; if(match){ @@ -4200,7 +4181,7 @@ } } } - else if(Object.is(3, n) && l){ + else if(3 === n && l){ var _v_ = l[2]; if(_v_){ var match$2 = _v_[2]; @@ -4268,7 +4249,7 @@ } /*<>*/ } function rev_sort(n, l){ - /*<>*/ if(Object.is(2, n)){ + /*<>*/ if(2 === n){ if(l){ var match = l[2]; if(match){ @@ -4284,7 +4265,7 @@ } } } - else if(Object.is(3, n) && l){ + else if(3 === n && l){ var _t_ = l[2]; if(_t_){ var match$2 = _t_[2]; @@ -4356,7 +4337,7 @@ /*<>*/ } function sort_uniq(cmp, l){ function sort(n, l){ - /*<>*/ if(Object.is(2, n)){ + /*<>*/ if(2 === n){ if(l){ var match = l[2]; if(match){ @@ -4374,7 +4355,7 @@ } } } - else if(Object.is(3, n) && l){ + else if(3 === n && l){ var _m_ = l[2]; if(_m_){ var match$2 = _m_[2]; @@ -4492,7 +4473,7 @@ } /*<>*/ } function rev_sort(n, l){ - /*<>*/ if(Object.is(2, n)){ + /*<>*/ if(2 === n){ if(l){ var match = l[2]; if(match){ @@ -4510,7 +4491,7 @@ } } } - else if(Object.is(3, n) && l){ + else if(3 === n && l){ var _f_ = l[2]; if(_f_){ var match$2 = _f_[2]; @@ -5163,10 +5144,7 @@ _af_ = param - 9 | 0; a: { - if(4 < _af_ >>> 0){ - if(! Object.is(23, _af_)) break a; - } - else if(Object.is(2, _af_)) break a; + if(4 < _af_ >>> 0){if(23 !== _af_) break a;} else if(2 === _af_) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -5214,7 +5192,7 @@ break a; } if(11 <= match){ - if(Object.is(13, match)) break b; + if(13 === match) break b; } else if(8 <= match) break b; } @@ -5248,7 +5226,7 @@ c: { if(35 <= c){ - if(! Object.is(92, c)){if(127 <= c) break c; break b;} + if(92 !== c){if(127 <= c) break c; break b;} } else{ if(32 > c){ @@ -6657,10 +6635,7 @@ /*<>*/ /*<>*/ var _J_ = param - 9 | 0; a: { - if(4 < _J_ >>> 0){ - if(! Object.is(23, _J_)) break a; - } - else if(Object.is(2, _J_)) break a; + if(4 < _J_ >>> 0){if(23 !== _J_) break a;} else if(2 === _J_) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -7907,7 +7882,7 @@ /*<>*/ caml_check_bound(a, 0)[1] = e$0; } /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; - if(Object.is(2, i$4)) break; + if(2 === i$4) break; i$4 = _B_; } } @@ -8032,7 +8007,7 @@ /*<>*/ a[1 + i] = caml_check_bound(a, j)[1 + j]; /*<>*/ a[1 + j] = v; var _k_ = i - 1 | 0; - if(Object.is(1, i)) break; + if(1 === i) break; i = _k_; } } @@ -8937,7 +8912,7 @@ /*<>*/ caml_check_bound(a, 0)[1] = e$0; } /*<>*/ /*<>*/ var _U_ = i$4 - 1 | 0; - if(Object.is(2, i$4)) break; + if(2 === i$4) break; i$4 = _U_; } } @@ -9064,7 +9039,7 @@ /*<>*/ a[1 + i] = caml_check_bound(a, j)[1 + j]; /*<>*/ a[1 + j] = v; var _D_ = i - 1 | 0; - if(Object.is(1, i)) break; + if(1 === i) break; i = _D_; } } @@ -9345,7 +9320,7 @@ minus_one = -1, min_int = -2147483648, max_int = 2147483647; - if(Object.is(32, _a_)) + if(32 === _a_) /*<>*/ var /*<>*/ max_int$0 = Stdlib[19], unsigned_to_int = @@ -9357,7 +9332,7 @@ /*<>*/ return 0; /*<>*/ }; else{ - if(! Object.is(64, _a_)) + if(64 !== _a_) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _b_], 1); var @@ -10626,7 +10601,7 @@ v1 = s1[2], l1 = s1[1]; if(h2 <= h1){ - if(Object.is(1, h2)) /*<>*/ return add(v2, s1); + if(1 === h2) /*<>*/ return add(v2, s1); /*<>*/ var /*<>*/ match = split(v1, s2), r2$0 = match[3], @@ -10634,7 +10609,7 @@ /*<>*/ _O_ = union(r1, r2$0); /*<>*/ return join(union(l1, l2$0), v1, _O_); } - if(Object.is(1, h1)) /*<>*/ return add(v1, s2); + if(1 === h1) /*<>*/ return add(v1, s2); /*<>*/ var /*<>*/ match$0 = split(v2, s1), r1$0 = match$0[3], @@ -13005,13 +12980,13 @@ i$4 = 0; /*<>*/ for(;;){ if(i$4 >= lim$1){ - var _o_ = Object.is(92, previous) ? 1 : 0; + var _o_ = 92 === previous ? 1 : 0; return _o_ ? add_char(b, previous) : _o_; } /*<>*/ /*<>*/ var previous$0 = /*<>*/ caml_string_get(s, i$4); - if(Object.is(36, previous$0)) - if(Object.is(92, previous)){ + if(36 === previous$0) + if(92 === previous){ /*<>*/ add_char(b, previous$0); /*<>*/ /*<>*/ var i$5 = i$4 + 1 | 0; @@ -13029,7 +13004,7 @@ opening = /*<>*/ caml_string_get(s, start); a: { - if(! Object.is(40, opening) && ! Object.is(123, opening)){ + if(40 !== opening && 123 !== opening){ var lim$0 = caml_ml_string_length(s); b: { @@ -13046,7 +13021,7 @@ if(97 <= match){ if(123 <= match) break d; } - else if(! Object.is(95, match)) break d; + else if(95 !== match) break d; } else if(58 <= match){ @@ -13076,10 +13051,10 @@ /*<>*/ var /*<>*/ new_start = start + 1 | 0, k$2 = 0; - if(Object.is(40, opening)) + if(40 === opening) var closing = 41; else{ - if(! Object.is(123, opening)) + if(123 !== opening) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); var closing = 125; @@ -13126,10 +13101,8 @@ i$4 = next_i; } else{ - if(Object.is(92, previous)) - /*<>*/ add_char(b, previous); - if(! Object.is(92, previous$0)) - /*<>*/ add_char(b, previous$0); + if(92 === previous) /*<>*/ add_char(b, previous); + if(92 !== previous$0) /*<>*/ add_char(b, previous$0); /*<>*/ /*<>*/ var i$6 = i$4 + 1 | 0; previous = previous$0; @@ -13993,7 +13966,7 @@ /*<>*/ caml_call1(Stdlib[29], _cS_)); /*<>*/ /*<>*/ var _cT_ = i + 1 | 0; - if(Object.is(31, i)) + if(31 === i) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], char_set$0); i = _cT_; @@ -14083,9 +14056,7 @@ } /*<>*/ } function default_float_precision(fconv){ - /*<>*/ return Object.is(5, fconv[2]) - ? 12 - : -6; + /*<>*/ return 5 === fconv[2] ? 12 : -6; /*<>*/ } function buffer_create(init_size){ /*<>*/ return [0, @@ -14295,7 +14266,7 @@ } /*<>*/ } function bprint_char_literal(buf, chr){ - /*<>*/ return Object.is(37, chr) + /*<>*/ return 37 === chr ? buffer_add_string(buf, cst$8) : buffer_add_char(buf, chr); /*<>*/ } @@ -14634,10 +14605,10 @@ c = /*<>*/ caml_call1 (Stdlib[29], i); - return Object.is(37, c) + return 37 === c ? (buffer_add_char(buf, 37), buffer_add_char(buf, 37)) - : Object.is - (64, c) + : 64 + === c ? (buffer_add_char(buf, 37), buffer_add_char(buf, 64)) : buffer_add_char(buf, c); /*<>*/ }; @@ -14744,7 +14715,7 @@ i$3 = i$1 - 1 | 0, j$0 = j; /*<>*/ for(;;){ - if(Object.is(256, j$0)) break; + if(256 === j$0) break; /*<>*/ if (! is_in_char_set @@ -16797,7 +16768,7 @@ /*<>*/ caml_call1(Stdlib[18], width); if(width$0 <= len) /*<>*/ return str; /*<>*/ var - _cu_ = Object.is(2, padty$0) ? 48 : 32, + _cu_ = 2 === padty$0 ? 48 : 32, /*<>*/ res = /*<>*/ caml_call2 (Stdlib_Bytes[1], width$0, _cu_); @@ -16814,20 +16785,14 @@ a: if(0 < len){ /*<>*/ if - (! - /*<>*/ Object.is - (43, - /*<>*/ caml_string_get(str, 0)) + (43 + !== /*<>*/ caml_string_get(str, 0) && - ! - /*<>*/ Object.is - (45, - /*<>*/ caml_string_get(str, 0)) + 45 + !== /*<>*/ caml_string_get(str, 0) && - ! - /*<>*/ Object.is - (32, - /*<>*/ caml_string_get(str, 0))) + 32 + !== /*<>*/ caml_string_get(str, 0)) break a; /*<>*/ /*<>*/ caml_bytes_set (res, @@ -16846,19 +16811,14 @@ if (1 < len && - /*<>*/ Object.is - (48, - /*<>*/ caml_string_get(str, 0))){ + 48 + === /*<>*/ caml_string_get(str, 0)){ /*<>*/ if - (! - /*<>*/ Object.is - (120, - /*<>*/ caml_string_get(str, 1)) + (120 + !== /*<>*/ caml_string_get(str, 1) && - ! - /*<>*/ Object.is - (88, - /*<>*/ caml_string_get(str, 1))) + 88 + !== /*<>*/ caml_string_get(str, 1)) break a; /*<>*/ /*<>*/ caml_bytes_set (res, @@ -16892,23 +16852,20 @@ b: { if(58 > c){ - if(! Object.is(32, c)){ + if(32 !== c){ if(43 > c) break a; switch(c - 43 | 0){ case 5: c: if(len < (prec$0 + 2 | 0) && 1 < len){ /*<>*/ if - (! - /*<>*/ Object.is - (120, - /*<>*/ caml_string_get(str, 1)) + (120 + !== + /*<>*/ caml_string_get(str, 1) && - ! - /*<>*/ Object.is - (88, - /*<>*/ caml_string_get - (str, 1))) + 88 + !== + /*<>*/ caml_string_get(str, 1)) break c; /*<>*/ /*<>*/ var res$1 = @@ -17210,7 +17167,7 @@ /*<>*/ /*<>*/ var match = /*<>*/ runtime.caml_classify_float(x); - return Object.is(3, match) + return 3 === match ? x < 0. ? cst_neg_infinity : cst_infinity : 4 <= match ? cst_nan : str; /*<>*/ } @@ -17234,7 +17191,7 @@ a: { if(23 < _cg_ >>> 0){ - if(Object.is(55, _cg_)) break a; + if(55 === _cg_) break a; } else if(21 < _cg_ - 1 >>> 0) break a; /*<>*/ /*<>*/ var @@ -18541,7 +18498,7 @@ /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(str, i$0); - if(! Object.is(9, match) && ! Object.is(32, match)) + if(9 !== match && 32 !== match) /*<>*/ return i$0; /*<>*/ /*<>*/ var i$1 = i$0 + 1 | 0; @@ -18583,10 +18540,7 @@ /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(str, nend); - if(48 <= match){ - if(58 <= match) break; - } - else if(! Object.is(45, match)) break; + if(48 <= match){if(58 <= match) break;} else if(45 !== match) break; /*<>*/ /*<>*/ var j$0 = nend + 1 | 0; nend = j$0; @@ -18681,8 +18635,8 @@ /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(str, str_ind); - if(Object.is(37, match)) break; - if(Object.is(64, match)) break a; + if(37 === match) break; + if(64 === match) break a; var str_ind$1 = str_ind + 1 | 0; str_ind = str_ind$1; } @@ -18692,10 +18646,10 @@ (end_ind, cst_unexpected_end_of_format); var match$1 = - Object.is - (95, - /*<>*/ caml_string_get - (str, str_ind$2)) + 95 + === + /*<>*/ caml_string_get + (str, str_ind$2) ? parse_flags(str_ind, str_ind$2 + 1 | 0, end_ind, 1) : parse_flags(str_ind, str_ind$2, end_ind, 0), fmt_rest = match$1[1]; @@ -18740,7 +18694,7 @@ } } else{ - if(Object.is(10, c)){ + if(10 === c){ var fmt_rest$4 = parse(str_ind$0 + 1 | 0, end_ind)[1], match$0 = [0, [17, 3, fmt_rest$4]]; @@ -18757,10 +18711,10 @@ /*<>*/ if ((str_ind$0 + 1 | 0) < end_ind && - /*<>*/ Object.is - (37, - /*<>*/ caml_string_get - (str, str_ind$0 + 1 | 0))){ + 37 + === + /*<>*/ caml_string_get + (str, str_ind$0 + 1 | 0)){ var fmt_rest$6 = parse(str_ind$0 + 2 | 0, end_ind)[1], match$0 = [0, [17, 6, fmt_rest$6]]; @@ -18789,12 +18743,12 @@ _bh_ = _bg_ || - (Object.is - (60, - /*<>*/ caml_string_get - (str, str_ind$3)) - ? 0 - : 1); + (60 + !== + /*<>*/ caml_string_get + (str, str_ind$3) + ? 1 + : 0); if(_bh_) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); @@ -18809,7 +18763,7 @@ if(48 <= match$2){ if(58 > match$2) break c; } - else if(Object.is(45, match$2)) break c; + else if(45 === match$2) break c; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); } @@ -18826,7 +18780,7 @@ - 45 | 0; if(12 < switcher$0 >>> 0){ - if(Object.is(17, switcher$0)){ + if(17 === switcher$0){ /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 @@ -18850,11 +18804,10 @@ /*<>*/ str_ind_5 = parse_spaces(str_ind_4, end_ind); if - (! - Object.is - (62, - /*<>*/ caml_string_get - (str, str_ind_5))) + (62 + !== + /*<>*/ caml_string_get + (str, str_ind_5)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -18901,7 +18854,7 @@ if(48 <= match$6){ if(58 > match$6) break c; } - else if(Object.is(45, match$6)) break c; + else if(45 === match$6) break c; var _bo_ = 0; break b; } @@ -18913,11 +18866,10 @@ /*<>*/ str_ind_3$0 = parse_spaces(str_ind_2$0, end_ind); if - (! - Object.is - (62, - /*<>*/ caml_string_get - (str, str_ind_3$0))) + (62 + !== + /*<>*/ caml_string_get + (str, str_ind_3$0)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -19082,7 +19034,7 @@ [0, padty, width]); } } - else if(Object.is(42, match)) + else if(42 === match) /*<>*/ return parse_after_padding (pct_ind, str_ind$0 + 1 | 0, @@ -19140,7 +19092,7 @@ /*<>*/ /*<>*/ var symb = /*<>*/ caml_string_get(str, str_ind); - if(! Object.is(46, symb)) + if(46 !== symb) /*<>*/ return parse_conversion (pct_ind, str_ind + 1 | 0, @@ -19202,7 +19154,7 @@ if(legacy_behavior$0){ /*<>*/ var /*<>*/ _ba_ = str_ind$0 + 1 | 0, - minus$0 = minus || (Object.is(45, symb$0) ? 1 : 0); + minus$0 = minus || (45 === symb$0 ? 1 : 0); /*<>*/ return parse_literal (minus$0, _ba_); } @@ -19472,8 +19424,8 @@ c = /*<>*/ caml_string_get (str, str_ind$0); - if(! Object.is(45, c)){ - if(Object.is(93, c)) + if(45 !== c){ + if(93 === c) /*<>*/ return str_ind$0 + 1 | 0; var _a__ = str_ind$0 + 1 | 0; @@ -19506,15 +19458,15 @@ a: { if(46 <= c$1){ - if(! Object.is(64, c$1)){ - if(! Object.is(93, c$1)) break a; + if(64 !== c$1){ + if(93 !== c$1) break a; /*<>*/ add_in_char_set (char_set, c$0); /*<>*/ return str_ind$0 + 1 | 0; } } - else if(! Object.is(37, c$1)){ + else if(37 !== c$1){ if(45 > c$1) break a; var str_ind$2 = str_ind$0 + 1 | 0; if(Object.is(str_ind$2, end_ind)) @@ -19524,7 +19476,7 @@ c$2 = /*<>*/ caml_string_get (str, str_ind$2); - if(Object.is(37, c$2)){ + if(37 === c$2){ if((str_ind$2 + 1 | 0) === end_ind) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); @@ -19532,7 +19484,7 @@ c$3 = /*<>*/ caml_string_get (str, str_ind$2 + 1 | 0); - if(! Object.is(37, c$3) && ! Object.is(64, c$3)) + if(37 !== c$3 && 64 !== c$3) /*<>*/ return fail_single_percent (str_ind$2); /*<>*/ add_range(c$0, c$3); @@ -19544,7 +19496,7 @@ /*<>*/ return parse_char_set_content (counter$1, _a8_, end_ind); } - if(Object.is(93, c$2)){ + if(93 === c$2){ /*<>*/ add_in_char_set (char_set, c$0); /*<>*/ add_in_char_set @@ -19561,7 +19513,7 @@ /*<>*/ return parse_char_set_content (counter$0, _a9_, end_ind); } - if(Object.is(37, c$0)){ + if(37 === c$0){ /*<>*/ add_in_char_set (char_set, c$1); var _a7_ = str_ind$0 + 1 | 0; @@ -19573,7 +19525,7 @@ (counter$2, _a7_, end_ind); } } - if(Object.is(37, c$0)) + if(37 === c$0) /*<>*/ fail_single_percent (str_ind$0); /*<>*/ add_in_char_set @@ -19592,10 +19544,10 @@ /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); if - (Object.is - (94, - /*<>*/ caml_string_get - (str, str_ind))) + (94 + === + /*<>*/ caml_string_get + (str, str_ind)) var str_ind$0 = str_ind + 1 | 0, reverse = 1, @@ -19770,7 +19722,7 @@ default: var counter = 1; break b; } } - else if(Object.is(76, symb)){var counter = 2; break b;} + else if(76 === symb){var counter = 2; break b;} /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _V_], 1); } @@ -19873,9 +19825,9 @@ break b; } if(hash$1){ - if(Object.is(70, symb)){var kind = 8; break b;} + if(70 === symb){var kind = 8; break b;} } - else if(Object.is(70, symb)){var kind = 5; break b;} + else if(70 === symb){var kind = 5; break b;} /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _X_], 1); } @@ -19972,7 +19924,7 @@ break a; } } - else if(Object.is(76, symb)){ + else if(76 === symb){ /*<>*/ var /*<>*/ _aE_ = /*<>*/ caml_string_get(str, str_ind), @@ -20050,9 +20002,9 @@ b: { if(38 <= symb){ - if(! Object.is(44, symb) && ! Object.is(64, symb)) break b; + if(44 !== symb && 64 !== symb) break b; } - else if(! Object.is(33, symb) && 37 > symb) break b; + else if(33 !== symb && 37 > symb) break b; if(legacy_behavior$0) break a; } /*<>*/ incompatible_flag @@ -20066,10 +20018,9 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); if - (! - Object.is - (60, - /*<>*/ caml_string_get(str, str_ind))) + (60 + !== + /*<>*/ caml_string_get(str, str_ind)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ /*<>*/ var @@ -20112,11 +20063,9 @@ /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ if - (! - /*<>*/ Object.is - (32, - /*<>*/ caml_string_get - (str, str_ind$0))) + (32 + !== + /*<>*/ caml_string_get(str, str_ind$0)) /*<>*/ return str_ind$0; var str_ind$1 = str_ind$0 + 1 | 0; str_ind$0 = str_ind$1; @@ -20160,7 +20109,7 @@ /*<>*/ return parse_positive (str_ind, end_ind, 0); } - else if(Object.is(45, match)){ + else if(45 === match){ if((str_ind + 1 | 0) === end_ind) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); @@ -20186,8 +20135,8 @@ size = str_ind - lit_start | 0; return Object.is(0, size) ? [0, fmt] - : Object.is - (1, size) + : 1 + === size ? [0, [12, /*<>*/ caml_string_get @@ -20206,10 +20155,10 @@ /*<>*/ /*<>*/ caml_call3 (failwith_message(_U_), str, c, end_ind); if - (Object.is - (37, - /*<>*/ caml_string_get - (str, str_ind$0))){ + (37 + === + /*<>*/ caml_string_get + (str, str_ind$0)){ if((str_ind$0 + 1 | 0) === end_ind) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); @@ -20249,7 +20198,7 @@ match$0 = /*<>*/ caml_string_get (str, str_ind$0 + 2 | 0); - if(Object.is(40, match$0)){ + if(40 === match$0){ /*<>*/ var /*<>*/ sub_end$0 = search_subformat_end(str_ind$0 + 3 | 0, end_ind, 41), @@ -20258,7 +20207,7 @@ str_ind$0 = str_ind$3; continue; } - if(Object.is(123, match$0)){ + if(123 === match$0){ /*<>*/ var /*<>*/ sub_end$1 = search_subformat_end(str_ind$0 + 3 | 0, end_ind, 125), @@ -20273,7 +20222,7 @@ } } else{ - if(Object.is(40, match)){ + if(40 === match){ /*<>*/ var /*<>*/ sub_end$2 = search_subformat_end(str_ind$0 + 2 | 0, end_ind, 41), @@ -20281,7 +20230,7 @@ str_ind$0 = str_ind$6; continue; } - if(Object.is(41, match)) + if(41 === match) /*<>*/ return expected_character (str_ind$0 + 1 | 0, cst_character$0, 41); } @@ -20302,20 +20251,16 @@ if(plus$0){ if(! hash$0){ if(space$0) break a; - if(Object.is(100, symb)) - /*<>*/ return 1; - if(Object.is(105, symb)) - /*<>*/ return 4; + if(100 === symb) /*<>*/ return 1; + if(105 === symb) /*<>*/ return 4; break a; } } else{ if(! hash$0){ if(space$0){ - if(Object.is(100, symb)) - /*<>*/ return 2; - if(Object.is(105, symb)) - /*<>*/ return 5; + if(100 === symb) /*<>*/ return 2; + if(105 === symb) /*<>*/ return 5; break a; } var switcher$1 = symb - 88 | 0; @@ -22177,9 +22122,7 @@ /*<>*/ for(;;){ if(len <= n$0) /*<>*/ return len; /*<>*/ if - (! - /*<>*/ Object.is - (32, /*<>*/ caml_string_get(s, n$0))) + (32 !== /*<>*/ caml_string_get(s, n$0)) /*<>*/ return n$0; /*<>*/ /*<>*/ var n$1 = n$0 + 1 | 0; n$0 = n$1; @@ -22218,7 +22161,7 @@ /*<>*/ return /*<>*/ caml_call2 (Stdlib_String[18], function(c){ - /*<>*/ if(Object.is(9, c) && ! seen[1]){ + /*<>*/ if(9 === c && ! seen[1]){ seen[1] = 1; /*<>*/ return 32; } @@ -22309,9 +22252,7 @@ { /*<>*/ if (0 < len - && - /*<>*/ Object.is - (13, /*<>*/ caml_string_get(word, len - 1 | 0))){ + && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ var _H_ = /*<>*/ caml_call3 @@ -22830,7 +22771,7 @@ if(! match) /*<>*/ return 0; var backtrace = match[1], i$1 = backtrace.length - 2 | 0, i = i$1; /*<>*/ for(;;){ - if(Object.is(-1, i)) + if(-1 === i) var _K_ = 0; else{ var _J_ = 0 === caml_check_bound(backtrace, i)[1 + i][0] ? 1 : 0; @@ -24129,13 +24070,13 @@ (Stdlib[86], chan, 16); /*<>*/ } function to_hex(d){ - /*<>*/ if(! Object.is(16, caml_ml_string_length(d))) + /*<>*/ if(16 !== caml_ml_string_length(d)) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Digest_to_hex$0); /*<>*/ return hex_of_string(d); /*<>*/ } function of_hex(s){ - /*<>*/ if(! Object.is(32, caml_ml_string_length(s))) + /*<>*/ if(32 !== caml_ml_string_length(s)) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Digest_from_hex); /*<>*/ return string_of_hex(s); @@ -24767,22 +24708,22 @@ (Stdlib[1], cst_Bigarray_array0_of_genarra); /*<>*/ } function array1_of_genarray(a){ - /*<>*/ return /*<>*/ Object.is - (1, /*<>*/ caml_ba_num_dims(a)) + /*<>*/ return 1 + === /*<>*/ caml_ba_num_dims(a) ? a : /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_array1_of_genarra); /*<>*/ } function array2_of_genarray(a){ - /*<>*/ return /*<>*/ Object.is - (2, /*<>*/ caml_ba_num_dims(a)) + /*<>*/ return 2 + === /*<>*/ caml_ba_num_dims(a) ? a : /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_array2_of_genarra); /*<>*/ } function array3_of_genarray(a){ - /*<>*/ return /*<>*/ Object.is - (3, /*<>*/ caml_ba_num_dims(a)) + /*<>*/ return 3 + === /*<>*/ caml_ba_num_dims(a) ? a : /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_array3_of_genarra); @@ -24974,7 +24915,7 @@ /*<>*/ /*<>*/ caml_call3 (Stdlib_Bytes[86], buf, 5 + (i * 8 | 0) | 0, _y_); /*<>*/ /*<>*/ var _z_ = i + 1 | 0; - if(Object.is(3, i)) + if(3 === i) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], buf); i = _z_; @@ -24982,7 +24923,7 @@ /*<>*/ } function of_binary_string(buf){ /*<>*/ var - _v_ = Object.is(runtime.caml_ml_string_length(buf), 37) ? 0 : 1, + _v_ = runtime.caml_ml_string_length(buf) !== 37 ? 1 : 0, _w_ = _v_ || @@ -25240,7 +25181,7 @@ _h_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), _i_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), nativebits = - Object.is(32, Stdlib_Nativeint[9]) + 32 === Stdlib_Nativeint[9] ? function (s){ /*<>*/ return bits32(s); @@ -25251,7 +25192,7 @@ ( /*<>*/ caml_lxm_next(s)); /*<>*/ }, nativeint = - Object.is(32, Stdlib_Nativeint[9]) + 32 === Stdlib_Nativeint[9] ? function (s, bound){ /*<>*/ return int32(s, bound); @@ -25263,7 +25204,7 @@ (s, /*<>*/ caml_int64_of_int32(bound))); /*<>*/ }, nativeint_in_range = - Object.is(32, Stdlib_Nativeint[9]) + 32 === Stdlib_Nativeint[9] ? function (s, min, max){ /*<>*/ return int32_in_range(s, min, max); @@ -26889,7 +26830,7 @@ } t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); /*<>*/ /*<>*/ var _u_ = i$4 + 1 | 0; - if(Object.is(2, i$4)) break; + if(2 === i$4) break; i$4 = _u_; } } @@ -27399,9 +27340,7 @@ /*<>*/ var width$2 = state[9] - off$1 | 0, /*<>*/ box_type$1 = - /*<>*/ Object.is(1, ty) - ? 1 - : state[9] < size$0 ? ty : 5; + 1 === ty ? 1 : state[9] < size$0 ? ty : 5; /*<>*/ return /*<>*/ caml_call2 (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]); case 4: @@ -28647,11 +28586,11 @@ } /*<>*/ /*<>*/ var match = /*<>*/ runtime.caml_string_get(s, right[1]); - if(Object.is(10, match)){ + if(10 === match){ /*<>*/ flush(0); /*<>*/ pp_force_newline(ppf, 0); } - else if(Object.is(32, match)){ + else if(32 === match){ /*<>*/ flush(0); /*<>*/ pp_print_space(ppf, 0); } @@ -29356,7 +29295,7 @@ ib[2] = c; ib[3] = 1; ib[4] = ib[4] + 1 | 0; - if(Object.is(10, c)) ib[5] = ib[5] + 1 | 0; + if(10 === c) ib[5] = ib[5] + 1 | 0; /*<>*/ return c; } catch(_aY_){ @@ -29631,18 +29570,17 @@ ( /*<>*/ caml_call3(Stdlib_Printf[4], _g_, c, ci)); /*<>*/ } function check_char(ib, c$0){ - /*<>*/ if(Object.is(10, c$0)){ + /*<>*/ if(10 === c$0){ /*<>*/ /*<>*/ var ci = checked_peek_char(ib); - /*<>*/ return /*<>*/ Object.is(10, ci) + /*<>*/ return 10 === ci ? invalidate_current_char(ib) - : Object.is - (13, ci) + : 13 + === ci ? (invalidate_current_char(ib), check_this_char(ib, 10)) : character_mismatch(10, ci); } - if(! Object.is(32, c$0)) - /*<>*/ return check_this_char(ib, c$0); + if(32 !== c$0) /*<>*/ return check_this_char(ib, c$0); /*<>*/ for(;;){ /*<>*/ var /*<>*/ c = peek_char(ib), @@ -29652,7 +29590,7 @@ a: { if(4 < _aT_ >>> 0){ - if(Object.is(23, _aT_)) break a; + if(23 === _aT_) break a; } else if(1 < _aT_ - 2 >>> 0) break a; /*<>*/ return 0; @@ -29732,9 +29670,7 @@ /*<>*/ if (! /*<>*/ Object.is(0, l) - && - /*<>*/ Object.is - (43, /*<>*/ caml_string_get(tok, 0))) + && 43 === /*<>*/ caml_string_get(tok, 0)) /*<>*/ return /*<>*/ caml_call3 (Stdlib_String[16], tok, 1, l - 1 | 0); /*<>*/ return tok; @@ -29751,7 +29687,7 @@ /*<>*/ if(ib[1]) /*<>*/ return width$0; if(58 <= c){ - if(Object.is(95, c)){ + if(95 === c){ /*<>*/ /*<>*/ var width$1 = ignore_char(width$0, ib); width$0 = width$1; @@ -29803,7 +29739,7 @@ width = width$0; } else{ - if(! Object.is(95, c)) /*<>*/ return width; + if(95 !== c) /*<>*/ return width; /*<>*/ /*<>*/ var width$1 = ignore_char(width, ib); width = width$1; @@ -29858,7 +29794,7 @@ /*<>*/ var /*<>*/ width$0 = scan_sign(width$1, ib), /*<>*/ c = checked_peek_char(ib); - if(! Object.is(48, c)) + if(48 !== c) /*<>*/ return scan_decimal_digit_plus(width$0, ib); /*<>*/ /*<>*/ var width = store_char(width$0, ib, c); @@ -29871,13 +29807,13 @@ a: { if(99 <= c$0){ - if(Object.is(111, c$0)) + if(111 === c$0) return scan_digit_plus (cst_octal, is_octal_digit, store_char(width, ib, c$0), ib); - if(Object.is(120, c$0)) break a; + if(120 === c$0) break a; } else{ - if(Object.is(88, c$0)) break a; + if(88 === c$0) break a; if(98 <= c$0) return scan_digit_plus (cst_binary, @@ -29916,8 +29852,7 @@ /*<>*/ return width; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width; - if(! Object.is(69, c) && ! Object.is(101, c)) - /*<>*/ return width; + if(69 !== c && 101 !== c) /*<>*/ return width; /*<>*/ return scan_optionally_signed_decimal (store_char(width, ib, c), ib); /*<>*/ } @@ -29930,7 +29865,7 @@ /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return [0, width$0, precision]; - if(! Object.is(46, c)) + if(46 !== c) /*<>*/ return [0, scan_exponent_part(width$0, ib), precision]; @@ -30004,10 +29939,10 @@ /*<>*/ return check_case_insensitive_string (width$1, ib, bad_hex_float, cst_an); } - if(! Object.is(26, switcher)) break a; + if(26 !== switcher) break a; } else{ - if(Object.is(48, c)){ + if(48 === c){ /*<>*/ var /*<>*/ width$3 = store_char(width$0, ib, c), _aE_ = Object.is(0, width$3) ? 1 : 0, @@ -30026,7 +29961,7 @@ c: { if(34 < _aG_ >>> 0){ - if(Object.is(66, _aG_)) break c; + if(66 === _aG_) break c; } else if(32 < _aG_ - 1 >>> 0) break c; var @@ -30042,7 +29977,7 @@ && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$0 = peek_char(ib); - if(Object.is(46, c$0)){ + if(46 === c$0){ /*<>*/ /*<>*/ var width$6 = store_char(width$5, ib, c$0); b: @@ -30055,7 +29990,7 @@ match = peek_char(ib); c: { - if(! Object.is(80, match) && ! Object.is(112, match)){ + if(80 !== match && 112 !== match){ /*<>*/ var /*<>*/ precision$0 = /*<>*/ caml_call2 @@ -30088,7 +30023,7 @@ && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$1 = peek_char(ib); - if(! Object.is(80, c$1) && ! Object.is(112, c$1)) + if(80 !== c$1 && 112 !== c$1) /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$1), @@ -30105,7 +30040,7 @@ } /*<>*/ return width$4; } - if(! Object.is(73, c)) break a; + if(73 !== c) break a; } /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), @@ -30134,7 +30069,7 @@ /*<>*/ c = peek_char(ib), /*<>*/ switcher = c - 69 | 0; if(32 < switcher >>> 0){ - if(Object.is(-23, switcher)){ + if(-23 === switcher){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), /*<>*/ precision$0 = @@ -30185,7 +30120,7 @@ /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); /*<>*/ /*<>*/ var c$0 = peek_char(ib); - if(! Object.is(88, c$0) && ! Object.is(120, c$0)) + if(88 !== c$0 && 120 !== c$0) /*<>*/ return scan_caml_float_rest (width$2, precision, ib); /*<>*/ var @@ -30208,7 +30143,7 @@ b: { if(32 < switcher >>> 0){ - if(Object.is(-34, switcher)){ + if(-34 === switcher){ /*<>*/ /*<>*/ var width$4 = store_char(width$10, ib, c$1); c: @@ -30221,7 +30156,7 @@ match = peek_char(ib); d: { - if(! Object.is(80, match) && ! Object.is(112, match)){ + if(80 !== match && 112 !== match){ /*<>*/ var /*<>*/ precision$0 = /*<>*/ caml_call2 @@ -30258,8 +30193,7 @@ (! /*<>*/ Object.is(0, width$7) && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$2 = peek_char(ib); - if(! Object.is(80, c$2) && ! Object.is(112, c$2)) - /*<>*/ return width$7; + if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$7; /*<>*/ var /*<>*/ width$8 = store_char(width$7, ib, c$2), _aq_ = Object.is(0, width$8) ? 1 : 0, @@ -30285,7 +30219,7 @@ a: { if(4 < _ad_ >>> 0){ - if(Object.is(23, _ad_)) break a; + if(23 === _ad_) break a; } else if(1 < _ad_ - 2 >>> 0) break a; /*<>*/ /*<>*/ var @@ -30400,7 +30334,7 @@ default: break a; } } - else if(! Object.is(34, c0) && 39 > c0) break a; + else if(34 !== c0 && 39 > c0) break a; b: { if(110 <= c0){ @@ -30414,7 +30348,7 @@ var _$_ = 9; break b; } } - else if(Object.is(98, c0)){var _$_ = 8; break b;} + else if(98 === c0){var _$_ = 8; break b;} var _$_ = c0; } /*<>*/ return store_char(width, ib, _$_); @@ -30426,13 +30360,12 @@ /*<>*/ var width$0 = width; /*<>*/ for(;;){ var c = check_next_char(cst_a_String, width$0, ib); - if(Object.is(34, c)) - /*<>*/ return ignore_char(width$0, ib); - if(Object.is(92, c)){ + if(34 === c) /*<>*/ return ignore_char(width$0, ib); + if(92 === c){ /*<>*/ var /*<>*/ width$1 = ignore_char(width$0, ib), match = check_next_char(cst_a_String, width$1, ib); - if(Object.is(10, match)){ + if(10 === match){ /*<>*/ /*<>*/ var _Y_ = ignore_char(width$1, ib); /*<>*/ if(counter >= 50) @@ -30441,10 +30374,10 @@ var counter$0 = counter + 1 | 0; /*<>*/ return skip_spaces(counter$0, _Y_); } - if(Object.is(13, match)){ + if(13 === match){ /*<>*/ /*<>*/ var width$3 = ignore_char(width$1, ib); - if(Object.is(10, check_next_char(cst_a_String, width$3, ib))){ + if(10 === check_next_char(cst_a_String, width$3, ib)){ /*<>*/ /*<>*/ var _Z_ = ignore_char(width$3, ib); /*<>*/ if(counter >= 50) @@ -30476,7 +30409,7 @@ function skip_spaces(counter, width){ /*<>*/ var width$0 = width; /*<>*/ for(;;){ - if(! Object.is(32, check_next_char(cst_a_String, width$0, ib))){ + if(32 !== check_next_char(cst_a_String, width$0, ib)){ /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return (find_stop$0, [0, width$0]); @@ -30490,7 +30423,7 @@ /*<>*/ } /*<>*/ /*<>*/ var c = checked_peek_char(ib); - return Object.is(34, c) + return 34 === c ? find_stop(ignore_char(width, ib)) : character_mismatch(34, c); /*<>*/ } @@ -30553,7 +30486,7 @@ /*<>*/ return width; /*<>*/ } function stopper_of_formatting_lit(fmting){ - /*<>*/ if(Object.is(6, fmting)) + /*<>*/ if(6 === fmting) /*<>*/ return _p_; /*<>*/ var /*<>*/ str = @@ -30813,17 +30746,17 @@ function(width){ /*<>*/ var c = check_next_char(cst_a_Char, width, ib); - return Object.is(39, c) + return 39 === c ? ignore_char(width, ib) : character_mismatch(39, c); /*<>*/ }, /*<>*/ c = checked_peek_char(ib), /*<>*/ width$0 = 0; - if(Object.is(39, c)){ + if(39 === c){ /*<>*/ var /*<>*/ width = ignore_char(width$0, ib), c$3 = check_next_char(cst_a_Char, width, ib); - if(Object.is(92, c$3)) + if(92 === c$3) /*<>*/ find_stop (scan_backslash_char(ignore_char(width, ib), ib)); else @@ -31059,10 +30992,10 @@ /*<>*/ var /*<>*/ c = checked_peek_char(ib), /*<>*/ m = - /*<>*/ Object.is(102, c) + 102 === c ? 5 - : Object.is - (116, c) + : 116 + === c ? 4 : bad_input ( /*<>*/ caml_call2 @@ -32700,8 +32633,8 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stdlib[15], loc], 1); var _j_ = caml_obj_tag(l); - if(Object.is(250, _j_)) return l[1]; - if(! Object.is(246, _j_) && ! Object.is(244, _j_)) + if(250 === _j_) return l[1]; + if(246 !== _j_ && 244 !== _j_) /*<>*/ return l; /*<>*/ return /*<>*/ caml_call1 (CamlinternalLazy[2], l); @@ -32757,7 +32690,7 @@ if ( /*<>*/ Object.is (0, /*<>*/ caml_obj_tag(n$0)) - && Object.is(4, n$0.length - 1)){ + && 4 === n$0.length - 1){ /*<>*/ var /*<>*/ cl = modu[1 + i], j = 0; @@ -32765,7 +32698,7 @@ /*<>*/ cl[1 + j] = n$0[1 + j]; /*<>*/ /*<>*/ var _c_ = j + 1 | 0; - if(Object.is(3, j)) break; + if(3 === j) break; j = _c_; } break a; @@ -32874,10 +32807,10 @@ /*<>*/ if(random){ var _ar_ = runtime.caml_obj_tag(prng); a: - if(Object.is(250, _ar_)) + if(250 === _ar_) var _as_ = prng[1]; else{ - if(! Object.is(246, _ar_) && ! Object.is(244, _ar_)){var _as_ = prng; break a;} + if(246 !== _ar_ && 244 !== _ar_){var _as_ = prng; break a;} var _as_ = caml_call1(CamlinternalLazy[2], prng); } var @@ -34248,8 +34181,8 @@ } /*<>*/ } function is_dir_sep(s, i){ - /*<>*/ return Object.is - (47, /*<>*/ caml_string_get(s, i)) + /*<>*/ return 47 + === /*<>*/ caml_string_get(s, i) ? 1 : 0; /*<>*/ } @@ -34258,10 +34191,7 @@ _aH_ = caml_ml_string_length(n) < 1 ? 1 : 0, _aI_ = _aH_ - || - (Object.is(47, /*<>*/ caml_string_get(n, 0)) - ? 0 - : 1); + || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); return _aI_; /*<>*/ } function is_implicit(n){ @@ -34353,8 +34283,7 @@ var i = _ax_; for(;;){ /*<>*/ if - ( /*<>*/ Object.is - (39, /*<>*/ caml_string_get(s, i))) + (39 === /*<>*/ caml_string_get(s, i)) /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[16], b, quotequote); else{ @@ -34442,13 +34371,11 @@ /*<>*/ var /*<>*/ c = /*<>*/ caml_string_get(s, i), - _ah_ = Object.is(47, c) ? 1 : 0; + _ah_ = 47 === c ? 1 : 0; if(_ah_) var _ai_ = _ah_; else - var - _aj_ = Object.is(92, c) ? 1 : 0, - _ai_ = _aj_ || (Object.is(58, c) ? 1 : 0); + var _aj_ = 92 === c ? 1 : 0, _ai_ = _aj_ || (58 === c ? 1 : 0); return _ai_; /*<>*/ } function is_relative$0(n){ @@ -34456,28 +34383,19 @@ _ab_ = caml_ml_string_length(n) < 1 ? 1 : 0, _ac_ = _ab_ - || - (Object.is(47, /*<>*/ caml_string_get(n, 0)) - ? 0 - : 1); + || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); if(_ac_){ var _ad_ = caml_ml_string_length(n) < 1 ? 1 : 0, _ae_ = _ad_ - || - (Object.is(92, /*<>*/ caml_string_get(n, 0)) - ? 0 - : 1); + || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); if(_ae_) var _af_ = caml_ml_string_length(n) < 2 ? 1 : 0, _ag_ = _af_ - || - (Object.is(58, /*<>*/ caml_string_get(n, 1)) - ? 0 - : 1); + || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); else var _ag_ = _ae_; } @@ -34608,7 +34526,7 @@ (Stdlib_Buffer[12], b, 34); /*<>*/ /*<>*/ var c = /*<>*/ caml_string_get(s, i$0); - if(Object.is(34, c)){ + if(34 === c){ var _N_ = 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -34616,7 +34534,7 @@ var counter$1 = counter + 1 | 0; /*<>*/ return loop_bs(counter$1, _N_, i$0); } - if(Object.is(92, c)){ + if(92 === c){ var _O_ = 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -34642,7 +34560,7 @@ } /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(s, i$0); - if(Object.is(34, match)){ + if(34 === match){ /*<>*/ add_bs((2 * n$0 | 0) + 1 | 0); /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); @@ -34654,7 +34572,7 @@ var counter$1 = counter + 1 | 0; /*<>*/ return loop$0(counter$1, _M_); } - if(! Object.is(92, match)){ + if(92 !== match){ /*<>*/ add_bs(n$0); /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return @@ -34693,8 +34611,7 @@ /*<>*/ caml_call2 (Stdlib_String[23], function(param){ - /*<>*/ if - (! Object.is(34, param) && ! Object.is(37, param)) + /*<>*/ if(34 !== param && 37 !== param) /*<>*/ return 0; /*<>*/ return 1; /*<>*/ }, @@ -34759,11 +34676,11 @@ if(60 < _I_ >>> 0){ if(62 <= _I_) break a; } - else if(! Object.is(31, _I_)) break a; + else if(31 !== _I_) break a; } else if(42 <= c){ - if(! Object.is(60, c)) break a; + if(60 !== c) break a; } else{ if(33 > c) break a; @@ -34813,10 +34730,7 @@ /*<>*/ /*<>*/ var _u_ = _t_ - ? Object.is - (58, /*<>*/ caml_string_get(s, 1)) - ? 1 - : 0 + ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 : _t_; } else @@ -34935,8 +34849,7 @@ /*<>*/ for(;;){ /*<>*/ if(0 <= i0 && ! is_dir_sep$1(name, i0)){ /*<>*/ if - ( /*<>*/ Object.is - (46, /*<>*/ caml_string_get(name, i0))) + (46 === /*<>*/ caml_string_get(name, i0)) break; /*<>*/ /*<>*/ var i$2 = i0 - 1 | 0; @@ -34951,9 +34864,7 @@ /*<>*/ for(;;){ /*<>*/ if(0 <= i && ! is_dir_sep$1(name, i)){ /*<>*/ if - (! - /*<>*/ Object.is - (46, /*<>*/ caml_string_get(name, i))) + (46 !== /*<>*/ caml_string_get(name, i)) return caml_ml_string_length(name) - i0 | 0; /*<>*/ /*<>*/ var i$0 = i - 1 | 0; From f608b978da256cd0ee1b28aef40c4037ab0d1f39 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 10 Oct 2024 18:17:52 +0200 Subject: [PATCH 07/10] WIP --- compiler/lib/generate.ml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 4cd78552e2..d7afe38ba3 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -1056,10 +1056,13 @@ let remove_unused_tail_args ctx exact trampolined args = else args else args -let is_int = function - | J.ENum n -> J.Num.is_int n && not (J.Num.is_zero n) - | J.EBin ((J.Bor | J.Lsr), _, _) -> true - | _ -> false +let maybe_zero_or_nan = function + | J.ENum n -> ( + match J.Num.to_string n with + | "NaN" -> true + | "-0." | "0." | "0" | "0." -> true + | J.EBin ((J.Bor | J.Lsr), _, _) -> false + | _ -> true) let rec translate_expr ctx queue loc x e level : _ * J.statement_list = match e with @@ -1359,7 +1362,7 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in let e = - if is_int cx || is_int cy + if not (maybe_zero_or_nan cx && maybe_zero_or_nan cy) then bool (J.EBin (J.EqEqEq, cx, cy)) else bool @@ -1373,7 +1376,7 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in let e = - if is_int cx || is_int cy + if not (maybe_zero_or_nan cx && maybe_zero_or_nan cy) then bool (J.EBin (J.NotEqEq, cx, cy)) else bool_not From 6ba77eb6717d6e1edbafd34fe86edc352b01bcde Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 10 Oct 2024 18:27:07 +0200 Subject: [PATCH 08/10] wip --- compiler/lib/generate.ml | 7 ++++--- compiler/tests-compiler/effects_toplevel.ml | 7 +------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index d7afe38ba3..1cd25f4afe 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -1060,9 +1060,10 @@ let maybe_zero_or_nan = function | J.ENum n -> ( match J.Num.to_string n with | "NaN" -> true - | "-0." | "0." | "0" | "0." -> true - | J.EBin ((J.Bor | J.Lsr), _, _) -> false - | _ -> true) + | "-0." | "0." | "0" | "-0" -> true + | _ -> false) + | J.EBin ((J.Bor | J.Lsr), _, _) -> false + | _ -> true let rec translate_expr ctx queue loc x e level : _ * J.statement_list = match e with diff --git a/compiler/tests-compiler/effects_toplevel.ml b/compiler/tests-compiler/effects_toplevel.ml index b6eecc20c9..20eb72768b 100644 --- a/compiler/tests-compiler/effects_toplevel.ml +++ b/compiler/tests-compiler/effects_toplevel.ml @@ -81,13 +81,8 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = dummy, function(_c_){ var _d_ = i + 1 | 0; -<<<<<<< HEAD - if(! Object.is(5, i)) return caml_cps_exact_call1(_b_, _d_); - caml_callback(g, [dummy]); -======= if(5 !== i) return caml_cps_exact_call1(_b_, _d_); - caml_callback(g, [undef]); ->>>>>>> 21ff3c88d1 (fix) + caml_callback(g, [dummy]); var Test = [0]; runtime.caml_register_global(2, Test, "Test"); }); From c966a8f97b44d7df4986aa5a384568835ab75473 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Fri, 11 Oct 2024 09:24:17 +0200 Subject: [PATCH 09/10] WIP --- compiler/lib/code.ml | 13 +- compiler/lib/code.mli | 9 +- compiler/lib/eval.ml | 4 +- compiler/lib/flow.ml | 64 +- compiler/lib/flow.mli | 2 + compiler/lib/generate.ml | 53 +- compiler/lib/global_flow.ml | 7 +- compiler/lib/javascript.ml | 9 - compiler/lib/javascript.mli | 2 - compiler/lib/parse_bytecode.ml | 10 +- compiler/lib/specialize_js.ml | 20 + compiler/tests-compiler/compact.ml | 5 +- compiler/tests-compiler/effects.ml | 5 +- .../tests-compiler/effects_continuations.ml | 4 +- compiler/tests-compiler/effects_exceptions.ml | 4 +- compiler/tests-compiler/es6.ml | 10 +- compiler/tests-compiler/gh1320.ml | 5 +- compiler/tests-compiler/gh1559.ml | 4 +- compiler/tests-compiler/gh747.ml | 170 ++- compiler/tests-compiler/global_deadcode.ml | 7 +- compiler/tests-compiler/lazy.ml | 5 +- compiler/tests-compiler/loops.ml | 17 +- compiler/tests-compiler/match_with_exn.ml | 14 +- compiler/tests-compiler/mutable_closure.ml | 7 +- compiler/tests-compiler/tailcall.ml | 14 +- compiler/tests-full/stdlib.cma.expected.js | 998 ++++++++---------- 26 files changed, 715 insertions(+), 747 deletions(-) diff --git a/compiler/lib/code.ml b/compiler/lib/code.ml index ee704a6a5c..09b8e9719f 100644 --- a/compiler/lib/code.ml +++ b/compiler/lib/code.ml @@ -289,14 +289,19 @@ end type cont = Addr.t * Var.t list +type float_or_not = + | Float + | Not_float + | Unknown + type prim = | Vectlength | Array_get | Extern of string | Not | IsInt - | Eq - | Neq + | Eq of float_or_not + | Neq of float_or_not | Lt | Le | Ult @@ -557,8 +562,8 @@ module Print = struct | Extern s, _ -> Format.fprintf f "\"%s\"(%a)" s (list arg) l | Not, [ x ] -> Format.fprintf f "!%a" arg x | IsInt, [ x ] -> Format.fprintf f "is_int(%a)" arg x - | Eq, [ x; y ] -> Format.fprintf f "%a === %a" arg x arg y - | Neq, [ x; y ] -> Format.fprintf f "!(%a === %a)" arg x arg y + | Eq _, [ x; y ] -> Format.fprintf f "%a === %a" arg x arg y + | Neq _, [ x; y ] -> Format.fprintf f "!(%a === %a)" arg x arg y | Lt, [ x; y ] -> Format.fprintf f "%a < %a" arg x arg y | Le, [ x; y ] -> Format.fprintf f "%a <= %a" arg x arg y | Ult, [ x; y ] -> Format.fprintf f "%a <= %a" arg x arg y diff --git a/compiler/lib/code.mli b/compiler/lib/code.mli index 699aa220fb..6946dd2363 100644 --- a/compiler/lib/code.mli +++ b/compiler/lib/code.mli @@ -139,14 +139,19 @@ end type cont = Addr.t * Var.t list +type float_or_not = + | Float + | Not_float + | Unknown + type prim = | Vectlength | Array_get | Extern of string | Not | IsInt - | Eq - | Neq + | Eq of float_or_not + | Neq of float_or_not | Lt | Le | Ult diff --git a/compiler/lib/eval.ml b/compiler/lib/eval.ml index 113fe6432b..d3a46f3896 100644 --- a/compiler/lib/eval.ml +++ b/compiler/lib/eval.ml @@ -83,8 +83,8 @@ let eval_prim x = | Not, [ Int i ] -> bool (Targetint.is_zero i) | Lt, [ Int i; Int j ] -> bool Targetint.(i < j) | Le, [ Int i; Int j ] -> bool Targetint.(i <= j) - | Eq, [ Int i; Int j ] -> bool Targetint.(i = j) - | Neq, [ Int i; Int j ] -> bool Targetint.(i <> j) + | Eq _, [ Int i; Int j ] -> bool Targetint.(i = j) + | Neq _, [ Int i; Int j ] -> bool Targetint.(i <> j) | Ult, [ Int i; Int j ] -> bool (Targetint.(j < zero) || Targetint.(i < j)) | Extern name, l -> ( let name = Primitive.resolve name in diff --git a/compiler/lib/flow.ml b/compiler/lib/flow.ml index d93b97389d..a59d1ec949 100644 --- a/compiler/lib/flow.ml +++ b/compiler/lib/flow.ml @@ -206,7 +206,7 @@ let expr_escape st _x e = | Special _ | Constant _ | Closure _ | Block _ | Field _ -> () | Apply { args; _ } -> List.iter args ~f:(fun x -> block_escape st x) | Prim (Array_get, [ Pv x; _ ]) -> block_escape st x - | Prim ((Vectlength | Array_get | Not | IsInt | Eq | Neq | Lt | Le | Ult), _) -> () + | Prim ((Vectlength | Array_get | Not | IsInt | Eq _ | Neq _ | Lt | Le | Ult), _) -> () | Prim (Extern name, l) -> let ka = match Primitive.kind_args name with @@ -340,6 +340,68 @@ let the_def_of info x = x | Pc c -> Some (Constant c) +let float_or_not x : Code.float_or_not = + match x with + | Block _ -> Not_float + | Closure _ -> Not_float + | Special (Alias_prim _) -> Not_float + | Field _ -> Unknown + | Apply _ -> Unknown + | Prim (prim, _) -> ( + match prim with + | Extern + ( "caml_ml_string_length" + | "caml_ml_bytes_length" + | "caml_bytes_unsafe_get" + | "caml_bytes_get" + | "caml_string_unsafe_get" + | "caml_string_get" + | "%int_add" + | "%int_sub" + | "%int_mul" + | "%direct_int_mul" + | "%int_div" + | "%direct_int_div" + | "%int_mod" + | "%direct_int_mod" + | "caml_obj_tag" ) -> Not_float + | Array_get -> Unknown + | Extern _ -> Unknown + | Vectlength -> Not_float + | Not -> Not_float + | IsInt -> Not_float + | Eq _ | Neq _ -> Not_float + | Lt | Le | Ult -> Not_float) + | Constant + ( String _ + | NativeString _ + | Float_array _ + | Int _ + | Int32 _ + | Int64 _ + | Tuple _ + | NativeInt _ ) -> Not_float + | Constant (Float _) -> Float + +let the_float_or_not_of info x = + match x with + | Pv x -> + get_approx + info + (fun x -> + match info.info_defs.(Var.idx x) with + | Expr e -> float_or_not e + | Param | Phi _ -> Unknown) + Unknown + (fun a b -> + match a, b with + | Unknown, _ | _, Unknown -> Unknown + | Float, Float -> Float + | Not_float, Not_float -> Not_float + | Float, Not_float | Not_float, Float -> Unknown) + x + | Pc c -> float_or_not (Constant c) + (* If [constant_identical a b = true], then the two values cannot be distinguished, i.e., they are not different objects (and [caml_js_equals a b = true]) and if both are floats, they are bitwise equal. *) diff --git a/compiler/lib/flow.mli b/compiler/lib/flow.mli index 20271a4e3f..b78ee0b5e9 100644 --- a/compiler/lib/flow.mli +++ b/compiler/lib/flow.mli @@ -52,6 +52,8 @@ val get_approx : val the_def_of : Info.t -> Code.prim_arg -> Code.expr option +val the_float_or_not_of : Info.t -> Code.prim_arg -> Code.float_or_not + val the_const_of : target:[ `JavaScript | `Wasm ] -> Info.t -> Code.prim_arg -> Code.constant option diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 1cd25f4afe..efed05e326 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -978,6 +978,7 @@ let _ = register_un_prim "caml_obj_dup" `Mutable (fun cx loc -> J.call (J.dot cx (Utf8_string.of_string_exn "slice")) [] loc); register_un_prim "caml_int_of_float" `Pure (fun cx _loc -> to_int cx); + register_un_prim "caml_float_of_int" `Pure (fun cx _loc -> cx); register_un_math_prim "caml_abs_float" "abs"; register_un_math_prim "caml_acos_float" "acos"; register_un_math_prim "caml_asin_float" "asin"; @@ -1056,15 +1057,6 @@ let remove_unused_tail_args ctx exact trampolined args = else args else args -let maybe_zero_or_nan = function - | J.ENum n -> ( - match J.Num.to_string n with - | "NaN" -> true - | "-0." | "0." | "0" | "-0" -> true - | _ -> false) - | J.EBin ((J.Bor | J.Lsr), _, _) -> false - | _ -> true - let rec translate_expr ctx queue loc x e level : _ * J.statement_list = match e with | Apply { f; args; exact } -> @@ -1359,32 +1351,32 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in bool (J.EBin (J.LeInt, cx, cy)), or_p px py, queue - | Eq, [ x; y ] -> + | Eq k, [ x; y ] -> let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in let e = - if not (maybe_zero_or_nan cx && maybe_zero_or_nan cy) - then bool (J.EBin (J.EqEqEq, cx, cy)) - else - bool - (J.call - (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) - [ cx; cy ] - loc) + match k with + | Not_float -> bool (J.EBin (J.EqEqEq, cx, cy)) + | Float | Unknown -> + bool + (J.call + (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) + [ cx; cy ] + loc) in e, or_p px py, queue - | Neq, [ x; y ] -> + | Neq k, [ x; y ] -> let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in let e = - if not (maybe_zero_or_nan cx && maybe_zero_or_nan cy) - then bool (J.EBin (J.NotEqEq, cx, cy)) - else - bool_not - (J.call - (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) - [ cx; cy ] - loc) + match k with + | Not_float -> bool (J.EBin (J.NotEqEq, cx, cy)) + | Float | Unknown -> + bool_not + (J.call + (J.dot (s_var "Object") (Utf8_string.of_string_exn "is")) + [ cx; cy ] + loc) in e, or_p px py, queue | IsInt, [ x ] -> @@ -1394,7 +1386,7 @@ let rec translate_expr ctx queue loc x e level : _ * J.statement_list = let (px, cx), queue = access_queue' ~ctx queue x in let (py, cy), queue = access_queue' ~ctx queue y in bool (J.EBin (J.LtInt, unsigned cx, unsigned cy)), or_p px py, queue - | (Vectlength | Array_get | Not | IsInt | Eq | Neq | Lt | Le | Ult), _ -> + | (Vectlength | Array_get | Not | IsInt | Eq _ | Neq _ | Lt | Le | Ult), _ -> assert false in res, [] @@ -2062,7 +2054,7 @@ let init () = ; "caml_int32_of_int", "%identity" ; "caml_int32_to_int", "%identity" ; "caml_int32_of_float", "caml_int_of_float" - ; "caml_int32_to_float", "%identity" + ; "caml_int32_to_float", "caml_float_of_int" ; "caml_int32_format", "caml_format_int" ; "caml_int32_of_string", "caml_int_of_string" ; "caml_int32_compare", "caml_int_compare" @@ -2081,7 +2073,7 @@ let init () = ; "caml_nativeint_of_int", "%identity" ; "caml_nativeint_to_int", "%identity" ; "caml_nativeint_of_float", "caml_int_of_float" - ; "caml_nativeint_to_float", "%identity" + ; "caml_nativeint_to_float", "caml_float_of_int" ; "caml_nativeint_of_int32", "%identity" ; "caml_nativeint_to_int32", "%identity" ; "caml_nativeint_format", "caml_format_int" @@ -2092,7 +2084,6 @@ let init () = ; "caml_int64_to_int", "caml_int64_to_int32" ; "caml_int64_of_nativeint", "caml_int64_of_int32" ; "caml_int64_to_nativeint", "caml_int64_to_int32" - ; "caml_float_of_int", "%identity" ; "caml_array_get_float", "caml_array_get" ; "caml_floatarray_get", "caml_array_get" ; "caml_array_get_addr", "caml_array_get" diff --git a/compiler/lib/global_flow.ml b/compiler/lib/global_flow.ml index 66ce9fe395..d5d5665b31 100644 --- a/compiler/lib/global_flow.ml +++ b/compiler/lib/global_flow.ml @@ -150,8 +150,9 @@ let possibly_mutable st x = Var.ISet.add st.variable_possibly_mutable x let expr_deps blocks st x e = match e with - | Constant _ | Prim ((Vectlength | Not | IsInt | Eq | Neq | Lt | Le | Ult), _) | Block _ - -> () + | Constant _ + | Prim ((Vectlength | Not | IsInt | Eq _ | Neq _ | Lt | Le | Ult), _) + | Block _ -> () | Special _ -> () | Prim ( ( Extern @@ -480,7 +481,7 @@ let propagate st ~update approx x = known | Top -> Top) | Prim (Array_get, _) -> Domain.others - | Prim ((Vectlength | Not | IsInt | Eq | Neq | Lt | Le | Ult), _) -> + | Prim ((Vectlength | Not | IsInt | Eq _ | Neq _ | Lt | Le | Ult), _) -> (* The result of these primitive is neither a function nor a block *) Domain.bot diff --git a/compiler/lib/javascript.ml b/compiler/lib/javascript.ml index 22ce1b3892..952b196769 100644 --- a/compiler/lib/javascript.ml +++ b/compiler/lib/javascript.ml @@ -42,8 +42,6 @@ module Num : sig val is_neg : t -> bool - val is_int : t -> bool - (** Arithmetic *) val add : t -> t -> t @@ -135,13 +133,6 @@ end = struct let is_neg s = Char.equal s.[0] '-' - let is_int = function - | "-0" -> false - | s -> - String.for_all s ~f:(function - | '0' .. '9' | '-' | '+' -> true - | _ -> false) - let neg s = match String.drop_prefix s ~prefix:"-" with | None -> "-" ^ s diff --git a/compiler/lib/javascript.mli b/compiler/lib/javascript.mli index bab8689abf..af02260783 100644 --- a/compiler/lib/javascript.mli +++ b/compiler/lib/javascript.mli @@ -43,8 +43,6 @@ module Num : sig val is_neg : t -> bool - val is_int : t -> bool - (** Arithmetic *) val add : t -> t -> t diff --git a/compiler/lib/parse_bytecode.ml b/compiler/lib/parse_bytecode.ml index 2068d2d233..98d8a2bdc1 100644 --- a/compiler/lib/parse_bytecode.ml +++ b/compiler/lib/parse_bytecode.ml @@ -2207,7 +2207,7 @@ and compile infos pc state instrs = infos (pc + 1) (State.pop 1 state) - ((Let (x, Prim (Eq, [ Pv y; Pv z ])), loc) :: instrs) + ((Let (x, Prim (Eq Unknown, [ Pv y; Pv z ])), loc) :: instrs) | NEQ -> let y, _ = State.accu state in let z, _ = State.peek 0 state in @@ -2219,7 +2219,7 @@ and compile infos pc state instrs = infos (pc + 1) (State.pop 1 state) - ((Let (x, Prim (Neq, [ Pv y; Pv z ])), loc) :: instrs) + ((Let (x, Prim (Neq Unknown, [ Pv y; Pv z ])), loc) :: instrs) | LTINT -> let y, _ = State.accu state in let z, _ = State.peek 0 state in @@ -2303,7 +2303,8 @@ and compile infos pc state instrs = let x, _ = State.accu state in let y = Var.fresh () in - ( (Let (y, Prim (Eq, [ Pc (Int (Targetint.of_int32_exn n)); Pv x ])), loc) + ( ( Let (y, Prim (Eq Not_float, [ Pc (Int (Targetint.of_int32_exn n)); Pv x ])) + , loc ) :: instrs , (Cond (y, (pc + offset + 2, []), (pc + 3, [])), loc) , state ) @@ -2313,7 +2314,8 @@ and compile infos pc state instrs = let x, _ = State.accu state in let y = Var.fresh () in - ( (Let (y, Prim (Eq, [ Pc (Int (Targetint.of_int32_exn n)); Pv x ])), loc) + ( ( Let (y, Prim (Eq Not_float, [ Pc (Int (Targetint.of_int32_exn n)); Pv x ])) + , loc ) :: instrs , (Cond (y, (pc + 3, []), (pc + offset + 2, [])), loc) , state ) diff --git a/compiler/lib/specialize_js.ml b/compiler/lib/specialize_js.ml index 3e75f1a1f8..ba56dd8c0b 100644 --- a/compiler/lib/specialize_js.ml +++ b/compiler/lib/specialize_js.ml @@ -294,6 +294,26 @@ let specialize_instrs ~target info l = instr (Pv y') :: (Let (y', Prim (Extern check, [ y; z ])), noloc) :: acc in aux info ((y, idx) :: checks) r acc + | Let (x, Prim (Eq Unknown, [ a; b ])) -> + let i = + match Flow.the_float_or_not_of info a, Flow.the_float_or_not_of info b with + | Not_float, (Not_float | Unknown | Float) | (Float | Unknown), Not_float -> + Let (x, Prim (Eq Not_float, [ a; b ])) + | Float, Float -> Let (x, Prim (Eq Float, [ a; b ])) + | Unknown, _ | _, Unknown -> i + in + + aux info checks r ((i, loc) :: acc) + | Let (x, Prim (Neq Unknown, [ a; b ])) -> + let i = + match Flow.the_float_or_not_of info a, Flow.the_float_or_not_of info b with + | Not_float, (Not_float | Unknown | Float) | (Float | Unknown), Not_float -> + Let (x, Prim (Neq Not_float, [ a; b ])) + | Float, Float -> Let (x, Prim (Neq Float, [ a; b ])) + | Unknown, _ | _, Unknown -> i + in + + aux info checks r ((i, loc) :: acc) | _ -> let i = specialize_instr ~target info i in aux info checks r ((i, loc) :: acc)) diff --git a/compiler/tests-compiler/compact.ml b/compiler/tests-compiler/compact.ml index 3c77eaacaa..8d23fa73b3 100644 --- a/compiler/tests-compiler/compact.ml +++ b/compiler/tests-compiler/compact.ml @@ -42,7 +42,7 @@ let rec f x y z = function(a, b, c){ var f = a, e = b, d = c; for(;;){ - if(Object.is(0, f) && Object.is(0, e) && Object.is(0, d)) return 1; + if(0 === f && 0 === e && 0 === d) return 1; var g = (d + f | 0) + e | 0; f = f + d | 0; e = e - d | 0; @@ -53,4 +53,5 @@ let rec f x y z = return; } (globalThis)); - //end |}] + //end + |}] diff --git a/compiler/tests-compiler/effects.ml b/compiler/tests-compiler/effects.ml index d0f2335b0e..47d185d0a9 100644 --- a/compiler/tests-compiler/effects.ml +++ b/compiler/tests-compiler/effects.ml @@ -49,7 +49,7 @@ let fff () = 10, [0, function(e, cont){ - return Object.is(e, E) + return e === E ? cont([0, function(k, cont){return cont(11);}]) : cont(0); }], @@ -60,4 +60,5 @@ let fff () = function(_c_){return caml_cps_call2(_c_, _b_, cont);}); }); } - //end |}] + //end + |}] diff --git a/compiler/tests-compiler/effects_continuations.ml b/compiler/tests-compiler/effects_continuations.ml index c742c54991..b7e7a7fdad 100644 --- a/compiler/tests-compiler/effects_continuations.ml +++ b/compiler/tests-compiler/effects_continuations.ml @@ -101,7 +101,6 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = print_fun_decl code (Some "loop3"); [%expect {| - function exceptions(s, cont){ try{var _t_ = runtime.caml_int_of_string(s), n = _t_;} catch(_x_){ @@ -209,4 +208,5 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = return _f_(l); }); } - //end |}] + //end + |}] diff --git a/compiler/tests-compiler/effects_exceptions.ml b/compiler/tests-compiler/effects_exceptions.ml index 4749f7e165..1b580f801a 100644 --- a/compiler/tests-compiler/effects_exceptions.ml +++ b/compiler/tests-compiler/effects_exceptions.ml @@ -55,7 +55,6 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = print_fun_decl code (Some "exceptions"); [%expect {| - function exceptions(s, cont){ try{var _k_ = runtime.caml_int_of_string(s), n = _k_;} catch(_o_){ @@ -93,7 +92,8 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = var _i_ = Stdlib[8], raise = caml_pop_trap(); return raise(caml_maybe_attach_backtrace(_i_, 1)); } - //end |}]; + //end + |}]; print_fun_decl code (Some "handler_is_loop"); [%expect {| diff --git a/compiler/tests-compiler/es6.ml b/compiler/tests-compiler/es6.ml index c9a505a6f0..f2192a0f12 100644 --- a/compiler/tests-compiler/es6.ml +++ b/compiler/tests-compiler/es6.ml @@ -59,14 +59,15 @@ let rec odd n' = function (a, b)=>{ var d = a, c = b; for(;;){ - if(Object.is(0, c)) return [0, d, 0]; + if(0 === c) return [0, d, 0]; if(1 === c) return [0, d, 1]; [c, d] = [(d - 1 | 0) - 1 | 0, (c - 1 | 0) - 1 | 0]; }}], "Test"); return;}) (globalThis); - //end |}]; + //end + |}]; let program = Util.compile_and_parse ~effects:false ~pretty:false ~flags:[] prog in Util.print_program program; [%expect @@ -80,7 +81,7 @@ let rec odd n' = function function(a, b){ var d = a, c = b; for(;;){ - if(Object.is(0, c)) return [0, d, 0]; + if(0 === c) return [0, d, 0]; if(1 === c) return [0, d, 1]; var e = (d - 1 | 0) - 1 | 0; d = (c - 1 | 0) - 1 | 0; @@ -91,4 +92,5 @@ let rec odd n' = function return; } (globalThis)); - //end |}] + //end + |}] diff --git a/compiler/tests-compiler/gh1320.ml b/compiler/tests-compiler/gh1320.ml index 7ff1c559eb..ed86db9b6b 100644 --- a/compiler/tests-compiler/gh1320.ml +++ b/compiler/tests-compiler/gh1320.ml @@ -50,7 +50,7 @@ let () = myfun () var f = function(x){ - return Object.is(0, x) ? 1 : runtime.caml_mul(i$0, app(g$0, x - 1 | 0)); + return 0 === x ? 1 : runtime.caml_mul(i$0, app(g$0, x - 1 | 0)); }, g = function(x){return app(f$0, x);}; let f$0 = f, g$0 = g; @@ -61,4 +61,5 @@ let () = myfun () i = _b_; } } - //end |}] + //end + |}] diff --git a/compiler/tests-compiler/gh1559.ml b/compiler/tests-compiler/gh1559.ml index 1546ed9159..9f83d8b258 100644 --- a/compiler/tests-compiler/gh1559.ml +++ b/compiler/tests-compiler/gh1559.ml @@ -96,7 +96,7 @@ let () = my_ref := 2 this_will_be_undefined = function(param){var _c_ = 1 === t$1[1] ? 1 : 0; return _c_ ? 1 : 2;}, i = t[1]; - if(Object.is(0, i)){var _a_ = this_will_be_undefined(0); break a;} + if(0 === i){var _a_ = this_will_be_undefined(0); break a;} if(1 === i) break; t = t$0; } @@ -204,7 +204,7 @@ let () = my_ref := 2 this_will_be_undefined = function(param){var _e_ = 1 === t$1[1] ? 1 : 0; return _e_ ? 1 : 2;}, i = t[1]; - if(Object.is(0, i)) break; + if(0 === i) break; if(1 === i) break b; t = t$0; } diff --git a/compiler/tests-compiler/gh747.ml b/compiler/tests-compiler/gh747.ml index f16cbbf5f4..adbb4cc285 100644 --- a/compiler/tests-compiler/gh747.ml +++ b/compiler/tests-compiler/gh747.ml @@ -314,89 +314,87 @@ end 88: function format_backtrace_slot(pos, slot){ 89: function info(is_raise){ 90: /*<>*/ return is_raise - 91: ? Object.is(0, pos) ? cst_Raised_at : cst_Re_raised_at - 92: : Object.is - 93: (0, pos) - 94: ? cst_Raised_by_primitive_operat - 95: : cst_Called_from; - 96: /*<>*/ } - 97: /*<>*/ if(0 === slot[0]){ - 98: /*<>*/ var - 99: _h_ = slot[5], - 100: _i_ = slot[4], - 101: _j_ = slot[3], - 102: _k_ = slot[6] ? cst_inlined : cst, - 103: _l_ = slot[2], - 104: _m_ = slot[7], - 105: /*<>*/ _n_ = info(slot[1]); - 106: /*<>*/ return [0, - 107: /*<>*/ caml_call8 - 108: (Stdlib_Printf[4], _a_, _n_, _m_, _l_, _k_, _j_, _i_, _h_)]; - 109: } - 110: if(slot[1]) /*<>*/ return 0; - 111: /*<>*/ /*<>*/ var _o_ = info(0); - 112: /*<>*/ return [0, - 113: /*<>*/ caml_call2(Stdlib_Printf[4], _b_, _o_)]; - 114: /*<>*/ } - 115: function print_exception_backtrace(outchan, backtrace){ - 116: /*<>*/ if(! backtrace) - 117: /*<>*/ return /*<>*/ caml_call2 - 118: (Stdlib_Printf[1], outchan, _d_); - 119: var a = backtrace[1], _f_ = a.length - 2 | 0, _e_ = 0; - 120: if(_f_ >= 0){ - 121: var i = _e_; - 122: for(;;){ - 123: /*<>*/ /*<>*/ var - 124: match = format_backtrace_slot(i, runtime.caml_check_bound(a, i)[1 + i]); - 125: if(match){ - 126: var str = match[1]; - 127: /*<>*/ /*<>*/ caml_call3 - 128: (Stdlib_Printf[1], outchan, _c_, str); - 129: } - 130: /*<>*/ /*<>*/ var _g_ = i + 1 | 0; - 131: if(Object.is(_f_, i)) break; - 132: i = _g_; - 133: } - 134: } - 135: return 0; - 136: /*<>*/ } - 137: function compare(left, right, e1, e2){ - 138: /*<>*/ if(0 === e1[0]){ - 139: var v1 = e1[1]; - 140: if(0 !== e2[0]) /*<>*/ return -1; - 141: var v2 = e2[1]; - 142: /*<>*/ return /*<>*/ caml_call2 - 143: (left, v1, v2); - 144: } - 145: var v1$0 = e1[1]; - 146: if(0 === e2[0]) /*<>*/ return 1; - 147: var v2$0 = e2[1]; - 148: /*<>*/ return /*<>*/ caml_call2 - 149: (right, v1$0, v2$0); - 150: /*<>*/ } - 151: /*<>*/ var - 152: /*<>*/ Either = [0, compare], - 153: Test = - 154: [0, - 155: executable_name, - 156: os_type, - 157: backend_type, - 158: 0, - 159: 32, - 160: 32, - 161: unix, - 162: win32, - 163: cygwin, - 164: max_array_length, - 165: max_floatarray_length, - 166: max_string_length, - 167: Unhandled, - 168: format_backtrace_slot, - 169: print_exception_backtrace, - 170: Either]; - 171: runtime.caml_register_global(12, Test, "Test"); - 172: return; - 173: /*<>*/ } - 174: (globalThis)); - 175: - 176: //# sourceMappingURL=test.map |}] + 91: ? 0 === pos ? cst_Raised_at : cst_Re_raised_at + 92: : 0 === pos ? cst_Raised_by_primitive_operat : cst_Called_from; + 93: /*<>*/ } + 94: /*<>*/ if(0 === slot[0]){ + 95: /*<>*/ var + 96: _h_ = slot[5], + 97: _i_ = slot[4], + 98: _j_ = slot[3], + 99: _k_ = slot[6] ? cst_inlined : cst, + 100: _l_ = slot[2], + 101: _m_ = slot[7], + 102: /*<>*/ _n_ = info(slot[1]); + 103: /*<>*/ return [0, + 104: /*<>*/ caml_call8 + 105: (Stdlib_Printf[4], _a_, _n_, _m_, _l_, _k_, _j_, _i_, _h_)]; + 106: } + 107: if(slot[1]) /*<>*/ return 0; + 108: /*<>*/ /*<>*/ var _o_ = info(0); + 109: /*<>*/ return [0, + 110: /*<>*/ caml_call2(Stdlib_Printf[4], _b_, _o_)]; + 111: /*<>*/ } + 112: function print_exception_backtrace(outchan, backtrace){ + 113: /*<>*/ if(! backtrace) + 114: /*<>*/ return /*<>*/ caml_call2 + 115: (Stdlib_Printf[1], outchan, _d_); + 116: var a = backtrace[1], _f_ = a.length - 2 | 0, _e_ = 0; + 117: if(_f_ >= 0){ + 118: var i = _e_; + 119: for(;;){ + 120: /*<>*/ /*<>*/ var + 121: match = format_backtrace_slot(i, runtime.caml_check_bound(a, i)[1 + i]); + 122: if(match){ + 123: var str = match[1]; + 124: /*<>*/ /*<>*/ caml_call3 + 125: (Stdlib_Printf[1], outchan, _c_, str); + 126: } + 127: /*<>*/ /*<>*/ var _g_ = i + 1 | 0; + 128: if(_f_ === i) break; + 129: i = _g_; + 130: } + 131: } + 132: return 0; + 133: /*<>*/ } + 134: function compare(left, right, e1, e2){ + 135: /*<>*/ if(0 === e1[0]){ + 136: var v1 = e1[1]; + 137: if(0 !== e2[0]) /*<>*/ return -1; + 138: var v2 = e2[1]; + 139: /*<>*/ return /*<>*/ caml_call2 + 140: (left, v1, v2); + 141: } + 142: var v1$0 = e1[1]; + 143: if(0 === e2[0]) /*<>*/ return 1; + 144: var v2$0 = e2[1]; + 145: /*<>*/ return /*<>*/ caml_call2 + 146: (right, v1$0, v2$0); + 147: /*<>*/ } + 148: /*<>*/ var + 149: /*<>*/ Either = [0, compare], + 150: Test = + 151: [0, + 152: executable_name, + 153: os_type, + 154: backend_type, + 155: 0, + 156: 32, + 157: 32, + 158: unix, + 159: win32, + 160: cygwin, + 161: max_array_length, + 162: max_floatarray_length, + 163: max_string_length, + 164: Unhandled, + 165: format_backtrace_slot, + 166: print_exception_backtrace, + 167: Either]; + 168: runtime.caml_register_global(12, Test, "Test"); + 169: return; + 170: /*<>*/ } + 171: (globalThis)); + 172: + 173: //# sourceMappingURL=test.map + |}] diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index 807c47a3f8..cbe2c6bb41 100644 --- a/compiler/tests-compiler/global_deadcode.ml +++ b/compiler/tests-compiler/global_deadcode.ml @@ -68,7 +68,7 @@ let%expect_test "Eliminates unused functions from functor" = function add(x, t){ if(! t) return [0, 0, x, 0, 1]; var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); - if(Object.is(0, c)) return t; + if(0 === c) return t; if(0 <= c){var rr = add(x, r); return Object.is(r, rr) ? t : bal(l, v, rr);} var ll = add(x, l); return Object.is(l, ll) ? t : bal(ll, v, r); @@ -83,13 +83,14 @@ let%expect_test "Eliminates unused functions from functor" = v = param$0[2], l = param$0[1], c = caml_call2(Ord[1], x, v); - if(Object.is(0, c)) return v; + if(0 === c) return v; var r$0 = 0 <= c ? r : l; param$0 = r$0; } } return [0, 0, add, singleton, find]; - //end |}] + //end + |}] let%expect_test "Omit unused fields" = let program = diff --git a/compiler/tests-compiler/lazy.ml b/compiler/tests-compiler/lazy.ml index 6c6a966712..8b6cecfd59 100644 --- a/compiler/tests-compiler/lazy.ml +++ b/compiler/tests-compiler/lazy.ml @@ -34,7 +34,7 @@ let%expect_test "static eval of string get" = [%expect {| function do_the_lazy_rec(n){ - if(Object.is(0, n)) return 0; + if(0 === n) return 0; var _b_ = do_the_lazy_rec(n - 1 | 0), _c_ = runtime.caml_obj_tag(lz); a: if(250 === _c_) @@ -45,4 +45,5 @@ let%expect_test "static eval of string get" = } return [0, _d_, _b_]; } - //end |}] + //end + |}] diff --git a/compiler/tests-compiler/loops.ml b/compiler/tests-compiler/loops.ml index a4ea92682b..426c02abe3 100644 --- a/compiler/tests-compiler/loops.ml +++ b/compiler/tests-compiler/loops.ml @@ -283,7 +283,8 @@ let f t x = } return - 2; } - //end |}] + //end + |}] let%expect_test "loop-and-switch" = let program = @@ -311,7 +312,7 @@ in loop x function inspect(x){ var x$1 = x; for(;;){ - if(Object.is(0, x$1)) return 1; + if(0 === x$1) return 1; if(1 === x$1) break; var x$2 = x$1 + 1 | 0; x$1 = x$2; @@ -334,7 +335,8 @@ in loop x return _a_ + 2 | 0; } } - //end |}] + //end + |}] let%expect_test "buffer.add_substitute" = let program = @@ -501,13 +503,13 @@ let add_substitute = var lim = caml_ml_string_length(s), k = k$2, stop = new_start; for(;;){ if(lim <= stop) throw caml_maybe_attach_backtrace(Stdlib[8], 1); - if(Object.is(caml_string_get(s, stop), opening)){ + if(caml_string_get(s, stop) === opening){ var i = stop + 1 | 0, k$0 = k + 1 | 0; k = k$0; stop = i; } - else if(Object.is(caml_string_get(s, stop), closing)){ - if(Object.is(0, k)) break; + else if(caml_string_get(s, stop) === closing){ + if(0 === k) break; var i$0 = stop + 1 | 0, k$1 = k - 1 | 0; k = k$1; stop = i$0; @@ -545,7 +547,8 @@ let add_substitute = } } } - //end |}] + //end + |}] let%expect_test "Bytes.trim" = let program = diff --git a/compiler/tests-compiler/match_with_exn.ml b/compiler/tests-compiler/match_with_exn.ml index 3a2146f938..be2699c7d9 100644 --- a/compiler/tests-compiler/match_with_exn.ml +++ b/compiler/tests-compiler/match_with_exn.ml @@ -78,13 +78,13 @@ let fun2 () = try{var i$1 = caml_call1(Stdlib_Random[5], 2);} catch(_e_){ var _d_ = caml_wrap_exception(_e_); - if(! Object.is(_d_[1], A)) throw caml_maybe_attach_backtrace(_d_, 0); + if(_d_[1] !== A) throw caml_maybe_attach_backtrace(_d_, 0); var i = _d_[2]; if(2 !== i) return i + 2 | 0; var i$0 = i; break a; } - if(! Object.is(0, i$1)) return i$1 + 1 | 0; + if(0 !== i$1) return i$1 + 1 | 0; var i$0 = i$1; } return i$0; @@ -96,15 +96,13 @@ let fun2 () = try{var i$0 = caml_call1(Stdlib_Random[5], 2);} catch(_c_){ var _a_ = caml_wrap_exception(_c_); - if(Object.is(_a_[1], A)){ - var _b_ = _a_[2]; - if(2 === _b_){var i = _b_; break a;} - } + if(_a_[1] === A){var _b_ = _a_[2]; if(2 === _b_){var i = _b_; break a;}} throw caml_maybe_attach_backtrace(_a_, 0); } - if(! Object.is(0, i$0)) return i$0 + 1 | 0; + if(0 !== i$0) return i$0 + 1 | 0; var i = i$0; } return i; } - //end |}] + //end + |}] diff --git a/compiler/tests-compiler/mutable_closure.ml b/compiler/tests-compiler/mutable_closure.ml index e782177626..6a724b1cea 100644 --- a/compiler/tests-compiler/mutable_closure.ml +++ b/compiler/tests-compiler/mutable_closure.ml @@ -130,7 +130,7 @@ let%expect_test _ = var counter$1 = counter + 1 | 0; return g$0(counter$1, _f_); } - if(Object.is(0, n)) return i$0; + if(0 === n) return i$0; var _g_ = n - 1 | 0; if(counter >= 50) return caml_trampoline_return(g$0, [0, _g_]); var counter$0 = counter + 1 | 0; @@ -145,7 +145,7 @@ let%expect_test _ = var counter$1 = counter + 1 | 0; return f$1(counter$1, _d_); } - if(Object.is(0, n)) return i$0; + if(0 === n) return i$0; var _e_ = n - 1 | 0; if(counter >= 50) return caml_trampoline_return(f$1, [0, _e_]); var counter$0 = counter + 1 | 0; @@ -167,7 +167,8 @@ let%expect_test _ = if(runtime.caml_equal(indirect$0, direct$0)) return 0; throw caml_maybe_attach_backtrace([0, Assert_failure, _a_], 1); } - //end|}] + //end + |}] let%expect_test _ = let prog = {| diff --git a/compiler/tests-compiler/tailcall.ml b/compiler/tests-compiler/tailcall.ml index a2b067c30b..3d84d2a37d 100644 --- a/compiler/tests-compiler/tailcall.ml +++ b/compiler/tests-compiler/tailcall.ml @@ -46,7 +46,7 @@ let%expect_test _ = {| function fun1(param){ function odd$0(counter, x){ - if(Object.is(0, x)) return 0; + if(0 === x) return 0; var _f_ = x - 1 | 0; if(counter >= 50) return caml_trampoline_return(even$0, [0, _f_]); var counter$0 = counter + 1 | 0; @@ -54,7 +54,7 @@ let%expect_test _ = } function odd(x){return caml_trampoline(odd$0(0, x));} function even$0(counter, x){ - if(Object.is(0, x)) return 1; + if(0 === x) return 1; var _e_ = x - 1 | 0; if(counter >= 50) return caml_trampoline_return(odd$0, [0, _e_]); var counter$0 = counter + 1 | 0; @@ -67,7 +67,8 @@ let%expect_test _ = try{odd(5000); var _c_ = log_success(0); return _c_;} catch(_d_){return caml_call1(log_failure, cst_too_much_recursion);} } - //end |}] + //end + |}] let%expect_test _ = let prog = @@ -95,11 +96,11 @@ let%expect_test _ = {| function fun1(param){ function odd$0(x){ - return Object.is(0, x) ? 0 : caml_trampoline_return(even$0, [0, x - 1 | 0]); + return 0 === x ? 0 : caml_trampoline_return(even$0, [0, x - 1 | 0]); } function odd(x){return caml_trampoline(odd$0(x));} function even$0(x){ - return Object.is(0, x) ? 1 : caml_trampoline_return(odd$0, [0, x - 1 | 0]); + return 0 === x ? 1 : caml_trampoline_return(odd$0, [0, x - 1 | 0]); } function even(x){return caml_trampoline(even$0(x));} var _b_ = even(1); @@ -108,4 +109,5 @@ let%expect_test _ = try{odd(5000); var _c_ = log_success(0); return _c_;} catch(_d_){return caml_call1(log_failure, cst_too_much_recursion);} } - //end |}] + //end + |}] diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 349c6671a4..dc6860754b 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -637,7 +637,7 @@ if(0 >= len$0) /*<>*/ return 0; /*<>*/ /*<>*/ var r = /*<>*/ caml_ml_input(ic, s, ofs$0, len$0); - /*<>*/ if( /*<>*/ Object.is(0, r)) + /*<>*/ if(0 === r) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (End_of_file, 1); var len$1 = len$0 - r | 0, ofs$1 = ofs$0 + r | 0; @@ -678,7 +678,7 @@ /*<>*/ for(;;){ /*<>*/ /*<>*/ var n = /*<>*/ runtime.caml_ml_input_scan_line(chan); - /*<>*/ if( /*<>*/ Object.is(0, n)){ + /*<>*/ if(0 === n){ if(! accu) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (End_of_file, 1); @@ -1335,7 +1335,7 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _a_ = Object.is(0, l) ? 0 : 1, + _a_ = 0 !== l ? 1 : 0, _b_ = _a_ ? /*<>*/ runtime.caml_ephe_blit_key @@ -1488,11 +1488,10 @@ [248, "CamlinternalLazy.Undefined", runtime.caml_fresh_oo_id(0)]; function force_gen_lazy_block(only_val, blk){ /*<>*/ if - (! - Object.is - (0, - /*<>*/ runtime.caml_lazy_update_to_forcing - (blk))) + (0 + !== + /*<>*/ runtime.caml_lazy_update_to_forcing + (blk)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Undefined, 1); if(only_val){ @@ -1536,14 +1535,12 @@ function force_gen(only_val, lzv){ /*<>*/ /*<>*/ var t = /*<>*/ runtime.caml_obj_tag(lzv); - if(Object.is(t, Stdlib_Obj[12])) + if(t === Stdlib_Obj[12]) /*<>*/ return lzv[1]; - if(Object.is(t, Stdlib_Obj[6])) + if(t === Stdlib_Obj[6]) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Undefined, 1); - return ! Object.is(t, Stdlib_Obj[8]) - ? lzv - : force_gen_lazy_block(only_val, lzv); + return t !== Stdlib_Obj[8] ? lzv : force_gen_lazy_block(only_val, lzv); /*<>*/ } var CamlinternalLazy = [0, Undefined, force_lazy_block, force_gen]; runtime.caml_register_global(2, CamlinternalLazy, "CamlinternalLazy"); @@ -1586,22 +1583,18 @@ /*<>*/ /*<>*/ var t = /*<>*/ caml_obj_tag(v); if - (! - Object.is(t, Stdlib_Obj[12]) - && - ! - Object.is(t, Stdlib_Obj[8]) - && ! Object.is(t, Stdlib_Obj[6]) && ! Object.is(t, Stdlib_Obj[16])) + (t !== Stdlib_Obj[12] + && t !== Stdlib_Obj[8] && t !== Stdlib_Obj[6] && t !== Stdlib_Obj[16]) /*<>*/ return v; /*<>*/ return /*<>*/ runtime.caml_lazy_make_forward (v); /*<>*/ } function is_val(l){ /*<>*/ /*<>*/ var _i_ = Stdlib_Obj[8]; - /*<>*/ return /*<>*/ Object.is - ( /*<>*/ caml_obj_tag(l), _i_) - ? 0 - : 1; + /*<>*/ return /*<>*/ caml_obj_tag(l) + !== _i_ + ? 1 + : 0; /*<>*/ } function map(f, x){ /*<>*/ return [246, @@ -2059,8 +2052,7 @@ ys$1 = match$0[2], y = match$0[1], /*<>*/ c = /*<>*/ caml_call2(cmp, x, y); - /*<>*/ if(! /*<>*/ Object.is(0, c)) - /*<>*/ return c; + /*<>*/ if(0 !== c) /*<>*/ return c; xs$0 = xs$1; ys$0 = ys$1; } @@ -2156,7 +2148,7 @@ /*<>*/ return [0, s, next];}; /*<>*/ } function take_aux(n, xs){ - /*<>*/ return Object.is(0, n) + /*<>*/ return 0 === n ? empty : function (param){ @@ -2175,8 +2167,8 @@ /*<>*/ } function drop(n, xs){ /*<>*/ return 0 <= n - ? Object.is - (0, n) + ? 0 + === n ? xs : function (param){ @@ -2188,8 +2180,7 @@ /*<>*/ var xs$1 = match[2], /*<>*/ n$1 = n$0 - 1 | 0; - /*<>*/ if - ( /*<>*/ Object.is(0, n$1)) + /*<>*/ if(0 === n$1) /*<>*/ return /*<>*/ caml_call1 (xs$1, 0); n$0 = n$1; @@ -3086,7 +3077,7 @@ function pred(u){ /*<>*/ return u === 57344 ? lo_bound - : Object.is(u, 0) ? caml_call1(Stdlib[1], err_no_pred) : u - 1 | 0; + : u === 0 ? caml_call1(Stdlib[1], err_no_pred) : u - 1 | 0; /*<>*/ } function is_valid(i){ /*<>*/ var @@ -3278,8 +3269,7 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[2], cst_nth); var l$1 = l$0[2], a = l$0[1]; - /*<>*/ if( /*<>*/ Object.is(0, n$0)) - /*<>*/ return a; + /*<>*/ if(0 === n$0) /*<>*/ return a; /*<>*/ /*<>*/ var n$1 = n$0 - 1 | 0; l$0 = l$1; n$0 = n$1; @@ -3293,7 +3283,7 @@ /*<>*/ for(;;){ if(! l$0) /*<>*/ return 0; var l$1 = l$0[2], a = l$0[1]; - /*<>*/ if( /*<>*/ Object.is(0, n$0)) + /*<>*/ if(0 === n$0) /*<>*/ return [0, a]; /*<>*/ /*<>*/ var n$1 = n$0 - 1 | 0; l$0 = l$1; @@ -3334,7 +3324,7 @@ (Stdlib[1], cst_List_init); var last = len - 1 | 0, i$1 = 0; if(last < 0) /*<>*/ return 0; - if(Object.is(0, last)) + if(0 === last) /*<>*/ return [0, /*<>*/ caml_call1(f, i$1), 0]; @@ -3349,7 +3339,7 @@ if(last < i) dst[1 + offset] = 0; else{ - if(! Object.is(i, last)){ + if(i !== last){ /*<>*/ var /*<>*/ r1$0 = /*<>*/ caml_call1(f, i), /*<>*/ r2$0 = @@ -3752,7 +3742,7 @@ var l = param$0[2], a = param$0[1], - _B_ = Object.is(0, /*<>*/ caml_compare(a, x)) ? 1 : 0; + _B_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; if(_B_) return _B_; param$0 = l; } @@ -3774,8 +3764,7 @@ (Stdlib[8], 1); var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(a, x))) + (0 === /*<>*/ caml_compare(a, x)) /*<>*/ return b; param$0 = l; } @@ -3786,8 +3775,7 @@ if(! param$0) /*<>*/ return 0; var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(a, x))) + (0 === /*<>*/ caml_compare(a, x)) /*<>*/ return [0, b]; param$0 = l; } @@ -3819,7 +3807,7 @@ var l = param$0[2], a = param$0[1][1], - _z_ = Object.is(0, /*<>*/ caml_compare(a, x)) ? 1 : 0; + _z_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; if(_z_) return _z_; param$0 = l; } @@ -3836,8 +3824,8 @@ function remove_assoc(x, param){ /*<>*/ if(! param) /*<>*/ return 0; var l = param[2], pair = param[1], a = pair[1]; - /*<>*/ return /*<>*/ Object.is - (0, /*<>*/ caml_compare(a, x)) + /*<>*/ return 0 + === /*<>*/ caml_compare(a, x) ? l : [0, pair, remove_assoc(x, l)]; } @@ -4348,7 +4336,7 @@ /*<>*/ c$0 = /*<>*/ caml_call2(cmp, x1, x2), /*<>*/ s = - /*<>*/ Object.is(0, c$0) + 0 === c$0 ? [0, x1, 0] : 0 <= c$0 ? [0, x2, [0, x1, 0]] : [0, x1, [0, x2, 0]]; /*<>*/ return [0, s, tl]; @@ -4367,26 +4355,26 @@ x1$0 = l[1], /*<>*/ c$1 = /*<>*/ caml_call2(cmp, x1$0, x2$0); - /*<>*/ if( /*<>*/ Object.is(0, c$1)) + /*<>*/ if(0 === c$1) /*<>*/ var /*<>*/ c$2 = /*<>*/ caml_call2(cmp, x2$0, x3), /*<>*/ _n_ = - /*<>*/ Object.is(0, c$2) + 0 === c$2 ? [0, x2$0, 0] : 0 <= c$2 ? [0, x3, [0, x2$0, 0]] : [0, x2$0, [0, x3, 0]], s$0 = _n_; else if(0 <= c$1){ /*<>*/ /*<>*/ var c$3 = /*<>*/ caml_call2(cmp, x1$0, x3); - /*<>*/ if( /*<>*/ Object.is(0, c$3)) + /*<>*/ if(0 === c$3) var _o_ = [0, x2$0, [0, x1$0, 0]]; else if(0 <= c$3) /*<>*/ var /*<>*/ c$4 = /*<>*/ caml_call2(cmp, x2$0, x3), /*<>*/ _p_ = - /*<>*/ Object.is(0, c$4) + 0 === c$4 ? [0, x2$0, [0, x1$0, 0]] : 0 <= c$4 @@ -4400,14 +4388,14 @@ else{ /*<>*/ /*<>*/ var c$5 = /*<>*/ caml_call2(cmp, x2$0, x3); - /*<>*/ if( /*<>*/ Object.is(0, c$5)) + /*<>*/ if(0 === c$5) var _q_ = [0, x1$0, [0, x2$0, 0]]; else if(0 <= c$5) /*<>*/ var /*<>*/ c$6 = /*<>*/ caml_call2(cmp, x1$0, x3), /*<>*/ _r_ = - /*<>*/ Object.is(0, c$6) + 0 === c$6 ? [0, x1$0, [0, x2$0, 0]] : 0 <= c$6 @@ -4444,7 +4432,7 @@ h1 = l1[1], /*<>*/ c = /*<>*/ caml_call2(cmp, h1, h2); - /*<>*/ if( /*<>*/ Object.is(0, c)){ + /*<>*/ if(0 === c){ /*<>*/ /*<>*/ var accu$0 = [0, h1, accu]; l1 = t1; @@ -4484,7 +4472,7 @@ /*<>*/ c$0 = /*<>*/ caml_call2(cmp, x1, x2), /*<>*/ s = - /*<>*/ Object.is(0, c$0) + 0 === c$0 ? [0, x1, 0] : 0 < c$0 ? [0, x1, [0, x2, 0]] : [0, x2, [0, x1, 0]]; /*<>*/ return [0, s, tl]; @@ -4503,19 +4491,19 @@ x1$0 = l[1], /*<>*/ c$1 = /*<>*/ caml_call2(cmp, x1$0, x2$0); - /*<>*/ if( /*<>*/ Object.is(0, c$1)) + /*<>*/ if(0 === c$1) /*<>*/ var /*<>*/ c$2 = /*<>*/ caml_call2(cmp, x2$0, x3), /*<>*/ _g_ = - /*<>*/ Object.is(0, c$2) + 0 === c$2 ? [0, x2$0, 0] : 0 < c$2 ? [0, x2$0, [0, x3, 0]] : [0, x3, [0, x2$0, 0]], s$0 = _g_; else if(0 < c$1){ /*<>*/ /*<>*/ var c$3 = /*<>*/ caml_call2(cmp, x2$0, x3); - /*<>*/ if( /*<>*/ Object.is(0, c$3)) + /*<>*/ if(0 === c$3) var _h_ = [0, x1$0, [0, x2$0, 0]]; else if(0 < c$3) var _h_ = [0, x1$0, [0, x2$0, [0, x3, 0]]]; @@ -4524,7 +4512,7 @@ /*<>*/ c$4 = /*<>*/ caml_call2(cmp, x1$0, x3), /*<>*/ _i_ = - /*<>*/ Object.is(0, c$4) + 0 === c$4 ? [0, x1$0, [0, x2$0, 0]] : 0 < c$4 @@ -4536,7 +4524,7 @@ else{ /*<>*/ /*<>*/ var c$5 = /*<>*/ caml_call2(cmp, x1$0, x3); - /*<>*/ if( /*<>*/ Object.is(0, c$5)) + /*<>*/ if(0 === c$5) var _j_ = [0, x2$0, [0, x1$0, 0]]; else if(0 < c$5) var _j_ = [0, x2$0, [0, x1$0, [0, x3, 0]]]; @@ -4545,7 +4533,7 @@ /*<>*/ c$6 = /*<>*/ caml_call2(cmp, x2$0, x3), /*<>*/ _k_ = - /*<>*/ Object.is(0, c$6) + 0 === c$6 ? [0, x2$0, [0, x1$0, 0]] : 0 < c$6 @@ -4580,7 +4568,7 @@ h1 = l1[1], /*<>*/ c = /*<>*/ caml_call2(cmp, h1, h2); - /*<>*/ if( /*<>*/ Object.is(0, c)){ + /*<>*/ if(0 === c){ /*<>*/ /*<>*/ var accu$0 = [0, h1, accu]; l1 = t1; @@ -4624,7 +4612,7 @@ function compare_length_with(l, n){ /*<>*/ var l$0 = l, n$0 = n; /*<>*/ for(;;){ - if(! l$0) return Object.is(0, n$0) ? 0 : 0 < n$0 ? -1 : 1; + if(! l$0) return 0 === n$0 ? 0 : 0 < n$0 ? -1 : 1; var l$1 = l$0[2]; /*<>*/ if(0 >= n$0) /*<>*/ return 1; /*<>*/ /*<>*/ var n$1 = n$0 - 1 | 0; @@ -4668,8 +4656,7 @@ a2 = l2$0[1], /*<>*/ c = /*<>*/ caml_call2(cmp, a1, a2); - /*<>*/ if(! /*<>*/ Object.is(0, c)) - /*<>*/ return c; + /*<>*/ if(0 !== c) /*<>*/ return c; l1$0 = l1$1; l2$0 = l2$1; } @@ -4919,7 +4906,7 @@ for(;;){ caml_bytes_unsafe_set(s, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; - if(Object.is(_ap_, i)) break; + if(_ap_ === i) break; i = _aq_; } } @@ -5054,7 +5041,7 @@ /*<>*/ /*<>*/ caml_call1 (f, caml_bytes_unsafe_get(a, i)); /*<>*/ /*<>*/ var _am_ = i + 1 | 0; - if(Object.is(_al_, i)) break; + if(_al_ === i) break; i = _am_; } } @@ -5070,7 +5057,7 @@ /*<>*/ /*<>*/ caml_call2 (f, i, caml_bytes_unsafe_get(a, i)); /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; - if(Object.is(_ai_, i)) break; + if(_ai_ === i) break; i = _aj_; } } @@ -5203,12 +5190,11 @@ } n[1] = n[1] + _ad_ | 0; /*<>*/ /*<>*/ var _ae_ = i$0 + 1 | 0; - if(Object.is(___, i$0)) break; + if(___ === i$0) break; i$0 = _ae_; } } - if(Object.is(n[1], caml_ml_bytes_length(s))) - /*<>*/ return s; + if(n[1] === caml_ml_bytes_length(s)) /*<>*/ return s; /*<>*/ /*<>*/ var s$0 = /*<>*/ caml_create_bytes(n[1]); n[1] = 0; @@ -5275,7 +5261,7 @@ } n[1]++; /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(Object.is(_aa_, i)) break; + if(_aa_ === i) break; i = _ab_; } } @@ -5287,8 +5273,7 @@ /*<>*/ } function map(f, s){ /*<>*/ var l = caml_ml_bytes_length(s); - /*<>*/ if( /*<>*/ Object.is(0, l)) - /*<>*/ return s; + /*<>*/ if(0 === l) /*<>*/ return s; /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), @@ -5302,7 +5287,7 @@ i, /*<>*/ caml_call1(f, caml_bytes_unsafe_get(s, i))); /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; - if(Object.is(_X_, i)) break; + if(_X_ === i) break; i = _Y_; } } @@ -5310,8 +5295,7 @@ /*<>*/ } function mapi(f, s){ /*<>*/ var l = caml_ml_bytes_length(s); - /*<>*/ if( /*<>*/ Object.is(0, l)) - /*<>*/ return s; + /*<>*/ if(0 === l) /*<>*/ return s; /*<>*/ var /*<>*/ r = /*<>*/ caml_create_bytes(l), @@ -5325,7 +5309,7 @@ i, /*<>*/ caml_call2(f, i, caml_bytes_unsafe_get(s, i))); /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(Object.is(_U_, i)) break; + if(_U_ === i) break; i = _V_; } } @@ -5343,7 +5327,7 @@ /*<>*/ caml_call2 (f, r[1], caml_bytes_unsafe_get(a, i)); /*<>*/ /*<>*/ var _S_ = i + 1 | 0; - if(Object.is(_R_, i)) break; + if(_R_ === i) break; i = _S_; } } @@ -5361,7 +5345,7 @@ /*<>*/ caml_call2 (f, caml_bytes_unsafe_get(a, i), r[1]); /*<>*/ /*<>*/ var _P_ = i - 1 | 0; - if(Object.is(0, i)) break; + if(0 === i) break; i = _P_; } } @@ -5370,7 +5354,7 @@ function exists(p, s){ /*<>*/ var n = caml_ml_bytes_length(s), i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call1(p, caml_bytes_unsafe_get(s, i))) /*<>*/ return 1; @@ -5381,7 +5365,7 @@ function for_all(p, s){ /*<>*/ var n = caml_ml_bytes_length(s), i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 1; + if(i === n) /*<>*/ return 1; /*<>*/ if (! /*<>*/ caml_call1(p, caml_bytes_unsafe_get(s, i))) /*<>*/ return 0; @@ -5396,7 +5380,7 @@ /*<>*/ return map(Stdlib_Char[3], s); /*<>*/ } function apply1(f, s){ - /*<>*/ if(Object.is(0, caml_ml_bytes_length(s))) + /*<>*/ if(0 === caml_ml_bytes_length(s)) /*<>*/ return s; /*<>*/ /*<>*/ var r = copy(s); caml_bytes_unsafe_set @@ -5419,11 +5403,8 @@ if(! _N_) return _N_; var i = 0; /*<>*/ for(;;){ - if(Object.is(i, len_pre)) /*<>*/ return 1; - if - (! - Object.is - (caml_bytes_unsafe_get(s, i), caml_bytes_unsafe_get(prefix, i))) + if(i === len_pre) /*<>*/ return 1; + if(caml_bytes_unsafe_get(s, i) !== caml_bytes_unsafe_get(prefix, i)) /*<>*/ return 0; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -5438,12 +5419,10 @@ if(! _M_) return _M_; var i = 0; /*<>*/ for(;;){ - if(Object.is(i, len_suf)) /*<>*/ return 1; + if(i === len_suf) /*<>*/ return 1; if - (! - Object.is - (caml_bytes_unsafe_get(s, diff + i | 0), - caml_bytes_unsafe_get(suffix, i))) + (caml_bytes_unsafe_get(s, diff + i | 0) + !== caml_bytes_unsafe_get(suffix, i)) /*<>*/ return 0; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -5455,7 +5434,7 @@ if(lim <= i$0) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if(Object.is(caml_bytes_unsafe_get(s, i$0), c)) + if(caml_bytes_unsafe_get(s, i$0) === c) /*<>*/ return i$0; var i$1 = i$0 + 1 | 0; i$0 = i$1; @@ -5469,7 +5448,7 @@ /*<>*/ var i$0 = i; /*<>*/ for(;;){ if(lim <= i$0) /*<>*/ return 0; - if(Object.is(caml_bytes_unsafe_get(s, i$0), c)) + if(caml_bytes_unsafe_get(s, i$0) === c) /*<>*/ return [0, i$0]; var i$1 = i$0 + 1 | 0; i$0 = i$1; @@ -5498,7 +5477,7 @@ if(0 > i$0) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if(Object.is(caml_bytes_unsafe_get(s, i$0), c)) + if(caml_bytes_unsafe_get(s, i$0) === c) /*<>*/ return i$0; var i$1 = i$0 - 1 | 0; i$0 = i$1; @@ -5518,7 +5497,7 @@ /*<>*/ var i$0 = i; /*<>*/ for(;;){ if(0 > i$0) /*<>*/ return 0; - if(Object.is(caml_bytes_unsafe_get(s, i$0), c)) + if(caml_bytes_unsafe_get(s, i$0) === c) /*<>*/ return [0, i$0]; var i$1 = i$0 - 1 | 0; i$0 = i$1; @@ -5581,13 +5560,13 @@ if(_C_ >= 0){ var i = _C_; for(;;){ - if(Object.is(caml_bytes_unsafe_get(s, i), sep)){ + if(caml_bytes_unsafe_get(s, i) === sep){ var _E_ = r[1]; r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _E_]; j[1] = i; } /*<>*/ /*<>*/ var _F_ = i - 1 | 0; - if(Object.is(0, i)) break; + if(0 === i) break; i = _F_; } } @@ -5596,7 +5575,7 @@ /*<>*/ } function to_seq(s){ function aux(i, param){ - /*<>*/ if(Object.is(i, caml_ml_bytes_length(s))) + /*<>*/ if(i === caml_ml_bytes_length(s)) /*<>*/ return 0; /*<>*/ var /*<>*/ x = @@ -5612,7 +5591,7 @@ /*<>*/ } function to_seqi(s){ function aux(i, param){ - /*<>*/ if(Object.is(i, caml_ml_bytes_length(s))) + /*<>*/ if(i === caml_ml_bytes_length(s)) /*<>*/ return 0; /*<>*/ var /*<>*/ x = @@ -5633,15 +5612,14 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Seq[4], function(c){ - /*<>*/ if - (Object.is(n[1], caml_ml_bytes_length(buf[1]))){ + /*<>*/ if(n[1] === caml_ml_bytes_length(buf[1])){ /*<>*/ /*<>*/ var new_len = /*<>*/ caml_call2 (Stdlib_Int[10], 2 * caml_ml_bytes_length(buf[1]) | 0, Stdlib_Sys[12]); - if(Object.is(caml_ml_bytes_length(buf[1]), new_len)) + if(caml_ml_bytes_length(buf[1]) === new_len) /*<>*/ /*<>*/ caml_call1 (Stdlib[2], cst_Bytes_of_seq_cannot_grow_b); /*<>*/ /*<>*/ var @@ -6179,7 +6157,7 @@ /*<>*/ /*<>*/ var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; if(0 <= i && max >= i){ - if(Object.is(i, max)) + if(i === max) /*<>*/ return /*<>*/ caml_call1 (dec_invalid, 1); /*<>*/ /*<>*/ var @@ -6237,7 +6215,7 @@ /*<>*/ var max = caml_ml_bytes_length(b) - 1 | 0, i = 0; /*<>*/ for(;;){ if(max < i) /*<>*/ return 1; - if(Object.is(i, max)) /*<>*/ return 0; + if(i === max) /*<>*/ return 0; /*<>*/ /*<>*/ var u = unsafe_get_uint16_be(b, i); if(55296 <= u && 57343 >= u){ @@ -6262,7 +6240,7 @@ /*<>*/ /*<>*/ var max = /*<>*/ caml_ml_bytes_length(b) - 1 | 0; if(0 <= i && max >= i){ - if(Object.is(i, max)) + if(i === max) /*<>*/ return /*<>*/ caml_call1 (dec_invalid, 1); /*<>*/ /*<>*/ var @@ -6320,7 +6298,7 @@ /*<>*/ var max = caml_ml_bytes_length(b) - 1 | 0, i = 0; /*<>*/ for(;;){ if(max < i) /*<>*/ return 1; - if(Object.is(i, max)) /*<>*/ return 0; + if(i === max) /*<>*/ return 0; /*<>*/ /*<>*/ var u = unsafe_get_uint16_le(b, i); if(55296 <= u && 57343 >= u){ @@ -6571,7 +6549,7 @@ /*<>*/ /*<>*/ caml_call1 (f, caml_string_unsafe_get(s, i)); /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(Object.is(_U_, i)) break; + if(_U_ === i) break; i = _V_; } } @@ -6587,7 +6565,7 @@ /*<>*/ /*<>*/ caml_call2 (f, i, caml_string_unsafe_get(s, i)); /*<>*/ /*<>*/ var _S_ = i + 1 | 0; - if(Object.is(_R_, i)) break; + if(_R_ === i) break; i = _S_; } } @@ -6667,7 +6645,7 @@ if(lim <= i$0) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if(Object.is(caml_string_unsafe_get(s, i$0), c)) + if(caml_string_unsafe_get(s, i$0) === c) /*<>*/ return i$0; var i$1 = i$0 + 1 | 0; i$0 = i$1; @@ -6681,7 +6659,7 @@ /*<>*/ var i$0 = i; /*<>*/ for(;;){ if(lim <= i$0) /*<>*/ return 0; - if(Object.is(caml_string_unsafe_get(s, i$0), c)) + if(caml_string_unsafe_get(s, i$0) === c) /*<>*/ return [0, i$0]; var i$1 = i$0 + 1 | 0; i$0 = i$1; @@ -6711,7 +6689,7 @@ if(0 > i$0) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if(Object.is(caml_string_unsafe_get(s, i$0), c)) + if(caml_string_unsafe_get(s, i$0) === c) /*<>*/ return i$0; var i$1 = i$0 - 1 | 0; i$0 = i$1; @@ -6731,7 +6709,7 @@ /*<>*/ var i$0 = i; /*<>*/ for(;;){ if(0 > i$0) /*<>*/ return 0; - if(Object.is(caml_string_unsafe_get(s, i$0), c)) + if(caml_string_unsafe_get(s, i$0) === c) /*<>*/ return [0, i$0]; var i$1 = i$0 - 1 | 0; i$0 = i$1; @@ -6813,11 +6791,8 @@ if(! _x_) return _x_; var i = 0; /*<>*/ for(;;){ - if(Object.is(i, len_pre)) /*<>*/ return 1; - if - (! - Object.is - (caml_string_unsafe_get(s, i), caml_string_unsafe_get(prefix, i))) + if(i === len_pre) /*<>*/ return 1; + if(caml_string_unsafe_get(s, i) !== caml_string_unsafe_get(prefix, i)) /*<>*/ return 0; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -6832,12 +6807,10 @@ if(! _w_) return _w_; var i = 0; /*<>*/ for(;;){ - if(Object.is(i, len_suf)) /*<>*/ return 1; + if(i === len_suf) /*<>*/ return 1; if - (! - Object.is - (caml_string_unsafe_get(s, diff + i | 0), - caml_string_unsafe_get(suffix, i))) + (caml_string_unsafe_get(s, diff + i | 0) + !== caml_string_unsafe_get(suffix, i)) /*<>*/ return 0; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -6857,13 +6830,13 @@ if(_s_ >= 0){ var i = _s_; for(;;){ - if(Object.is(caml_string_unsafe_get(s, i), sep)){ + if(caml_string_unsafe_get(s, i) === sep){ var _u_ = r[1]; r[1] = [0, sub(s, i + 1 | 0, (j[1] - i | 0) - 1 | 0), _u_]; j[1] = i; } /*<>*/ /*<>*/ var _v_ = i - 1 | 0; - if(Object.is(0, i)) break; + if(0 === i) break; i = _v_; } } @@ -7200,8 +7173,7 @@ cst_Array_exists2 = "Array.exists2", cst_Array_combine = "Array.combine"; function init(l, f){ - /*<>*/ if(Object.is(0, l)) - /*<>*/ return [0]; + /*<>*/ if(0 === l) /*<>*/ return [0]; if(0 > l) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_init); @@ -7217,7 +7189,7 @@ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); /*<>*/ /*<>*/ var _aF_ = i + 1 | 0; - if(Object.is(_aE_, i)) break; + if(_aE_ === i) break; i = _aF_; } } @@ -7238,7 +7210,7 @@ for(;;){ res[1 + x] = /*<>*/ caml_make_vect(sy, init); /*<>*/ /*<>*/ var _aC_ = x + 1 | 0; - if(Object.is(_aB_, x)) break; + if(_aB_ === x) break; x = _aC_; } } @@ -7270,13 +7242,13 @@ /*<>*/ row[1 + y] = /*<>*/ caml_call2(f, x, y); /*<>*/ /*<>*/ var _az_ = y + 1 | 0; - if(Object.is(_ax_, y)) break; + if(_ax_ === y) break; y = _az_; } } res[1 + x] = row; /*<>*/ /*<>*/ var _ay_ = x + 1 | 0; - if(Object.is(_av_, x)) break; + if(_av_ === x) break; x = _ay_; } } @@ -7285,16 +7257,16 @@ /*<>*/ } function copy(a){ /*<>*/ var l = a.length - 1; - /*<>*/ return /*<>*/ Object.is(0, l) + /*<>*/ return 0 === l ? [0] : /*<>*/ caml_array_sub(a, 0, l); /*<>*/ } function append(a1, a2){ /*<>*/ var l1 = a1.length - 1; - /*<>*/ return /*<>*/ Object.is(0, l1) + /*<>*/ return 0 === l1 ? copy(a2) - : Object.is - (0, a2.length - 1) + : 0 + === a2.length - 1 ? /*<>*/ caml_array_sub(a1, 0, l1) : /*<>*/ runtime.caml_array_append(a1, a2); /*<>*/ } @@ -7337,14 +7309,14 @@ /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); /*<>*/ /*<>*/ var _at_ = i + 1 | 0; - if(Object.is(_as_, i)) break; + if(_as_ === i) break; i = _at_; } } return 0; /*<>*/ } function iter2(f, a, b){ - /*<>*/ if(! Object.is(a.length - 1, b.length - 1)) + /*<>*/ if(a.length - 1 !== b.length - 1) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_iter2_arrays_must_ha); /*<>*/ var @@ -7356,7 +7328,7 @@ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; - if(Object.is(_ap_, i)) break; + if(_ap_ === i) break; i = _aq_; } } @@ -7364,8 +7336,7 @@ /*<>*/ } function map(f, a){ /*<>*/ var l = a.length - 1; - /*<>*/ if( /*<>*/ Object.is(0, l)) - /*<>*/ return [0]; + /*<>*/ if(0 === l) /*<>*/ return [0]; /*<>*/ var /*<>*/ r = /*<>*/ caml_make_vect @@ -7378,7 +7349,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(Object.is(_am_, i)) break; + if(_am_ === i) break; i = _an_; } } @@ -7394,7 +7365,7 @@ /*<>*/ a[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(Object.is(_aj_, i)) break; + if(_aj_ === i) break; i = _ak_; } } @@ -7410,7 +7381,7 @@ /*<>*/ a[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(Object.is(_ag_, i)) break; + if(_ag_ === i) break; i = _ah_; } } @@ -7420,10 +7391,10 @@ /*<>*/ var la = a.length - 1, /*<>*/ lb = b.length - 1; - if(! Object.is(la, lb)) + if(la !== lb) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_map2_arrays_must_hav); - if(Object.is(0, la)) /*<>*/ return [0]; + if(0 === la) /*<>*/ return [0]; /*<>*/ var /*<>*/ r = /*<>*/ caml_make_vect @@ -7436,7 +7407,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(Object.is(_ad_, i)) break; + if(_ad_ === i) break; i = _ae_; } } @@ -7452,7 +7423,7 @@ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; - if(Object.is(_aa_, i)) break; + if(_aa_ === i) break; i = _ab_; } } @@ -7460,8 +7431,7 @@ /*<>*/ } function mapi(f, a){ /*<>*/ var l = a.length - 1; - /*<>*/ if( /*<>*/ Object.is(0, l)) - /*<>*/ return [0]; + /*<>*/ if(0 === l) /*<>*/ return [0]; /*<>*/ var /*<>*/ r = /*<>*/ caml_make_vect @@ -7474,7 +7444,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); /*<>*/ /*<>*/ var ___ = i + 1 | 0; - if(Object.is(_Z_, i)) break; + if(_Z_ === i) break; i = ___; } } @@ -7530,7 +7500,7 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); /*<>*/ /*<>*/ var _X_ = i + 1 | 0; - if(Object.is(_W_, i)) break; + if(_W_ === i) break; i = _X_; } } @@ -7538,7 +7508,7 @@ /*<>*/ } function fold_left_map(f, acc, input_array){ /*<>*/ var len = input_array.length - 1; - /*<>*/ if( /*<>*/ Object.is(0, len)) + /*<>*/ if(0 === len) /*<>*/ return [0, acc, [0]]; /*<>*/ var /*<>*/ match = @@ -7561,7 +7531,7 @@ acc$1[1] = acc$2; /*<>*/ output_array[1 + i] = elt$0; /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(Object.is(_T_, i)) break; + if(_T_ === i) break; i = _U_; } } @@ -7576,7 +7546,7 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); /*<>*/ /*<>*/ var _R_ = i - 1 | 0; - if(Object.is(0, i)) break; + if(0 === i) break; i = _R_; } } @@ -7585,7 +7555,7 @@ function exists(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return 1; @@ -7596,7 +7566,7 @@ function for_all(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 1; + if(i === n) /*<>*/ return 1; /*<>*/ if (! /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return 0; @@ -7606,12 +7576,12 @@ /*<>*/ } function for_all2(p, l1, l2){ /*<>*/ var n1 = l1.length - 1, n2 = l2.length - 1; - if(! Object.is(n1, n2)) + if(n1 !== n2) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_for_all2); var i = 0; /*<>*/ for(;;){ - if(Object.is(i, n1)) /*<>*/ return 1; + if(i === n1) /*<>*/ return 1; /*<>*/ if (! /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) /*<>*/ return 0; @@ -7621,12 +7591,12 @@ /*<>*/ } function exists2(p, l1, l2){ /*<>*/ var n1 = l1.length - 1, n2 = l2.length - 1; - if(! Object.is(n1, n2)) + if(n1 !== n2) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_exists2); var i = 0; /*<>*/ for(;;){ - if(Object.is(i, n1)) /*<>*/ return 0; + if(i === n1) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) /*<>*/ return 1; @@ -7637,10 +7607,9 @@ function mem(x, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ runtime.caml_compare(a[1 + i], x))) + (0 === /*<>*/ runtime.caml_compare(a[1 + i], x)) /*<>*/ return 1; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -7649,7 +7618,7 @@ function memq(x, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; if(Object.is(x, a[1 + i])) /*<>*/ return 1; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -7658,7 +7627,7 @@ function find_opt(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ /*<>*/ var x = a[1 + i]; /*<>*/ if( /*<>*/ caml_call1(p, x)) /*<>*/ return [0, x]; @@ -7669,7 +7638,7 @@ function find_index(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return [0, i]; @@ -7680,7 +7649,7 @@ function find_map(f, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ /*<>*/ var r = /*<>*/ caml_call1(f, a[1 + i]); if(r) /*<>*/ return r; @@ -7691,7 +7660,7 @@ function find_mapi(f, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ /*<>*/ var r = /*<>*/ caml_call2(f, i, a[1 + i]); if(r) /*<>*/ return r; @@ -7721,7 +7690,7 @@ /*<>*/ a[1 + i] = ai; /*<>*/ b[1 + i] = bi; /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(Object.is(_O_, i)) break; + if(_O_ === i) break; i = _P_; } } @@ -7731,10 +7700,10 @@ /*<>*/ var na = a.length - 1, /*<>*/ nb = b.length - 1; - if(! Object.is(na, nb)) + if(na !== nb) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Array_combine); - if(Object.is(0, na)) /*<>*/ return [0]; + if(0 === na) /*<>*/ return [0]; /*<>*/ var /*<>*/ x = /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), @@ -7745,7 +7714,7 @@ for(;;){ x[1 + i] = [0, a[1 + i], b[1 + i]]; /*<>*/ /*<>*/ var _M_ = i + 1 | 0; - if(Object.is(_L_, i)) break; + if(_L_ === i) break; i = _M_; } } @@ -7821,13 +7790,12 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(! Object.is(exn[1], Bottom)) - throw caml_maybe_attach_backtrace(exn, 0); + if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); var i$0 = exn[2]; /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; - if(Object.is(0, i$6)) break; + if(0 === i$6) break; i$6 = _C_; } } @@ -7851,8 +7819,7 @@ } catch(exn){ var exn$0 = caml_wrap_exception(exn); - if(! Object.is(exn$0[1], Bottom)) - throw caml_maybe_attach_backtrace(exn$0, 0); + if(exn$0[1] !== Bottom) throw caml_maybe_attach_backtrace(exn$0, 0); var i$2 = exn$0[2]; a: { @@ -7861,7 +7828,7 @@ var i$3 = i$2; /*<>*/ for(;;){ var father = (i$3 - 1 | 0) / 3 | 0; - if(Object.is(i$3, father)) + if(i$3 === father) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); /*<>*/ if @@ -7969,7 +7936,7 @@ var _s_ = j[1] + 1 | 0; /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; /*<>*/ /*<>*/ var _t_ = i + 1 | 0; - if(Object.is(_m_, i)) break; + if(_m_ === i) break; i = _t_; } } @@ -8210,9 +8177,7 @@ (x, neg_infinity); /*<>*/ } function equal(x, y){ - /*<>*/ return Object.is(0, caml_float_compare(x, y)) - ? 1 - : 0; + /*<>*/ return 0 === caml_float_compare(x, y) ? 1 : 0; /*<>*/ } function min(x, y){ /*<>*/ a: @@ -8308,7 +8273,7 @@ for(;;){ /*<>*/ a[1 + i] = v; /*<>*/ /*<>*/ var _aW_ = i + 1 | 0; - if(Object.is(_aV_, i)) break; + if(_aV_ === i) break; i = _aW_; } } @@ -8350,7 +8315,7 @@ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); /*<>*/ /*<>*/ var _aQ_ = i + 1 | 0; - if(Object.is(_aP_, i)) break; + if(_aP_ === i) break; i = _aQ_; } } @@ -8373,7 +8338,7 @@ for(;;){ /*<>*/ res[1 + x] = make(sy, v); /*<>*/ /*<>*/ var _aN_ = x + 1 | 0; - if(Object.is(_aM_, x)) break; + if(_aM_ === x) break; x = _aN_; } } @@ -8407,13 +8372,13 @@ /*<>*/ caml_call2(f, x, y); /*<>*/ /*<>*/ var _aK_ = y + 1 | 0; - if(Object.is(_aI_, y)) break; + if(_aI_ === y) break; y = _aK_; } } /*<>*/ res[1 + x] = row; /*<>*/ /*<>*/ var _aJ_ = x + 1 | 0; - if(Object.is(_aG_, x)) break; + if(_aG_ === x) break; x = _aJ_; } } @@ -8455,7 +8420,7 @@ i = 0; /*<>*/ for(;;){ if(! l$0){ - if(Object.is(i, acc)) /*<>*/ return result; + if(i === acc) /*<>*/ return result; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); } @@ -8529,14 +8494,14 @@ /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); /*<>*/ /*<>*/ var _aD_ = i + 1 | 0; - if(Object.is(_aC_, i)) break; + if(_aC_ === i) break; i = _aD_; } } return 0; /*<>*/ } function iter2(f, a, b){ - /*<>*/ if(! Object.is(a.length - 1, b.length - 1)) + /*<>*/ if(a.length - 1 !== b.length - 1) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_iter2_arrays_m); /*<>*/ var @@ -8548,7 +8513,7 @@ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _aA_ = i + 1 | 0; - if(Object.is(_az_, i)) break; + if(_az_ === i) break; i = _aA_; } } @@ -8567,7 +8532,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _ax_ = i + 1 | 0; - if(Object.is(_aw_, i)) break; + if(_aw_ === i) break; i = _ax_; } } @@ -8583,7 +8548,7 @@ /*<>*/ a[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _au_ = i + 1 | 0; - if(Object.is(_at_, i)) break; + if(_at_ === i) break; i = _au_; } } @@ -8593,7 +8558,7 @@ /*<>*/ var la = a.length - 1, /*<>*/ lb = b.length - 1; - if(! Object.is(la, lb)) + if(la !== lb) /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_map2_arrays_mu); /*<>*/ var @@ -8607,7 +8572,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); /*<>*/ /*<>*/ var _ar_ = i + 1 | 0; - if(Object.is(_aq_, i)) break; + if(_aq_ === i) break; i = _ar_; } } @@ -8623,7 +8588,7 @@ /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); /*<>*/ /*<>*/ var _ao_ = i + 1 | 0; - if(Object.is(_an_, i)) break; + if(_an_ === i) break; i = _ao_; } } @@ -8642,7 +8607,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); /*<>*/ /*<>*/ var _al_ = i + 1 | 0; - if(Object.is(_ak_, i)) break; + if(_ak_ === i) break; i = _al_; } } @@ -8658,7 +8623,7 @@ /*<>*/ a[1 + i] = /*<>*/ caml_call2(f, i, a[1 + i]); /*<>*/ /*<>*/ var _ai_ = i + 1 | 0; - if(Object.is(_ah_, i)) break; + if(_ah_ === i) break; i = _ai_; } } @@ -8674,7 +8639,7 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); /*<>*/ /*<>*/ var _af_ = i + 1 | 0; - if(Object.is(_ae_, i)) break; + if(_ae_ === i) break; i = _af_; } } @@ -8689,7 +8654,7 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); /*<>*/ /*<>*/ var _ac_ = i - 1 | 0; - if(Object.is(0, i)) break; + if(0 === i) break; i = _ac_; } } @@ -8698,7 +8663,7 @@ function exists(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return 1; @@ -8709,7 +8674,7 @@ function for_all(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 1; + if(i === n) /*<>*/ return 1; /*<>*/ if (! /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return 0; @@ -8720,9 +8685,8 @@ function mem(x, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; - if - (Object.is(0, /*<>*/ caml_float_compare(a[1 + i], x))) + if(i === n) /*<>*/ return 0; + if(0 === /*<>*/ caml_float_compare(a[1 + i], x)) /*<>*/ return 1; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -8731,7 +8695,7 @@ function mem_ieee(x, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; if(x === a[1 + i]) /*<>*/ return 1; /*<>*/ /*<>*/ var i$0 = i + 1 | 0; i = i$0; @@ -8740,7 +8704,7 @@ function find_opt(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ /*<>*/ var x = a[1 + i]; /*<>*/ if( /*<>*/ caml_call1(p, x)) /*<>*/ return [0, x]; @@ -8751,7 +8715,7 @@ function find_index(p, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ if ( /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return [0, i]; @@ -8762,7 +8726,7 @@ function find_map(f, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ /*<>*/ var r = /*<>*/ caml_call1(f, a[1 + i]); if(r) /*<>*/ return r; @@ -8773,7 +8737,7 @@ function find_mapi(f, a){ /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(Object.is(i, n)) /*<>*/ return 0; + if(i === n) /*<>*/ return 0; /*<>*/ /*<>*/ var r = /*<>*/ caml_call2(f, i, a[1 + i]); if(r) /*<>*/ return r; @@ -8851,13 +8815,12 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(! Object.is(exn[1], Bottom)) - throw caml_maybe_attach_backtrace(exn, 0); + if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); var i$0 = exn[2]; /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } /*<>*/ /*<>*/ var _V_ = i$6 - 1 | 0; - if(Object.is(0, i$6)) break; + if(0 === i$6) break; i$6 = _V_; } } @@ -8881,8 +8844,7 @@ } catch(exn){ var exn$0 = caml_wrap_exception(exn); - if(! Object.is(exn$0[1], Bottom)) - throw caml_maybe_attach_backtrace(exn$0, 0); + if(exn$0[1] !== Bottom) throw caml_maybe_attach_backtrace(exn$0, 0); var i$2 = exn$0[2]; a: { @@ -8891,7 +8853,7 @@ var i$3 = i$2; /*<>*/ for(;;){ var father = (i$3 - 1 | 0) / 3 | 0; - if(Object.is(i$3, father)) + if(i$3 === father) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _b_], 1); /*<>*/ if @@ -9001,7 +8963,7 @@ var _L_ = j[1] + 1 | 0; /*<>*/ caml_check_bound(dst, _L_)[1 + _L_] = e; /*<>*/ /*<>*/ var _M_ = i + 1 | 0; - if(Object.is(_F_, i)) break; + if(_F_ === i) break; i = _M_; } } @@ -9103,8 +9065,7 @@ /*<>*/ } function map_to_array(f, a){ /*<>*/ var l = a.length - 1; - /*<>*/ if( /*<>*/ Object.is(0, l)) - /*<>*/ return [0]; + /*<>*/ if(0 === l) /*<>*/ return [0]; /*<>*/ var /*<>*/ r = /*<>*/ caml_make_vect @@ -9117,7 +9078,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _t_ = i + 1 | 0; - if(Object.is(_s_, i)) break; + if(_s_ === i) break; i = _t_; } } @@ -9136,7 +9097,7 @@ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); /*<>*/ /*<>*/ var _q_ = i + 1 | 0; - if(Object.is(_p_, i)) break; + if(_p_ === i) break; i = _q_; } } @@ -9661,8 +9622,8 @@ /*<>*/ } var compare = caml_int_compare; function equal(x, y){ - /*<>*/ return Object.is - (0, /*<>*/ caml_int_compare(x, y)) + /*<>*/ return 0 + === /*<>*/ caml_int_compare(x, y) ? 1 : 0; /*<>*/ } @@ -9794,7 +9755,7 @@ /*<>*/ result = /*<>*/ runtime.caml_lex_engine(tbl, state, buf), _n_ = 0 <= result ? 1 : 0, - _o_ = _n_ ? Object.is(buf[12], dummy_pos) ? 0 : 1 : _n_; + _o_ = _n_ ? buf[12] !== dummy_pos ? 1 : 0 : _n_; if(_o_){ buf[11] = buf[12]; var _p_ = buf[12]; @@ -9807,7 +9768,7 @@ /*<>*/ result = /*<>*/ runtime.caml_new_lex_engine(tbl, state, buf), _k_ = 0 <= result ? 1 : 0, - _l_ = _k_ ? Object.is(buf[12], dummy_pos) ? 0 : 1 : _k_; + _l_ = _k_ ? buf[12] !== dummy_pos ? 1 : 0 : _k_; if(_l_){ buf[11] = buf[12]; var _m_ = buf[12]; @@ -9877,7 +9838,7 @@ /*<>*/ caml_check_bound(t, i)[1 + i] = v - s | 0; /*<>*/ /*<>*/ var _j_ = i + 1 | 0; - if(Object.is(_i_, i)) break; + if(_i_ === i) break; i = _j_; } } @@ -9941,7 +9902,7 @@ return 0; /*<>*/ } function with_positions(lexbuf){ - /*<>*/ return Object.is(lexbuf[12], dummy_pos) ? 0 : 1; + /*<>*/ return lexbuf[12] !== dummy_pos ? 1 : 0; /*<>*/ } function lexeme(lexbuf){ /*<>*/ var len = lexbuf[6] - lexbuf[5] | 0; @@ -9988,7 +9949,7 @@ function new_line(lexbuf){ /*<>*/ var lcp = lexbuf[12], - _a_ = Object.is(lcp, dummy_pos) ? 0 : 1, + _a_ = lcp !== dummy_pos ? 1 : 0, _b_ = _a_ ? (lexbuf[12] = [0, lcp[1], lcp[2] + 1 | 0, lcp[4], lcp[4]], 0) @@ -9999,7 +9960,7 @@ /*<>*/ lb[6] = 0; lb[4] = 0; var lcp = lb[12]; - if(! Object.is(lcp, dummy_pos)) + if(lcp !== dummy_pos) lb[12] = [0, lcp[1], zero_pos[2], zero_pos[3], zero_pos[4]]; lb[3] = 0; return 0; @@ -10173,8 +10134,7 @@ } catch(_m_){ var _h_ = caml_wrap_exception(_m_); - if(! Object.is(_h_, Parse_error)) - throw caml_maybe_attach_backtrace(_h_, 0); + if(_h_ !== Parse_error) throw caml_maybe_attach_backtrace(_h_, 0); var value = 0, action = 5; } cmd = action; @@ -10198,7 +10158,7 @@ env[7] = init_curr_char; env[8] = init_lval; env[16] = init_errflag; - if(Object.is(exn[1], YYexit)){ + if(exn[1] === YYexit){ var v = exn[2]; /*<>*/ return v; } @@ -10411,8 +10371,7 @@ l = t[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)) - /*<>*/ return t; + /*<>*/ if(0 === c) /*<>*/ return t; if(0 <= c){ /*<>*/ /*<>*/ var rr = add(x, r); return Object.is(r, rr) ? t : bal(l, v, rr); @@ -10528,7 +10487,7 @@ l = param[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)) + /*<>*/ if(0 === c) /*<>*/ return [0, l, 1, r]; if(0 <= c){ /*<>*/ var @@ -10559,7 +10518,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v), - _R_ = Object.is(0, c) ? 1 : 0; + _R_ = 0 === c ? 1 : 0; if(_R_) return _R_; var r$0 = 0 <= c ? r : l; param$0 = r$0; @@ -10573,7 +10532,7 @@ t1 = t[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)){ + /*<>*/ if(0 === c){ if(! t1) /*<>*/ return t2; if(! t2) /*<>*/ return t1; /*<>*/ /*<>*/ var @@ -10650,8 +10609,7 @@ l = param[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)) - /*<>*/ return 0; + /*<>*/ if(0 === c) /*<>*/ return 0; if(0 <= c){ /*<>*/ /*<>*/ var match = split_bis(x, r); @@ -10742,8 +10700,7 @@ v1 = e1[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(! /*<>*/ Object.is(0, c)) - /*<>*/ return c; + /*<>*/ if(0 !== c) /*<>*/ return c; /*<>*/ var /*<>*/ e2$1 = cons_enum(r2, e2$0), /*<>*/ e1$1 = cons_enum(r1, e1$0); @@ -10752,7 +10709,7 @@ } /*<>*/ } function equal(s1, s2){ - /*<>*/ return Object.is(0, compare(s1, s2)) ? 1 : 0; + /*<>*/ return 0 === compare(s1, s2) ? 1 : 0; /*<>*/ } function subset(s1, s2){ /*<>*/ var s1$0 = s1, s2$0 = s2; @@ -10768,7 +10725,7 @@ l1 = s1$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if( /*<>*/ Object.is(0, c)){ + /*<>*/ if(0 === c){ /*<>*/ /*<>*/ var _E_ = subset(l1, l2); /*<>*/ if(! _E_) /*<>*/ return _E_; @@ -10928,8 +10885,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)) - /*<>*/ return v; + /*<>*/ if(0 === c) /*<>*/ return v; var r$0 = 0 <= c ? r : l; param$0 = r$0; } @@ -11032,7 +10988,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)) + /*<>*/ if(0 === c) /*<>*/ return [0, v]; var r$0 = 0 <= c ? r : l; param$0 = r$0; @@ -11041,13 +10997,13 @@ function try_join(l, v, r){ /*<>*/ a: { - if(! Object.is(0, l)){ + if(0 !== l){ /*<>*/ /*<>*/ var _u_ = max_elt(l); /*<>*/ if (0 <= /*<>*/ caml_call2(Ord[1], _u_, v)) break a; } - if(! Object.is(0, r)){ + if(0 !== r){ /*<>*/ /*<>*/ var _t_ = min_elt(r); /*<>*/ if (0 <= /*<>*/ caml_call2(Ord[1], v, _t_)) @@ -11247,7 +11203,7 @@ l = s$0[1], /*<>*/ n = /*<>*/ caml_call2(Ord[1], v, low); - if(Object.is(0, n)) break b; + if(0 === n) break b; if(0 <= n){ /*<>*/ /*<>*/ var c$0 = [0, v, r, c]; @@ -11442,7 +11398,7 @@ l = m[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)) + /*<>*/ if(0 === c) return Object.is(d, data) ? m : [0, l, x, data, r, h]; if(0 <= c){ /*<>*/ /*<>*/ var @@ -11466,8 +11422,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)) - /*<>*/ return d; + /*<>*/ if(0 === c) /*<>*/ return d; var r$0 = 0 <= c ? r : l; param$0 = r$0; } @@ -11587,7 +11542,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)) + /*<>*/ if(0 === c) /*<>*/ return [0, d]; var r$0 = 0 <= c ? r : l; param$0 = r$0; @@ -11603,7 +11558,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v), - _E_ = Object.is(0, c) ? 1 : 0; + _E_ = 0 === c ? 1 : 0; if(_E_) return _E_; var r$0 = 0 <= c ? r : l; param$0 = r$0; @@ -11691,7 +11646,7 @@ l = m[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)) + /*<>*/ if(0 === c) /*<>*/ return _d_(l, r); if(0 <= c){ /*<>*/ /*<>*/ var rr = remove(x, r); @@ -11716,7 +11671,7 @@ l = m[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)){ + /*<>*/ if(0 === c){ /*<>*/ /*<>*/ var match = /*<>*/ caml_call1(f, [0, d]); if(! match) /*<>*/ return _d_(l, r); @@ -11895,7 +11850,7 @@ l = param[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if( /*<>*/ Object.is(0, c)) + /*<>*/ if(0 === c) /*<>*/ return [0, l, [0, d], r]; if(0 <= c){ /*<>*/ var @@ -12091,12 +12046,10 @@ v1 = e1[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(! /*<>*/ Object.is(0, c)) - /*<>*/ return c; + /*<>*/ if(0 !== c) /*<>*/ return c; /*<>*/ /*<>*/ var c$0 = /*<>*/ caml_call2(cmp, d1, d2); - /*<>*/ if - (! /*<>*/ Object.is(0, c$0)) + /*<>*/ if(0 !== c$0) /*<>*/ return c$0; /*<>*/ var /*<>*/ e2$1 = cons_enum(r2, e2$0), @@ -12124,9 +12077,7 @@ d1 = e1[2], v1 = e1[1], _p_ = - Object.is(0, /*<>*/ caml_call2(Ord[1], v1, v2)) - ? 1 - : 0; + 0 === /*<>*/ caml_call2(Ord[1], v1, v2) ? 1 : 0; if(_p_){ /*<>*/ /*<>*/ var _q_ = /*<>*/ caml_call2(cmp, d1, d2); @@ -12259,7 +12210,7 @@ l = m$0[1], /*<>*/ n = /*<>*/ caml_call2(Ord[1], v, low); - if(Object.is(0, n)) break b; + if(0 === n) break b; if(0 <= n){ /*<>*/ /*<>*/ var c$0 = [0, v, d, r, c]; @@ -12415,7 +12366,7 @@ /*<>*/ return [0, hd]; /*<>*/ } function is_empty(s){ - /*<>*/ return Object.is(0, s[1]) ? 1 : 0; + /*<>*/ return 0 === s[1] ? 1 : 0; /*<>*/ } function length(s){ /*<>*/ return s[2]; @@ -12570,7 +12521,7 @@ } /*<>*/ } function is_empty(q){ - /*<>*/ return Object.is(0, q[1]) ? 1 : 0; + /*<>*/ return 0 === q[1] ? 1 : 0; /*<>*/ } function length(q){ /*<>*/ return q[1]; @@ -12839,7 +12790,7 @@ n = /*<>*/ caml_call3 (Stdlib_Bytes[51], b[1][1], pos, u); - /*<>*/ if(! /*<>*/ Object.is(0, n)){b[2] = pos + n | 0; return 0;} + /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} /*<>*/ resize(b, uchar_utf_8_byte_length_max); } /*<>*/ } @@ -12852,7 +12803,7 @@ n = /*<>*/ caml_call3 (Stdlib_Bytes[54], b[1][1], pos, u); - /*<>*/ if(! /*<>*/ Object.is(0, n)){b[2] = pos + n | 0; return 0;} + /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} /*<>*/ resize(b, uchar_utf_16_byte_length_max); } /*<>*/ } @@ -12865,7 +12816,7 @@ n = /*<>*/ caml_call3 (Stdlib_Bytes[57], b[1][1], pos, u); - /*<>*/ if(! /*<>*/ Object.is(0, n)){b[2] = pos + n | 0; return 0;} + /*<>*/ if(0 !== n){b[2] = pos + n | 0; return 0;} /*<>*/ resize(b, uchar_utf_16_byte_length_max); } /*<>*/ } @@ -12946,12 +12897,12 @@ ofs = ofs$1, to_read = to_read$1; /*<>*/ for(;;){ - if(! Object.is(0, to_read)){ + if(0 !== to_read){ /*<>*/ /*<>*/ var r = /*<>*/ caml_call4 (Stdlib[84], ic, buf, ofs, to_read); - /*<>*/ if(! /*<>*/ Object.is(0, r)){ + /*<>*/ if(0 !== r){ var already_read$0 = already_read + r | 0, ofs$0 = ofs + r | 0, @@ -13037,7 +12988,7 @@ } var stop$0 = lim$0; } - if(Object.is(stop$0, start)) + if(stop$0 === start) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var @@ -13064,13 +13015,10 @@ if(lim <= stop) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - if - ( /*<>*/ Object.is - ( /*<>*/ caml_string_get(s, stop), opening)){var i = stop + 1 | 0, k$0 = k + 1 | 0; k = k$0; stop = i;} + if( /*<>*/ caml_string_get(s, stop) === opening){var i = stop + 1 | 0, k$0 = k + 1 | 0; k = k$0; stop = i;} else if - ( /*<>*/ Object.is - ( /*<>*/ caml_string_get(s, stop), closing)){ - if(Object.is(0, k)) break; + ( /*<>*/ caml_string_get(s, stop) === closing){ + if(0 === k) break; var i$0 = stop + 1 | 0, k$1 = k - 1 | 0; k = k$1; stop = i$0; @@ -13418,7 +13366,7 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], s[1]); /*<>*/ for(;;){ - if(! Object.is(0, s[2])){ + if(0 !== s[2]){ s[2] = s[2] - 1 | 0; return caml_call1(Stdlib_Mutex[4], s[1]); } @@ -13429,7 +13377,7 @@ function try_acquire(s){ /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], s[1]); - var ret = Object.is(0, s[2]) ? 0 : (s[2] = s[2] - 1 | 0, 1); + var ret = 0 === s[2] ? 0 : (s[2] = s[2] - 1 | 0, 1); /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[4], s[1]); /*<>*/ return ret; @@ -13461,10 +13409,7 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], s[1]); /*<>*/ for(;;){ - if(! Object.is(0, s[2])){ - s[2] = 0; - return caml_call1(Stdlib_Mutex[4], s[1]); - } + if(0 !== s[2]){s[2] = 0; return caml_call1(Stdlib_Mutex[4], s[1]);} /*<>*/ /*<>*/ caml_call2 (Stdlib_Condition[2], s[3], s[1]); } @@ -13472,7 +13417,7 @@ function try_acquire$0(s){ /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[2], s[1]); - var ret = Object.is(0, s[2]) ? 0 : (s[2] = 0, 1); + var ret = 0 === s[2] ? 0 : (s[2] = 0, 1); /*<>*/ /*<>*/ caml_call1 (Stdlib_Mutex[4], s[1]); /*<>*/ return ret; @@ -13605,7 +13550,7 @@ idx = param[1], /*<>*/ st = maybe_grow(idx), /*<>*/ oldval = caml_check_bound(st, idx)[1 + idx]; - /*<>*/ if(! Object.is(oldval, none)) + /*<>*/ if(oldval !== none) /*<>*/ return oldval; /*<>*/ var /*<>*/ new_obj = @@ -13617,7 +13562,7 @@ /*<>*/ if(_e_) /*<>*/ return new_obj; /*<>*/ /*<>*/ var updated_obj = caml_check_bound(st$0, idx)[1 + idx]; - /*<>*/ if(! Object.is(updated_obj, none)) + /*<>*/ if(updated_obj !== none) /*<>*/ return updated_obj; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); @@ -13631,8 +13576,8 @@ (0); /*<>*/ } function is_main_domain(param){ - /*<>*/ return Object.is - (0, /*<>*/ caml_ml_domain_id(0)) + /*<>*/ return 0 + === /*<>*/ caml_ml_domain_id(0) ? 1 : 0; /*<>*/ } @@ -13976,13 +13921,13 @@ /*<>*/ var str_ind = c >>> 3 | 0, mask = 1 << (c & 7); - return Object.is - (0, - /*<>*/ caml_string_get - (char_set, str_ind) - & mask) - ? 0 - : 1; + return 0 + !== + ( /*<>*/ caml_string_get + (char_set, str_ind) + & mask) + ? 1 + : 0; /*<>*/ } function pad_of_pad_opt(pad_opt){ /*<>*/ if(! pad_opt) @@ -14281,7 +14226,7 @@ (buf, /*<>*/ caml_string_get(str, i)); /*<>*/ /*<>*/ var _cP_ = i + 1 | 0; - if(Object.is(_cO_, i)) break; + if(_cO_ === i) break; i = _cP_; } } @@ -14824,7 +14769,7 @@ /*<>*/ buffer_add_char(buf, 63); /*<>*/ /*<>*/ var _cI_ = i$8 + 1 | 0; - if(Object.is(_cH_, i$8)) break; + if(_cH_ === i$8) break; i$8 = _cI_; } } @@ -16971,7 +16916,7 @@ if(9 >= caml_string_unsafe_get(s, i$0) - 48 >>> 0) n[1]++; /*<>*/ /*<>*/ var _ct_ = i$0 + 1 | 0; - if(Object.is(_cp_, i$0)) break; + if(_cp_ === i$0) break; i$0 = _ct_; } } @@ -16998,7 +16943,7 @@ if(9 < c - 48 >>> 0) /*<>*/ put(c); else{ - if(Object.is(0, left[1])){ + if(0 === left[1]){ /*<>*/ put(95); left[1] = 3; } @@ -17007,7 +16952,7 @@ } /*<>*/ /*<>*/ var _cs_ = i + 1 | 0; - if(Object.is(_cr_, i)) break; + if(_cr_ === i) break; i = _cs_; } } @@ -17180,7 +17125,7 @@ len = caml_ml_string_length(str), i = 0; /*<>*/ for(;;){ - if(Object.is(i, len)) + if(i === len) var _ch_ = 0; else{ /*<>*/ /*<>*/ var @@ -18493,8 +18438,7 @@ function parse_spaces(i){ /*<>*/ var i$0 = i; /*<>*/ for(;;){ - if(Object.is(i$0, len)) - /*<>*/ return i$0; + if(i$0 === len) /*<>*/ return i$0; /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(str, i$0); @@ -18512,7 +18456,7 @@ { var wend = wstart; /*<>*/ for(;;){ - if(Object.is(wend, len)) break b; + if(wend === len) break b; if (25 < @@ -18536,7 +18480,7 @@ { var nend = nstart; /*<>*/ for(;;){ - if(Object.is(nend, len)) break b; + if(nend === len) break b; /*<>*/ /*<>*/ var match = /*<>*/ caml_string_get(str, nend); @@ -18566,8 +18510,7 @@ } /*<>*/ /*<>*/ var exp_end = parse_spaces(nend); - if(! Object.is(exp_end, len)) - /*<>*/ invalid_box(0); + if(exp_end !== len) /*<>*/ invalid_box(0); a: { if(box_name !== cst$43 && box_name !== "b"){ @@ -18641,7 +18584,7 @@ str_ind = str_ind$1; } var str_ind$2 = str_ind + 1 | 0; - if(Object.is(str_ind$2, end_ind)) + if(str_ind$2 === end_ind) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); var @@ -18658,7 +18601,7 @@ } var str_ind$0 = str_ind + 1 | 0; a: - if(Object.is(str_ind$0, end_ind)) + if(str_ind$0 === end_ind) var match$0 = _N_; else{ /*<>*/ /*<>*/ var @@ -18739,7 +18682,7 @@ b: try{ var - _bg_ = Object.is(str_ind$3, end_ind) ? 1 : 0, + _bg_ = str_ind$3 === end_ind ? 1 : 0, _bh_ = _bg_ || @@ -19106,7 +19049,7 @@ pad, symb); var str_ind$0 = str_ind + 1 | 0; - if(Object.is(str_ind$0, end_ind)) + if(str_ind$0 === end_ind) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); function parse_literal(minus, str_ind){ @@ -19469,7 +19412,7 @@ else if(37 !== c$1){ if(45 > c$1) break a; var str_ind$2 = str_ind$0 + 1 | 0; - if(Object.is(str_ind$2, end_ind)) + if(str_ind$2 === end_ind) /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); /*<>*/ /*<>*/ var @@ -19593,7 +19536,7 @@ fmt_rest$21 = parse(str_ind, end_ind)[1], /*<>*/ match$7 = get_pad_opt(99); if(match$7){ - if(Object.is(0, match$7[1])) + if(0 === match$7[1]) /*<>*/ var /*<>*/ _aY_ = get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], @@ -20133,7 +20076,7 @@ function add_literal(lit_start, str_ind, fmt){ /*<>*/ var size = str_ind - lit_start | 0; - return Object.is(0, size) + return 0 === size ? [0, fmt] : 1 === size @@ -20163,10 +20106,9 @@ /*<>*/ invalid_format_message (end_ind, cst_unexpected_end_of_format); if - ( /*<>*/ Object.is - ( /*<>*/ caml_string_get - (str, str_ind$0 + 1 | 0), - c)) + ( /*<>*/ caml_string_get + (str, str_ind$0 + 1 | 0) + === c) /*<>*/ return str_ind$0; /*<>*/ /*<>*/ var match = @@ -20369,8 +20311,7 @@ } catch(_af_){ var _ac_ = caml_wrap_exception(_af_); - if(! Object.is(_ac_, Type_mismatch)) - throw caml_maybe_attach_backtrace(_ac_, 0); + if(_ac_ !== Type_mismatch) throw caml_maybe_attach_backtrace(_ac_, 0); /*<>*/ /*<>*/ var _ad_ = string_of_fmtty(fmtty); /*<>*/ return /*<>*/ caml_call2 @@ -20389,7 +20330,7 @@ } catch(_ab_){ var _$_ = caml_wrap_exception(_ab_); - if(Object.is(_$_, Type_mismatch)) + if(_$_ === Type_mismatch) /*<>*/ return /*<>*/ caml_call2 (failwith_message(___), str, str$0); throw caml_maybe_attach_backtrace(_$_, 0); @@ -20726,8 +20667,8 @@ function unexpected_empty_element(f, i, length){ /*<>*/ return i < length ? missing_element(i, length) - : Object.is - (0, length) + : 0 + === length ? /*<>*/ caml_call4 (Stdlib_Printf[10], Stdlib[1], _a_, f, i) : /*<>*/ caml_call5 @@ -20806,7 +20747,7 @@ /*<>*/ return a[1]; /*<>*/ } function is_empty(a){ - /*<>*/ return Object.is(0, a[1]) ? 1 : 0; + /*<>*/ return 0 === a[1] ? 1 : 0; /*<>*/ } function copy(param){ var length = param[1], arr = param[2]; @@ -20825,7 +20766,7 @@ function get_last(a){ /*<>*/ var length = a[1], arr = a[2]; /*<>*/ check_valid_length(length, arr); - if(Object.is(0, length)) + if(0 === length) /*<>*/ /*<>*/ caml_call3 (Stdlib_Printf[10], Stdlib[1], _i_, f); /*<>*/ return unsafe_get(arr, length - 1 | 0, length); @@ -20833,14 +20774,12 @@ function find_last(a){ /*<>*/ var length = a[1], arr = a[2]; /*<>*/ check_valid_length(length, arr); - return Object.is(0, length) - ? 0 - : [0, unsafe_get(arr, length - 1 | 0, length)]; + return 0 === length ? 0 : [0, unsafe_get(arr, length - 1 | 0, length)]; /*<>*/ } function pop_last(a){ /*<>*/ var length = a[1], arr = a[2]; /*<>*/ check_valid_length(length, arr); - if(Object.is(0, length)) + if(0 === length) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var @@ -21037,7 +20976,7 @@ arr[1 + (length_a + i | 0)] = [0, x]; /*<>*/ /*<>*/ var _J_ = i + 1 | 0; - if(Object.is(_I_, i)) break; + if(_I_ === i) break; i = _J_; } } @@ -21071,7 +21010,7 @@ arr_a[1 + (length_a + i | 0)] = [0, x]; /*<>*/ /*<>*/ var _F_ = i + 1 | 0; - if(Object.is(_E_, i)) break; + if(_E_ === i) break; i = _F_; } } @@ -21103,7 +21042,7 @@ (k, unsafe_get(arr, i, length)); /*<>*/ /*<>*/ var _B_ = i + 1 | 0; - if(Object.is(_A_, i)) break; + if(_A_ === i) break; i = _B_; } } @@ -21125,7 +21064,7 @@ (k, i, unsafe_get(arr, i, length)); /*<>*/ /*<>*/ var _y_ = i + 1 | 0; - if(Object.is(_x_, i)) break; + if(_x_ === i) break; i = _y_; } } @@ -21182,7 +21121,7 @@ r[1] = /*<>*/ caml_call2(f, r[1], v); /*<>*/ /*<>*/ var _v_ = i + 1 | 0; - if(Object.is(_u_, i)) break; + if(_u_ === i) break; i = _v_; } } @@ -21203,7 +21142,7 @@ r[1] = /*<>*/ caml_call2(f, v, r[1]); /*<>*/ /*<>*/ var _s_ = i - 1 | 0; - if(Object.is(0, i)) break; + if(0 === i) break; i = _s_; } } @@ -21215,7 +21154,7 @@ /*<>*/ check_valid_length(length, arr); var i = 0; /*<>*/ for(;;){ - if(Object.is(i, length)) + if(i === length) var res = 0; else{ /*<>*/ /*<>*/ var @@ -21237,7 +21176,7 @@ /*<>*/ check_valid_length(length, arr); var i = 0; /*<>*/ for(;;){ - if(Object.is(i, length)) + if(i === length) var res = 1; else{ /*<>*/ /*<>*/ var @@ -21328,7 +21267,7 @@ l[1] = [0, unsafe_get(arr, i, length), _m_]; /*<>*/ /*<>*/ var _n_ = i - 1 | 0; - if(Object.is(0, i)) break; + if(0 === i) break; i = _n_; } } @@ -22014,12 +21953,12 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(Object.is(exn[1], Bad)){ + if(exn[1] === Bad){ var m = exn[2]; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (convert_error([3, m]), 1); } - if(! Object.is(exn[1], Stop)) throw caml_maybe_attach_backtrace(exn, 0); + if(exn[1] !== Stop) throw caml_maybe_attach_backtrace(exn, 0); var e = exn[2]; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (convert_error(e), 1); @@ -22050,14 +21989,14 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(Object.is(exn[1], Bad)){ + if(exn[1] === Bad){ var msg$0 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[3], _l_, msg$0); /*<>*/ return /*<>*/ caml_call1 (Stdlib[99], 2); } - if(! Object.is(exn[1], Help)) throw caml_maybe_attach_backtrace(exn, 0); + if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[2], _m_, msg$1); @@ -22073,14 +22012,14 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(Object.is(exn[1], Bad)){ + if(exn[1] === Bad){ var msg$0 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[3], _n_, msg$0); /*<>*/ return /*<>*/ caml_call1 (Stdlib[99], 2); } - if(! Object.is(exn[1], Help)) throw caml_maybe_attach_backtrace(exn, 0); + if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[2], _o_, msg$1); @@ -22100,14 +22039,14 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(Object.is(exn[1], Bad)){ + if(exn[1] === Bad){ var msg$0 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[3], _p_, msg$0); /*<>*/ return /*<>*/ caml_call1 (Stdlib[99], 2); } - if(! Object.is(exn[1], Help)) throw caml_maybe_attach_backtrace(exn, 0); + if(exn[1] !== Help) throw caml_maybe_attach_backtrace(exn, 0); var msg$1 = exn[2]; /*<>*/ /*<>*/ caml_call2 (Stdlib_Printf[2], _q_, msg$1); @@ -22483,15 +22422,12 @@ (Stdlib_Printf[4], _b_, f); /*<>*/ /*<>*/ var _ah_ = Stdlib_Obj[15]; - if - ( /*<>*/ Object.is - ( /*<>*/ caml_obj_tag(f), _ah_)) + if( /*<>*/ caml_obj_tag(f) === _ah_) /*<>*/ return /*<>*/ caml_call2 (Stdlib_Printf[4], _a_, f); /*<>*/ /*<>*/ var _ai_ = Stdlib_Obj[16]; - return /*<>*/ Object.is - ( /*<>*/ caml_obj_tag(f), _ai_) + return /*<>*/ caml_obj_tag(f) === _ai_ ? /*<>*/ caml_call1(Stdlib[35], f) : cst; /*<>*/ } @@ -22524,8 +22460,7 @@ /*<>*/ } function string_of_extension_constructo(t){ /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_obj_tag(t))){ + (0 === /*<>*/ caml_obj_tag(t)){ /*<>*/ var /*<>*/ constructor = t[1][1], match = t.length - 1; @@ -22659,11 +22594,8 @@ function format_backtrace_slot(pos, slot){ function info(is_raise){ /*<>*/ return is_raise - ? Object.is(0, pos) ? cst_Raised_at : cst_Re_raised_at - : Object.is - (0, pos) - ? cst_Raised_by_primitive_operat - : cst_Called_from; + ? 0 === pos ? cst_Raised_at : cst_Re_raised_at + : 0 === pos ? cst_Raised_by_primitive_operat : cst_Called_from; /*<>*/ } /*<>*/ if(0 === slot[0]){ /*<>*/ var @@ -22707,7 +22639,7 @@ } /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; - if(Object.is(_P_, i)) break; + if(_P_ === i) break; i = _Q_; } } @@ -22741,7 +22673,7 @@ } /*<>*/ /*<>*/ var _N_ = i + 1 | 0; - if(Object.is(_M_, i)) break; + if(_M_ === i) break; i = _N_; } } @@ -22809,8 +22741,8 @@ } /*<>*/ } function exn_slot(x){ - /*<>*/ return /*<>*/ Object.is - (0, /*<>*/ caml_obj_tag(x)) + /*<>*/ return 0 + === /*<>*/ caml_obj_tag(x) ? x[1] : x; /*<>*/ } @@ -23021,7 +22953,7 @@ /*<>*/ /*<>*/ caml_call1 (Stdlib_Printexc[9], function(param){ - /*<>*/ if(! Object.is(param[1], Finally_raised)) + /*<>*/ if(param[1] !== Finally_raised) /*<>*/ return 0; /*<>*/ var exn = param[2], @@ -23455,8 +23387,7 @@ r = /*<>*/ caml_ml_input_bigarray (ic, buf, ofs, len); - /*<>*/ if - ( /*<>*/ Object.is(0, r)) + /*<>*/ if(0 === r) /*<>*/ return 0; var len$0 = len - r | 0, ofs$0 = ofs + r | 0; ofs = ofs$0; @@ -23481,13 +23412,12 @@ function read_upto(ic, buf, ofs, len){ /*<>*/ var ofs$0 = ofs, len$0 = len; /*<>*/ for(;;){ - if(! Object.is(0, len$0)){ + if(0 !== len$0){ /*<>*/ /*<>*/ var r = /*<>*/ caml_call4 (Stdlib[84], ic, buf, ofs$0, len$0); - /*<>*/ if - (! /*<>*/ Object.is(0, r)){ + /*<>*/ if(0 !== r){ var len$1 = len$0 - r | 0, ofs$1 = ofs$0 + r | 0; ofs$0 = ofs$1; len$0 = len$1; @@ -23854,7 +23784,7 @@ caml_bytes_unsafe_set(result, i * 2 | 0, char_hex(x >>> 4 | 0)); caml_bytes_unsafe_set(result, (i * 2 | 0) + 1 | 0, char_hex(x & 15)); /*<>*/ /*<>*/ var _k_ = i + 1 | 0; - if(Object.is(_j_, i)) break; + if(_j_ === i) break; i = _k_; } } @@ -23938,7 +23868,7 @@ /*<>*/ if(0 <= toread){ var toread$0 = toread; /*<>*/ for(;;){ - if(Object.is(0, toread$0)) + if(0 === toread$0) /*<>*/ return /*<>*/ caml_blake2_final (ctx, hash_length); /*<>*/ var @@ -23948,7 +23878,7 @@ /*<>*/ n = /*<>*/ caml_call4 (Stdlib_In_channel[16], ic, buf, 0, _c_); - /*<>*/ if( /*<>*/ Object.is(0, n)) + /*<>*/ if(0 === n) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[12], 1); /*<>*/ /*<>*/ caml_blake2_update @@ -23966,7 +23896,7 @@ n$0 = /*<>*/ caml_call4 (Stdlib_In_channel[16], ic, buf, 0, buf_size); - /*<>*/ if( /*<>*/ Object.is(0, n$0)) + /*<>*/ if(0 === n$0) /*<>*/ return /*<>*/ caml_blake2_final (ctx, hash_length); /*<>*/ /*<>*/ caml_blake2_update @@ -23993,8 +23923,7 @@ (Stdlib[86], chan, hash_length); /*<>*/ } function to_hex(d){ - /*<>*/ if - (! Object.is(caml_ml_string_length(d), hash_length)) + /*<>*/ if(caml_ml_string_length(d) !== hash_length) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Digest_to_hex); /*<>*/ return hex_of_string(d); @@ -24205,7 +24134,7 @@ cst_Bigarray_array2_of_genarra = "Bigarray.array2_of_genarray", cst_Bigarray_array3_of_genarra = "Bigarray.array3_of_genarray"; function cloop(arr, idx, f, col, max){ - /*<>*/ if(Object.is(col, idx.length - 1)){ + /*<>*/ if(col === idx.length - 1){ /*<>*/ /*<>*/ caml_ba_set_generic (arr, idx, /*<>*/ caml_call1(f, idx)); /*<>*/ return; @@ -24221,7 +24150,7 @@ /*<>*/ cloop(arr, idx, f, col + 1 | 0, max); /*<>*/ /*<>*/ var _an_ = j + 1 | 0; - if(Object.is(_am_, j)) break; + if(_am_ === j) break; j = _an_; } } @@ -24242,7 +24171,7 @@ /*<>*/ floop(arr, idx, f, col - 1 | 0, max); /*<>*/ /*<>*/ var _ak_ = j + 1 | 0; - if(Object.is(_aj_, j)) break; + if(_aj_ === j) break; j = _ak_; } } @@ -24284,7 +24213,7 @@ /*<>*/ caml_check_bound(d, i)[1 + i] = _ag_; /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(Object.is(_af_, i)) break; + if(_af_ === i) break; i = _ah_; } } @@ -24352,7 +24281,7 @@ (arr, i$0, /*<>*/ caml_call1(f, i$0)); /*<>*/ /*<>*/ var ___ = i$0 + 1 | 0; - if(Object.is(dim, i$0)) break; + if(dim === i$0) break; i$0 = ___; } } @@ -24368,7 +24297,7 @@ (arr, i, /*<>*/ caml_call1(f, i)); /*<>*/ /*<>*/ var _Y_ = i + 1 | 0; - if(Object.is(_X_, i)) break; + if(_X_ === i) break; i = _Y_; } } @@ -24387,7 +24316,7 @@ (ba, i + ofs | 0, caml_check_bound(data, i)[1 + i]); /*<>*/ /*<>*/ var _V_ = i + 1 | 0; - if(Object.is(_U_, i)) break; + if(_U_ === i) break; i = _V_; } } @@ -24434,13 +24363,13 @@ (arr, i$0, j$0, /*<>*/ caml_call2(f, i$0, j$0)); /*<>*/ /*<>*/ var _Q_ = i$0 + 1 | 0; - if(Object.is(dim1, i$0)) break; + if(dim1 === i$0) break; i$0 = _Q_; } } /*<>*/ /*<>*/ var _P_ = j$0 + 1 | 0; - if(Object.is(dim2, j$0)) break; + if(dim2 === j$0) break; j$0 = _P_; } } @@ -24462,13 +24391,13 @@ (arr, i, j, /*<>*/ caml_call2(f, i, j)); /*<>*/ /*<>*/ var _M_ = j + 1 | 0; - if(Object.is(_K_, j)) break; + if(_K_ === j) break; j = _M_; } } /*<>*/ /*<>*/ var _L_ = i + 1 | 0; - if(Object.is(_I_, i)) break; + if(_I_ === i) break; i = _L_; } } @@ -24478,9 +24407,7 @@ /*<>*/ var dim1 = data.length - 1, /*<>*/ dim2 = - /*<>*/ Object.is(0, dim1) - ? 0 - : caml_check_bound(data, 0)[1].length - 1, + 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, /*<>*/ ba = create$1(kind, layout, dim1, dim2), /*<>*/ ofs = layout ? 1 : 0, /*<>*/ _C_ = dim1 - 1 | 0, @@ -24490,7 +24417,7 @@ for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; - if(! Object.is(row.length - 1, dim2)) + if(row.length - 1 !== dim2) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array2_of_array_n); /*<>*/ var @@ -24503,13 +24430,13 @@ (ba, i + ofs | 0, j + ofs | 0, caml_check_bound(row, j)[1 + j]); /*<>*/ /*<>*/ var _G_ = j + 1 | 0; - if(Object.is(_E_, j)) break; + if(_E_ === j) break; j = _G_; } } /*<>*/ /*<>*/ var _F_ = i + 1 | 0; - if(Object.is(_C_, i)) break; + if(_C_ === i) break; i = _F_; } } @@ -24576,19 +24503,19 @@ /*<>*/ caml_call3(f, i$0, j$0, k$0)); /*<>*/ /*<>*/ var _x_ = i$0 + 1 | 0; - if(Object.is(dim1, i$0)) break; + if(dim1 === i$0) break; i$0 = _x_; } } /*<>*/ /*<>*/ var _w_ = j$0 + 1 | 0; - if(Object.is(dim2, j$0)) break; + if(dim2 === j$0) break; j$0 = _w_; } } /*<>*/ /*<>*/ var _u_ = k$0 + 1 | 0; - if(Object.is(dim3, k$0)) break; + if(dim3 === k$0) break; k$0 = _u_; } } @@ -24616,19 +24543,19 @@ (arr, i, j, k, /*<>*/ caml_call3(f, i, j, k)); /*<>*/ /*<>*/ var _r_ = k + 1 | 0; - if(Object.is(_p_, k)) break; + if(_p_ === k) break; k = _r_; } } /*<>*/ /*<>*/ var _q_ = j + 1 | 0; - if(Object.is(_m_, j)) break; + if(_m_ === j) break; j = _q_; } } /*<>*/ /*<>*/ var _n_ = i + 1 | 0; - if(Object.is(_k_, i)) break; + if(_k_ === i) break; i = _n_; } } @@ -24638,11 +24565,9 @@ /*<>*/ var dim1 = data.length - 1, /*<>*/ dim2 = - /*<>*/ Object.is(0, dim1) - ? 0 - : caml_check_bound(data, 0)[1].length - 1, + 0 === dim1 ? 0 : caml_check_bound(data, 0)[1].length - 1, /*<>*/ dim3 = - /*<>*/ Object.is(0, dim2) + 0 === dim2 ? 0 : caml_check_bound(caml_check_bound(data, 0)[1], 0)[1].length - 1, /*<>*/ ba = create$2(kind, layout, dim1, dim2, dim3), @@ -24654,7 +24579,7 @@ for(;;){ /*<>*/ /*<>*/ var row = caml_check_bound(data, i)[1 + i]; - if(! Object.is(row.length - 1, dim2)) + if(row.length - 1 !== dim2) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n); /*<>*/ var @@ -24665,7 +24590,7 @@ for(;;){ /*<>*/ /*<>*/ var col = caml_check_bound(row, j)[1 + j]; - if(! Object.is(col.length - 1, dim3)) + if(col.length - 1 !== dim3) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_Array3_of_array_n$0); /*<>*/ var @@ -24682,27 +24607,27 @@ caml_check_bound(col, k)[1 + k]); /*<>*/ /*<>*/ var _i_ = k + 1 | 0; - if(Object.is(_g_, k)) break; + if(_g_ === k) break; k = _i_; } } /*<>*/ /*<>*/ var _h_ = j + 1 | 0; - if(Object.is(_d_, j)) break; + if(_d_ === j) break; j = _h_; } } /*<>*/ /*<>*/ var _e_ = i + 1 | 0; - if(Object.is(_b_, i)) break; + if(_b_ === i) break; i = _e_; } } /*<>*/ return ba; /*<>*/ } function array0_of_genarray(a){ - /*<>*/ return /*<>*/ Object.is - (0, /*<>*/ caml_ba_num_dims(a)) + /*<>*/ return 0 + === /*<>*/ caml_ba_num_dims(a) ? a : /*<>*/ caml_call1 (Stdlib[1], cst_Bigarray_array0_of_genarra); @@ -24972,7 +24897,7 @@ /*<>*/ /*<>*/ caml_call3 (Stdlib_Bytes[86], b, i * 8 | 0, _t_); /*<>*/ /*<>*/ var _u_ = i + 1 | 0; - if(Object.is(_p_, i)) break; + if(_p_ === i) break; i = _u_; } } @@ -25564,9 +25489,7 @@ /*<>*/ var len = h[2].length - 1; if (4 <= h.length - 1 - && - ! - Object.is(len, /*<>*/ caml_call1(Stdlib[18], h[4]))){ + && len !== /*<>*/ caml_call1(Stdlib[18], h[4])){ h[1] = 0; h[2] = /*<>*/ caml_make_vect @@ -25643,7 +25566,7 @@ } /*<>*/ /*<>*/ var _af_ = i$0 + 1 | 0; - if(Object.is(_aa_, i$0)) break; + if(_aa_ === i$0) break; i$0 = _af_; } } @@ -25659,7 +25582,7 @@ if(match$0) match$0[3] = 0; /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(Object.is(_ac_, i)) break; + if(_ac_ === i) break; i = _ae_; } } @@ -25706,7 +25629,7 @@ } /*<>*/ /*<>*/ var _Z_ = i + 1 | 0; - if(Object.is(_W_, i)) break; + if(_W_ === i) break; i = _Z_; } } @@ -25762,7 +25685,7 @@ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; /*<>*/ /*<>*/ var _U_ = i + 1 | 0; - if(Object.is(_R_, i)) break; + if(_R_ === i) break; i = _U_; } } @@ -25810,7 +25733,7 @@ accu$1[1] = accu; /*<>*/ /*<>*/ var _P_ = i + 1 | 0; - if(Object.is(_N_, i)) break; + if(_N_ === i) break; i = _P_; } } @@ -25876,8 +25799,7 @@ [0, key, data], function(_K_){ /*<>*/ return aux(i$0, next, _K_);}]; } - if(Object.is(i$0, tbl_data.length - 1)) - /*<>*/ return 0; + if(i$0 === tbl_data.length - 1) /*<>*/ return 0; /*<>*/ var /*<>*/ buck$1 = caml_check_bound(tbl_data, i$0)[1 + i$0], @@ -26235,8 +26157,7 @@ if(! prec) /*<>*/ return 0; var k = prec[1], next = prec[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(k, key))){ + (0 === /*<>*/ caml_compare(k, key)){ h[1] = h[1] - 1 | 0; return prec$0 ? (prec$0[3] = next, 0) @@ -26255,24 +26176,21 @@ (Stdlib[8], 1); var k1 = match[1], d1 = match[2], next1 = match[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(key, k1))) + (0 === /*<>*/ caml_compare(key, k1)) /*<>*/ return d1; if(! next1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var k2 = next1[1], d2 = next1[2], next2 = next1[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(key, k2))) + (0 === /*<>*/ caml_compare(key, k2)) /*<>*/ return d2; if(! next2) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var k3 = next2[1], d3 = next2[2], next3 = next2[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(key, k3))) + (0 === /*<>*/ caml_compare(key, k3)) /*<>*/ return d3; var param = next3; for(;;){ @@ -26281,8 +26199,7 @@ (Stdlib[8], 1); var k = param[1], data = param[2], next = param[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(key, k))) + (0 === /*<>*/ caml_compare(key, k)) /*<>*/ return data; param = next; } @@ -26294,28 +26211,24 @@ if(! match) /*<>*/ return 0; var k1 = match[1], d1 = match[2], next1 = match[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(key, k1))) + (0 === /*<>*/ caml_compare(key, k1)) /*<>*/ return [0, d1]; if(! next1) /*<>*/ return 0; var k2 = next1[1], d2 = next1[2], next2 = next1[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(key, k2))) + (0 === /*<>*/ caml_compare(key, k2)) /*<>*/ return [0, d2]; if(! next2) /*<>*/ return 0; var k3 = next2[1], d3 = next2[2], next3 = next2[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(key, k3))) + (0 === /*<>*/ caml_compare(key, k3)) /*<>*/ return [0, d3]; var param = next3; for(;;){ if(! param) /*<>*/ return 0; var k = param[1], data = param[2], next = param[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(key, k))) + (0 === /*<>*/ caml_compare(key, k)) /*<>*/ return [0, data]; param = next; } @@ -26328,8 +26241,7 @@ if(! param) /*<>*/ return 0; var k = param[1], data = param[2], next = param[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(k, key))) + (0 === /*<>*/ caml_compare(k, key)) break; param = next; } @@ -26345,8 +26257,7 @@ } var k$0 = param$0[1], data$0 = param$0[2], next$0 = param$0[3]; /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_compare(k$0, key))){ + (0 === /*<>*/ caml_compare(k$0, key)){ /*<>*/ /*<>*/ var dst$0 = [0, data$0, 24029]; dst[1 + offset] = dst$0; @@ -26367,9 +26278,7 @@ if(slot){ var k = slot[1], next = slot[3]; /*<>*/ if - (! - /*<>*/ Object.is - (0, /*<>*/ caml_compare(k, key))){slot = next; continue;} + (0 !== /*<>*/ caml_compare(k, key)){slot = next; continue;} slot[1] = key; slot[2] = data; var _l_ = 0; @@ -26397,8 +26306,7 @@ var k = param[1], next = param[3], - _j_ = - Object.is(0, /*<>*/ caml_compare(k, key)) ? 1 : 0; + _j_ = 0 === /*<>*/ caml_compare(k, key) ? 1 : 0; if(_j_) return _j_; param = next; } @@ -26590,7 +26498,7 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _E_ = Object.is(0, l) ? 0 : 1, + _E_ = 0 !== l ? 1 : 0, _F_ = _E_ ? /*<>*/ runtime.caml_ephe_blit_key @@ -26610,7 +26518,7 @@ for(;;){ /*<>*/ set(ar, i, x); /*<>*/ /*<>*/ var _D_ = i + 1 | 0; - if(Object.is(_C_, i)) break; + if(_C_ === i) break; i = _D_; } } @@ -26647,7 +26555,7 @@ /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; /*<>*/ /*<>*/ var _B_ = i + 1 | 0; - if(Object.is(_A_, i)) break; + if(_A_ === i) break; i = _B_; } } @@ -26804,7 +26712,7 @@ j = j$1; } } - if(Object.is(0, prev_len)){ + if(0 === prev_len){ var _k_ = t[5]; /*<>*/ caml_check_bound(t[1], _k_)[1 + _k_] = emptybucket; var _l_ = t[5]; @@ -27866,7 +27774,7 @@ return 0; /*<>*/ } function default_pp_mark_open_tag(param){ - /*<>*/ if(! Object.is(param[1], String_tag)) + /*<>*/ if(param[1] !== String_tag) /*<>*/ return cst$10; /*<>*/ var s = param[2], @@ -27876,7 +27784,7 @@ (Stdlib[28], cst$9, _aD_); /*<>*/ } function default_pp_mark_close_tag(param){ - /*<>*/ if(! Object.is(param[1], String_tag)) + /*<>*/ if(param[1] !== String_tag) /*<>*/ return cst$13; /*<>*/ var s = param[2], @@ -28580,8 +28488,8 @@ return 0; /*<>*/ } for(;;){ - if(Object.is(right[1], len)){ - var _O_ = Object.is(left[1], len) ? 0 : 1; + if(right[1] === len){ + var _O_ = left[1] !== len ? 1 : 0; return _O_ ? flush(0) : _O_; } /*<>*/ /*<>*/ var @@ -29323,7 +29231,7 @@ return ib[1]; /*<>*/ } function beginning_of_input(ib){ - /*<>*/ return Object.is(0, ib[4]) ? 1 : 0; + /*<>*/ return 0 === ib[4] ? 1 : 0; /*<>*/ } function name_of_input(ib){ /*<>*/ var match = ib[9]; @@ -29424,7 +29332,7 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[12], 1); lim[1] = /*<>*/ caml_call4(Stdlib[84], ic, buf, 0, len); - return Object.is(0, lim[1]) + return 0 === lim[1] ? (eof[1] = 1, caml_call1(scan_close_ic, ic)) : (i[1] = 1, /*<>*/ caml_bytes_get(buf, 0)); /*<>*/ } @@ -29668,9 +29576,7 @@ /*<>*/ /*<>*/ var l = /*<>*/ caml_ml_string_length(tok); /*<>*/ if - (! - /*<>*/ Object.is(0, l) - && 43 === /*<>*/ caml_string_get(tok, 0)) + (0 !== l && 43 === /*<>*/ caml_string_get(tok, 0)) /*<>*/ return /*<>*/ caml_call3 (Stdlib_String[16], tok, 1, l - 1 | 0); /*<>*/ return tok; @@ -29682,7 +29588,7 @@ function scan_decimal_digit_star(width, ib){ /*<>*/ var width$0 = width; /*<>*/ for(;;){ - if(Object.is(0, width$0)) /*<>*/ return width$0; + if(0 === width$0) /*<>*/ return width$0; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width$0; @@ -29704,7 +29610,7 @@ } /*<>*/ } function scan_decimal_digit_plus(width, ib){ - /*<>*/ if(Object.is(0, width)) + /*<>*/ if(0 === width) /*<>*/ return bad_token_length(cst_decimal_digits); /*<>*/ /*<>*/ var c = checked_peek_char(ib); @@ -29716,7 +29622,7 @@ /*<>*/ return scan_decimal_digit_star(width$0, ib); /*<>*/ } function scan_digit_plus(basis, digitp, width$2, ib){ - /*<>*/ if(Object.is(0, width$2)) + /*<>*/ if(0 === width$2) /*<>*/ return bad_token_length(cst_digits); /*<>*/ /*<>*/ var c$0 = checked_peek_char(ib); @@ -29729,7 +29635,7 @@ /*<>*/ width$3 = store_char(width$2, ib, c$0), width = width$3; /*<>*/ for(;;){ - if(Object.is(0, width)) /*<>*/ return width; + if(0 === width) /*<>*/ return width; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width; /*<>*/ if @@ -29798,7 +29704,7 @@ /*<>*/ return scan_decimal_digit_plus(width$0, ib); /*<>*/ /*<>*/ var width = store_char(width$0, ib, c); - /*<>*/ if( /*<>*/ Object.is(0, width)) + /*<>*/ if(0 === width) /*<>*/ return width; /*<>*/ /*<>*/ var c$0 = peek_char(ib); @@ -29837,7 +29743,7 @@ } /*<>*/ } function scan_fractional_part(width, ib){ - /*<>*/ if(Object.is(0, width)) + /*<>*/ if(0 === width) /*<>*/ return width; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ return ib[1] @@ -29848,7 +29754,7 @@ : scan_decimal_digit_star(store_char(width, ib, c), ib); /*<>*/ } function scan_exponent_part(width, ib){ - /*<>*/ if(Object.is(0, width)) + /*<>*/ if(0 === width) /*<>*/ return width; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width; @@ -29860,7 +29766,7 @@ /*<>*/ var /*<>*/ width = scan_sign(width$1, ib), /*<>*/ width$0 = scan_decimal_digit_star(width, ib); - /*<>*/ if( /*<>*/ Object.is(0, width$0)) + /*<>*/ if(0 === width$0) /*<>*/ return [0, width$0, precision]; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) @@ -29900,11 +29806,11 @@ lowercase( /*<>*/ caml_string_get(str, i)); if(! /*<>*/ Object.is(lowercase(c), _aL_)) /*<>*/ /*<>*/ caml_call1(error, 0); - if(Object.is(0, width$0[1])) + if(0 === width$0[1]) /*<>*/ /*<>*/ caml_call1(error, 0); width$0[1] = store_char(width$0[1], ib, c); /*<>*/ /*<>*/ var _aM_ = i + 1 | 0; - if(Object.is(_aK_, i)) break; + if(_aK_ === i) break; i = _aM_; } } @@ -29912,13 +29818,13 @@ /*<>*/ } function scan_hex_float(width, precision, ib){ /*<>*/ var - _aw_ = Object.is(0, width) ? 1 : 0, + _aw_ = 0 === width ? 1 : 0, _ax_ = _aw_ || end_of_input(ib); /*<>*/ if(_ax_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _ay_ = Object.is(0, width$0) ? 1 : 0, + _ay_ = 0 === width$0 ? 1 : 0, _az_ = _ay_ || end_of_input(ib); /*<>*/ if(_az_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); @@ -29932,7 +29838,7 @@ if(32 <= switcher) break a; /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _aA_ = Object.is(0, width$1) ? 1 : 0, + _aA_ = 0 === width$1 ? 1 : 0, _aB_ = _aA_ || end_of_input(ib); /*<>*/ if(_aB_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); @@ -29945,15 +29851,14 @@ if(48 === c){ /*<>*/ var /*<>*/ width$3 = store_char(width$0, ib, c), - _aE_ = Object.is(0, width$3) ? 1 : 0, + _aE_ = 0 === width$3 ? 1 : 0, _aF_ = _aE_ || end_of_input(ib); /*<>*/ if(_aF_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); /*<>*/ /*<>*/ var width$4 = check_case_insensitive_string(width$3, ib, bad_hex_float, cst_x); - /*<>*/ if - (! /*<>*/ Object.is(0, width$4) && ! end_of_input(ib)){ + /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var _aG_ = peek_char(ib) - 46 | 0; b: @@ -29971,10 +29876,7 @@ } var width$5 = width$4; } - /*<>*/ if - (! - /*<>*/ Object.is(0, width$5) - && ! end_of_input(ib)){ + /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$0 = peek_char(ib); if(46 === c$0){ @@ -29982,10 +29884,7 @@ width$6 = store_char(width$5, ib, c$0); b: { - /*<>*/ if - (! - /*<>*/ Object.is(0, width$6) - && ! end_of_input(ib)){ + /*<>*/ if(0 !== width$6 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var match = peek_char(ib); c: @@ -30017,17 +29916,14 @@ } else var width$8 = width$5; - /*<>*/ if - (! - /*<>*/ Object.is(0, width$8) - && ! end_of_input(ib)){ + /*<>*/ if(0 !== width$8 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$1 = peek_char(ib); if(80 !== c$1 && 112 !== c$1) /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$1), - _aH_ = Object.is(0, width$9) ? 1 : 0, + _aH_ = 0 === width$9 ? 1 : 0, _aI_ = _aH_ || end_of_input(ib); /*<>*/ if(_aI_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); @@ -30044,7 +29940,7 @@ } /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _aC_ = Object.is(0, width$2) ? 1 : 0, + _aC_ = 0 === width$2 ? 1 : 0, _aD_ = _aC_ || end_of_input(ib); /*<>*/ if(_aD_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); @@ -30055,13 +29951,13 @@ /*<>*/ } function scan_caml_float_rest(width, precision, ib){ /*<>*/ var - _as_ = Object.is(0, width) ? 1 : 0, + _as_ = 0 === width ? 1 : 0, _at_ = _as_ || end_of_input(ib); /*<>*/ if(_at_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); /*<>*/ var /*<>*/ width$0 = scan_decimal_digit_star(width, ib), - _au_ = Object.is(0, width$0) ? 1 : 0, + _au_ = 0 === width$0 ? 1 : 0, _av_ = _au_ || end_of_input(ib); /*<>*/ if(_av_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); @@ -30088,13 +29984,13 @@ /*<>*/ } function scan_caml_float(width, precision, ib){ /*<>*/ var - _ae_ = Object.is(0, width) ? 1 : 0, + _ae_ = 0 === width ? 1 : 0, _af_ = _ae_ || end_of_input(ib); /*<>*/ if(_af_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _ag_ = Object.is(0, width$0) ? 1 : 0, + _ag_ = 0 === width$0 ? 1 : 0, _ah_ = _ag_ || end_of_input(ib); /*<>*/ if(_ah_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); @@ -30103,7 +29999,7 @@ if(58 > c){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _ai_ = Object.is(0, width$1) ? 1 : 0, + _ai_ = 0 === width$1 ? 1 : 0, _aj_ = _ai_ || end_of_input(ib); /*<>*/ if(_aj_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); @@ -30114,7 +30010,7 @@ else if(48 <= c){ /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _ak_ = Object.is(0, width$2) ? 1 : 0, + _ak_ = 0 === width$2 ? 1 : 0, _al_ = _ak_ || end_of_input(ib); /*<>*/ if(_al_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); @@ -30125,13 +30021,13 @@ (width$2, precision, ib); /*<>*/ var /*<>*/ width$3 = store_char(width$2, ib, c$0), - _am_ = Object.is(0, width$3) ? 1 : 0, + _am_ = 0 === width$3 ? 1 : 0, _an_ = _am_ || end_of_input(ib); /*<>*/ if(_an_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); var width$10 = scan_digit_plus(cst_hexadecimal, is_hexa_digit, width$3, ib), - _ao_ = Object.is(0, width$10) ? 1 : 0, + _ao_ = 0 === width$10 ? 1 : 0, _ap_ = _ao_ || end_of_input(ib); /*<>*/ if(_ap_) /*<>*/ bad_input(cst_no_dot_or_exponent_part_fo); @@ -30148,10 +30044,7 @@ width$4 = store_char(width$10, ib, c$1); c: { - /*<>*/ if - (! - /*<>*/ Object.is(0, width$4) - && ! end_of_input(ib)){ + /*<>*/ if(0 !== width$4 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var match = peek_char(ib); d: @@ -30189,14 +30082,13 @@ } var width$7 = width$6; } - /*<>*/ if - (! /*<>*/ Object.is(0, width$7) && ! end_of_input(ib)){ + /*<>*/ if(0 !== width$7 && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$2 = peek_char(ib); if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$7; /*<>*/ var /*<>*/ width$8 = store_char(width$7, ib, c$2), - _aq_ = Object.is(0, width$8) ? 1 : 0, + _aq_ = 0 === width$8 ? 1 : 0, _ar_ = _aq_ || end_of_input(ib); /*<>*/ if(_ar_) /*<>*/ bad_input(cst_not_a_valid_float_in_hexad); @@ -30210,7 +30102,7 @@ function scan_string(stp, width, ib){ /*<>*/ var width$0 = width; /*<>*/ for(;;){ - if(Object.is(0, width$0)) /*<>*/ return width$0; + if(0 === width$0) /*<>*/ return width$0; /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ if(ib[1]) /*<>*/ return width$0; @@ -30245,7 +30137,7 @@ : 65 <= c ? c - 55 | 0 : c - 48 | 0; /*<>*/ } function check_next_char(message, width, ib){ - /*<>*/ if(Object.is(0, width)) + /*<>*/ if(0 === width) /*<>*/ return bad_token_length(message); /*<>*/ /*<>*/ var c = peek_char(ib); /*<>*/ return ib[1] @@ -30466,7 +30358,7 @@ : character_mismatch(c, ci); /*<>*/ } function scanf_bad_input(ib, x){ - /*<>*/ if(Object.is(x[1], Scan_failure)) + /*<>*/ if(x[1] === Scan_failure) var s = x[2]; else{ if(! Object.is(x[1], Stdlib[7])) @@ -31276,8 +31168,7 @@ catch(exc$0){ var exc = caml_wrap_exception(exc$0); if - (! - Object.is(exc[1], Scan_failure) + (exc[1] !== Scan_failure && ! Object.is(exc[1], Stdlib[7]) && ! Object.is(exc, Stdlib[12])){ if(! Object.is(exc[1], Stdlib[6])) throw caml_maybe_attach_backtrace(exc, 0); @@ -31451,8 +31342,7 @@ /*<>*/ var _a_ = Stdlib_Obj[10], slot = - /*<>*/ Object.is - ( /*<>*/ runtime.caml_obj_tag(exn), _a_) + /*<>*/ runtime.caml_obj_tag(exn) === _a_ ? exn : exn[1]; /*<>*/ return /*<>*/ caml_register_named_value @@ -31531,7 +31421,7 @@ accu[1] = (223 * accu[1] | 0) + _am_ | 0; /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(Object.is(_al_, i)) break; + if(_al_ === i) break; i = _an_; } } @@ -31590,7 +31480,7 @@ = _ah_; /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; - if(Object.is(_ag_, i)) break; + if(_ag_ === i) break; i = _aj_; } } @@ -31692,7 +31582,7 @@ } /*<>*/ } function to_list(arr){ - /*<>*/ return Object.is(0, arr) + /*<>*/ return 0 === arr ? 0 : /*<>*/ caml_call1 (Stdlib_Array[10], arr); @@ -31869,7 +31759,7 @@ /*<>*/ caml_check_bound(res, i$0)[1 + i$0] = _J_; /*<>*/ /*<>*/ var _K_ = i$0 + 1 | 0; - if(Object.is(_D_, i$0)) break; + if(_D_ === i$0) break; i$0 = _K_; } } @@ -31886,7 +31776,7 @@ /*<>*/ caml_check_bound(res, _H_)[1 + _H_] = _G_; /*<>*/ /*<>*/ var _I_ = i + 1 | 0; - if(Object.is(_F_, i)) break; + if(_F_ === i) break; i = _I_; } } @@ -31918,7 +31808,7 @@ return 0; /*<>*/ } function create_table(public_methods){ - /*<>*/ if(Object.is(0, public_methods)) + /*<>*/ if(0 === public_methods) /*<>*/ return new_table([0]); /*<>*/ var /*<>*/ tags = @@ -32048,15 +31938,14 @@ function run_initializers(obj, table){ /*<>*/ var inits = table[8], - _r_ = Object.is(0, inits) ? 0 : 1; + _r_ = 0 !== inits ? 1 : 0; return _r_ ? iter_f(obj, inits) : _r_; /*<>*/ } function run_initializers_opt(obj_0, obj, table){ /*<>*/ if(obj_0) /*<>*/ return obj; var inits = table[8]; - if(! Object.is(0, inits)) - /*<>*/ iter_f(obj, inits); + if(0 !== inits) /*<>*/ iter_f(obj, inits); /*<>*/ return obj; /*<>*/ } function create_object_and_run_initiali(obj_0, table){ @@ -32085,7 +31974,7 @@ r[1] = [0, caml_check_bound(keys, i)[1 + i], _p_, 0]; /*<>*/ /*<>*/ var _q_ = i + 1 | 0; - if(Object.is(n, i)) break; + if(n === i) break; i = _q_; } } @@ -32611,7 +32500,7 @@ function(x){ /*<>*/ /*<>*/ var fn = modu[1 + i$1]; - if(Object.is(fn$0, fn)) + if(fn$0 === fn) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stdlib[15], loc], 1); /*<>*/ return /*<>*/ caml_call1 @@ -32654,7 +32543,7 @@ /*<>*/ modu[1 + i] = init; /*<>*/ /*<>*/ var _i_ = i + 1 | 0; - if(Object.is(_h_, i)) break; + if(_h_ === i) break; i = _i_; } } @@ -32671,8 +32560,7 @@ /*<>*/ } function update_mod_block(comps$0, modu, n){ /*<>*/ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_obj_tag(n)) + (0 === /*<>*/ caml_obj_tag(n) && comps$0.length - 1 <= n.length - 1){ /*<>*/ var _e_ = comps$0.length - 2 | 0, @@ -32688,8 +32576,7 @@ if(typeof shape === "number"){ if(2 === shape){ if - ( /*<>*/ Object.is - (0, /*<>*/ caml_obj_tag(n$0)) + (0 === /*<>*/ caml_obj_tag(n$0) && 4 === n$0.length - 1){ /*<>*/ var /*<>*/ cl = modu[1 + i], @@ -32715,7 +32602,7 @@ } /*<>*/ /*<>*/ var _f_ = i + 1 | 0; - if(Object.is(_e_, i)) break; + if(_e_ === i) break; i = _f_; } } @@ -32837,7 +32724,7 @@ /*<>*/ caml_check_bound(h[2], i)[1 + i] = 0; /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; - if(Object.is(_ap_, i)) break; + if(_ap_ === i) break; i = _aq_; } } @@ -32845,7 +32732,7 @@ /*<>*/ } function reset(h){ /*<>*/ var len = h[2].length - 1; - return Object.is(len, h[4]) + return len === h[4] ? clear(h) : (h [1] @@ -32887,7 +32774,7 @@ do_bucket(caml_check_bound(d, i)[1 + i]); /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(Object.is(_aj_, i)) break; + if(_aj_ === i) break; i = _ak_; } } @@ -32927,7 +32814,7 @@ (caml_check_bound(odata, i)[1 + i]); /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(Object.is(_af_, i)) break; + if(_af_ === i) break; i = _ah_; } } @@ -33699,7 +33586,7 @@ (eph, i, caml_check_bound(keys, i)[1 + i]); /*<>*/ /*<>*/ var _J_ = i + 1 | 0; - if(Object.is(_I_, i)) break; + if(_I_ === i) break; i = _J_; } } @@ -33709,7 +33596,7 @@ /*<>*/ /*<>*/ var l = length$1(eph); /*<>*/ try{ - if(! Object.is(l, keys.length - 1)) + if(l !== keys.length - 1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var @@ -33729,7 +33616,7 @@ (Stdlib[3], 1); /*<>*/ /*<>*/ var _F_ = i + 1 | 0; - if(Object.is(_D_, i)) break; + if(_D_ === i) break; i = _F_; } } @@ -33758,7 +33645,7 @@ (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var _A_ = i + 1 | 0; - if(Object.is(_z_, i)) break; + if(_z_ === i) break; i = _A_; } } @@ -33781,7 +33668,7 @@ | 0; /*<>*/ /*<>*/ var _x_ = i + 1 | 0; - if(Object.is(_u_, i)) break; + if(_u_ === i) break; i = _x_; } } @@ -33791,7 +33678,7 @@ /*<>*/ var len = k.length - 1, /*<>*/ len$0 = length$1(c); - if(! Object.is(len, len$0)) /*<>*/ return 1; + if(len !== len$0) /*<>*/ return 1; /*<>*/ var /*<>*/ i$1 = len - 1 | 0, i = i$1; @@ -33824,7 +33711,7 @@ (c, i, caml_check_bound(k, i)[1 + i]); /*<>*/ /*<>*/ var _r_ = i + 1 | 0; - if(Object.is(_q_, i)) break; + if(_q_ === i) break; i = _r_; } } @@ -33926,7 +33813,7 @@ /*<>*/ } function test_keys$0(k, e){ /*<>*/ try{ - if(! /*<>*/ Object.is(length$1(e), k.length - 1)) + if(length$1(e) !== k.length - 1) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[3], 1); /*<>*/ var @@ -33942,7 +33829,7 @@ if(Object.is(x, caml_check_bound(k, i)[1 + i])){ /*<>*/ /*<>*/ var _i_ = i + 1 | 0; - if(Object.is(_g_, i)) break; + if(_g_ === i) break; i = _i_; continue; } @@ -34294,7 +34181,7 @@ } /*<>*/ /*<>*/ var _az_ = i + 1 | 0; - if(Object.is(_ay_, i)) break; + if(_ay_ === i) break; i = _az_; } } @@ -34521,7 +34408,7 @@ function loop$0(counter, i){ /*<>*/ var i$0 = i; /*<>*/ for(;;){ - if(Object.is(i$0, l)) + if(i$0 === l) /*<>*/ return /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ /*<>*/ var @@ -34553,7 +34440,7 @@ function loop_bs(counter, n, i){ /*<>*/ var n$0 = n, i$0 = i; /*<>*/ for(;;){ - if(Object.is(i$0, l)){ + if(i$0 === l){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ return add_bs(n$0); @@ -34596,7 +34483,7 @@ (Stdlib_Buffer[12], b, 92); /*<>*/ /*<>*/ var _L_ = j + 1 | 0; - if(Object.is(n, j)) break; + if(n === j) break; j = _L_; } } @@ -34819,9 +34706,7 @@ function concat(dirname, filename){ /*<>*/ var l = caml_ml_string_length(dirname); /*<>*/ if - (! - /*<>*/ Object.is(0, l) - && ! is_dir_sep$1(dirname, l - 1 | 0)){ + (0 !== l && ! is_dir_sep$1(dirname, l - 1 | 0)){ /*<>*/ /*<>*/ var _p_ = /*<>*/ caml_call2 @@ -34877,8 +34762,7 @@ function extension(name){ /*<>*/ /*<>*/ var l = extension_len(name); - /*<>*/ return /*<>*/ Object.is - (0, l) + /*<>*/ return 0 === l ? cst$18 : /*<>*/ caml_call3 (Stdlib_String[16], @@ -34889,8 +34773,7 @@ function chop_extension(name){ /*<>*/ /*<>*/ var l = extension_len(name); - /*<>*/ return /*<>*/ Object.is - (0, l) + /*<>*/ return 0 === l ? /*<>*/ caml_call1 (Stdlib[1], cst_Filename_chop_extension) : caml_call3 @@ -34902,8 +34785,7 @@ function remove_extension(name){ /*<>*/ /*<>*/ var l = extension_len(name); - /*<>*/ return /*<>*/ Object.is - (0, l) + /*<>*/ return 0 === l ? name : caml_call3 (Stdlib_String[16], @@ -35849,7 +35731,7 @@ [11, "Stdlib.Effect.Unhandled(", [2, 0, [12, 41, 0]]], "Stdlib.Effect.Unhandled(%s)"]; function printer(param){ - /*<>*/ if(! Object.is(param[1], Unhandled)) + /*<>*/ if(param[1] !== Unhandled) /*<>*/ return 0; /*<>*/ var x = param[2], @@ -35969,7 +35851,7 @@ (Stdlib[2], cst_impossible); /*<>*/ } function effc(eff, k, last_fiber){ - /*<>*/ if(! Object.is(eff, Initial_setup)) + /*<>*/ if(eff !== Initial_setup) /*<>*/ return error(0); k[2] = last_fiber; /*<>*/ throw [0, E, k]; @@ -35983,7 +35865,7 @@ } catch(exn$0){ var exn = caml_wrap_exception(exn$0); - if(! Object.is(exn[1], E)) throw caml_maybe_attach_backtrace(exn, 0); + if(exn[1] !== E) throw caml_maybe_attach_backtrace(exn, 0); var k = exn[2]; /*<>*/ return k; } From af33f939303eb3437621c65fea00367fc41521c4 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Fri, 11 Oct 2024 10:05:02 +0200 Subject: [PATCH 10/10] Changes --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 87ab15d50e..0a26a1b1cf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,7 @@ that follows the semantic of the backend (js or wasm) * Compiler: warn on joo_global_object * Compiler: revisit static env handling (#1708) +* Compiler: Make phys_equal more like native (wrt NaN and +0/-0) #1410 * Runtime: change Sys.os_type on windows (Cygwin -> Win32) * Runtime: backtraces are really expensive, they need to be be explicitly requested at compile time (--enable with-js-error) or at startup (OCAMLRUNPARAM=b=1)