Skip to content
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

Resolve conflicts in, and fix, ocaml/stdlib/ #2806

Merged
merged 2 commits into from
Aug 23, 2024
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
27 changes: 14 additions & 13 deletions ocaml/stdlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,13 @@ include $(ROOTDIR)/Makefile.common
# ../runtime/ocamlrun.
USE_BOOT_OCAMLC ?=

<<<<<<< HEAD
COMPILER=$(ROOTDIR)/ocamlc$(EXE)
CAMLC=$(OCAMLRUN) $(COMPILER)
COMPFLAGS=-strict-sequence -absname -w +a-4-9-41-42-44-45-48-66-70 \
-g -warn-error +A -bin-annot -nostdlib -principal \
-nopervasives -no-alias-deps
||||||| 121bedcfd2
COMPILER=$(ROOTDIR)/ocamlc$(EXE)
CAMLC=$(OCAMLRUN) $(COMPILER)
COMPFLAGS=-strict-sequence -absname -w +a-4-9-41-42-44-45-48 \
-g -warn-error +A -bin-annot -nostdlib -principal
=======
ifeq "$(USE_BOOT_OCAMLC)" ""
CAMLC = $(OCAMLRUN) $(ROOTDIR)/ocamlc$(EXE)
else
CAMLC = $(BOOT_OCAMLC)
endif
COMPFLAGS = -strict-sequence -absname -w +a-4-9-41-42-44-45-48 \
-g -warn-error +A -bin-annot -nostdlib -principal
>>>>>>> 5.2.0
ifeq "$(FLAMBDA)" "true"
OPTCOMPFLAGS += -O3
endif
Expand Down Expand Up @@ -206,3 +193,17 @@ depend:
-e 's/^(${STDLIB_NAMESPACE_MODULES})(\.[^i]*)(i?) :/\1\2\3 : \1.ml\3/' \
-e 's#(^| )(${STDLIB_NAMESPACE_MODULES})[.]#\1stdlib__\u\2.#' \
> .$@

# The following are for compatibility with runtime4

camlheader:
touch camlheader

camlheaderd:
touch camlheaderd

camlheaderi:
touch camlheaderi

camlheader_ur:
touch camlheader_ur
11 changes: 1 addition & 10 deletions ocaml/stdlib/StdlibModules
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,8 @@ STDLIB_MODULE_BASENAMES = \
stringLabels \
moreLabels \
stdLabels \
<<<<<<< HEAD
in_channel \
out_channel \
effect \
camlinternalComprehension
||||||| 121bedcfd2
in_channel \
out_channel \
effect
=======
effect
>>>>>>> 5.2.0

STDLIB_PREFIXED_MODULES = \
$(filter-out stdlib camlinternal%, $(STDLIB_MODULE_BASENAMES))
Expand Down
17 changes: 1 addition & 16 deletions ocaml/stdlib/atomic.mli
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ type !'a t
(** Create an atomic reference. *)
val make : 'a -> 'a t

<<<<<<< HEAD
(** Create an atomic reference that is alone on a cache line. It occupies 4-16x
the memory of one allocated with [make v].
The primary purpose is to prevent false-sharing and the resulting
performance degradation. When a CPU performs an atomic operation, it
temporarily takes ownership of an entire cache line that contains the
Expand All @@ -42,24 +42,9 @@ val make : 'a -> 'a t
enhance performance.
CR ocaml 5 all-runtime5: does not support runtime4 *)
val make_contended : 'a -> 'a t

||||||| 121bedcfd2
=======
(** Create an atomic reference that is alone on a cache line. It occupies 4-16x
the memory of one allocated with [make v].

The primary purpose is to prevent false-sharing and the resulting
performance degradation. When a CPU performs an atomic operation, it
temporarily takes ownership of an entire cache line that contains the
atomic reference. If multiple atomic references share the same cache line,
modifying these disjoint memory regions simultaneously becomes impossible,
which can create a bottleneck. Hence, as a general guideline, if an atomic
reference is experiencing contention, assigning it its own cache line may
enhance performance. *)
val make_contended : 'a -> 'a t

>>>>>>> 5.2.0
(** Get the current value of the atomic reference. *)
val get : 'a t -> 'a

Expand Down
6 changes: 0 additions & 6 deletions ocaml/stdlib/digest.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,11 @@
(* *)
(**************************************************************************)

<<<<<<< HEAD
open! Stdlib

[@@@ocaml.flambda_o3]

(* Message digest (MD5) *)
||||||| 121bedcfd2
(* Message digest (MD5) *)
=======
(* Utility functions *)
>>>>>>> 5.2.0

let hex_of_string d =
let char_hex n =
Expand Down
6 changes: 0 additions & 6 deletions ocaml/stdlib/digest.mli
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,9 @@
(* *)
(**************************************************************************)

<<<<<<< HEAD
open! Stdlib

(** MD5 message digest.
||||||| 121bedcfd2
(** MD5 message digest.
=======
(** Message digest.
>>>>>>> 5.2.0
This module provides functions to compute 'digests', also known as
'hashes', of arbitrary-length strings or files.
Expand Down
Loading
Loading