|
8992 | 8992 | "use strict";
|
8993 | 8993 | var
|
8994 | 8994 | runtime = globalThis.jsoo_runtime,
|
8995 |
| - caml_greaterequal = runtime.caml_greaterequal, |
8996 | 8995 | caml_hash = runtime.caml_hash,
|
8997 | 8996 | caml_int_compare = runtime.caml_int_compare,
|
8998 |
| - caml_lessequal = runtime.caml_lessequal, |
8999 |
| - caml_lessthan = runtime.caml_lessthan, |
9000 | 8997 | caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace,
|
9001 | 8998 | caml_mul = runtime.caml_mul,
|
9002 | 8999 | caml_wrap_exception = runtime.caml_wrap_exception,
|
|
9009 | 9006 | function succ(n){ /*<<int32.ml:48:21>>*/ return n + 1 | 0;}
|
9010 | 9007 | function pred(n){ /*<<int32.ml:49:21>>*/ return n - 1 | 0;}
|
9011 | 9008 | function abs(n){
|
9012 |
| - /*<<int32.ml:50:15>>*/ return caml_greaterequal(n, 0) ? n : - n | 0 /*<<int32.ml:50:40>>*/ ; |
| 9009 | + /*<<int32.ml:50:22>>*/ return 0 <= n ? n : - n | 0 /*<<int32.ml:50:40>>*/ ; |
9013 | 9010 | }
|
9014 | 9011 | function lognot(n){ /*<<int32.ml:53:29>>*/ return n ^ -1;}
|
9015 | 9012 | var
|
|
9023 | 9020 | max_int$0 = /*<<int32.ml:58:6>>*/ Stdlib[19],
|
9024 | 9021 | unsigned_to_int =
|
9025 | 9022 | /*<<int32.ml:59:6>>*/ function(n){
|
9026 |
| - /*<<int32.ml:60:11>>*/ if |
9027 |
| - (caml_greaterequal(n, 0) |
9028 |
| - && /*<<int32.ml:60:22>>*/ caml_lessequal(n, max_int$0)) |
| 9023 | + /*<<int32.ml:60:18>>*/ if(0 <= n && n <= max_int$0) |
9029 | 9024 | /*<<int32.ml:61:10>>*/ return [0, n];
|
9030 | 9025 | /*<<int32.ml:63:10>>*/ return 0;
|
9031 | 9026 | /*<<int32.ml:63:14>>*/ };
|
|
9053 | 9048 | /*<<?>>*/ throw caml_maybe_attach_backtrace(_b_, 0);
|
9054 | 9049 | }
|
9055 | 9050 | /*<<int32.ml:78:24>>*/ }
|
9056 |
| - var compare = /*<<?>>*/ caml_int_compare, equal = runtime.caml_equal; |
| 9051 | + var compare = /*<<?>>*/ caml_int_compare; |
| 9052 | + function equal(x, y){ /*<<int32.ml:83:31>>*/ return x === y ? 1 : 0;} |
9057 | 9053 | function unsigned_compare(n, m){
|
9058 | 9054 | var
|
9059 | 9055 | y = /*<<int32.ml:86:26>>*/ m + 2147483648 | 0,
|
9060 | 9056 | x = /*<<int32.ml:86:10>>*/ n + 2147483648 | 0;
|
9061 | 9057 | /*<<int32.ml:82:28>>*/ return caml_int_compare(x, y) /*<<int32.ml:86:41>>*/ ;
|
9062 | 9058 | }
|
9063 | 9059 | function unsigned_lt(n, m){
|
9064 |
| - /*<<int32.ml:89:2>>*/ return caml_lessthan |
9065 |
| - (n + 2147483648 | 0, m + 2147483648 | 0) /*<<int32.ml:89:31>>*/ ; |
| 9060 | + /*<<int32.ml:89:31>>*/ return (n + 2147483648 | 0) < (m + 2147483648 | 0) |
| 9061 | + ? 1 |
| 9062 | + : 0; |
9066 | 9063 | }
|
9067 | 9064 | function min(x, y){
|
9068 |
| - /*<<int32.ml:91:21>>*/ return caml_lessequal(x, y) ? x : y /*<<int32.ml:91:41>>*/ ; |
| 9065 | + /*<<int32.ml:91:27>>*/ return x <= y ? x : y /*<<int32.ml:91:41>>*/ ; |
9069 | 9066 | }
|
9070 | 9067 | function max(x, y){
|
9071 |
| - /*<<int32.ml:92:21>>*/ return caml_greaterequal(x, y) ? x : y /*<<int32.ml:92:41>>*/ ; |
| 9068 | + /*<<int32.ml:92:27>>*/ return y <= x ? x : y /*<<int32.ml:92:41>>*/ ; |
9072 | 9069 | }
|
9073 | 9070 | function unsigned_div(n, d){
|
9074 |
| - /*<<int32.ml:98:5>>*/ if(caml_lessthan(d, 0)) |
| 9071 | + /*<<int32.ml:98:13>>*/ if(d < 0) |
9075 | 9072 | /*<<int32.ml:99:7>>*/ return unsigned_lt(n, d) ? zero : one /*<<int32.ml:103:41>>*/ ;
|
9076 | 9073 | var
|
9077 | 9074 | q = /*<<int32.ml:101:23>>*/ runtime.caml_div(n >>> 1 | 0, d) << 1,
|
|
9276 | 9273 | "use strict";
|
9277 | 9274 | var
|
9278 | 9275 | runtime = globalThis.jsoo_runtime,
|
9279 |
| - caml_greaterequal = runtime.caml_greaterequal, |
9280 | 9276 | caml_hash = runtime.caml_hash,
|
9281 | 9277 | caml_int_compare = runtime.caml_int_compare,
|
9282 |
| - caml_lessequal = runtime.caml_lessequal, |
9283 |
| - caml_lessthan = runtime.caml_lessthan, |
9284 | 9278 | caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace,
|
9285 | 9279 | caml_mul = runtime.caml_mul,
|
9286 | 9280 | caml_wrap_exception = runtime.caml_wrap_exception,
|
|
9292 | 9286 | function succ(n){ /*<<nativeint.ml:44:21>>*/ return n + 1 | 0;}
|
9293 | 9287 | function pred(n){ /*<<nativeint.ml:45:21>>*/ return n - 1 | 0;}
|
9294 | 9288 | function abs(n){
|
9295 |
| - /*<<nativeint.ml:46:15>>*/ return caml_greaterequal(n, 0) ? n : - n | 0 /*<<nativeint.ml:46:40>>*/ ; |
| 9289 | + /*<<nativeint.ml:46:22>>*/ return 0 <= n ? n : - n | 0 /*<<nativeint.ml:46:40>>*/ ; |
9296 | 9290 | }
|
9297 | 9291 | var
|
9298 | 9292 | size = /*<<?>>*/ Stdlib_Sys[9],
|
|
9301 | 9295 | function lognot(n){ /*<<nativeint.ml:50:29>>*/ return n ^ -1;}
|
9302 | 9296 | var max_int$0 = /*<<nativeint.ml:49:28>>*/ Stdlib[19];
|
9303 | 9297 | function unsigned_to_int(n){
|
9304 |
| - /*<<nativeint.ml:55:7>>*/ if |
9305 |
| - (caml_greaterequal(n, 0) |
9306 |
| - && /*<<nativeint.ml:55:18>>*/ caml_lessequal(n, max_int$0)) |
| 9298 | + /*<<nativeint.ml:55:14>>*/ if(0 <= n && n <= max_int$0) |
9307 | 9299 | /*<<nativeint.ml:56:6>>*/ return [0, n];
|
9308 | 9300 | /*<<nativeint.ml:58:6>>*/ return 0;
|
9309 | 9301 | /*<<nativeint.ml:58:10>>*/ }
|
|
9332 | 9324 | /*<<nativeint.ml:71:28>>*/ return caml_int_compare(x, y) /*<<nativeint.ml:75:41>>*/ ;
|
9333 | 9325 | }
|
9334 | 9326 | function unsigned_lt(n, m){
|
9335 |
| - /*<<nativeint.ml:78:2>>*/ return caml_lessthan |
9336 |
| - (n - min_int | 0, m - min_int | 0) /*<<nativeint.ml:78:31>>*/ ; |
| 9327 | + /*<<nativeint.ml:78:31>>*/ return (n - min_int | 0) < (m - min_int | 0) |
| 9328 | + ? 1 |
| 9329 | + : 0; |
9337 | 9330 | }
|
9338 | 9331 | function min(x, y){
|
9339 |
| - /*<<nativeint.ml:80:21>>*/ return caml_lessequal(x, y) ? x : y /*<<nativeint.ml:80:41>>*/ ; |
| 9332 | + /*<<nativeint.ml:80:27>>*/ return x <= y ? x : y /*<<nativeint.ml:80:41>>*/ ; |
9340 | 9333 | }
|
9341 | 9334 | function max(x, y){
|
9342 |
| - /*<<nativeint.ml:81:21>>*/ return caml_greaterequal(x, y) ? x : y /*<<nativeint.ml:81:41>>*/ ; |
| 9335 | + /*<<nativeint.ml:81:27>>*/ return y <= x ? x : y /*<<nativeint.ml:81:41>>*/ ; |
9343 | 9336 | }
|
9344 | 9337 | function unsigned_div(n, d){
|
9345 |
| - /*<<nativeint.ml:87:5>>*/ if(caml_lessthan(d, 0)) |
| 9338 | + /*<<nativeint.ml:87:13>>*/ if(d < 0) |
9346 | 9339 | /*<<nativeint.ml:88:7>>*/ return unsigned_lt(n, d) ? zero : one /*<<nativeint.ml:92:41>>*/ ;
|
9347 | 9340 | var
|
9348 | 9341 | q = /*<<nativeint.ml:90:23>>*/ runtime.caml_div(n >>> 1 | 0, d) << 1,
|
@@ -24924,31 +24917,28 @@
|
24924 | 24917 | var
|
24925 | 24918 | r = bits32(s) >>> 1 | 0,
|
24926 | 24919 | v = /*<<random.ml:228:12>>*/ caml_mod(r, n);
|
24927 |
| - /*<<random.ml:230:14>>*/ if |
24928 |
| - (! caml_greaterthan(r - v | 0, (Stdlib_Int32[9] - n | 0) + 1 | 0)) |
| 24920 | + /*<<random.ml:230:46>>*/ if |
| 24921 | + (((Stdlib_Int32[9] - n | 0) + 1 | 0) >= (r - v | 0)) |
24929 | 24922 | /*<<random.ml:232:9>>*/ return v;
|
24930 | 24923 | }
|
24931 | 24924 | /*<<random.ml:232:10>>*/ }
|
24932 | 24925 | function int32(s, bound){
|
24933 |
| - /*<<random.ml:235:7>>*/ return caml_lessequal(bound, 0) |
| 24926 | + /*<<random.ml:235:18>>*/ return bound <= 0 |
24934 | 24927 | ? /*<<random.ml:236:9>>*/ (0, Stdlib[1])(cst_Random_int32)
|
24935 | 24928 | : /*<<random.ml:237:9>>*/ int32aux(s, bound) /*<<random.ml:237:25>>*/ ;
|
24936 | 24929 | }
|
24937 | 24930 | function int32_in_range(s, min, max){
|
24938 |
| - /*<<random.ml:246:7>>*/ if(caml_greaterthan(min, max)) |
| 24931 | + /*<<random.ml:246:16>>*/ if(max < min) |
24939 | 24932 | /*<<random.ml:247:6>>*/ return (0, Stdlib[1])(cst_Random_int32_in_range) /*<<random.ml:254:39>>*/ ;
|
24940 | 24933 | var span = /*<<random.ml:249:17>>*/ (0, Stdlib_Int32[6])(max - min | 0);
|
24941 |
| - /*<<random.ml:251:9>>*/ if(! caml_lessequal(span, Stdlib_Int32[1])) |
| 24934 | + /*<<random.ml:251:27>>*/ if(span > Stdlib_Int32[1]) |
24942 | 24935 | /*<<random.ml:254:22>>*/ return min + int32aux(s, span) | 0 /*<<random.ml:254:39>>*/ ;
|
24943 | 24936 | /*<<random.ml:252:8>>*/ for(;;){
|
24944 | 24937 | var
|
24945 | 24938 | r =
|
24946 | 24939 | /*<<random.ml:242:27>>*/ /*<<random.ml:242:12>>*/ caml_int64_to_int32
|
24947 | 24940 | ( /*<<random.ml:242:27>>*/ caml_lxm_next(s));
|
24948 |
| - /*<<random.ml:243:7>>*/ if |
24949 |
| - (! |
24950 |
| - caml_lessthan(r, min) |
24951 |
| - && ! /*<<random.ml:243:18>>*/ caml_greaterthan(r, max)) |
| 24941 | + /*<<random.ml:243:14>>*/ if(r >= min && max >= r) |
24952 | 24942 | /*<<random.ml:243:67>>*/ return r;
|
24953 | 24943 | }
|
24954 | 24944 | /*<<random.ml:254:39>>*/ }
|
|
0 commit comments