Skip to content

Commit

Permalink
Merge commit '18c4d16b3b80388f5b77dcc5a268c33eceb37ebe' into 5.00_reb…
Browse files Browse the repository at this point in the history
…ase_to_pr
  • Loading branch information
ctk21 committed Dec 20, 2021
2 parents 47dd6c5 + 18c4d16 commit 03db0a4
Show file tree
Hide file tree
Showing 32 changed files with 57 additions and 52 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ tools/ocaml-objcopy-macosx text eol=lf
tools/ocamlsize text eol=lf
tools/pre-commit-githook text eol=lf
tools/markdown-add-pr-links.sh text eol=lf
runtime/caml/m.h.in text eol=lf
runtime/caml/s.h.in text eol=lf
runtime/caml/compatibility.h typo.long-line=may
runtime/caml/sizeclasses.h typo.missing-header typo.white-at-eol

Expand Down
10 changes: 10 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Working version
(Xavier Leroy and David Allsopp, review by Sébastien Hinderer and
Damien Doligez)

- #10730, 10731: Fix bug in `Obj.reachable_words` causing a slowdown when called
multiple time (Alain Frisch, report by ygrek, review by Xavier Leroy)

### Code generation and optimizations:

- #10578: Increase the number of integer registers used for
Expand Down Expand Up @@ -275,8 +278,15 @@ Working version
- #10692: Expose Parse.module_type and Parse.module_expr
(Guillaume Petiot, review by Gabriel Scherer)

- #10714: Add X86_proc.with_internal_assembler for temporarily changing the
assembler used by the backend.
(David Allsopp, review by Gabriel Scherer)

### Build system:

- #10717: Simplify the installation of man pages
(Sébastien Hinderer, review by ???)

### Bug fixes:

- #9214, #10709: Wrong unmarshaling of function pointers in debugger mode.
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,7 @@ ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true"
endif
$(MAKE) -C tools install
ifeq "$(UNIX_OR_WIN32)" "unix" # Install manual pages only on Unix
$(MKDIR) "$(INSTALL_MANDIR)/man$(PROGRAMS_MAN_SECTION)"
-$(MAKE) -C man install
$(MAKE) -C man install
endif
for i in $(OTHERLIBRARIES); do \
$(MAKE) -C otherlibs/$$i install || exit $$?; \
Expand Down
2 changes: 2 additions & 0 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ INSTALL_BINDIR := $(DESTDIR)$(BINDIR)
INSTALL_LIBDIR := $(DESTDIR)$(LIBDIR)
INSTALL_STUBLIBDIR := $(DESTDIR)$(STUBLIBDIR)
INSTALL_MANDIR := $(DESTDIR)$(MANDIR)
INSTALL_PROGRAMS_MAN_DIR := $(DESTDIR)$(PROGRAMS_MAN_DIR)
INSTALL_LIBRARIES_MAN_DIR := $(DESTDIR)$(LIBRARIES_MAN_DIR)
INSTALL_DOCDIR := $(DESTDIR)$(DOCDIR)

FLEXDLL_SUBMODULE_PRESENT := $(wildcard $(ROOTDIR)/flexdll/Makefile)
Expand Down
8 changes: 4 additions & 4 deletions Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ LIBDIR=@libdir@
STUBLIBDIR=@libdir@/stublibs

### Where to install the man pages
# Man pages for commands go in $(MANDIR)/man$(PROGRAMS_MAN_SECTION)
# Man pages for the library go in $(MANDIR)/man/man$(LIBRARIES_MAN_SECTION)
# Man pages for commands go in $(MANDIR)/man1
# Man pages for the library go in $(MANDIR)/man3
MANDIR=@mandir@
PROGRAMS_MAN_SECTION=@programs_man_section@
LIBRARIES_MAN_SECTION=@libraries_man_section@
PROGRAMS_MAN_DIR=$(MANDIR)/man1
LIBRARIES_MAN_DIR=$(MANDIR)/man3

