Skip to content

Commit 88f522a

Browse files
authored
flambda-backend: Reclassify 'CR ocaml 5 runtime' comments (#2094)
1 parent d67772e commit 88f522a

File tree

17 files changed

+25
-25
lines changed

17 files changed

+25
-25
lines changed

otherlibs/str/str.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ external re_search_backward: regexp -> string -> int -> int array
610610
module Domain = struct
611611
module DLS = struct
612612

613-
(* CR ocaml 5 runtime: Remove this proxy and use the real Domain.DLS *)
613+
(* CR ocaml 5 domains: Remove this proxy and use the real Domain.DLS *)
614614
let[@inline always] new_key f = ref (f ())
615615
let[@inline always] set k s = k := s
616616
let[@inline always] get k = !k

otherlibs/systhreads4/st_stubs.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
/* */
1414
/**************************************************************************/
1515

16-
// CR ocaml 5 runtime: We will need to pull in changes from the same file in
17-
// [tip-5] tag in ocaml-jst. We're considering this file to be part of the
18-
// runtime.
19-
2016
#define CAML_INTERNALS
2117

2218
#define CAML_NAME_SPACE

otherlibs/unix/signals.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
/* */
1414
/**************************************************************************/
1515

16-
/* CR ocaml 5 runtime: This file is the 4.x version together with
16+
/* CR ocaml 5 domains: This file is the 4.x version together with
1717
adjustments to the names of exported functions ("unix_" -> "caml_unix").
18-
(mshinwell/xclerc)
18+
(mshinwell/xclerc).
19+
For multi-domain support we'll need to revisit this.
1920
*/
2021

2122
#define CAML_INTERNALS

runtime/caml/stack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#ifdef TARGET_arm64
6060
/* Size of the gc_regs structure, in words.
6161
See arm64.S and arm64/proc.ml for the indices */
62-
/* CR ocaml 5 runtime (mshinwell): this has not been updated for SIMD */
62+
/* CR-someday mshinwell: update for SIMD */
6363
#define Wosize_gc_regs (2 + 24 /* int regs */ + 24 /* float regs */)
6464
#define Saved_return_address(sp) *((intnat *)((sp) - 8))
6565
#define Pop_frame_pointer(sp) sp += sizeof(value)

runtime/dynlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ void caml_free_shared_libs(void)
236236
#define Handle_val(v) (*((void **) (v)))
237237

238238
/* The mode argument is here for compatibility with runtime4. */
239-
/* CR ocaml 5 runtime: Remove [mode] when all-runtime5. */
239+
/* CR ocaml 5 all-runtime5: Remove [mode] when all-runtime5. */
240240
CAMLprim value caml_dynlink_open_lib(value mode, value filename)
241241
{
242242
void * handle;

runtime/extern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ enum reachable_words_node_state {
13801380
* root that we reached it from */
13811381
};
13821382

1383-
/* CR ocaml 5 runtime (mshinwell): think about what to do here */
1383+
/* CR ocaml 5 domains (mshinwell): think about what to do here */
13841384
/* Not multicore-safe (the [volatile] just lets us use this with the [Field] macro) */
13851385
static void add_to_long_value(volatile value *v, intnat x) {
13861386
*v = Val_long(Long_val(*v) + x);

runtime4/caml/camlatomic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ using std::memory_order_seq_cst;
4343
#include <stdatomic.h>
4444
#define ATOMIC_UINTNAT_INIT(x) (x)
4545

46-
// CR ocaml 5 runtime: provide these typedefs (requires C11)
46+
// CR ocaml 5 domains: provide these typedefs (requires C11)
4747
// typedef _Atomic uintnat atomic_uintnat;
4848
// typedef _Atomic intnat atomic_intnat;
4949

stdlib/domain.ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ open! Stdlib
2121

2222
[@@@ocaml.flambda_o3]
2323

24-
(* CR ocaml 5 runtime: domain-local-storage assumes single-domain,
25-
i.e. calling split will never be necessary. *)
24+
(* CR ocaml 5 domains: domain-local-storage assumes single-domain,
25+
i.e. calling split will never be necessary.
26+
For multi-domain support we'll need the upstream 5.x implementation.
27+
*)
2628

2729
module DLS = struct
2830

@@ -107,7 +109,7 @@ let do_at_exit () =
107109

108110
let _ = Stdlib.do_domain_local_at_exit := do_at_exit
109111

110-
(* CR ocaml 5 runtime: domains not supported on 4.x
112+
(* CR ocaml 5 domains: use this code
111113
112114
module Raw = struct
113115
(* Low-level primitives provided by the runtime *)

stdlib/domain.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
(* *)
1818
(**************************************************************************)
1919

20-
(* CR ocaml 5 runtime: domains not supported on 4.x
20+
(* CR ocaml 5 domains: domains not supported on 4.x
2121
2222
[@@@alert unstable
2323
"The Domain interface may change in incompatible ways in the future."

stdlib/gc.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ external full_major : unit -> unit = "caml_gc_full_major"
6767
external compact : unit -> unit = "caml_gc_compaction"
6868
external get_minor_free : unit -> int = "caml_get_minor_free"
6969

70-
(* CR ocaml 5 runtime: These functions are no-ops upstream. We should make them
71-
no-ops internally when we delete the corresponding C functions from the
72-
runtime -- they're already marked as deprecated in the mli.
70+
(* CR ocaml 5 all-runtime5: These functions are no-ops upstream. We should
71+
make them no-ops internally when we delete the corresponding C functions
72+
from the runtime -- they're already marked as deprecated in the mli.
7373
*)
7474

7575
external eventlog_pause : unit -> unit = "caml_eventlog_pause"

stdlib/gc.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ type stat =
100100
value will always be [0].
101101
102102
@since 3.12 *)
103-
(* CR ocaml 5 runtime: Update the above comment to what it is upstream:
103+
(* CR ocaml 5 all-runtime5: Update the above comment to what it is upstream:
104104
105105
This metrics is currently not available in OCaml 5: the field value is
106106
always [0].

stdlib/mutex.mli

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,5 @@ val protect : t -> (unit -> 'a) -> 'a
7070
7171
@since 5.1 *)
7272
(* CR ocaml 5 runtime (mshinwell): looks like [protect] needs to use
73-
Sys.with_async_exns? *)
73+
Sys.with_async_exns?
74+
(PR2007 fixes this) *)

stdlib/stdlib.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ module Complex = Complex
608608
module Condition = Condition
609609
module Digest = Digest
610610
module Domain = Domain
611-
(* CR ocaml 5 runtime:
611+
(* CR ocaml 5 effects:
612612
BACKPORT
613613
module Effect = Effect
614614
*)

stdlib/stdlib.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ module Domain = Domain
14101410
[@@alert unstable
14111411
"The Domain interface may change in incompatible ways in the future."
14121412
]
1413-
(* CR ocaml 5 runtime:
1413+
(* CR ocaml 5 effects:
14141414
BACKPORT
14151415
module Effect = Effect
14161416
[@@alert "-unstable"]

testsuite/tests/misc/pr7168.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ let _ =
7676
* to simplify this test along the same
7777
* lines as upstream, as stack overflow
7878
* detection is always supported in
79-
* ocaml 5. *)
79+
* ocaml 5. *)
8080
if (Gc.get ()).Gc.stack_limit = 0 then begin
8181
(* We are in native code. Skip the test because some platforms cannot
8282
reliably detect stack overflow. *)

testsuite/tests/statmemprof/thread_exit_in_callback.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ include systhreads
66
*** native
77
*)
88

9-
(* CR ocaml 5 runtime: Once statmemprof is ported, remove "runtime4" stanzas
9+
(* CR ocaml 5 statmemprof: Once statmemprof is ported, remove "runtime4" stanzas
1010
for the tests/statmemprof/ tests. *)
1111

1212
let _ =

utils/symbol.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ end)
4747

4848
let caml_symbol_prefix = "caml"
4949

50-
(* CR ocaml 5 runtime: Remove this_is_ocamlc and force_runtime4_symbols once
50+
(* CR ocaml 5 all-runtime5: Remove this_is_ocamlc and force_runtime4_symbols once
5151
fully on runtime5 *)
5252
let this_is_ocamlc = ref false
5353
let force_runtime4_symbols = ref false

0 commit comments

Comments
 (0)