|
9110 | 9110 | "use strict";
|
9111 | 9111 | var
|
9112 | 9112 | runtime = globalThis.jsoo_runtime,
|
9113 |
| - caml_greaterequal = runtime.caml_greaterequal, |
9114 | 9113 | caml_hash = runtime.caml_hash,
|
9115 | 9114 | caml_int_compare = runtime.caml_int_compare,
|
9116 |
| - caml_lessequal = runtime.caml_lessequal, |
9117 |
| - caml_lessthan = runtime.caml_lessthan, |
9118 | 9115 | caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace,
|
9119 | 9116 | caml_mul = runtime.caml_mul,
|
9120 | 9117 | caml_wrap_exception = runtime.caml_wrap_exception,
|
|
9127 | 9124 | function succ(n){ /*<<int32.ml:48:21>>*/ return n + 1 | 0;}
|
9128 | 9125 | function pred(n){ /*<<int32.ml:49:21>>*/ return n - 1 | 0;}
|
9129 | 9126 | function abs(n){
|
9130 |
| - /*<<int32.ml:50:15>>*/ return caml_greaterequal(n, 0) ? n : - n | 0 /*<<int32.ml:50:40>>*/ ; |
| 9127 | + /*<<int32.ml:50:22>>*/ return 0 <= n ? n : - n | 0 /*<<int32.ml:50:40>>*/ ; |
9131 | 9128 | }
|
9132 | 9129 | function lognot(n){ /*<<int32.ml:53:29>>*/ return n ^ -1;}
|
9133 | 9130 | var
|
|
9141 | 9138 | max_int$0 = /*<<int32.ml:58:20>>*/ Stdlib[19],
|
9142 | 9139 | unsigned_to_int =
|
9143 | 9140 | /*<<int32.ml:59:6>>*/ function(n){
|
9144 |
| - /*<<int32.ml:60:11>>*/ if |
9145 |
| - (caml_greaterequal(n, 0) |
9146 |
| - && /*<<int32.ml:60:22>>*/ caml_lessequal(n, max_int$0)) |
| 9141 | + /*<<int32.ml:60:18>>*/ if(0 <= n && n <= max_int$0) |
9147 | 9142 | /*<<int32.ml:61:10>>*/ return [0, n];
|
9148 | 9143 | /*<<int32.ml:63:10>>*/ return 0;
|
9149 | 9144 | /*<<int32.ml:63:14>>*/ };
|
|
9171 | 9166 | /*<<?>>*/ throw caml_maybe_attach_backtrace(exn, 0);
|
9172 | 9167 | }
|
9173 | 9168 | /*<<int32.ml:78:24>>*/ }
|
9174 |
| - var compare = /*<<?>>*/ caml_int_compare, equal = runtime.caml_equal; |
| 9169 | + var compare = /*<<?>>*/ caml_int_compare; |
| 9170 | + function equal(x, y){ /*<<int32.ml:83:31>>*/ return x === y ? 1 : 0;} |
9175 | 9171 | function unsigned_compare(n, m){
|
9176 | 9172 | var
|
9177 | 9173 | y = /*<<int32.ml:86:26>>*/ m + 2147483648 | 0,
|
9178 | 9174 | x = /*<<int32.ml:86:10>>*/ n + 2147483648 | 0;
|
9179 | 9175 | /*<<int32.ml:82:28>>*/ return caml_int_compare(x, y) /*<<int32.ml:86:41>>*/ ;
|
9180 | 9176 | }
|
9181 | 9177 | function unsigned_lt(n, m){
|
9182 |
| - /*<<int32.ml:89:2>>*/ return caml_lessthan |
9183 |
| - (n + 2147483648 | 0, m + 2147483648 | 0) /*<<int32.ml:89:31>>*/ ; |
| 9178 | + /*<<int32.ml:89:31>>*/ return (n + 2147483648 | 0) < (m + 2147483648 | 0) |
| 9179 | + ? 1 |
| 9180 | + : 0; |
9184 | 9181 | }
|
9185 | 9182 | function min(x, y){
|
9186 |
| - /*<<int32.ml:91:21>>*/ return caml_lessequal(x, y) ? x : y /*<<int32.ml:91:41>>*/ ; |
| 9183 | + /*<<int32.ml:91:27>>*/ return x <= y ? x : y /*<<int32.ml:91:41>>*/ ; |
9187 | 9184 | }
|
9188 | 9185 | function max(x, y){
|
9189 |
| - /*<<int32.ml:92:21>>*/ return caml_greaterequal(x, y) ? x : y /*<<int32.ml:92:41>>*/ ; |
| 9186 | + /*<<int32.ml:92:27>>*/ return y <= x ? x : y /*<<int32.ml:92:41>>*/ ; |
9190 | 9187 | }
|
9191 | 9188 | function unsigned_div(n, d){
|
9192 |
| - /*<<int32.ml:98:5>>*/ if(caml_lessthan(d, 0)) |
| 9189 | + /*<<int32.ml:98:13>>*/ if(d < 0) |
9193 | 9190 | /*<<int32.ml:99:7>>*/ return unsigned_lt(n, d) ? zero : one /*<<int32.ml:103:41>>*/ ;
|
9194 | 9191 | var
|
9195 | 9192 | q = /*<<int32.ml:101:23>>*/ runtime.caml_div(n >>> 1 | 0, d) << 1,
|
|
9395 | 9392 | "use strict";
|
9396 | 9393 | var
|
9397 | 9394 | runtime = globalThis.jsoo_runtime,
|
9398 |
| - caml_greaterequal = runtime.caml_greaterequal, |
9399 | 9395 | caml_hash = runtime.caml_hash,
|
9400 | 9396 | caml_int_compare = runtime.caml_int_compare,
|
9401 |
| - caml_lessequal = runtime.caml_lessequal, |
9402 |
| - caml_lessthan = runtime.caml_lessthan, |
9403 | 9397 | caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace,
|
9404 | 9398 | caml_mul = runtime.caml_mul,
|
9405 | 9399 | caml_wrap_exception = runtime.caml_wrap_exception,
|
|
9411 | 9405 | function succ(n){ /*<<nativeint.ml:44:21>>*/ return n + 1 | 0;}
|
9412 | 9406 | function pred(n){ /*<<nativeint.ml:45:21>>*/ return n - 1 | 0;}
|
9413 | 9407 | function abs(n){
|
9414 |
| - /*<<nativeint.ml:46:15>>*/ return caml_greaterequal(n, 0) ? n : - n | 0 /*<<nativeint.ml:46:40>>*/ ; |
| 9408 | + /*<<nativeint.ml:46:22>>*/ return 0 <= n ? n : - n | 0 /*<<nativeint.ml:46:40>>*/ ; |
9415 | 9409 | }
|
9416 | 9410 | var
|
9417 | 9411 | size = /*<<?>>*/ Stdlib_Sys[9],
|
|
9420 | 9414 | function lognot(n){ /*<<nativeint.ml:50:29>>*/ return n ^ -1;}
|
9421 | 9415 | var max_int$0 = /*<<nativeint.ml:53:16>>*/ Stdlib[19];
|
9422 | 9416 | function unsigned_to_int(n){
|
9423 |
| - /*<<nativeint.ml:55:7>>*/ if |
9424 |
| - (caml_greaterequal(n, 0) |
9425 |
| - && /*<<nativeint.ml:55:18>>*/ caml_lessequal(n, max_int$0)) |
| 9417 | + /*<<nativeint.ml:55:14>>*/ if(0 <= n && n <= max_int$0) |
9426 | 9418 | /*<<nativeint.ml:56:6>>*/ return [0, n];
|
9427 | 9419 | /*<<nativeint.ml:58:6>>*/ return 0;
|
9428 | 9420 | /*<<nativeint.ml:58:10>>*/ }
|
|
9451 | 9443 | /*<<nativeint.ml:71:28>>*/ return caml_int_compare(x, y) /*<<nativeint.ml:75:41>>*/ ;
|
9452 | 9444 | }
|
9453 | 9445 | function unsigned_lt(n, m){
|
9454 |
| - /*<<nativeint.ml:78:2>>*/ return caml_lessthan |
9455 |
| - (n - min_int | 0, m - min_int | 0) /*<<nativeint.ml:78:31>>*/ ; |
| 9446 | + /*<<nativeint.ml:78:31>>*/ return (n - min_int | 0) < (m - min_int | 0) |
| 9447 | + ? 1 |
| 9448 | + : 0; |
9456 | 9449 | }
|
9457 | 9450 | function min(x, y){
|
9458 |
| - /*<<nativeint.ml:80:21>>*/ return caml_lessequal(x, y) ? x : y /*<<nativeint.ml:80:41>>*/ ; |
| 9451 | + /*<<nativeint.ml:80:27>>*/ return x <= y ? x : y /*<<nativeint.ml:80:41>>*/ ; |
9459 | 9452 | }
|
9460 | 9453 | function max(x, y){
|
9461 |
| - /*<<nativeint.ml:81:21>>*/ return caml_greaterequal(x, y) ? x : y /*<<nativeint.ml:81:41>>*/ ; |
| 9454 | + /*<<nativeint.ml:81:27>>*/ return y <= x ? x : y /*<<nativeint.ml:81:41>>*/ ; |
9462 | 9455 | }
|
9463 | 9456 | function unsigned_div(n, d){
|
9464 |
| - /*<<nativeint.ml:87:5>>*/ if(caml_lessthan(d, 0)) |
| 9457 | + /*<<nativeint.ml:87:13>>*/ if(d < 0) |
9465 | 9458 | /*<<nativeint.ml:88:7>>*/ return unsigned_lt(n, d) ? zero : one /*<<nativeint.ml:92:41>>*/ ;
|
9466 | 9459 | var
|
9467 | 9460 | q = /*<<nativeint.ml:90:23>>*/ runtime.caml_div(n >>> 1 | 0, d) << 1,
|
@@ -23943,34 +23936,31 @@
|
23943 | 23936 | var
|
23944 | 23937 | r = /*<<random.ml:227:38>>*/ bits32(s) >>> 1 | 0,
|
23945 | 23938 | v = /*<<random.ml:228:12>>*/ caml_mod(r, n);
|
23946 |
| - /*<<random.ml:230:14>>*/ if |
23947 |
| - (! caml_greaterthan(r - v | 0, (Stdlib_Int32[9] - n | 0) + 1 | 0)) |
| 23939 | + /*<<random.ml:230:46>>*/ if |
| 23940 | + (((Stdlib_Int32[9] - n | 0) + 1 | 0) >= (r - v | 0)) |
23948 | 23941 | /*<<random.ml:232:9>>*/ return v;
|
23949 | 23942 | }
|
23950 | 23943 | /*<<random.ml:232:10>>*/ }
|
23951 | 23944 | function int32(s, bound){
|
23952 |
| - /*<<random.ml:235:7>>*/ return caml_lessequal(bound, 0) |
| 23945 | + /*<<random.ml:235:18>>*/ return bound <= 0 |
23953 | 23946 | ? /*<<random.ml:236:9>>*/ Stdlib[1].call(null, cst_Random_int32)
|
23954 | 23947 | : /*<<random.ml:237:9>>*/ int32aux(s, bound) /*<<random.ml:237:25>>*/ ;
|
23955 | 23948 | }
|
23956 | 23949 | function int32_in_range(s, min, max){
|
23957 |
| - /*<<random.ml:246:7>>*/ if(caml_greaterthan(min, max)) |
| 23950 | + /*<<random.ml:246:16>>*/ if(max < min) |
23958 | 23951 | /*<<random.ml:247:6>>*/ return Stdlib[1].call
|
23959 | 23952 | (null, cst_Random_int32_in_range) /*<<random.ml:254:39>>*/ ;
|
23960 | 23953 | var
|
23961 | 23954 | span =
|
23962 | 23955 | /*<<random.ml:249:17>>*/ Stdlib_Int32[6].call(null, max - min | 0);
|
23963 |
| - /*<<random.ml:251:9>>*/ if(! caml_lessequal(span, Stdlib_Int32[1])) |
| 23956 | + /*<<random.ml:251:27>>*/ if(span > Stdlib_Int32[1]) |
23964 | 23957 | /*<<random.ml:254:22>>*/ return min + int32aux(s, span) | 0 /*<<random.ml:254:39>>*/ ;
|
23965 | 23958 | /*<<random.ml:251:27>>*/ for(;;){
|
23966 | 23959 | var
|
23967 | 23960 | r =
|
23968 | 23961 | /*<<random.ml:242:27>>*/ /*<<random.ml:242:12>>*/ caml_int64_to_int32
|
23969 | 23962 | ( /*<<random.ml:242:27>>*/ caml_lxm_next(s));
|
23970 |
| - /*<<random.ml:243:7>>*/ if |
23971 |
| - (! |
23972 |
| - caml_lessthan(r, min) |
23973 |
| - && ! /*<<random.ml:243:18>>*/ caml_greaterthan(r, max)) |
| 23963 | + /*<<random.ml:243:14>>*/ if(r >= min && max >= r) |
23974 | 23964 | /*<<random.ml:243:67>>*/ return r;
|
23975 | 23965 | }
|
23976 | 23966 | /*<<random.ml:254:39>>*/ }
|
|
0 commit comments