Skip to content

Reclassify 'CR ocaml 5 runtime' comments #2094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion middle_end/flambda2/tests/tools/flexpect.ml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ let run_mdflx_file filename : Outcome.t =
Error

let _ =
(* CR ocaml 5 runtime: remove this once we are on the 5 runtime *)
(* CR ocaml 5 all-runtime5: remove this once we are on the 5 runtime *)
Symbol0.force_runtime4_symbols ();
if not Config.stack_allocation
then (
Expand Down
2 changes: 1 addition & 1 deletion ocaml/otherlibs/str/str.ml
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ external re_search_backward: regexp -> string -> int -> int array
module Domain = struct
module DLS = struct

(* CR ocaml 5 runtime: Remove this proxy and use the real Domain.DLS *)
(* CR ocaml 5 domains: Remove this proxy and use the real Domain.DLS *)
let[@inline always] new_key f = ref (f ())
let[@inline always] set k s = k := s
let[@inline always] get k = !k
Expand Down
4 changes: 0 additions & 4 deletions ocaml/otherlibs/systhreads4/st_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
/* */
/**************************************************************************/

// CR ocaml 5 runtime: We will need to pull in changes from the same file in
// [tip-5] tag in ocaml-jst. We're considering this file to be part of the
// runtime.

#define CAML_INTERNALS

#define CAML_NAME_SPACE
Expand Down
5 changes: 3 additions & 2 deletions ocaml/otherlibs/unix/signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
/* */
/**************************************************************************/

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

#define CAML_INTERNALS
Expand Down
2 changes: 1 addition & 1 deletion ocaml/runtime/caml/stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#ifdef TARGET_arm64
/* Size of the gc_regs structure, in words.
See arm64.S and arm64/proc.ml for the indices */
/* CR ocaml 5 runtime (mshinwell): this has not been updated for SIMD */
/* CR-someday mshinwell: update for SIMD */
#define Wosize_gc_regs (2 + 24 /* int regs */ + 24 /* float regs */)
#define Saved_return_address(sp) *((intnat *)((sp) - 8))
#define Pop_frame_pointer(sp) sp += sizeof(value)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/runtime/dynlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void caml_free_shared_libs(void)
#define Handle_val(v) (*((void **) (v)))

/* The mode argument is here for compatibility with runtime4. */
/* CR ocaml 5 runtime: Remove [mode] when all-runtime5. */
/* CR ocaml 5 all-runtime5: Remove [mode] when all-runtime5. */
CAMLprim value caml_dynlink_open_lib(value mode, value filename)
{
void * handle;
Expand Down
2 changes: 1 addition & 1 deletion ocaml/runtime/extern.c
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ enum reachable_words_node_state {
* root that we reached it from */
};

/* CR ocaml 5 runtime (mshinwell): think about what to do here */
/* CR ocaml 5 domains (mshinwell): think about what to do here */
/* Not multicore-safe (the [volatile] just lets us use this with the [Field] macro) */
static void add_to_long_value(volatile value *v, intnat x) {
*v = Val_long(Long_val(*v) + x);
Expand Down
2 changes: 1 addition & 1 deletion ocaml/runtime4/caml/camlatomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ using std::memory_order_seq_cst;
#include <stdatomic.h>
#define ATOMIC_UINTNAT_INIT(x) (x)

// CR ocaml 5 runtime: provide these typedefs (requires C11)
// CR ocaml 5 domains: provide these typedefs (requires C11)
// typedef _Atomic uintnat atomic_uintnat;
// typedef _Atomic intnat atomic_intnat;

Expand Down
8 changes: 5 additions & 3 deletions ocaml/stdlib/domain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ open! Stdlib

[@@@ocaml.flambda_o3]

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

module DLS = struct

Expand Down Expand Up @@ -107,7 +109,7 @@ let do_at_exit () =

let _ = Stdlib.do_domain_local_at_exit := do_at_exit

(* CR ocaml 5 runtime: domains not supported on 4.x
(* CR ocaml 5 domains: use this code

module Raw = struct
(* Low-level primitives provided by the runtime *)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/stdlib/domain.mli
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
(* *)
(**************************************************************************)

(* CR ocaml 5 runtime: domains not supported on 4.x
(* CR ocaml 5 domains: domains not supported on 4.x

[@@@alert unstable
"The Domain interface may change in incompatible ways in the future."
Expand Down
6 changes: 3 additions & 3 deletions ocaml/stdlib/gc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ external full_major : unit -> unit = "caml_gc_full_major"
external compact : unit -> unit = "caml_gc_compaction"
external get_minor_free : unit -> int = "caml_get_minor_free"

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

external eventlog_pause : unit -> unit = "caml_eventlog_pause"
Expand Down
2 changes: 1 addition & 1 deletion ocaml/stdlib/gc.mli
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type stat =
value will always be [0].

@since 3.12 *)
(* CR ocaml 5 runtime: Update the above comment to what it is upstream:
(* CR ocaml 5 all-runtime5: Update the above comment to what it is upstream:

This metrics is currently not available in OCaml 5: the field value is
always [0].
Expand Down
3 changes: 2 additions & 1 deletion ocaml/stdlib/mutex.mli
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ val protect : t -> (unit -> 'a) -> 'a

@since 5.1 *)
(* CR ocaml 5 runtime (mshinwell): looks like [protect] needs to use
Sys.with_async_exns? *)
Sys.with_async_exns?
(PR2007 fixes this) *)
2 changes: 1 addition & 1 deletion ocaml/stdlib/stdlib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ module Complex = Complex
module Condition = Condition
module Digest = Digest
module Domain = Domain
(* CR ocaml 5 runtime:
(* CR ocaml 5 effects:
BACKPORT
module Effect = Effect
*)
Expand Down
2 changes: 1 addition & 1 deletion ocaml/stdlib/stdlib.mli
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ module Domain = Domain
[@@alert unstable
"The Domain interface may change in incompatible ways in the future."
]
(* CR ocaml 5 runtime:
(* CR ocaml 5 effects:
BACKPORT
module Effect = Effect
[@@alert "-unstable"]
Expand Down
2 changes: 1 addition & 1 deletion ocaml/testsuite/tests/misc/pr7168.ml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ let _ =
* to simplify this test along the same
* lines as upstream, as stack overflow
* detection is always supported in
* ocaml 5. *)
* ocaml 5. *)
if (Gc.get ()).Gc.stack_limit = 0 then begin
(* We are in native code. Skip the test because some platforms cannot
reliably detect stack overflow. *)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include systhreads
*** native
*)

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

let _ =
Expand Down
2 changes: 1 addition & 1 deletion ocaml/utils/symbol.ml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ end)

let caml_symbol_prefix = "caml"

(* CR ocaml 5 runtime: Remove this_is_ocamlc and force_runtime4_symbols once
(* CR ocaml 5 all-runtime5: Remove this_is_ocamlc and force_runtime4_symbols once
fully on runtime5 *)
let this_is_ocamlc = ref false
let force_runtime4_symbols = ref false
Expand Down
2 changes: 1 addition & 1 deletion tests/backend/checkmach/filter.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

# CR ocaml 5 runtime: remove __ mangling once we're always using the 5 runtime
# CR ocaml 5 all-runtime5: remove __ mangling once we're always using the 5 runtime
sed -r 's/Error: Annotation check for zero_alloc( strict | )failed on function ([^ ]*) \(caml(.*)_[0-9]+(_[0-9]+_code)?\)$/Error: Annotation check for zero_alloc\1failed on function \2 \(caml\3_HIDE_STAMP\)/' | \
sed -r 's/ direct (tail)?call caml(.*)_[0-9]+(_[0-9]+_code)?( on a path to .*)?$/ direct \1call caml\2_HIDE_STAMP\4/' | sed -r 's/ probe (test)? handler caml(.*)_[0-9]+(_[0-9]+_code)?( on a path to .*)?$/ probe \1 handler caml\2_HIDE_STAMP\4/' | \
sed 's/__/./'