|
9085 | 9085 | "use strict"; |
9086 | 9086 | var |
9087 | 9087 | runtime = globalThis.jsoo_runtime, |
9088 | | - caml_greaterequal = runtime.caml_greaterequal, |
9089 | 9088 | caml_hash = runtime.caml_hash, |
9090 | 9089 | caml_int_compare = runtime.caml_int_compare, |
9091 | | - caml_lessequal = runtime.caml_lessequal, |
9092 | | - caml_lessthan = runtime.caml_lessthan, |
9093 | 9090 | caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, |
9094 | 9091 | caml_mul = runtime.caml_mul, |
9095 | 9092 | caml_wrap_exception = runtime.caml_wrap_exception, |
|
9102 | 9099 | function succ(n){ /*<<int32.ml:48:21>>*/ return n + 1 | 0;} |
9103 | 9100 | function pred(n){ /*<<int32.ml:49:21>>*/ return n - 1 | 0;} |
9104 | 9101 | function abs(n){ |
9105 | | - /*<<int32.ml:50:15>>*/ return caml_greaterequal(n, 0) ? n : - n | 0 /*<<int32.ml:50:40>>*/ ; |
| 9102 | + /*<<int32.ml:50:22>>*/ return 0 <= n ? n : - n | 0 /*<<int32.ml:50:40>>*/ ; |
9106 | 9103 | } |
9107 | 9104 | function lognot(n){ /*<<int32.ml:53:29>>*/ return n ^ -1;} |
9108 | 9105 | var |
|
9116 | 9113 | max_int$0 = /*<<int32.ml:58:20>>*/ Stdlib[19], |
9117 | 9114 | unsigned_to_int = |
9118 | 9115 | /*<<int32.ml:59:6>>*/ function(n){ |
9119 | | - /*<<int32.ml:60:11>>*/ if |
9120 | | - (caml_greaterequal(n, 0) |
9121 | | - && /*<<int32.ml:60:22>>*/ caml_lessequal(n, max_int$0)) |
| 9116 | + /*<<int32.ml:60:18>>*/ if(0 <= n && n <= max_int$0) |
9122 | 9117 | /*<<int32.ml:61:10>>*/ return [0, n]; |
9123 | 9118 | /*<<int32.ml:63:10>>*/ return 0; |
9124 | 9119 | /*<<int32.ml:63:14>>*/ }; |
|
9146 | 9141 | /*<<?>>*/ throw caml_maybe_attach_backtrace(exn, 0); |
9147 | 9142 | } |
9148 | 9143 | /*<<int32.ml:78:24>>*/ } |
9149 | | - var compare = /*<<?>>*/ caml_int_compare, equal = runtime.caml_equal; |
| 9144 | + var compare = /*<<?>>*/ caml_int_compare; |
| 9145 | + function equal(x, y){ /*<<int32.ml:83:31>>*/ return x === y ? 1 : 0;} |
9150 | 9146 | function unsigned_compare(n, m){ |
9151 | 9147 | var |
9152 | 9148 | y = /*<<int32.ml:86:26>>*/ m + 2147483648 | 0, |
9153 | 9149 | x = /*<<int32.ml:86:10>>*/ n + 2147483648 | 0; |
9154 | 9150 | /*<<int32.ml:82:28>>*/ return caml_int_compare(x, y) /*<<int32.ml:86:41>>*/ ; |
9155 | 9151 | } |
9156 | 9152 | function unsigned_lt(n, m){ |
9157 | | - /*<<int32.ml:89:2>>*/ return caml_lessthan |
9158 | | - (n + 2147483648 | 0, m + 2147483648 | 0) /*<<int32.ml:89:31>>*/ ; |
| 9153 | + /*<<int32.ml:89:31>>*/ return (n + 2147483648 | 0) < (m + 2147483648 | 0) |
| 9154 | + ? 1 |
| 9155 | + : 0; |
9159 | 9156 | } |
9160 | 9157 | function min(x, y){ |
9161 | | - /*<<int32.ml:91:21>>*/ return caml_lessequal(x, y) ? x : y /*<<int32.ml:91:41>>*/ ; |
| 9158 | + /*<<int32.ml:91:27>>*/ return x <= y ? x : y /*<<int32.ml:91:41>>*/ ; |
9162 | 9159 | } |
9163 | 9160 | function max(x, y){ |
9164 | | - /*<<int32.ml:92:21>>*/ return caml_greaterequal(x, y) ? x : y /*<<int32.ml:92:41>>*/ ; |
| 9161 | + /*<<int32.ml:92:27>>*/ return y <= x ? x : y /*<<int32.ml:92:41>>*/ ; |
9165 | 9162 | } |
9166 | 9163 | function unsigned_div(n, d){ |
9167 | | - /*<<int32.ml:98:5>>*/ if(caml_lessthan(d, 0)) |
| 9164 | + /*<<int32.ml:98:13>>*/ if(d < 0) |
9168 | 9165 | /*<<int32.ml:99:7>>*/ return unsigned_lt(n, d) ? zero : one /*<<int32.ml:103:41>>*/ ; |
9169 | 9166 | var |
9170 | 9167 | q = /*<<int32.ml:101:23>>*/ runtime.caml_div(n >>> 1 | 0, d) << 1, |
|
9370 | 9367 | "use strict"; |
9371 | 9368 | var |
9372 | 9369 | runtime = globalThis.jsoo_runtime, |
9373 | | - caml_greaterequal = runtime.caml_greaterequal, |
9374 | 9370 | caml_hash = runtime.caml_hash, |
9375 | 9371 | caml_int_compare = runtime.caml_int_compare, |
9376 | | - caml_lessequal = runtime.caml_lessequal, |
9377 | | - caml_lessthan = runtime.caml_lessthan, |
9378 | 9372 | caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, |
9379 | 9373 | caml_mul = runtime.caml_mul, |
9380 | 9374 | caml_wrap_exception = runtime.caml_wrap_exception, |
|
9386 | 9380 | function succ(n){ /*<<nativeint.ml:44:21>>*/ return n + 1 | 0;} |
9387 | 9381 | function pred(n){ /*<<nativeint.ml:45:21>>*/ return n - 1 | 0;} |
9388 | 9382 | function abs(n){ |
9389 | | - /*<<nativeint.ml:46:15>>*/ return caml_greaterequal(n, 0) ? n : - n | 0 /*<<nativeint.ml:46:40>>*/ ; |
| 9383 | + /*<<nativeint.ml:46:22>>*/ return 0 <= n ? n : - n | 0 /*<<nativeint.ml:46:40>>*/ ; |
9390 | 9384 | } |
9391 | 9385 | var |
9392 | 9386 | size = /*<<?>>*/ Stdlib_Sys[9], |
|
9395 | 9389 | function lognot(n){ /*<<nativeint.ml:50:29>>*/ return n ^ -1;} |
9396 | 9390 | var max_int$0 = /*<<nativeint.ml:53:16>>*/ Stdlib[19]; |
9397 | 9391 | function unsigned_to_int(n){ |
9398 | | - /*<<nativeint.ml:55:7>>*/ if |
9399 | | - (caml_greaterequal(n, 0) |
9400 | | - && /*<<nativeint.ml:55:18>>*/ caml_lessequal(n, max_int$0)) |
| 9392 | + /*<<nativeint.ml:55:14>>*/ if(0 <= n && n <= max_int$0) |
9401 | 9393 | /*<<nativeint.ml:56:6>>*/ return [0, n]; |
9402 | 9394 | /*<<nativeint.ml:58:6>>*/ return 0; |
9403 | 9395 | /*<<nativeint.ml:58:10>>*/ } |
|
9426 | 9418 | /*<<nativeint.ml:71:28>>*/ return caml_int_compare(x, y) /*<<nativeint.ml:75:41>>*/ ; |
9427 | 9419 | } |
9428 | 9420 | function unsigned_lt(n, m){ |
9429 | | - /*<<nativeint.ml:78:2>>*/ return caml_lessthan |
9430 | | - (n - min_int | 0, m - min_int | 0) /*<<nativeint.ml:78:31>>*/ ; |
| 9421 | + /*<<nativeint.ml:78:31>>*/ return (n - min_int | 0) < (m - min_int | 0) |
| 9422 | + ? 1 |
| 9423 | + : 0; |
9431 | 9424 | } |
9432 | 9425 | function min(x, y){ |
9433 | | - /*<<nativeint.ml:80:21>>*/ return caml_lessequal(x, y) ? x : y /*<<nativeint.ml:80:41>>*/ ; |
| 9426 | + /*<<nativeint.ml:80:27>>*/ return x <= y ? x : y /*<<nativeint.ml:80:41>>*/ ; |
9434 | 9427 | } |
9435 | 9428 | function max(x, y){ |
9436 | | - /*<<nativeint.ml:81:21>>*/ return caml_greaterequal(x, y) ? x : y /*<<nativeint.ml:81:41>>*/ ; |
| 9429 | + /*<<nativeint.ml:81:27>>*/ return y <= x ? x : y /*<<nativeint.ml:81:41>>*/ ; |
9437 | 9430 | } |
9438 | 9431 | function unsigned_div(n, d){ |
9439 | | - /*<<nativeint.ml:87:5>>*/ if(caml_lessthan(d, 0)) |
| 9432 | + /*<<nativeint.ml:87:13>>*/ if(d < 0) |
9440 | 9433 | /*<<nativeint.ml:88:7>>*/ return unsigned_lt(n, d) ? zero : one /*<<nativeint.ml:92:41>>*/ ; |
9441 | 9434 | var |
9442 | 9435 | q = /*<<nativeint.ml:90:23>>*/ runtime.caml_div(n >>> 1 | 0, d) << 1, |
@@ -24016,34 +24009,31 @@ |
24016 | 24009 | var |
24017 | 24010 | r = /*<<random.ml:227:38>>*/ bits32(s) >>> 1 | 0, |
24018 | 24011 | v = /*<<random.ml:228:12>>*/ caml_mod(r, n); |
24019 | | - /*<<random.ml:230:14>>*/ if |
24020 | | - (! caml_greaterthan(r - v | 0, (Stdlib_Int32[9] - n | 0) + 1 | 0)) |
| 24012 | + /*<<random.ml:230:46>>*/ if |
| 24013 | + (((Stdlib_Int32[9] - n | 0) + 1 | 0) >= (r - v | 0)) |
24021 | 24014 | /*<<random.ml:232:9>>*/ return v; |
24022 | 24015 | } |
24023 | 24016 | /*<<random.ml:232:10>>*/ } |
24024 | 24017 | function int32(s, bound){ |
24025 | | - /*<<random.ml:235:7>>*/ return caml_lessequal(bound, 0) |
| 24018 | + /*<<random.ml:235:18>>*/ return bound <= 0 |
24026 | 24019 | ? /*<<random.ml:236:9>>*/ Stdlib[1].call(null, cst_Random_int32) |
24027 | 24020 | : /*<<random.ml:237:9>>*/ int32aux(s, bound) /*<<random.ml:237:25>>*/ ; |
24028 | 24021 | } |
24029 | 24022 | function int32_in_range(s, min, max){ |
24030 | | - /*<<random.ml:246:7>>*/ if(caml_greaterthan(min, max)) |
| 24023 | + /*<<random.ml:246:16>>*/ if(max < min) |
24031 | 24024 | /*<<random.ml:247:6>>*/ return Stdlib[1].call |
24032 | 24025 | (null, cst_Random_int32_in_range) /*<<random.ml:254:39>>*/ ; |
24033 | 24026 | var |
24034 | 24027 | span = |
24035 | 24028 | /*<<random.ml:249:17>>*/ Stdlib_Int32[6].call(null, max - min | 0); |
24036 | | - /*<<random.ml:251:9>>*/ if(! caml_lessequal(span, Stdlib_Int32[1])) |
| 24029 | + /*<<random.ml:251:27>>*/ if(span > Stdlib_Int32[1]) |
24037 | 24030 | /*<<random.ml:254:22>>*/ return min + int32aux(s, span) | 0 /*<<random.ml:254:39>>*/ ; |
24038 | 24031 | /*<<random.ml:251:27>>*/ for(;;){ |
24039 | 24032 | var |
24040 | 24033 | r = |
24041 | 24034 | /*<<random.ml:242:27>>*/ /*<<random.ml:242:12>>*/ caml_int64_to_int32 |
24042 | 24035 | ( /*<<random.ml:242:27>>*/ caml_lxm_next(s)); |
24043 | | - /*<<random.ml:243:7>>*/ if |
24044 | | - (! |
24045 | | - caml_lessthan(r, min) |
24046 | | - && ! /*<<random.ml:243:18>>*/ caml_greaterthan(r, max)) |
| 24036 | + /*<<random.ml:243:14>>*/ if(r >= min && max >= r) |
24047 | 24037 | /*<<random.ml:243:67>>*/ return r; |
24048 | 24038 | } |
24049 | 24039 | /*<<random.ml:254:39>>*/ } |
|
0 commit comments