11
22
33import * as $$Array from "./array.js" ;
4- import * as Curry from "./curry.js" ;
54import * as Int32 from "./int32.js" ;
65import * as Int64 from "./int64.js" ;
76import * as Digest from "./digest.js" ;
8- import * as Caml_sys from "./caml_sys.js" ;
9- import * as Nativeint from "./nativeint.js" ;
107import * as Caml_array from "./caml_array.js" ;
118import * as Caml_int64 from "./caml_int64.js" ;
129import * as Caml_string from "./caml_string.js" ;
1310
11+ function random_seed ( param ) {
12+ return [ ( Math . floor ( Math . random ( ) * 0x7fff_ffff ) ) ] ;
13+ }
14+
1415function assign ( st1 , st2 ) {
1516 $$Array . blit ( st2 . st , 0 , st1 . st , 0 , 55 ) ;
1617 st1 . idx = st2 . idx ;
@@ -52,7 +53,7 @@ function make(seed) {
5253}
5354
5455function make_self_init ( param ) {
55- return make ( Caml_sys . caml_sys_random_seed ( undefined ) ) ;
56+ return make ( random_seed ( undefined ) ) ;
5657}
5758
5859function copy ( s ) {
@@ -132,10 +133,6 @@ function int64(s, bound) {
132133 } ;
133134}
134135
135- var nativeint = Nativeint . size === 32 ? int32 : ( function ( s , bound ) {
136- return Caml_int64 . to_int32 ( int64 ( s , Caml_int64 . of_int32 ( bound ) ) ) ;
137- } ) ;
138-
139136function rawfloat ( s ) {
140137 var r1 = bits ( s ) ;
141138 var r2 = bits ( s ) ;
@@ -223,10 +220,6 @@ function int32$1(bound) {
223220 return int32 ( $$default , bound ) ;
224221}
225222
226- function nativeint$1 ( bound ) {
227- return Curry . _2 ( nativeint , $$default , bound ) ;
228- }
229-
230223function int64$1 ( bound ) {
231224 return int64 ( $$default , bound ) ;
232225}
@@ -248,7 +241,7 @@ function init(seed) {
248241}
249242
250243function self_init ( param ) {
251- return full_init$1 ( Caml_sys . caml_sys_random_seed ( undefined ) ) ;
244+ return full_init$1 ( random_seed ( undefined ) ) ;
252245}
253246
254247function get_state ( param ) {
@@ -266,7 +259,6 @@ var State = {
266259 bits : bits ,
267260 $$int : $$int ,
268261 int32 : int32 ,
269- nativeint : nativeint ,
270262 int64 : int64 ,
271263 $$float : $$float ,
272264 bool : bool
@@ -279,7 +271,6 @@ export {
279271 bits$1 as bits ,
280272 $$int$1 as $$int ,
281273 int32$1 as int32 ,
282- nativeint$1 as nativeint ,
283274 int64$1 as int64 ,
284275 $$float$1 as $$float ,
285276 bool$1 as bool ,
0 commit comments