Skip to content

Commit 23c8981

Browse files
authored
Revert "Move immutable array modules to Stable_stdlib (#2570)"
This reverts commit db0f07b.
1 parent 39103eb commit 23c8981

File tree

19 files changed

+56
-27
lines changed

19 files changed

+56
-27
lines changed

ocaml/otherlibs/stable/dune

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@
4646
(targets
4747
float_u.ml
4848
float_u.mli
49-
iarray.ml
50-
iarray.mli
51-
iarrayLabels.ml
52-
iarrayLabels.mli
5349
int32_u.ml
5450
int32_u.mli
5551
int64_u.ml

ocaml/otherlibs/stdlib_stable/stdlib_stable.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ module Float_u = Float_u
22
module Int32_u = Int32_u
33
module Int64_u = Int64_u
44
module Nativeint_u = Nativeint_u
5-
module Iarray = Iarray
6-
module IarrayLabels = IarrayLabels
5+
module Iarray = Stdlib__Iarray
6+
module IarrayLabels = Stdlib__IarrayLabels

ocaml/otherlibs/stdlib_stable/stdlib_stable.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ module Float_u = Float_u
22
module Int32_u = Int32_u
33
module Int64_u = Int64_u
44
module Nativeint_u = Nativeint_u
5-
module Iarray = Iarray
6-
module IarrayLabels = IarrayLabels
5+
module Iarray = Stdlib__Iarray
6+
module IarrayLabels = Stdlib__IarrayLabels

ocaml/stdlib/.depend

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,32 @@ stdlib__Hashtbl.cmx : hashtbl.ml \
454454
stdlib__Hashtbl.cmi : hashtbl.mli \
455455
stdlib.cmi \
456456
stdlib__Seq.cmi
457+
stdlib__Iarray.cmo : iarray.ml \
458+
stdlib.cmi \
459+
stdlib__Seq.cmi \
460+
stdlib__Array.cmi \
461+
stdlib__Iarray.cmi
462+
stdlib__Iarray.cmx : iarray.ml \
463+
stdlib.cmx \
464+
stdlib__Seq.cmx \
465+
stdlib__Array.cmx \
466+
stdlib__Iarray.cmi
467+
stdlib__Iarray.cmi : iarray.mli \
468+
stdlib.cmi \
469+
stdlib__Seq.cmi
470+
stdlib__IarrayLabels.cmo : iarrayLabels.ml \
471+
stdlib.cmi \
472+
stdlib__Seq.cmi \
473+
stdlib__Array.cmi \
474+
stdlib__IarrayLabels.cmi
475+
stdlib__IarrayLabels.cmx : iarrayLabels.ml \
476+
stdlib.cmx \
477+
stdlib__Seq.cmx \
478+
stdlib__Array.cmx \
479+
stdlib__IarrayLabels.cmi
480+
stdlib__IarrayLabels.cmi : iarrayLabels.mli \
481+
stdlib.cmi \
482+
stdlib__Seq.cmi
457483
stdlib__In_channel.cmo : in_channel.ml \
458484
stdlib__Sys.cmi \
459485
stdlib.cmi \

ocaml/stdlib/StdlibModules

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ STDLIB_MODULE_BASENAMES = \
5757
unit \
5858
marshal \
5959
array \
60+
iarray \
6061
float \
6162
int32 \
6263
nativeint \
@@ -93,6 +94,7 @@ STDLIB_MODULE_BASENAMES = \
9394
filename \
9495
complex \
9596
arrayLabels \
97+
iarrayLabels \
9698
listLabels \
9799
bytesLabels \
98100
stringLabels \

ocaml/stdlib/dune

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@
129129
gc.mli
130130
hashtbl.ml
131131
hashtbl.mli
132+
iarray.ml
133+
iarray.mli
134+
iarrayLabels.ml
135+
iarrayLabels.mli
132136
in_channel.ml
133137
in_channel.mli
134138
int.ml
@@ -276,6 +280,12 @@
276280
.stdlib.objs/byte/stdlib__Hashtbl.cmi
277281
.stdlib.objs/byte/stdlib__Hashtbl.cmt
278282
.stdlib.objs/byte/stdlib__Hashtbl.cmti
283+
.stdlib.objs/byte/stdlib__Iarray.cmi
284+
.stdlib.objs/byte/stdlib__Iarray.cmt
285+
.stdlib.objs/byte/stdlib__Iarray.cmti
286+
.stdlib.objs/byte/stdlib__IarrayLabels.cmi
287+
.stdlib.objs/byte/stdlib__IarrayLabels.cmt
288+
.stdlib.objs/byte/stdlib__IarrayLabels.cmti
279289
.stdlib.objs/byte/stdlib__In_channel.cmi
280290
.stdlib.objs/byte/stdlib__In_channel.cmt
281291
.stdlib.objs/byte/stdlib__In_channel.cmti
@@ -478,6 +488,8 @@
478488
.stdlib.objs/native/stdlib__Either.cmx
479489
.stdlib.objs/native/stdlib__In_channel.cmx
480490
.stdlib.objs/native/stdlib__Out_channel.cmx
491+
.stdlib.objs/native/stdlib__Iarray.cmx
492+
.stdlib.objs/native/stdlib__IarrayLabels.cmx
481493
(META as stdlib/META))
482494
(section lib)
483495
(package ocaml_runtime_stdlib))
File renamed without changes.
File renamed without changes.

