Skip to content

Commit 45d8bbd

Browse files
authored
Merge pull request #5327 from rescript-lang/separate_runtime_stdlib
separate runtime from stdlib
2 parents 2789454 + 9bf49dc commit 45d8bbd

27 files changed

+1879
-1441
lines changed

jscomp/core/bs_conditional_initial.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,9 @@ let setup_env () =
6363
Clflags.include_dirs :=
6464
(root_dir//"jscomp"//"others") ::
6565
(root_dir//"jscomp"//"stdlib-406") ::
66-
(root_dir//"jscomp"//"runtime") ::
6766
!Clflags.include_dirs);
6867

69-
# 66 "core/bs_conditional_initial.pp.ml"
68+
# 65 "core/bs_conditional_initial.pp.ml"
7069
Rescript_cpp.replace_directive_bool "BS" true;
7170
Rescript_cpp.replace_directive_bool "JS" true;
7271
Rescript_cpp.replace_directive_string "BS_VERSION" Bs_version.version

jscomp/core/bs_conditional_initial.pp.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ let setup_env () =
6060
Clflags.include_dirs :=
6161
(root_dir//"jscomp"//"others") ::
6262
(root_dir//"jscomp"//"stdlib-406") ::
63-
(root_dir//"jscomp"//"runtime") ::
6463
!Clflags.include_dirs);
6564
#endif
6665
Rescript_cpp.replace_directive_bool "BS" true;

jscomp/main/builtin_cmi_datasets.ml

Lines changed: 116 additions & 116 deletions
Large diffs are not rendered by default.

jscomp/main/builtin_cmj_datasets.ml

Lines changed: 9 additions & 9 deletions
Large diffs are not rendered by default.

jscomp/main/cmij_main.ml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,8 @@ let () =
171171
[] folders
172172
in
173173
let cmj_files =
174-
(Filename.dirname Sys.argv.(0) // ".." // "runtime" // "js.cmj")
175-
:: get_files Literals.suffix_cmj
176-
(Filename.dirname Sys.argv.(0) // ".." // stdlib)
174+
get_files Literals.suffix_cmj
175+
(Filename.dirname Sys.argv.(0) // ".." // stdlib)
177176
@ get_files Literals.suffix_cmj
178177
(Filename.dirname Sys.argv.(0) // ".." // "others")
179178
@ third_party_cmj_files
@@ -193,12 +192,11 @@ let () =
193192
if release_cmi then get_files Literals.suffix_cmi (".." // "lib" // "ocaml")
194193
else
195194
let files =
196-
(Filename.dirname Sys.argv.(0) // ".." // "runtime" // "js.cmi")
197-
:: (get_files Literals.suffix_cmi
198-
(Filename.dirname Sys.argv.(0) // ".." // stdlib)
199-
@ get_files Literals.suffix_cmi
200-
(Filename.dirname Sys.argv.(0) // ".." // "others")
201-
@ third_party_cmi_files)
195+
get_files Literals.suffix_cmi
196+
(Filename.dirname Sys.argv.(0) // ".." // stdlib)
197+
@ get_files Literals.suffix_cmi
198+
(Filename.dirname Sys.argv.(0) // ".." // "others")
199+
@ third_party_cmi_files
202200
in
203201
Ext_list.filter files (fun x ->
204202
x |~ "js_OO" || x |~ "camlinternal" || not (x |~ "internal"))

jscomp/others/belt_HashMap.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ let rec getAux ~eq key buckets =
156156
let get h key =
157157
let h_buckets = h.C.buckets in
158158
let nid = (Belt_Id.getHashInternal h.C.hash) key [@bs] land (A.length h_buckets - 1) in
159-
match C.toOpt @@ A.getUnsafe h_buckets nid with
159+
match C.toOpt (A.getUnsafe h_buckets nid) with
160160
| None -> None
161161
| Some (cell1 : _ N.bucket) ->
162162
let eq = Belt_Id.getEqInternal h.C.eq in

jscomp/others/belt_HashMapInt.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ let rec getAux (key : key) buckets =
138138
let get h (key : key) =
139139
let h_buckets = h.C.buckets in
140140
let nid = hash key land (A.length h_buckets - 1) in
141-
match C.toOpt @@ A.getUnsafe h_buckets nid with
141+
match C.toOpt (A.getUnsafe h_buckets nid) with
142142
| None -> None
143143
| Some cell1 ->
144144
if key = cell1.N.key then Some cell1.N.value else

jscomp/others/belt_HashMapString.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ let rec getAux (key : key) buckets =
138138
let get h (key : key) =
139139
let h_buckets = h.C.buckets in
140140
let nid = hash key land (A.length h_buckets - 1) in
141-
match C.toOpt @@ A.getUnsafe h_buckets nid with
141+
match C.toOpt (A.getUnsafe h_buckets nid) with
142142
| None -> None
143143
| Some cell1 ->
144144
if key = cell1.N.key then Some cell1.N.value else

jscomp/others/belt_MutableSet.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ let intersect a b : _ t =
295295
N.lengthNode dataa0, N.lengthNode datab0 in
296296
let totalSize = sizea + sizeb in
297297
let tmp = A.makeUninitializedUnsafe totalSize in
298-
ignore @@ N.fillArray dataa0 0 tmp ;
299-
ignore @@ N.fillArray datab0 sizea tmp;
298+
ignore (N.fillArray dataa0 0 tmp) ;
299+
ignore (N.fillArray datab0 sizea tmp);
300300
let p = Belt_Id.getCmpInternal cmp in
301301
if (p (A.getUnsafe tmp (sizea - 1))
302302
(A.getUnsafe tmp sizea) [@bs] < 0)
@@ -324,8 +324,8 @@ let diff a b : _ t =
324324
let sizea, sizeb = N.lengthNode dataa0, N.lengthNode datab0 in
325325
let totalSize = sizea + sizeb in
326326
let tmp = A.makeUninitializedUnsafe totalSize in
327-
ignore @@ N.fillArray dataa0 0 tmp ;
328-
ignore @@ N.fillArray datab0 sizea tmp;
327+
ignore ( N.fillArray dataa0 0 tmp) ;
328+
ignore (N.fillArray datab0 sizea tmp);
329329
let p = Belt_Id.getCmpInternal cmp in
330330
if (p (A.getUnsafe tmp (sizea - 1))
331331
(A.getUnsafe tmp sizea) [@bs] < 0)
@@ -351,8 +351,8 @@ let union a b =
351351
let sizea, sizeb = N.lengthNode dataa0, N.lengthNode datab0 in
352352
let totalSize = sizea + sizeb in
353353
let tmp = A.makeUninitializedUnsafe totalSize in
354-
ignore @@ N.fillArray dataa0 0 tmp ;
355-
ignore @@ N.fillArray datab0 sizea tmp ;
354+
ignore (N.fillArray dataa0 0 tmp );
355+
ignore (N.fillArray datab0 sizea tmp);
356356
let p = (Belt_Id.getCmpInternal cmp) in
357357
if p
358358
(A.getUnsafe tmp (sizea - 1))

jscomp/others/belt_MutableSetInt.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ let intersect dataa datab =
279279
N.lengthNode dataa0, N.lengthNode datab0 in
280280
let totalSize = sizea + sizeb in
281281
let tmp = A.makeUninitializedUnsafe totalSize in
282-
ignore @@ N.fillArray dataa0 0 tmp ;
283-
ignore @@ N.fillArray datab0 sizea tmp;
282+
ignore (N.fillArray dataa0 0 tmp) ;
283+
ignore (N.fillArray datab0 sizea tmp);
284284
if ((A.getUnsafe tmp (sizea - 1) <
285285
A.getUnsafe tmp sizea))
286286
||
@@ -303,8 +303,8 @@ let diff dataa datab : t =
303303
let sizea, sizeb = N.lengthNode dataa0, N.lengthNode datab0 in
304304
let totalSize = sizea + sizeb in
305305
let tmp = A.makeUninitializedUnsafe totalSize in
306-
ignore @@ N.fillArray dataa0 0 tmp ;
307-
ignore @@ N.fillArray datab0 sizea tmp;
306+
ignore (N.fillArray dataa0 0 tmp);
307+
ignore (N.fillArray datab0 sizea tmp);
308308
if ( (A.getUnsafe tmp (sizea - 1)) <
309309
(A.getUnsafe tmp sizea))
310310
||
@@ -326,8 +326,8 @@ let union (dataa : t) (datab : t) : t =
326326
let sizea, sizeb = N.lengthNode dataa0, N.lengthNode datab0 in
327327
let totalSize = sizea + sizeb in
328328
let tmp = A.makeUninitializedUnsafe totalSize in
329-
ignore @@ N.fillArray dataa0 0 tmp ;
330-
ignore @@ N.fillArray datab0 sizea tmp ;
329+
ignore (N.fillArray dataa0 0 tmp);
330+
ignore (N.fillArray datab0 sizea tmp);
331331
if
332332
(A.getUnsafe tmp (sizea - 1) <
333333
A.getUnsafe tmp sizea) then

0 commit comments

Comments
 (0)