From 683da3626c7c950d9d1f18d86d5803acca925ea5 Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Thu, 20 Apr 2023 18:31:53 +0200 Subject: [PATCH] fix --- compiler/lib/generate.ml | 1 - compiler/tests-compiler/effects_toplevel.ml | 2 +- compiler/tests-compiler/gh1007.ml | 14 +- compiler/tests-compiler/gh1320.ml | 4 +- compiler/tests-compiler/gh747.ml | 169 +-- 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/tailcall.ml | 8 +- .../variable_declaration_output.ml | 4 +- compiler/tests-full/stdlib.cma.expected.js | 1029 ++++++++++------- compiler/tests-jsoo/test_obj.ml | 5 + 14 files changed, 739 insertions(+), 563 deletions(-) diff --git a/compiler/lib/generate.ml b/compiler/lib/generate.ml index 9eb31f7e18..a652b6ae6a 100644 --- a/compiler/lib/generate.ml +++ b/compiler/lib/generate.ml @@ -1017,7 +1017,6 @@ let throw_statement ctx cx k loc = ] 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/effects_toplevel.ml b/compiler/tests-compiler/effects_toplevel.ml index 56f7ada14d..bdce5206cc 100644 --- a/compiler/tests-compiler/effects_toplevel.ml +++ b/compiler/tests-compiler/effects_toplevel.ml @@ -85,7 +85,7 @@ let%expect_test "test-compiler/lib-effects/test1.ml" = undef, function(_d_){ var _e_ = i + 1 | 0; - if(5 !== i) return caml_cps_exact_call1(_c_, _e_); + if(! Object.is(5, i)) return caml_cps_exact_call1(_c_, _e_); caml_callback(g, [undef]); var Test = [0]; runtime.caml_register_global(2, Test, "Test"); diff --git a/compiler/tests-compiler/gh1007.ml b/compiler/tests-compiler/gh1007.ml index 46f5b06fd9..c749ffeef4 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], rev_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]; @@ -240,7 +240,7 @@ let () = M.myfun M.x }, sort = function(n, l){ - if(2 === n){ + if(Object.is(2, n)){ if(l){ var match = l[2]; if(match){ @@ -256,7 +256,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]; @@ -390,7 +390,7 @@ let () = M.run () }; 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; var i = _a_; } } @@ -499,7 +499,7 @@ let () = M.run () even = closures$0[1]; if(even(i)) caml_call1(Stdlib[42], cst); var _e_ = i + 1 | 0; - if(4 === i){ + if(Object.is(4, i)){ var _d_ = caml_call1(list_rev, delayed[1]); return caml_call2(list_iter, function(f){return caml_call1(f, 0);}, _d_); } @@ -631,7 +631,7 @@ let () = M.run () var f = param$0[2], param$0 = f(0); } var _g_ = i + 1 | 0; - if(4 === i){ + if(Object.is(4, i)){ var _f_ = caml_call1(list_rev, delayed[1]); return caml_call2(list_iter, function(f){return caml_call1(f, 0);}, _f_); } diff --git a/compiler/tests-compiler/gh1320.ml b/compiler/tests-compiler/gh1320.ml index 14d95d6c10..7e491da697 100644 --- a/compiler/tests-compiler/gh1320.ml +++ b/compiler/tests-compiler/gh1320.ml @@ -51,7 +51,7 @@ let () = myfun () function(i){ function g(x){return app(f, x);} function f(x){ - return 0 === x ? 1 : runtime.caml_mul(i, app(g, x - 1 | 0)); + return Object.is(0, x) ? 1 : runtime.caml_mul(i, app(g, x - 1 | 0)); } var block = [0, g, f]; return block; @@ -61,7 +61,7 @@ let () = myfun () _b_ = g(i); caml_call2(Stdlib_Printf[3], _a_, _b_); var _c_ = i + 1 | 0; - if(4 === i) return 0; + if(Object.is(4, i)) return 0; var i = _c_; } } diff --git a/compiler/tests-compiler/gh747.ml b/compiler/tests-compiler/gh747.ml index 7d04e7195f..e6c7470a1d 100644 --- a/compiler/tests-compiler/gh747.ml +++ b/compiler/tests-compiler/gh747.ml @@ -316,86 +316,89 @@ end 91: function format_backtrace_slot(pos, slot){ 92: function info(is_raise){ 93: /*<>*/ return is_raise - 94: ? 0 === pos ? cst_Raised_at : cst_Re_raised_at - 95: : 0 === pos ? cst_Raised_by_primitive_operat : 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 - 1 - 1 | 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: var 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: big_endian, - 159: word_size, - 160: int_size, - 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 |}] + 94: ? Object.is(0, pos) ? cst_Raised_at : cst_Re_raised_at + 95: : Object.is + 96: (0, pos) + 97: ? cst_Raised_by_primitive_operat + 98: : cst_Called_from; + 99: /*<>*/ } + 100: /*<>*/ if(0 === slot[0]){ + 101: /*<>*/ var + 102: _h_ = slot[5], + 103: _i_ = slot[4], + 104: _j_ = slot[3], + 105: _k_ = slot[6] ? cst_inlined : cst, + 106: _l_ = slot[2], + 107: _m_ = slot[7], + 108: /*<>*/ _n_ = info(slot[1]); + 109: /*<>*/ return [0, + 110: /*<>*/ caml_call8 + 111: (Stdlib_Printf[4], _a_, _n_, _m_, _l_, _k_, _j_, _i_, _h_)]; + 112: } + 113: if(slot[1]) /*<>*/ return 0; + 114: /*<>*/ /*<>*/ var _o_ = info(0); + 115: /*<>*/ return [0, + 116: /*<>*/ caml_call2(Stdlib_Printf[4], _b_, _o_)]; + 117: /*<>*/ } + 118: function print_exception_backtrace(outchan, backtrace){ + 119: /*<>*/ if(! backtrace) + 120: /*<>*/ return /*<>*/ caml_call2 + 121: (Stdlib_Printf[1], outchan, _d_); + 122: var a = backtrace[1], _f_ = a.length - 1 - 1 | 0, _e_ = 0; + 123: if(_f_ >= 0){ + 124: var i = _e_; + 125: for(;;){ + 126: /*<>*/ /*<>*/ var + 127: match = format_backtrace_slot(i, runtime.caml_check_bound(a, i)[1 + i]); + 128: if(match){ + 129: var str = match[1]; + 130: /*<>*/ /*<>*/ caml_call3 + 131: (Stdlib_Printf[1], outchan, _c_, str); + 132: } + 133: /*<>*/ /*<>*/ var _g_ = i + 1 | 0; + 134: if(Object.is(_f_, i)) break; + 135: var i = _g_; + 136: } + 137: } + 138: return 0; + 139: /*<>*/ } + 140: function compare(left, right, e1, e2){ + 141: /*<>*/ if(0 === e1[0]){ + 142: var v1 = e1[1]; + 143: if(0 !== e2[0]) /*<>*/ return -1; + 144: var v2 = e2[1]; + 145: /*<>*/ return /*<>*/ caml_call2 + 146: (left, v1, v2); + 147: } + 148: var v1$0 = e1[1]; + 149: if(0 === e2[0]) /*<>*/ return 1; + 150: var v2$0 = e2[1]; + 151: /*<>*/ return /*<>*/ caml_call2 + 152: (right, v1$0, v2$0); + 153: /*<>*/ } + 154: /*<>*/ var + 155: /*<>*/ Either = [0, compare], + 156: Test = + 157: [0, + 158: executable_name, + 159: os_type, + 160: backend_type, + 161: big_endian, + 162: word_size, + 163: int_size, + 164: unix, + 165: win32, + 166: cygwin, + 167: max_array_length, + 168: max_floatarray_length, + 169: max_string_length, + 170: Unhandled, + 171: format_backtrace_slot, + 172: print_exception_backtrace, + 173: Either]; + 174: runtime.caml_register_global(12, Test, "Test"); + 175: return; + 176: /*<>*/ } + 177: (globalThis)); + 178: + 179: //# sourceMappingURL=test.map |}] diff --git a/compiler/tests-compiler/global_deadcode.ml b/compiler/tests-compiler/global_deadcode.ml index fa91300b45..34e83bd590 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); @@ -84,7 +84,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 cbddec6373..c40fc53b12 100644 --- a/compiler/tests-compiler/loops.ml +++ b/compiler/tests-compiler/loops.ml @@ -87,12 +87,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]; var i$0 = _b_; } } @@ -100,7 +100,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; var i = _a_; } var acc$1 = [0, x, a[1]], acc$0 = acc$1, param$0 = xs; @@ -134,11 +134,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; var j = _b_; } var _a_ = k + 1 | 0; - if(10 === k) return 0; + if(Object.is(10, k)) return 0; var k = _a_; } } @@ -175,11 +175,11 @@ let for_for_while () = id[1]++; } var _b_ = j + 1 | 0; - if(10 === j) break; + if(Object.is(10, j)) break; var j = _b_; } var _a_ = k + 1 | 0; - if(10 === k) return 0; + if(Object.is(10, k)) return 0; var k = _a_; } } @@ -310,8 +310,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; } var x$0 = 2; @@ -435,12 +435,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, i$4 = i$5; } @@ -450,7 +450,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: { @@ -466,7 +466,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; @@ -486,10 +486,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; } @@ -499,7 +499,7 @@ let add_substitute = 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(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; } else @@ -515,12 +515,12 @@ let add_substitute = caml_call2(add_string, b, caml_call1(f, ident)); var 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; else{ caml_call2(add_char, b, previous$0); 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 49f6c3314f..a26e1a77d1 100644 --- a/compiler/tests-compiler/mutable_closure.ml +++ b/compiler/tests-compiler/mutable_closure.ml @@ -124,26 +124,26 @@ let%expect_test _ = closures = function(i){ function f(counter, n){ - if(- 1 === n){ + if(Object.is(- 1, n)){ var _j_ = - 2; if(counter >= 50) return caml_trampoline_return(g, [0, _j_]); var counter$1 = counter + 1 | 0; return g(counter$1, _j_); } - if(0 === n) return i; + if(Object.is(0, n)) return i; var _k_ = n - 1 | 0; if(counter >= 50) return caml_trampoline_return(g, [0, _k_]); var counter$0 = counter + 1 | 0; return g(counter$0, _k_); } function g(counter, n){ - if(- 1 === n){ + if(Object.is(- 1, n)){ var _h_ = - 2; if(counter >= 50) return caml_trampoline_return(f, [0, _h_]); var counter$1 = counter + 1 | 0; return f(counter$1, _h_); } - if(0 === n) return i; + if(Object.is(0, n)) return i; var _i_ = n - 1 | 0; if(counter >= 50) return caml_trampoline_return(f, [0, _i_]); var counter$0 = counter + 1 | 0; @@ -162,7 +162,7 @@ let%expect_test _ = indirect[1] = [0, function(i, f){return function(param){return f(i);};}(i, f), _f_]; var _g_ = i + 1 | 0; - if(3 === i){ + if(Object.is(3, i)){ var _d_ = indirect[1], indirect$0 = diff --git a/compiler/tests-compiler/tailcall.ml b/compiler/tests-compiler/tailcall.ml index 92b9e4933d..a685925e08 100644 --- a/compiler/tests-compiler/tailcall.ml +++ b/compiler/tests-compiler/tailcall.ml @@ -46,14 +46,14 @@ let%expect_test _ = {| function fun1(param){ function odd$0(counter, x){ - if(0 === x) return 0; + if(Object.is(0, x)) return 0; var _g_ = x - 1 | 0; if(counter >= 50) return caml_trampoline_return(even$0, [0, _g_]); var counter$0 = counter + 1 | 0; return even$0(counter$0, _g_); } function even$0(counter, x){ - if(0 === x) return 1; + if(Object.is(0, x)) return 1; var _f_ = x - 1 | 0; if(counter >= 50) return caml_trampoline_return(odd$0, [0, _f_]); var counter$0 = counter + 1 | 0; @@ -95,10 +95,10 @@ 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 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 odd(x){return caml_trampoline(odd$0(x));} function even(x){return caml_trampoline(even$0(x));} 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 01411ba93d..98156e10da 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -485,7 +485,10 @@ match = /*<>*/ runtime.caml_string_get(s, 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 s; } /*<>*/ var @@ -656,7 +659,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 @@ -697,7 +700,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); @@ -1321,13 +1324,16 @@ out_of_heap_tag = 1001, unaligned_tag = 1002; function info(obj){ - /*<>*/ if( /*<>*/ caml_obj_tag(obj) !== 247) + /*<>*/ if + (! + /*<>*/ Object.is + ( /*<>*/ caml_obj_tag(obj), 247)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); /*<>*/ var /*<>*/ info = /*<>*/ runtime.caml_obj_raw_field(obj, 1), - arity = 64 === Stdlib_Sys[9] ? info >> 56 : info >> 24, + arity = Object.is(64, Stdlib_Sys[9]) ? info >> 56 : info >> 24, /*<>*/ start_env = info << 8 >>> 9 | 0; /*<>*/ return [0, arity, start_env]; /*<>*/ } @@ -1336,18 +1342,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); @@ -1420,7 +1438,7 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _b_ = 0 !== l ? 1 : 0, + _b_ = Object.is(0, l) ? 0 : 1, _c_ = _b_ ? /*<>*/ runtime.caml_ephe_blit_key @@ -1577,10 +1595,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){ @@ -1696,10 +1715,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 @@ -1712,10 +1731,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 @@ -1723,10 +1742,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 @@ -2143,7 +2162,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; var xs$0 = xs$1, ys$0 = ys$1; } /*<>*/ } @@ -2251,7 +2271,7 @@ /*<>*/ return [0, s, _Z_];}; /*<>*/ } function take_aux(n, xs){ - /*<>*/ return 0 === n + /*<>*/ return Object.is(0, n) ? empty : function (param){ @@ -2270,8 +2290,8 @@ /*<>*/ } function drop(n, xs){ /*<>*/ return 0 <= n - ? 0 - === n + ? Object.is + (0, n) ? xs : function (param){ @@ -2283,7 +2303,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); var n$0 = n$1, xs$0 = xs$1; @@ -2357,8 +2378,9 @@ s = /*<>*/ caml_call1(to_lazy, s$0); /*<>*/ return function(_O_){ var _N_ = runtime.caml_obj_tag(s); - if(250 === _N_) return s[1]; - if(246 !== _N_ && 244 !== _N_) /*<>*/ return s; + if(Object.is(250, _N_)) return s[1]; + if(! Object.is(246, _N_) && ! Object.is(244, _N_)) + /*<>*/ return s; /*<>*/ return /*<>*/ caml_call1 (CamlinternalLazy[2], s);}; /*<>*/ } @@ -3092,7 +3114,7 @@ /*<>*/ a: { if(40 <= c){ - if(92 === c) /*<>*/ return cst; + if(Object.is(92, c)) /*<>*/ return cst; if(127 > c) break a; } else{ @@ -3198,14 +3220,17 @@ bom = 65279, rep = 65533; 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 @@ -3404,7 +3429,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, @@ -3419,7 +3445,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, @@ -3449,7 +3475,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]; @@ -3850,7 +3876,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_; var param$0 = l; } @@ -3872,7 +3898,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; var param$0 = l; } @@ -3883,7 +3910,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]; var param$0 = l; } @@ -3915,7 +3943,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_; var param$0 = l; } @@ -3932,8 +3960,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)]; } @@ -4246,7 +4274,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){ @@ -4262,7 +4290,7 @@ } } } - else if(3 === n && l){ + else if(Object.is(3, n) && l){ var _v_ = l[2]; if(_v_){ var match$2 = _v_[2]; @@ -4330,7 +4358,7 @@ } /*<>*/ } function rev_sort(n, l){ - /*<>*/ if(2 === n){ + /*<>*/ if(Object.is(2, n)){ if(l){ var match = l[2]; if(match){ @@ -4346,7 +4374,7 @@ } } } - else if(3 === n && l){ + else if(Object.is(3, n) && l){ var _t_ = l[2]; if(_t_){ var match$2 = _t_[2]; @@ -4418,7 +4446,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){ @@ -4429,14 +4457,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]; @@ -4448,26 +4476,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 @@ -4481,14 +4509,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 @@ -4525,7 +4553,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, @@ -4554,7 +4582,7 @@ } /*<>*/ } function rev_sort(n, l){ - /*<>*/ if(2 === n){ + /*<>*/ if(Object.is(2, n)){ if(l){ var match = l[2]; if(match){ @@ -4565,14 +4593,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]; @@ -4584,19 +4612,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]]]; @@ -4605,7 +4633,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 @@ -4617,7 +4645,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]]]; @@ -4626,7 +4654,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 @@ -4661,7 +4689,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, @@ -4703,7 +4731,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 @@ -4747,7 +4775,8 @@ a2 = l2$0[1], /*<>*/ c = /*<>*/ caml_call2(cmp, a1, a2); - /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ if(! /*<>*/ Object.is(0, c)) + /*<>*/ return c; var l1$0 = l1$1, l2$0 = l2$1; } /*<>*/ } @@ -5236,7 +5265,10 @@ _ag_ = param - 9 | 0; a: { - if(4 < _ag_ >>> 0){if(23 !== _ag_) break a;} else if(2 === _ag_) break a; + if(4 < _ag_ >>> 0){ + if(! Object.is(23, _ag_)) break a; + } + else if(Object.is(2, _ag_)) break a; /*<>*/ return 1; } /*<>*/ return 0; @@ -5284,7 +5316,7 @@ break a; } if(11 <= match){ - if(13 === match) break b; + if(Object.is(13, match)) break b; } else if(8 <= match) break b; } @@ -5318,7 +5350,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){ @@ -5379,7 +5411,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), @@ -5401,7 +5434,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), @@ -5451,7 +5485,7 @@ /*<>*/ caml_call2 (f, caml_bytes_unsafe_get(a, i), r[1]); /*<>*/ /*<>*/ var _Q_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; var i = _Q_; } } @@ -5488,7 +5522,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 @@ -5675,7 +5709,7 @@ j[1] = i; } /*<>*/ /*<>*/ var _G_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; var i = _G_; } } @@ -6767,7 +6801,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; @@ -6994,7 +7031,7 @@ j[1] = i; } /*<>*/ /*<>*/ var _v_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; var i = _v_; } } @@ -7278,8 +7315,8 @@ /*<>*/ runtime.caml_output_value_to_string(0, _a_), /*<>*/ match = /*<>*/ runtime.caml_string_get(s, 3); - if(189 === match) /*<>*/ return 1; - if(190 === match) /*<>*/ return 0; + if(Object.is(189, match)) /*<>*/ return 1; + if(Object.is(190, match)) /*<>*/ return 0; /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _b_], 1); /*<>*/ } @@ -7348,7 +7385,8 @@ cst_Array_init = "Array.init", cst_Stdlib_Array_Bottom = "Stdlib.Array.Bottom"; 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); @@ -7389,16 +7427,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); /*<>*/ } @@ -7467,7 +7505,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 @@ -7525,7 +7564,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 @@ -7562,7 +7601,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 @@ -7640,7 +7680,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 = @@ -7678,7 +7718,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; var i = _R_; } } @@ -7745,7 +7785,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, @@ -7845,7 +7886,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]]), @@ -7936,7 +7977,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; var i$6 = _C_; } } @@ -7991,7 +8032,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; var i$4 = _B_; } } @@ -8305,7 +8346,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: @@ -8720,7 +8763,7 @@ for(;;){ r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); /*<>*/ /*<>*/ var _L_ = i - 1 | 0; - if(0 === i) break; + if(Object.is(0, i)) break; var i = _L_; } } @@ -8754,7 +8797,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, @@ -8890,7 +8934,7 @@ (a, i$0, e$1); } /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; - if(0 === i$6) break; + if(Object.is(0, i$6)) break; var i$6 = _J_; } } @@ -8947,7 +8991,7 @@ (a, 0, e$0); } /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; - if(2 === i$4) break; + if(Object.is(2, i$4)) break; var i$4 = _I_; } } @@ -9124,7 +9168,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 = /*<>*/ runtime.caml_make_vect @@ -9328,7 +9373,7 @@ /*<>*/ return n ^ -1; /*<>*/ } var _a_ = Stdlib_Sys[9]; - if(32 === _a_) + if(Object.is(32, _a_)) /*<>*/ var /*<>*/ max_int$0 = Stdlib[19], unsigned_to_int = @@ -9340,7 +9385,7 @@ /*<>*/ return 0; /*<>*/ }; else{ - if(64 !== _a_) + if(! Object.is(64, _a_)) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _b_], 1); var @@ -9367,8 +9412,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; /*<>*/ } @@ -9515,8 +9560,8 @@ (x, y); /*<>*/ } function equal(x, y){ - /*<>*/ return 0 - === /*<>*/ caml_int64_compare(x, y) + /*<>*/ return Object.is + (0, /*<>*/ caml_int64_compare(x, y)) ? 1 : 0; /*<>*/ } @@ -9659,8 +9704,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; /*<>*/ } @@ -10434,7 +10479,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); @@ -10548,7 +10594,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 @@ -10579,7 +10625,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v), - _S_ = 0 === c ? 1 : 0; + _S_ = Object.is(0, c) ? 1 : 0; if(_S_) return _S_; var r$0 = 0 <= c ? r : l, param$0 = r$0; } @@ -10592,7 +10638,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 @@ -10620,7 +10666,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], @@ -10628,7 +10674,7 @@ /*<>*/ _P_ = union(r1, r2$0); /*<>*/ return join(union(l1, l2$0), v1, _P_); } - 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], @@ -10669,7 +10715,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); @@ -10761,7 +10808,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), @@ -10770,7 +10818,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; @@ -10786,7 +10834,7 @@ l1 = s1$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(0 === c){ + /*<>*/ if( /*<>*/ Object.is(0, c)){ /*<>*/ /*<>*/ var _F_ = subset(l1, l2); /*<>*/ if(! _F_) /*<>*/ return _F_; @@ -10945,7 +10993,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; } } @@ -11051,7 +11100,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; } @@ -11059,13 +11108,13 @@ function try_join(l, v, r){ /*<>*/ a: { - if(0 !== l){ + if(! Object.is(0, l)){ /*<>*/ /*<>*/ var _v_ = max_elt(l); /*<>*/ if (0 <= /*<>*/ caml_call2(Ord[1], _v_, v)) break a; } - if(0 !== r){ + if(! Object.is(0, r)){ /*<>*/ /*<>*/ var _u_ = min_elt(r); /*<>*/ if (0 <= /*<>*/ caml_call2(Ord[1], v, _u_)) @@ -11259,7 +11308,7 @@ l = s$0[1], /*<>*/ n = /*<>*/ caml_call2(Ord[1], v, low); - if(0 !== n){ + if(! Object.is(0, n)){ if(0 <= n){ /*<>*/ var /*<>*/ c$0 = [0, v, r, c], @@ -11455,7 +11504,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 @@ -11479,7 +11528,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; } } @@ -11602,7 +11652,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; } @@ -11617,7 +11667,7 @@ l = param$0[1], /*<>*/ c = /*<>*/ caml_call2(Ord[1], x, v), - _G_ = 0 === c ? 1 : 0; + _G_ = Object.is(0, c) ? 1 : 0; if(_G_) return _G_; var r$0 = 0 <= c ? r : l, param$0 = r$0; } @@ -11702,7 +11752,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); @@ -11727,7 +11777,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); @@ -11906,7 +11956,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 @@ -12102,10 +12152,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), @@ -12133,7 +12185,9 @@ d1 = e1[2], v1 = e1[1], _r_ = - 0 === /*<>*/ caml_call2(Ord[1], v1, v2) ? 1 : 0; + Object.is(0, /*<>*/ caml_call2(Ord[1], v1, v2)) + ? 1 + : 0; if(_r_){ /*<>*/ /*<>*/ var _s_ = /*<>*/ caml_call2(cmp, d1, d2); @@ -12258,7 +12312,7 @@ l = m$0[1], /*<>*/ n = /*<>*/ caml_call2(Ord[1], v, low); - if(0 !== n){ + if(! Object.is(0, n)){ if(0 <= n){ /*<>*/ var /*<>*/ c$0 = [0, v, d, r, c], @@ -12415,7 +12469,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]; @@ -12568,7 +12622,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]; @@ -12834,7 +12888,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); } /*<>*/ } @@ -12847,7 +12901,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); } /*<>*/ } @@ -12860,7 +12914,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); } /*<>*/ } @@ -12941,12 +12995,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, @@ -12975,13 +13029,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, @@ -12998,7 +13052,7 @@ 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); @@ -13017,7 +13071,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){ @@ -13043,10 +13097,10 @@ /*<>*/ 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; @@ -13063,7 +13117,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; } else @@ -13081,7 +13135,7 @@ (b, /*<>*/ caml_call1(f, ident)); var previous = 32, i$4 = next_i; } - else if(92 === previous){ + else if( /*<>*/ Object.is(92, previous)){ /*<>*/ add_char(b, 92); /*<>*/ add_char(b, previous$0); /*<>*/ var @@ -13089,7 +13143,7 @@ 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, @@ -13412,7 +13466,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]); } @@ -13423,7 +13477,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; @@ -13455,7 +13509,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]); } @@ -13463,7 +13520,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; @@ -13609,8 +13666,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; /*<>*/ } @@ -14211,7 +14268,7 @@ /*<>*/ caml_call1(Stdlib[29], _dQ_)); /*<>*/ /*<>*/ var _dR_ = i + 1 | 0; - if(31 === i) + if(Object.is(31, i)) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], char_set$0); var i = _dR_; @@ -14221,13 +14278,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) @@ -14301,7 +14358,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, @@ -14527,7 +14586,7 @@ } /*<>*/ } function bprint_char_literal(buf, chr){ - /*<>*/ if(37 === chr){ + /*<>*/ if(Object.is(37, chr)){ /*<>*/ buffer_add_string(buf, cst$8); /*<>*/ return; } @@ -14855,12 +14914,12 @@ c = /*<>*/ caml_call1 (Stdlib[29], i); - if(37 === c){ + if(Object.is(37, c)){ /*<>*/ buffer_add_char(buf, 37); /*<>*/ buffer_add_char(buf, 37); /*<>*/ return; } - if(64 === c){ + if(Object.is(64, c)){ /*<>*/ buffer_add_char(buf, 37); /*<>*/ buffer_add_char(buf, 64); /*<>*/ return; @@ -14973,7 +15032,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 @@ -16945,7 +17004,7 @@ /*<>*/ caml_call1(Stdlib[18], width); if(width$0 <= len) /*<>*/ return str; /*<>*/ var - _c6_ = 2 === padty$0 ? 48 : 32, + _c6_ = Object.is(2, padty$0) ? 48 : 32, /*<>*/ res = /*<>*/ caml_call2 (Stdlib_Bytes[1], width$0, _c6_); @@ -16962,14 +17021,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, @@ -16988,14 +17053,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, @@ -17029,20 +17099,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 = @@ -17176,7 +17249,7 @@ if(9 < c - 48 >>> 0) /*<>*/ put(c); else{ - if(0 === left[1]){ + if(Object.is(0, left[1])){ /*<>*/ put(95); left[1] = 3; } @@ -17345,7 +17418,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; /*<>*/ } @@ -17369,7 +17442,7 @@ a: { if(23 < _cS_ >>> 0){ - if(55 === _cS_) break a; + if(Object.is(55, _cS_)) break a; } else if(21 < _cS_ - 1 >>> 0) break a; /*<>*/ var @@ -18691,7 +18764,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, @@ -18733,7 +18806,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; @@ -18831,10 +18907,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 @@ -18857,8 +18933,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; } var str_ind$2 = str_ind + 1 | 0; @@ -18867,10 +18943,10 @@ (end_ind); 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]; @@ -18915,7 +18991,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]]; @@ -18932,10 +19008,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]]; @@ -18964,12 +19040,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); @@ -18984,7 +19060,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); } @@ -19001,7 +19077,7 @@ - 45 | 0; if(12 < switcher$0 >>> 0){ - if(17 === switcher$0){ + if(Object.is(17, switcher$0)){ /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 @@ -19025,10 +19101,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 @@ -19075,7 +19152,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; } @@ -19087,10 +19164,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 @@ -19366,8 +19444,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 _bc_ = str_ind$0 + 1 | 0; @@ -19398,14 +19476,14 @@ 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_char(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)) @@ -19415,7 +19493,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) /*<>*/ unexpected_end_of_format (end_ind); @@ -19423,7 +19501,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); @@ -19435,7 +19513,7 @@ /*<>*/ return parse_char_set_content (counter$2, _ba_, end_ind); } - if(93 === c$2){ + if(Object.is(93, c$2)){ /*<>*/ add_char(c$0); /*<>*/ add_char(45); /*<>*/ return str_ind$2 + 1 @@ -19450,7 +19528,7 @@ /*<>*/ return parse_char_set_content (counter$1, _bb_, end_ind); } - if(37 === c$0){ + if(Object.is(37, c$0)){ /*<>*/ add_char(c$1); var _a$_ = str_ind$0 + 1 | 0; /*<>*/ if(counter >= 50) @@ -19461,7 +19539,7 @@ (counter$0, _a$_, end_ind); } } - if(37 === c$0) + if(Object.is(37, c$0)) /*<>*/ fail_single_percent (str_ind$0); /*<>*/ add_char(c$0); @@ -19480,10 +19558,10 @@ /*<>*/ unexpected_end_of_format (end_ind); 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, @@ -19529,7 +19607,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 /*<>*/ _a2_ = get_ign(0) ? [0, [23, 3, fmt_rest$21]] : [0, [22, fmt_rest$21]], @@ -19658,7 +19736,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); } @@ -19761,9 +19839,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); } @@ -19860,7 +19938,7 @@ break a; } } - else if(76 === symb){ + else if(Object.is(76, symb)){ /*<>*/ var /*<>*/ _aI_ = /*<>*/ caml_string_get(str, str_ind), @@ -19938,9 +20016,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,7 +20067,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, @@ -20050,7 +20128,7 @@ if(legacy_behavior$0){ /*<>*/ var /*<>*/ _an_ = 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, _an_); } @@ -20186,7 +20264,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, @@ -20242,9 +20320,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 @@ -20287,9 +20366,11 @@ /*<>*/ unexpected_end_of_format (end_ind); /*<>*/ 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; } @@ -20332,7 +20413,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) /*<>*/ unexpected_end_of_format (end_ind); @@ -20360,10 +20441,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) /*<>*/ unexpected_end_of_format (end_ind); @@ -20403,7 +20484,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), @@ -20412,7 +20493,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), @@ -20426,7 +20507,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), @@ -20434,7 +20515,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); } @@ -20463,16 +20544,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; @@ -21441,7 +21526,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, @@ -21479,7 +21566,7 @@ function replace_leading_tab(s){ /*<>*/ /*<>*/ var seen = [0, 0]; function _P_(c){ - /*<>*/ if(9 === c && ! seen[1]){ + /*<>*/ if(Object.is(9, c) && ! seen[1]){ seen[1] = 1; /*<>*/ return 32; } @@ -21570,7 +21657,9 @@ { /*<>*/ if (0 < len - && 13 === /*<>*/ caml_string_get(word, len - 1 | 0)){ + && + /*<>*/ Object.is + (13, /*<>*/ caml_string_get(word, len - 1 | 0))){ var _I_ = /*<>*/ caml_call3 @@ -21862,7 +21951,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; @@ -21996,8 +22086,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 @@ -22100,7 +22193,7 @@ if(! match) /*<>*/ return 0; var backtrace = match[1], i$1 = backtrace.length - 1 - 1 | 0, i = i$1; /*<>*/ for(;;){ - if(-1 === i) + if(Object.is(-1, i)) var _N_ = 0; else{ var _M_ = 0 === caml_check_bound(backtrace, i)[1 + i][0] ? 1 : 0; @@ -22137,8 +22230,8 @@ } /*<>*/ } function exn_slot(x){ - /*<>*/ return 0 - === /*<>*/ caml_obj_tag(x) + /*<>*/ return /*<>*/ Object.is + (0, /*<>*/ caml_obj_tag(x)) ? x[1] : x; /*<>*/ } @@ -22687,7 +22780,7 @@ return n + _e_ | 0; /*<>*/ } 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); /*<>*/ var @@ -22700,14 +22793,14 @@ 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 _d_ = i + 1 | 0; - if(15 === i) + if(Object.is(15, i)) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], result); var i = _d_; } /*<>*/ } function from_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); /*<>*/ function digit(c){ @@ -22736,7 +22829,7 @@ /*<>*/ /*<>*/ runtime.caml_bytes_set (result, i, /*<>*/ caml_call1(Stdlib_Char[1], _b_)); /*<>*/ /*<>*/ var _c_ = i + 1 | 0; - if(15 === i) + if(Object.is(15, i)) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], result); var i = _c_; @@ -23133,7 +23226,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, @@ -23291,9 +23386,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), @@ -23352,29 +23449,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); @@ -23574,7 +23671,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); var i = _z_; @@ -23582,7 +23679,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_ || @@ -23749,7 +23846,7 @@ /*<>*/ } var nativebits = - 32 === Stdlib_Nativeint[9] + Object.is(32, Stdlib_Nativeint[9]) ? function (s){ /*<>*/ return bits32(s); @@ -23760,7 +23857,7 @@ ( /*<>*/ caml_lxm_next(s)); /*<>*/ }, nativeint = - 32 === Stdlib_Nativeint[9] + Object.is(32, Stdlib_Nativeint[9]) ? function (s, bound){ /*<>*/ return int32(s, bound); @@ -24745,7 +24842,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) @@ -24763,21 +24861,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(;;){ @@ -24786,7 +24887,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; var param = next; } @@ -24798,24 +24900,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]; var param = next; } @@ -24828,7 +24934,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; var param = next; } @@ -24844,7 +24951,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; @@ -24863,7 +24971,9 @@ if(slot){ var k = slot[1], next = slot[3]; /*<>*/ if - (0 !== /*<>*/ caml_compare(k, key)){var slot = next; continue;} + (! + /*<>*/ Object.is + (0, /*<>*/ caml_compare(k, key))){var slot = next; continue;} slot[1] = key; slot[2] = data; var _q_ = 0; @@ -24891,7 +25001,8 @@ var k = param[1], next = param[3], - _o_ = 0 === /*<>*/ caml_compare(k, key) ? 1 : 0; + _o_ = + Object.is(0, /*<>*/ caml_compare(k, key)) ? 1 : 0; if(_o_) return _o_; var param = next; } @@ -25089,7 +25200,7 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _U_ = 0 !== l ? 1 : 0, + _U_ = Object.is(0, l) ? 0 : 1, _V_ = _U_ ? /*<>*/ runtime.caml_ephe_blit_key @@ -25299,7 +25410,7 @@ /*<>*/ j$1 = j - 1 | 0, j = j$1; } - if(0 === prev_len){ + if(Object.is(0, prev_len)){ var _t_ = t[5]; /*<>*/ caml_check_bound(t[1], _t_)[1 + _t_] = emptybucket; var _u_ = t[5]; @@ -25325,7 +25436,7 @@ } t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); /*<>*/ /*<>*/ var _D_ = i$4 + 1 | 0; - if(2 === i$4) break; + if(Object.is(2, i$4)) break; var i$4 = _D_; } } @@ -25865,7 +25976,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; /*<>*/ /*<>*/ caml_call2 (Stdlib_Stack[3], [0, box_type$1, width$2], state[2]); /*<>*/ return; @@ -27108,11 +27221,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); } @@ -27910,7 +28023,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(_bb_){ @@ -27938,7 +28051,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]; @@ -28041,7 +28154,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)); /*<>*/ } @@ -28113,17 +28226,18 @@ : character_mismatch(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), @@ -28133,7 +28247,7 @@ a: { if(4 < _a8_ >>> 0){ - if(23 === _a8_) break a; + if(Object.is(23, _a8_)) break a; } else if(1 < _a8_ - 2 >>> 0) break a; /*<>*/ return 0; @@ -28204,7 +28318,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; @@ -28216,12 +28334,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; @@ -28238,7 +28356,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); @@ -28250,7 +28368,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); @@ -28263,7 +28381,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 @@ -28272,7 +28390,7 @@ /*<>*/ width$0 = store_char(width, ib, c), 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; @@ -28337,11 +28455,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); @@ -28350,13 +28468,13 @@ a: { if(99 <= c$0){ - if(111 === c$0) + if(Object.is(111, c$0)) /*<>*/ return scan_octal_int (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_binary_int (store_char(width, ib, c$0), ib); @@ -28374,7 +28492,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] @@ -28385,11 +28503,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); /*<>*/ } @@ -28397,12 +28516,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]; @@ -28437,7 +28556,7 @@ lowercase( /*<>*/ caml_string_get(str, i)); if(! /*<>*/ Object.is(lowercase(c), _aU_)) /*<>*/ /*<>*/ 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 _aV_ = i + 1 | 0; @@ -28449,13 +28568,13 @@ /*<>*/ } function scan_hex_float(width, precision, ib){ /*<>*/ var - _aF_ = 0 === width ? 1 : 0, + _aF_ = Object.is(0, width) ? 1 : 0, _aG_ = _aF_ || end_of_input(ib); /*<>*/ if(_aG_) /*<>*/ bad_hex_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _aH_ = 0 === width$0 ? 1 : 0, + _aH_ = Object.is(0, width$0) ? 1 : 0, _aI_ = _aH_ || end_of_input(ib); /*<>*/ if(_aI_) /*<>*/ bad_hex_float(0); @@ -28469,27 +28588,28 @@ if(32 <= switcher) break a; /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _aJ_ = 0 === width$1 ? 1 : 0, + _aJ_ = Object.is(0, width$1) ? 1 : 0, _aK_ = _aJ_ || end_of_input(ib); /*<>*/ if(_aK_) /*<>*/ bad_hex_float(0); /*<>*/ 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), - _aN_ = 0 === width$3 ? 1 : 0, + _aN_ = Object.is(0, width$3) ? 1 : 0, _aO_ = _aN_ || end_of_input(ib); /*<>*/ if(_aO_) /*<>*/ bad_hex_float(0); /*<>*/ /*<>*/ 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 _aP_ = peek_char(ib) - 46 | 0; b: @@ -28497,7 +28617,7 @@ c: { if(34 < _aP_ >>> 0){ - if(66 === _aP_) break c; + if(Object.is(66, _aP_)) break c; } else if(32 < _aP_ - 1 >>> 0) break c; var width$5 = scan_hexadecimal_int(width$4, ib); @@ -28505,20 +28625,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 @@ -28540,14 +28666,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), - _aQ_ = 0 === width$9 ? 1 : 0, + _aQ_ = Object.is(0, width$9) ? 1 : 0, _aR_ = _aQ_ || end_of_input(ib); /*<>*/ if(_aR_) /*<>*/ bad_hex_float(0); @@ -28560,11 +28689,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), - _aL_ = 0 === width$2 ? 1 : 0, + _aL_ = Object.is(0, width$2) ? 1 : 0, _aM_ = _aL_ || end_of_input(ib); /*<>*/ if(_aM_) /*<>*/ bad_hex_float(0); @@ -28575,19 +28704,19 @@ /*<>*/ } function scan_caml_float_rest(width, precision, ib){ /*<>*/ var - _aB_ = 0 === width ? 1 : 0, + _aB_ = Object.is(0, width) ? 1 : 0, _aC_ = _aB_ || end_of_input(ib); /*<>*/ if(_aC_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_decimal_digit_star(width, ib), - _aD_ = 0 === width$0 ? 1 : 0, + _aD_ = Object.is(0, width$0) ? 1 : 0, _aE_ = _aD_ || end_of_input(ib); /*<>*/ if(_aE_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ 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 = @@ -28606,12 +28735,12 @@ /*<>*/ } function scan_caml_float(width, precision, ib){ /*<>*/ var - _an_ = 0 === width ? 1 : 0, + _an_ = Object.is(0, width) ? 1 : 0, _ao_ = _an_ || end_of_input(ib); /*<>*/ if(_ao_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$0 = scan_sign(width, ib), - _ap_ = 0 === width$0 ? 1 : 0, + _ap_ = Object.is(0, width$0) ? 1 : 0, _aq_ = _ap_ || end_of_input(ib); /*<>*/ if(_aq_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ var c = peek_char(ib); @@ -28619,7 +28748,7 @@ if(58 > c){ /*<>*/ var /*<>*/ width$1 = store_char(width$0, ib, c), - _ar_ = 0 === width$1 ? 1 : 0, + _ar_ = Object.is(0, width$1) ? 1 : 0, _as_ = _ar_ || end_of_input(ib); /*<>*/ if(_as_) /*<>*/ bad_float(0); /*<>*/ return scan_caml_float_rest @@ -28629,22 +28758,22 @@ else if(48 <= c){ /*<>*/ var /*<>*/ width$2 = store_char(width$0, ib, c), - _at_ = 0 === width$2 ? 1 : 0, + _at_ = Object.is(0, width$2) ? 1 : 0, _au_ = _at_ || end_of_input(ib); /*<>*/ if(_au_) /*<>*/ bad_float(0); /*<>*/ /*<>*/ 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), - _av_ = 0 === width$3 ? 1 : 0, + _av_ = Object.is(0, width$3) ? 1 : 0, _aw_ = _av_ || end_of_input(ib); /*<>*/ if(_aw_) /*<>*/ bad_float(0); /*<>*/ var /*<>*/ width$4 = scan_hexadecimal_int(width$3, ib), - _ax_ = 0 === width$4 ? 1 : 0, + _ax_ = Object.is(0, width$4) ? 1 : 0, _ay_ = _ax_ || end_of_input(ib); /*<>*/ if(_ay_) /*<>*/ bad_float(0); /*<>*/ var @@ -28655,17 +28784,20 @@ b: { if(32 < switcher >>> 0){ - if(-34 === switcher){ + if(Object.is(-34, switcher)){ /*<>*/ /*<>*/ var width$5 = store_char(width$4, ib, c$1); c: { - /*<>*/ if(0 !== width$5 && ! end_of_input(ib)){ + /*<>*/ if + (! + /*<>*/ Object.is(0, width$5) + && ! 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 @@ -28693,13 +28825,15 @@ } var width$8 = width$7; } - /*<>*/ if(0 !== width$8 && ! end_of_input(ib)){ + /*<>*/ if + (! /*<>*/ Object.is(0, width$8) && ! end_of_input(ib)){ /*<>*/ /*<>*/ var c$2 = peek_char(ib); - if(80 !== c$2 && 112 !== c$2) /*<>*/ return width$8; + if(! Object.is(80, c$2) && ! Object.is(112, c$2)) + /*<>*/ return width$8; /*<>*/ var /*<>*/ width$9 = store_char(width$8, ib, c$2), - _az_ = 0 === width$9 ? 1 : 0, + _az_ = Object.is(0, width$9) ? 1 : 0, _aA_ = _az_ || end_of_input(ib); /*<>*/ if(_aA_) /*<>*/ bad_hex_float(0); @@ -28713,7 +28847,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; @@ -28722,7 +28856,7 @@ a: { if(4 < _am_ >>> 0){ - if(23 === _am_) break a; + if(Object.is(23, _am_)) break a; } else if(1 < _am_ - 2 >>> 0) break a; /*<>*/ var @@ -28746,7 +28880,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] @@ -28842,7 +28976,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){ @@ -28856,7 +28990,7 @@ var _ae_ = 9; break b; } } - else if(98 === c0){var _ae_ = 8; break b;} + else if(Object.is(98, c0)){var _ae_ = 8; break b;} var _ae_ = c0; } /*<>*/ return store_char(width, ib, _ae_); @@ -28869,13 +29003,14 @@ /*<>*/ for(;;){ /*<>*/ /*<>*/ var c = check_next_char_for_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_for_string(width$1, ib); - if(10 === match){ + if(Object.is(10, match)){ /*<>*/ /*<>*/ var _ab_ = ignore_char(width$1, ib); /*<>*/ if(counter >= 50) @@ -28884,10 +29019,10 @@ var counter$0 = counter + 1 | 0; /*<>*/ return skip_spaces(counter$0, _ab_); } - if(13 === match){ + if(Object.is(13, match)){ /*<>*/ /*<>*/ var width$3 = ignore_char(width$1, ib); - if(10 === check_next_char_for_string(width$3, ib)){ + if(Object.is(10, check_next_char_for_string(width$3, ib))){ /*<>*/ /*<>*/ var _ac_ = ignore_char(width$3, ib); /*<>*/ if(counter >= 50) @@ -28914,7 +29049,7 @@ function skip_spaces(counter, width){ /*<>*/ var width$0 = width; /*<>*/ for(;;){ - if(32 !== check_next_char_for_string(width$0, ib)){ + if(! Object.is(32, check_next_char_for_string(width$0, ib))){ /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return (find_stop$0, [0, width$0]); @@ -28931,7 +29066,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); /*<>*/ } @@ -28999,7 +29134,7 @@ /*<>*/ return width; /*<>*/ } function stopper_of_formatting_lit(fmting){ - /*<>*/ if(6 === fmting) + /*<>*/ if(Object.is(6, fmting)) /*<>*/ return _p_; /*<>*/ var /*<>*/ str = @@ -29301,7 +29436,7 @@ function(width){ /*<>*/ /*<>*/ var c = check_next_char_for_char(width, ib); - if(39 === c){ + if(Object.is(39, c)){ /*<>*/ ignore_char(width, ib); /*<>*/ return; } @@ -29309,11 +29444,11 @@ /*<>*/ return; /*<>*/ }, /*<>*/ c = checked_peek_char(ib); - if(39 === c){ + if(Object.is(39, c)){ /*<>*/ var /*<>*/ width = ignore_char(width$0, ib), /*<>*/ c$0 = check_next_char_for_char(width, ib); - if(92 === c$0) + if(Object.is(92, c$0)) /*<>*/ find_stop (scan_backslash_char(ignore_char(width, ib), ib)); else @@ -29549,10 +29684,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 @@ -30213,7 +30348,7 @@ } /*<>*/ } function to_list(arr){ - /*<>*/ return 0 === arr + /*<>*/ return Object.is(0, arr) ? 0 : /*<>*/ caml_call1 (Stdlib_Array[9], arr); @@ -30437,7 +30572,7 @@ return 0; /*<>*/ } function create_table(public_methods){ - /*<>*/ if(0 === public_methods) + /*<>*/ if(Object.is(0, public_methods)) /*<>*/ return new_table([0]); /*<>*/ var /*<>*/ tags = @@ -30568,14 +30703,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){ @@ -31155,8 +31291,8 @@ /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stdlib[15], loc], 1); var _j_ = caml_obj_tag(l$0); - if(250 === _j_) return l$0[1]; - if(246 !== _j_ && 244 !== _j_) + if(Object.is(250, _j_)) return l$0[1]; + if(! Object.is(246, _j_) && ! Object.is(244, _j_)) /*<>*/ return l$0; /*<>*/ return /*<>*/ caml_call1 (CamlinternalLazy[2], l$0);}; @@ -31194,7 +31330,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 - 1 - 1 | 0, @@ -31210,8 +31347,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; @@ -31219,7 +31357,7 @@ /*<>*/ cl[1 + j] = n$0[1 + j]; /*<>*/ /*<>*/ var _c_ = j + 1 | 0; - if(3 === j) break; + if(Object.is(3, j)) break; var j = _c_; } break a; @@ -31327,10 +31465,10 @@ /*<>*/ if(random){ var _aK_ = runtime.caml_obj_tag(prng); a: - if(250 === _aK_) + if(Object.is(250, _aK_)) var _aL_ = prng[1]; else{ - if(246 !== _aK_ && 244 !== _aK_){var _aL_ = prng; break a;} + if(! Object.is(246, _aK_) && ! Object.is(244, _aK_)){var _aL_ = prng; break a;} var _aL_ = caml_call1(CamlinternalLazy[2], prng); } var @@ -32718,8 +32856,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; /*<>*/ } @@ -32728,7 +32866,10 @@ _aJ_ = caml_ml_string_length(n) < 1 ? 1 : 0, _aK_ = _aJ_ - || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + || + (Object.is(47, /*<>*/ caml_string_get(n, 0)) + ? 0 + : 1); return _aK_; /*<>*/ } function is_implicit(n){ @@ -32804,7 +32945,8 @@ var i = _az_; for(;;){ /*<>*/ if - (39 === /*<>*/ caml_string_get(s, i)) + ( /*<>*/ Object.is + (39, /*<>*/ caml_string_get(s, i))) /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[16], b, quotequote); else{ @@ -32892,11 +33034,13 @@ /*<>*/ var /*<>*/ c = /*<>*/ caml_string_get(s, i), - _aj_ = 47 === c ? 1 : 0; + _aj_ = Object.is(47, c) ? 1 : 0; if(_aj_) var _ak_ = _aj_; else - var _al_ = 92 === c ? 1 : 0, _ak_ = _al_ || (58 === c ? 1 : 0); + var + _al_ = Object.is(92, c) ? 1 : 0, + _ak_ = _al_ || (Object.is(58, c) ? 1 : 0); return _ak_; /*<>*/ } function is_relative$0(n){ @@ -32904,19 +33048,28 @@ _ad_ = caml_ml_string_length(n) < 1 ? 1 : 0, _ae_ = _ad_ - || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + || + (Object.is(47, /*<>*/ caml_string_get(n, 0)) + ? 0 + : 1); if(_ae_){ var _af_ = caml_ml_string_length(n) < 1 ? 1 : 0, _ag_ = _af_ - || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); + || + (Object.is(92, /*<>*/ caml_string_get(n, 0)) + ? 0 + : 1); if(_ag_) var _ah_ = caml_ml_string_length(n) < 2 ? 1 : 0, _ai_ = _ah_ - || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); + || + (Object.is(58, /*<>*/ caml_string_get(n, 1)) + ? 0 + : 1); else var _ai_ = _ag_; } @@ -33045,11 +33198,11 @@ } /*<>*/ /*<>*/ var c = /*<>*/ caml_string_get(s, i$0); - if(34 === c){ + if(Object.is(34, c)){ /*<>*/ loop_bs(0, i$0); /*<>*/ return; } - if(92 === c){ + if(Object.is(92, c)){ /*<>*/ loop_bs(0, i$0); /*<>*/ return; } @@ -33071,14 +33224,14 @@ } /*<>*/ /*<>*/ 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); /*<>*/ loop(i$0 + 1 | 0); /*<>*/ return; } - if(92 !== match){ + if(! Object.is(92, match)){ /*<>*/ add_bs(n$0); /*<>*/ loop(i$0); /*<>*/ return; @@ -33111,7 +33264,8 @@ /*<>*/ } function quote_cmd_filename(f){ function _N_(param){ - /*<>*/ if(34 !== param && 37 !== param) + /*<>*/ if + (! Object.is(34, param) && ! Object.is(37, param)) /*<>*/ return 0; /*<>*/ return 1; /*<>*/ } @@ -33173,11 +33327,14 @@ { if(62 <= c){ var _M_ = c - 63 | 0; - if(60 < _M_ >>> 0){if(62 <= _M_) break a;} else if(31 !== _M_) break a; + if(60 < _M_ >>> 0){ + if(62 <= _M_) break a; + } + else if(! Object.is(31, _M_)) break a; } else if(42 <= c){ - if(60 !== c) break a; + if(! Object.is(60, c)) break a; } else{ if(33 > c) break a; @@ -33226,7 +33383,10 @@ /*<>*/ /*<>*/ var _w_ = _v_ - ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 + ? Object.is + (58, /*<>*/ caml_string_get(s, 1)) + ? 1 + : 0 : _v_; } else @@ -33318,7 +33478,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 _r_ = /*<>*/ caml_call2 @@ -33346,7 +33508,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, @@ -33361,7 +33524,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, @@ -33374,7 +33539,8 @@ function extension(name){ /*<>*/ /*<>*/ var l = extension_len(name); - /*<>*/ return 0 === l + /*<>*/ return /*<>*/ Object.is + (0, l) ? cst$18 : /*<>*/ caml_call3 (Stdlib_String[16], @@ -33385,7 +33551,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 @@ -33397,7 +33564,8 @@ function remove_extension(name){ /*<>*/ /*<>*/ var l = extension_len(name); - /*<>*/ return 0 === l + /*<>*/ return /*<>*/ Object.is + (0, l) ? name : caml_call3 (Stdlib_String[16], @@ -34456,12 +34624,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, 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 |}]