diff options
-rw-r--r-- | .gitattributes | 2 | ||||
-rw-r--r-- | Changes | 10 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | Makefile.common | 2 | ||||
-rw-r--r-- | Makefile.config.in | 8 | ||||
-rw-r--r-- | api_docgen/ocamldoc/Makefile | 9 | ||||
-rw-r--r-- | api_docgen/odoc/Makefile | 13 | ||||
-rw-r--r-- | asmcomp/x86_proc.ml | 2 | ||||
-rw-r--r-- | asmcomp/x86_proc.mli | 2 | ||||
-rwxr-xr-x | configure | 14 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | man/Makefile | 18 | ||||
-rw-r--r-- | man/ocaml.1 (renamed from man/ocaml.m) | 0 | ||||
-rw-r--r-- | man/ocamlc.1 (renamed from man/ocamlc.m) | 0 | ||||
-rw-r--r-- | man/ocamlc.opt.1 | 1 | ||||
-rw-r--r-- | man/ocamlcp.1 (renamed from man/ocamlcp.m) | 0 | ||||
-rw-r--r-- | man/ocamldebug.1 (renamed from man/ocamldebug.m) | 0 | ||||
-rw-r--r-- | man/ocamldep.1 (renamed from man/ocamldep.m) | 0 | ||||
-rw-r--r-- | man/ocamldoc.1 (renamed from man/ocamldoc.m) | 0 | ||||
-rw-r--r-- | man/ocamllex.1 (renamed from man/ocamllex.m) | 0 | ||||
-rw-r--r-- | man/ocamlmktop.1 (renamed from man/ocamlmktop.m) | 0 | ||||
-rw-r--r-- | man/ocamlopt.1 (renamed from man/ocamlopt.m) | 0 | ||||
-rw-r--r-- | man/ocamlopt.opt.1 | 1 | ||||
-rw-r--r-- | man/ocamloptp.1 | 1 | ||||
-rw-r--r-- | man/ocamlprof.1 (renamed from man/ocamlprof.m) | 0 | ||||
-rw-r--r-- | man/ocamlrun.1 (renamed from man/ocamlrun.m) | 0 | ||||
-rw-r--r-- | man/ocamlyacc.1 (renamed from man/ocamlyacc.m) | 0 | ||||
-rw-r--r-- | runtime/extern.c | 1 | ||||
-rw-r--r-- | testsuite/tests/warnings/w32.ml | 4 | ||||
-rw-r--r-- | testsuite/tests/warnings/w32.mli | 4 | ||||
-rwxr-xr-x | tools/autogen | 2 | ||||
-rw-r--r-- | typing/includemod.ml | 4 |
32 files changed, 57 insertions, 52 deletions
diff --git a/.gitattributes b/.gitattributes index f7578b53b1..ab3643be69 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 @@ -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 @@ -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. @@ -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 $$?; \ diff --git a/Makefile.common b/Makefile.common index 42fa671b61..43068151c8 100644 --- a/Makefile.common +++ b/Makefile.common @@ -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) diff --git a/Makefile.config.in b/Makefile.config.in index 6da3d3624f..63bdc810a4 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -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 diff --git a/api_docgen/ocamldoc/Makefile b/api_docgen/ocamldoc/Makefile index 87cd9cdb85..decc724af5 100644 --- a/api_docgen/ocamldoc/Makefile +++ b/api_docgen/ocamldoc/Makefile @@ -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 diff --git a/api_docgen/odoc/Makefile b/api_docgen/odoc/Makefile index 5c22a15b46..1d9437ab75 100644 --- a/api_docgen/odoc/Makefile +++ b/api_docgen/odoc/Makefile @@ -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 diff --git a/asmcomp/x86_proc.ml b/asmcomp/x86_proc.ml index 99ddd39842..7003160e64 100644 --- a/asmcomp/x86_proc.ml +++ b/asmcomp/x86_proc.ml @@ -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 = diff --git a/asmcomp/x86_proc.mli b/asmcomp/x86_proc.mli index c7f20bc99e..fbc0cead9b 100644 --- a/asmcomp/x86_proc.mli +++ b/asmcomp/x86_proc.mli @@ -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 @@ -816,8 +816,6 @@ ccomptype mkexedebugflag mkexe fpic -libraries_man_section -programs_man_section extralibs syslib outputobj @@ -2784,12 +2782,6 @@ $as_echo "$as_me: Configuring OCaml version 4.14.0+dev0-2021-06-03" >&6;} ## 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 @@ -2930,8 +2922,6 @@ OCAML_VERSION_SHORT=4.14 - - # TODO: rename this variable @@ -19191,9 +19181,9 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\r?\$)/ { line = \$ 0 - split(line, arg, " ") + split(line, arg, /[ \r\t]/) if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] diff --git a/configure.ac b/configure.ac index a72286849d..621ae9bd76 100644 --- a/configure.ac +++ b/configure.ac @@ -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 @@ -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]) diff --git a/man/Makefile b/man/Makefile index 52d1c19f53..36d3126563 100644 --- a/man/Makefile +++ b/man/Makefile @@ -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) diff --git a/man/ocaml.m b/man/ocaml.1 index 9d19f1b3c5..9d19f1b3c5 100644 --- a/man/ocaml.m +++ b/man/ocaml.1 diff --git a/man/ocamlc.m b/man/ocamlc.1 index adbfe3ec8b..adbfe3ec8b 100644 --- a/man/ocamlc.m +++ b/man/ocamlc.1 diff --git a/man/ocamlc.opt.1 b/man/ocamlc.opt.1 new file mode 100644 index 0000000000..3d957b581d --- /dev/null +++ b/man/ocamlc.opt.1 @@ -0,0 +1 @@ +.so man1/ocamlc.1 diff --git a/man/ocamlcp.m b/man/ocamlcp.1 index d6c983d167..d6c983d167 100644 --- a/man/ocamlcp.m +++ b/man/ocamlcp.1 diff --git a/man/ocamldebug.m b/man/ocamldebug.1 index f03ad60f39..f03ad60f39 100644 --- a/man/ocamldebug.m +++ b/man/ocamldebug.1 diff --git a/man/ocamldep.m b/man/ocamldep.1 index 1c39e9d52a..1c39e9d52a 100644 --- a/man/ocamldep.m +++ b/man/ocamldep.1 diff --git a/man/ocamldoc.m b/man/ocamldoc.1 index ffdee529a8..ffdee529a8 100644 --- a/man/ocamldoc.m +++ b/man/ocamldoc.1 diff --git a/man/ocamllex.m b/man/ocamllex.1 index 58e0362764..58e0362764 100644 --- a/man/ocamllex.m +++ b/man/ocamllex.1 diff --git a/man/ocamlmktop.m b/man/ocamlmktop.1 index 09a4126c01..09a4126c01 100644 --- a/man/ocamlmktop.m +++ b/man/ocamlmktop.1 diff --git a/man/ocamlopt.m b/man/ocamlopt.1 index 8540a08c1e..8540a08c1e 100644 --- a/man/ocamlopt.m +++ b/man/ocamlopt.1 diff --git a/man/ocamlopt.opt.1 b/man/ocamlopt.opt.1 new file mode 100644 index 0000000000..f548264fa1 --- /dev/null +++ b/man/ocamlopt.opt.1 @@ -0,0 +1 @@ +.so man1/ocamlopt.1 diff --git a/man/ocamloptp.1 b/man/ocamloptp.1 new file mode 100644 index 0000000000..bfd9d3e31a --- /dev/null +++ b/man/ocamloptp.1 @@ -0,0 +1 @@ +.so man1/ocamlcp.1 diff --git a/man/ocamlprof.m b/man/ocamlprof.1 index 97d5671441..97d5671441 100644 --- a/man/ocamlprof.m +++ b/man/ocamlprof.1 diff --git a/man/ocamlrun.m b/man/ocamlrun.1 index 78216f2eb5..78216f2eb5 100644 --- a/man/ocamlrun.m +++ b/man/ocamlrun.1 diff --git a/man/ocamlyacc.m b/man/ocamlyacc.1 index f522d5cc26..f522d5cc26 100644 --- a/man/ocamlyacc.m +++ b/man/ocamlyacc.1 diff --git a/runtime/extern.c b/runtime/extern.c index d526683a60..75ab233172 100644 --- a/runtime/extern.c +++ b/runtime/extern.c @@ -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; diff --git a/testsuite/tests/warnings/w32.ml b/testsuite/tests/warnings/w32.ml index 79b4b3093a..1a8e7b7a1d 100644 --- a/testsuite/tests/warnings/w32.ml +++ b/testsuite/tests/warnings/w32.ml @@ -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 diff --git a/testsuite/tests/warnings/w32.mli b/testsuite/tests/warnings/w32.mli index 8ffe03dd23..80fb6735ae 100644 --- a/testsuite/tests/warnings/w32.mli +++ b/testsuite/tests/warnings/w32.mli @@ -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 diff --git a/tools/autogen b/tools/autogen index 534145151c..69cc910180 100755 --- a/tools/autogen +++ b/tools/autogen @@ -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 diff --git a/typing/includemod.ml b/typing/includemod.ml index cfe6e6b3bd..8983ff5b04 100644 --- a/typing/includemod.ml +++ b/typing/includemod.ml @@ -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 |