### Do #! scripts work on your system?
### Beware: on some systems (e.g. SunOS 4), this will work only if
Expand Down
9 changes: 4 additions & 5 deletions api_docgen/ocamldoc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,9 @@ $(filter-out camlinternal%,$(compilerlibref)),\
build/latex/compilerlibs_input.tex: | build/latex
echo $(compilerlibs_INPUT) > $@

INSTALL_MANODIR=$(INSTALL_MANDIR)/man3
.PHONY:install
.PHONY: install
install:
$(MKDIR) "$(INSTALL_MANODIR)"
$(MKDIR) "$(INSTALL_LIBRARIES_MAN_DIR)"
if test -d build/man; then \
$(INSTALL_DATA) build/man/*.3o "$(INSTALL_MANODIR)"; \
else : ; fi
$(INSTALL_DATA) build/man/*.3o "$(INSTALL_LIBRARIES_MAN_DIR)"; \
fi
13 changes: 6 additions & 7 deletions api_docgen/odoc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,12 @@ $(ALL_PAGED_DOC:%=build/%.3o.stamp):build/%.3o.stamp:build/%.odocl | build/
touch $@

# Man pages are the only installed documentation
INSTALL_MANODIR=$(INSTALL_MANDIR)/man3
.PHONY:install
.PHONY: install
install:
$(MKDIR) "$(INSTALL_MANODIR)"
$(MKDIR) "$(INSTALL_LIBRARIES_MAN_DIR)"
if test -d build/man/libref ; then \
$(INSTALL_DATA) build/man/libref/* "$(INSTALL_MANODIR)"; \
else : ; fi
$(INSTALL_DATA) build/man/libref/* "$(INSTALL_LIBRARIES_MAN_DIR)"; \
fi
if test -d build/man/compilerlibref ; then \
$(INSTALL_DATA) build/man/libref/* "$(INSTALL_MANODIR)"; \
else : ; fi
$(INSTALL_DATA) build/man/libref/* "$(INSTALL_LIBRARIES_MAN_DIR)"; \
fi
2 changes: 2 additions & 0 deletions asmcomp/x86_proc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ let string_of_rounding = function

let internal_assembler = ref None
let register_internal_assembler f = internal_assembler := Some f
let with_internal_assembler assemble k =
Misc.protect_refs [ R (internal_assembler, Some assemble) ] k

(* Which asm conventions to use *)
let masm =
Expand Down
2 changes: 2 additions & 0 deletions asmcomp/x86_proc.mli
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ val use_plt : bool
(** Support for plumbing a binary code emitter *)

val register_internal_assembler: (asm_program -> string -> unit) -> unit
val with_internal_assembler:
(asm_program -> string -> unit) -> (unit -> 'a) -> 'a
14 changes: 2 additions & 12 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ AC_MSG_NOTICE([Configuring OCaml version AC_PACKAGE_VERSION])
## Command-line arguments passed to configure
CONFIGURE_ARGS="$*"

# Command-line tools section of the Unix manual
programs_man_section=1

# Library section of the Unix manual
libraries_man_section=3

# Command to build executalbes
# In general this command is supposed to use the CFLAGs- and LDFLAGS-
# related variables (OC_CFLAGS and OC_LDFLAGS for ocaml-specific
Expand Down Expand Up @@ -108,8 +102,6 @@ AC_SUBST([outputexe])
AC_SUBST([outputobj])
AC_SUBST([syslib])
AC_SUBST([extralibs])
AC_SUBST([programs_man_section])
AC_SUBST([libraries_man_section])
AC_SUBST([fpic])
AC_SUBST([mkexe])
AC_SUBST([mkexedebugflag])
Expand Down
18 changes: 7 additions & 11 deletions man/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,13 @@
#**************************************************************************

ROOTDIR = ..
include $(ROOTDIR)/Makefile.config
include $(ROOTDIR)/Makefile.common

DESTDIR ?=
INSTALL_DIR=$(DESTDIR)$(MANDIR)/man$(PROGRAMS_MAN_SECTION)
MANPAGES = $(addsuffix .1,\
ocaml ocamlc ocamlc.opt ocamlcp ocamldebug ocamldep ocamldoc ocamllex \
ocamlmktop ocamlopt ocamlopt.opt ocamloptp ocamlprof ocamlrun ocamlyacc)

.PHONY: install
install:
for i in *.m; do cp \
$$i $(INSTALL_DIR)/`basename $$i .m`.$(PROGRAMS_MAN_SECTION); done
echo '.so man$(PROGRAMS_MAN_SECTION)/ocamlc.$(PROGRAMS_MAN_SECTION)' \
> $(INSTALL_DIR)/ocamlc.opt.$(PROGRAMS_MAN_SECTION)
echo '.so man$(PROGRAMS_MAN_SECTION)/ocamlopt.$(PROGRAMS_MAN_SECTION)' \
> $(INSTALL_DIR)/ocamlopt.opt.$(PROGRAMS_MAN_SECTION)
echo '.so man$(PROGRAMS_MAN_SECTION)/ocamlcp.$(PROGRAMS_MAN_SECTION)' \
> $(INSTALL_DIR)/ocamloptp.$(PROGRAMS_MAN_SECTION)
$(MKDIR) $(INSTALL_PROGRAMS_MAN_DIR)
$(INSTALL_DATA) $(MANPAGES) $(INSTALL_PROGRAMS_MAN_DIR)
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions man/ocamlc.opt.1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man1/ocamlc.1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions man/ocamlopt.opt.1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man1/ocamlopt.1
1 change: 1 addition & 0 deletions man/ocamloptp.1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.so man1/ocamlcp.1
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions runtime/extern.c
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,7 @@ CAMLprim value caml_obj_reachable_words(value v)
uintnat pos = 0;
struct caml_extern_state *s = get_extern_state ();

s->obj_counter = 0;
extern_init_position_table(s);
sp = s->extern_stack;
size = 0;
Expand Down
4 changes: 4 additions & 0 deletions testsuite/tests/warnings/w32.ml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ module F (X : sig val x : int end) = struct end
module G (X : sig val x : int end) = X

module H (X : sig val x : int end) = X

module type S = sig
module F: sig val x : int end -> sig end
end
4 changes: 4 additions & 0 deletions testsuite/tests/warnings/w32.mli
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ module F (X : sig val x : int end) : sig end
module G (X : sig val x : int end) : sig end

module H (X : sig val x : int end) : sig val x : int end

module type S = sig
module F: sig val x : int end -> sig end
end
2 changes: 2 additions & 0 deletions tools/autogen
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ sed -e '/^runstatedir/d' \
-e '/-runstatedir /{N;N;N;N;N;N;N;N;d;}' \
-e '/--runstatedir=DIR/d' \
-e 's/ runstatedir//' \
-e '/split(line, arg/s|" "|/[ \\r\\t]/|' \
-e '/define|undef/s/|\\\$/|\\r?\\$/' \
-e '1d' \
configure >> configure.tmp

Expand Down
4 changes: 3 additions & 1 deletion typing/includemod.ml
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,9 @@ and check_modtype_equiv ~in_eq ~loc env ~mark mty1 mty2 =
of the equivalence.
*)
if in_eq then None
else Some (modtypes ~in_eq:true ~loc env ~mark Subst.identity mty2 mty1)
else
let mark = negate_mark mark in
Some (modtypes ~in_eq:true ~loc env ~mark Subst.identity mty2 mty1)
in
match c1, c2 with
| Ok Tcoerce_none, (Some Ok Tcoerce_none|None) -> Ok Tcoerce_none
Expand Down

0 comments on commit 03db0a4

Please sign in to comment.