|
3 | 3 | var Obj = require("./obj.js");
|
4 | 4 | var Sys = require("./sys.js");
|
5 | 5 | var $$Array = require("./array.js");
|
6 |
| -var Block = require("./block.js"); |
7 | 6 | var Curry = require("./curry.js");
|
8 | 7 | var Random = require("./random.js");
|
9 | 8 | var Hashtbl = require("./hashtbl.js");
|
| 9 | +var Caml_obj = require("./caml_obj.js"); |
10 | 10 | var Caml_array = require("./caml_array.js");
|
11 | 11 | var Caml_int32 = require("./caml_int32.js");
|
12 | 12 | var Caml_option = require("./caml_option.js");
|
@@ -102,21 +102,13 @@ function MakeSeeded(H) {
|
102 | 102 | }
|
103 | 103 | };
|
104 | 104 | };
|
105 |
| - var prng = Block.__(246, [(function (param) { |
| 105 | + var prng = Caml_obj.caml_lazy_make((function (param) { |
106 | 106 | return Random.State[/* make_self_init */1](/* () */0);
|
107 |
| - })]); |
| 107 | + })); |
108 | 108 | var create$1 = function ($staropt$star, initial_size) {
|
109 | 109 | var random = $staropt$star !== undefined ? $staropt$star : Hashtbl.is_randomized(/* () */0);
|
110 | 110 | var s = power_2_above(16, initial_size);
|
111 |
| - var seed; |
112 |
| - if (random) { |
113 |
| - var tag = prng.tag | 0; |
114 |
| - seed = Random.State[/* bits */3](tag === 250 ? prng[0] : ( |
115 |
| - tag === 246 ? CamlinternalLazy.force_lazy_block(prng) : prng |
116 |
| - )); |
117 |
| - } else { |
118 |
| - seed = 0; |
119 |
| - } |
| 111 | + var seed = random ? Random.State[/* bits */3](CamlinternalLazy.force(prng)) : 0; |
120 | 112 | return /* record */[
|
121 | 113 | /* size */0,
|
122 | 114 | /* data */Caml_array.caml_make_vect(s, /* Empty */0),
|
@@ -670,9 +662,9 @@ function Make(H) {
|
670 | 662 | }
|
671 | 663 | };
|
672 | 664 | };
|
673 |
| - var prng = Block.__(246, [(function (param) { |
| 665 | + var prng = Caml_obj.caml_lazy_make((function (param) { |
674 | 666 | return Random.State[/* make_self_init */1](/* () */0);
|
675 |
| - })]); |
| 667 | + })); |
676 | 668 | var clear = function (h) {
|
677 | 669 | h[/* size */0] = 0;
|
678 | 670 | var len = h[/* data */1].length;
|
@@ -1163,15 +1155,7 @@ function Make(H) {
|
1163 | 1155 | var initial_size = sz;
|
1164 | 1156 | var random = $staropt$star !== undefined ? $staropt$star : Hashtbl.is_randomized(/* () */0);
|
1165 | 1157 | var s = power_2_above(16, initial_size);
|
1166 |
| - var seed; |
1167 |
| - if (random) { |
1168 |
| - var tag = prng.tag | 0; |
1169 |
| - seed = Random.State[/* bits */3](tag === 250 ? prng[0] : ( |
1170 |
| - tag === 246 ? CamlinternalLazy.force_lazy_block(prng) : prng |
1171 |
| - )); |
1172 |
| - } else { |
1173 |
| - seed = 0; |
1174 |
| - } |
| 1158 | + var seed = random ? Random.State[/* bits */3](CamlinternalLazy.force(prng)) : 0; |
1175 | 1159 | return /* record */[
|
1176 | 1160 | /* size */0,
|
1177 | 1161 | /* data */Caml_array.caml_make_vect(s, /* Empty */0),
|
@@ -1340,21 +1324,13 @@ function MakeSeeded$1(H1, H2) {
|
1340 | 1324 | }
|
1341 | 1325 | };
|
1342 | 1326 | };
|
1343 |
| - var prng = Block.__(246, [(function (param) { |
| 1327 | + var prng = Caml_obj.caml_lazy_make((function (param) { |
1344 | 1328 | return Random.State[/* make_self_init */1](/* () */0);
|
1345 |
| - })]); |
| 1329 | + })); |
1346 | 1330 | var create$1 = function ($staropt$star, initial_size) {
|
1347 | 1331 | var random = $staropt$star !== undefined ? $staropt$star : Hashtbl.is_randomized(/* () */0);
|
1348 | 1332 | var s = power_2_above(16, initial_size);
|
1349 |
| - var seed; |
1350 |
| - if (random) { |
1351 |
| - var tag = prng.tag | 0; |
1352 |
| - seed = Random.State[/* bits */3](tag === 250 ? prng[0] : ( |
1353 |
| - tag === 246 ? CamlinternalLazy.force_lazy_block(prng) : prng |
1354 |
| - )); |
1355 |
| - } else { |
1356 |
| - seed = 0; |
1357 |
| - } |
| 1333 | + var seed = random ? Random.State[/* bits */3](CamlinternalLazy.force(prng)) : 0; |
1358 | 1334 | return /* record */[
|
1359 | 1335 | /* size */0,
|
1360 | 1336 | /* data */Caml_array.caml_make_vect(s, /* Empty */0),
|
@@ -1937,21 +1913,13 @@ function Make$1(H1, H2) {
|
1937 | 1913 | }
|
1938 | 1914 | };
|
1939 | 1915 | };
|
1940 |
| - var prng = Block.__(246, [(function (param) { |
| 1916 | + var prng = Caml_obj.caml_lazy_make((function (param) { |
1941 | 1917 | return Random.State[/* make_self_init */1](/* () */0);
|
1942 |
| - })]); |
| 1918 | + })); |
1943 | 1919 | var create$1 = function ($staropt$star, initial_size) {
|
1944 | 1920 | var random = $staropt$star !== undefined ? $staropt$star : Hashtbl.is_randomized(/* () */0);
|
1945 | 1921 | var s = power_2_above(16, initial_size);
|
1946 |
| - var seed; |
1947 |
| - if (random) { |
1948 |
| - var tag = prng.tag | 0; |
1949 |
| - seed = Random.State[/* bits */3](tag === 250 ? prng[0] : ( |
1950 |
| - tag === 246 ? CamlinternalLazy.force_lazy_block(prng) : prng |
1951 |
| - )); |
1952 |
| - } else { |
1953 |
| - seed = 0; |
1954 |
| - } |
| 1922 | + var seed = random ? Random.State[/* bits */3](CamlinternalLazy.force(prng)) : 0; |
1955 | 1923 | return /* record */[
|
1956 | 1924 | /* size */0,
|
1957 | 1925 | /* data */Caml_array.caml_make_vect(s, /* Empty */0),
|
@@ -2654,21 +2622,13 @@ function MakeSeeded$2(H) {
|
2654 | 2622 | }
|
2655 | 2623 | };
|
2656 | 2624 | };
|
2657 |
| - var prng = Block.__(246, [(function (param) { |
| 2625 | + var prng = Caml_obj.caml_lazy_make((function (param) { |
2658 | 2626 | return Random.State[/* make_self_init */1](/* () */0);
|
2659 |
| - })]); |
| 2627 | + })); |
2660 | 2628 | var create$1 = function ($staropt$star, initial_size) {
|
2661 | 2629 | var random = $staropt$star !== undefined ? $staropt$star : Hashtbl.is_randomized(/* () */0);
|
2662 | 2630 | var s = power_2_above(16, initial_size);
|
2663 |
| - var seed; |
2664 |
| - if (random) { |
2665 |
| - var tag = prng.tag | 0; |
2666 |
| - seed = Random.State[/* bits */3](tag === 250 ? prng[0] : ( |
2667 |
| - tag === 246 ? CamlinternalLazy.force_lazy_block(prng) : prng |
2668 |
| - )); |
2669 |
| - } else { |
2670 |
| - seed = 0; |
2671 |
| - } |
| 2631 | + var seed = random ? Random.State[/* bits */3](CamlinternalLazy.force(prng)) : 0; |
2672 | 2632 | return /* record */[
|
2673 | 2633 | /* size */0,
|
2674 | 2634 | /* data */Caml_array.caml_make_vect(s, /* Empty */0),
|
@@ -3292,9 +3252,9 @@ function Make$2(H) {
|
3292 | 3252 | }
|
3293 | 3253 | };
|
3294 | 3254 | };
|
3295 |
| - var prng = Block.__(246, [(function (param) { |
| 3255 | + var prng = Caml_obj.caml_lazy_make((function (param) { |
3296 | 3256 | return Random.State[/* make_self_init */1](/* () */0);
|
3297 |
| - })]); |
| 3257 | + })); |
3298 | 3258 | var clear = function (h) {
|
3299 | 3259 | h[/* size */0] = 0;
|
3300 | 3260 | var len = h[/* data */1].length;
|
@@ -3785,15 +3745,7 @@ function Make$2(H) {
|
3785 | 3745 | var initial_size = sz;
|
3786 | 3746 | var random = $staropt$star !== undefined ? $staropt$star : Hashtbl.is_randomized(/* () */0);
|
3787 | 3747 | var s = power_2_above(16, initial_size);
|
3788 |
| - var seed; |
3789 |
| - if (random) { |
3790 |
| - var tag = prng.tag | 0; |
3791 |
| - seed = Random.State[/* bits */3](tag === 250 ? prng[0] : ( |
3792 |
| - tag === 246 ? CamlinternalLazy.force_lazy_block(prng) : prng |
3793 |
| - )); |
3794 |
| - } else { |
3795 |
| - seed = 0; |
3796 |
| - } |
| 3748 | + var seed = random ? Random.State[/* bits */3](CamlinternalLazy.force(prng)) : 0; |
3797 | 3749 | return /* record */[
|
3798 | 3750 | /* size */0,
|
3799 | 3751 | /* data */Caml_array.caml_make_vect(s, /* Empty */0),
|
@@ -3903,21 +3855,13 @@ var GenHashTable = [(function (funarg) {
|
3903 | 3855 | }
|
3904 | 3856 | };
|
3905 | 3857 | };
|
3906 |
| - var prng = Block.__(246, [(function (param) { |
| 3858 | + var prng = Caml_obj.caml_lazy_make((function (param) { |
3907 | 3859 | return Random.State[/* make_self_init */1](/* () */0);
|
3908 |
| - })]); |
| 3860 | + })); |
3909 | 3861 | var create = function ($staropt$star, initial_size) {
|
3910 | 3862 | var random = $staropt$star !== undefined ? $staropt$star : Hashtbl.is_randomized(/* () */0);
|
3911 | 3863 | var s = power_2_above(16, initial_size);
|
3912 |
| - var seed; |
3913 |
| - if (random) { |
3914 |
| - var tag = prng.tag | 0; |
3915 |
| - seed = Random.State[/* bits */3](tag === 250 ? prng[0] : ( |
3916 |
| - tag === 246 ? CamlinternalLazy.force_lazy_block(prng) : prng |
3917 |
| - )); |
3918 |
| - } else { |
3919 |
| - seed = 0; |
3920 |
| - } |
| 3864 | + var seed = random ? Random.State[/* bits */3](CamlinternalLazy.force(prng)) : 0; |
3921 | 3865 | return /* record */[
|
3922 | 3866 | /* size */0,
|
3923 | 3867 | /* data */Caml_array.caml_make_vect(s, /* Empty */0),
|
|
0 commit comments