ocaml/testsuite/tests/array-functions/test_iarray.ml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
(* TEST
2-
include stdlib_stable;
3-
*)
1+
(* TEST *)
42

5-
module Iarray = Stdlib_stable.Iarray
3+
module Iarray = Stdlib__Iarray
64
external ( .:() ) : 'a iarray -> int -> 'a = "%array_safe_get"
75

86
(* Copied from [test.ml], but with all the [Array.fill] tests deleted *)

ocaml/testsuite/tests/comprehensions/iarray_comprehensions_pure.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
(* TEST
22
flags = "-extension comprehensions";
3-
include stdlib_stable;
43
expect;
54
*)
65

7-
module Iarray = Stdlib_stable.Iarray;;
6+
module Iarray = Stdlib__Iarray;;
87
[%%expect{|
9-
module Iarray = Stdlib_stable.Iarray
8+
module Iarray = Stdlib__Iarray
109
|}];;
1110

1211
(******************************************************************************

ocaml/testsuite/tests/comprehensions/iarray_comprehensions_side_effects.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
(* TEST
22
flags = "-extension comprehensions";
3-
include stdlib_stable;
43
*)
54

6-
module Iarray = Stdlib_stable.Iarray
5+
module Iarray = Stdlib__Iarray
76

87
(******************************************************************************
98
* ******** ATTENTION! ******** *

ocaml/testsuite/tests/lib-array/test_iarray.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
(* TEST
2-
include stdlib_stable;
32
expect;
43
*)
54

6-
module Iarray = Stdlib_stable.Iarray;;
5+
module Iarray = Stdlib__Iarray;;
76

87
external ( .:() ) : 'a iarray -> int -> 'a = "%array_safe_get";;
98

@@ -16,7 +15,7 @@ let marray : int array = [|1;2;3;4;5|];;
1615
let mfarray : float array = [|1.5;2.5;3.5;4.5;5.5|];;
1716

1817
[%%expect{|
19-
module Iarray = Stdlib_stable.Iarray
18+
module Iarray = Stdlib__Iarray
2019
external ( .:() ) : 'a iarray -> int -> 'a = "%array_safe_get"
2120
val iarray : int iarray = [:1; 2; 3; 4; 5:]
2221
val ifarray : float iarray = [:1.5; 2.5; 3.5; 4.5; 5.5:]

ocaml/testsuite/tests/typing-local/float_iarray.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
(* TEST
2-
include stdlib_stable;
32
{
43
reference = "${test_source_directory}/float_iarray.heap.reference";
54
bytecode;
@@ -17,7 +16,7 @@
1716
(* Testing that local [float iarray]s don't allocate on access. This is a
1817
question because for flat float arrays, accesses have to box the float. *)
1918

20-
module Iarray = Stdlib_stable.Iarray
19+
module Iarray = Stdlib__Iarray
2120

2221
let ( .:() ) = Iarray.( .:() )
2322

ocaml/testsuite/tests/typing-local/test_iarray.ml renamed to ocaml/testsuite/tests/typing-local/iarray.ml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
(* TEST
2-
include stdlib_stable;
32
{
4-
reference = "${test_source_directory}/test_iarray.byte.reference";
3+
reference = "${test_source_directory}/iarray.byte.reference";
54
bytecode;
65
}{
76
stack-allocation;
8-
reference = "${test_source_directory}/test_iarray.stack.reference";
7+
reference = "${test_source_directory}/iarray.stack.reference";
98
native;
109
}{
1110
no-stack-allocation;
12-
reference = "${test_source_directory}/test_iarray.heap.reference";
11+
reference = "${test_source_directory}/iarray.heap.reference";
1312
native;
1413
}
1514
*)
@@ -22,7 +21,7 @@
2221
2. Correctness: They actually create arrays on the stack (by testing that no
2322
GCed allocation happens). *)
2423

25-
module Iarray = Stdlib_stable.Iarray
24+
module Iarray = Stdlib__Iarray
2625

2726
external opaque_local : local_ 'a -> local_ 'a = "%opaque"
2827

0 commit comments

Comments
 (0)