From 8da85efa39dcad3d494aaaff5f729e8bb861cdd0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Glondu?= Date: Mon, 18 Sep 2023 13:35:46 +0200 Subject: [PATCH] New upstream version 4.14.0 --- .depend | 175 +- .gitattributes | 5 +- .github/workflows/build.yml | 2 +- .gitignore | 2 + .mailmap | 1 + Changes | 531 +- HACKING.adoc | 12 +- INSTALL.adoc | 52 +- Makefile | 63 +- Makefile.build_config.in | 8 + Makefile.common | 5 +- Makefile.config.in | 34 +- README.adoc | 4 +- README.win32.adoc | 2 +- VERSION | 14 +- aclocal.m4 | 16 + api_docgen/Format_tutorial.mld | 55 +- api_docgen/Makefile | 35 +- api_docgen/Makefile.common | 8 +- api_docgen/Ocaml_operators.mld | 2 +- api_docgen/alldoc.tex | 4 +- api_docgen/ocamldoc/Makefile | 31 +- api_docgen/odoc/Makefile | 68 +- asmcomp/amd64/emit.mlp | 41 +- asmcomp/amd64/proc.ml | 39 +- asmcomp/amd64/selection.ml | 6 +- asmcomp/arm/CSE.ml | 5 - asmcomp/arm/emit.mlp | 17 +- asmcomp/arm/proc.ml | 36 +- asmcomp/arm/selection.ml | 2 +- asmcomp/arm64/CSE.ml | 2 +- asmcomp/arm64/emit.mlp | 11 +- asmcomp/arm64/proc.ml | 35 +- asmcomp/arm64/selection.ml | 2 +- asmcomp/cmm.ml | 2 +- asmcomp/cmm.mli | 5 +- asmcomp/cmm_helpers.ml | 73 +- asmcomp/cmmgen.ml | 14 +- asmcomp/dune | 2 + asmcomp/i386/CSE.ml | 2 +- asmcomp/i386/emit.mlp | 27 +- asmcomp/i386/proc.ml | 30 +- asmcomp/i386/selection.ml | 7 +- asmcomp/mach.ml | 1 + asmcomp/mach.mli | 1 + asmcomp/polling.ml | 87 +- asmcomp/power/CSE.ml | 2 +- asmcomp/power/emit.mlp | 15 +- asmcomp/power/proc.ml | 33 +- asmcomp/printcmm.ml | 1 - asmcomp/printmach.ml | 2 + asmcomp/reg.ml | 1 + asmcomp/reg.mli | 23 + asmcomp/reloadgen.ml | 1 + asmcomp/riscv/CSE.ml | 2 +- asmcomp/riscv/emit.mlp | 97 +- asmcomp/riscv/proc.ml | 32 +- asmcomp/s390x/emit.mlp | 13 +- asmcomp/s390x/proc.ml | 27 +- asmcomp/selectgen.ml | 8 +- asmcomp/spill.ml | 1 + asmcomp/split.ml | 1 + asmcomp/x86_proc.ml | 2 + asmcomp/x86_proc.mli | 2 + boot/menhir/menhirLib.ml | 15 +- boot/menhir/menhirLib.mli | 2 +- boot/menhir/parser.ml | 10425 ++++++++-------- boot/menhir/parser.mli | 8 + boot/ocamlc | Bin 2893315 -> 2999142 bytes boot/ocamllex | Bin 351449 -> 369653 bytes build-aux/ocaml_version.m4 | 90 + bytecomp/bytegen.ml | 30 +- bytecomp/bytelink.ml | 9 +- compilerlibs/Makefile.compilerlibs | 7 +- configure | 297 +- configure.ac | 186 +- debugger/.depend | 6 +- debugger/Makefile | 17 +- debugger/command_line.ml | 2 +- debugger/eval.ml | 4 +- debugger/main.ml | 5 +- debugger/ocamldebug_entry.ml | 2 + driver/compenv.ml | 2 + driver/compile_common.ml | 2 + driver/compmisc.ml | 38 +- driver/main_args.ml | 41 + driver/main_args.mli | 4 + driver/maindriver.ml | 3 +- driver/optmaindriver.ml | 5 +- dune | 16 +- file_formats/cmt_format.ml | 6 +- file_formats/cmt_format.mli | 3 + lambda/lambda.ml | 42 +- lambda/lambda.mli | 23 +- lambda/matching.ml | 41 +- lambda/printlambda.ml | 18 +- lambda/simplif.ml | 60 +- lambda/switch.ml | 47 +- lambda/switch.mli | 53 +- lambda/tmc.ml | 1024 ++ lambda/tmc.mli | 81 + lambda/translattribute.ml | 100 +- lambda/translclass.ml | 106 +- lambda/translcore.ml | 86 +- lambda/translmod.ml | 44 +- lambda/translprim.ml | 12 +- man/Makefile | 18 +- man/{ocaml.m => ocaml.1} | 10 +- man/{ocamlc.m => ocamlc.1} | 382 +- man/ocamlc.opt.1 | 1 + man/{ocamlcp.m => ocamlcp.1} | 0 man/{ocamldebug.m => ocamldebug.1} | 0 man/{ocamldep.m => ocamldep.1} | 0 man/{ocamldoc.m => ocamldoc.1} | 0 man/{ocamllex.m => ocamllex.1} | 0 man/{ocamlmktop.m => ocamlmktop.1} | 0 man/{ocamlopt.m => ocamlopt.1} | 10 +- man/ocamlopt.opt.1 | 1 + man/ocamloptp.1 | 1 + man/{ocamlprof.m => ocamlprof.1} | 0 man/{ocamlrun.m => ocamlrun.1} | 118 +- man/{ocamlyacc.m => ocamlyacc.1} | 0 manual/README.md | 4 - manual/src/Makefile | 48 +- manual/src/allfiles.etex | 1 + manual/src/cmds/Makefile | 11 +- manual/src/cmds/intf-c.etex | 15 +- manual/src/cmds/ocamldoc.etex | 1 + manual/src/cmds/runtime.etex | 101 +- manual/src/cmds/tail-mod-cons.etex | 528 + manual/src/cmds/unified-options.etex | 15 +- manual/src/html_processing/Makefile | 3 + manual/src/html_processing/js/search.js | 4 + manual/src/html_processing/scss/_common.scss | 13 +- manual/src/html_processing/scss/manual.scss | 23 +- manual/src/html_processing/scss/style.scss | 24 +- .../src/{common.ml => common.ml.in} | 14 +- manual/src/html_processing/src/process_api.ml | 2 +- .../src/html_processing/src/process_manual.ml | 10 +- manual/src/library/Makefile | 6 +- manual/src/library/libunix.etex | 2 +- manual/src/library/stdlib-blurb.etex | 4 + manual/src/macros.hva | 1 + manual/src/manual.tex | 11 +- manual/src/refman/Makefile | 9 +- manual/src/refman/classes.etex | 22 +- manual/src/refman/expr.etex | 5 +- manual/src/refman/extensions/attributes.etex | 4 +- .../refman/extensions/extensionsyntax.etex | 38 +- manual/src/refman/extensions/gadts.etex | 4 +- manual/src/refman/extensions/indexops.etex | 8 +- .../refman/extensions/locallyabstract.etex | 2 +- .../extensions/signaturesubstitution.etex | 4 +- manual/src/refman/lex.etex | 44 +- manual/src/refman/modtypes.etex | 11 + manual/src/refman/modules.etex | 13 +- manual/src/refman/types.etex | 2 +- manual/src/tutorials/Makefile | 9 +- manual/src/tutorials/gadtexamples.etex | 4 +- manual/src/version.tex.in | 2 + manual/styles/syntaxdef.hva | 26 +- manual/tests/Makefile | 3 +- manual/tests/check-stdlib-modules | 2 +- manual/tools/.gitignore | 1 - manual/tools/Makefile | 7 +- manual/tools/htmltransf.mll | 117 - manual/tools/transfmain.ml | 4 +- middle_end/clambda.ml | 4 +- middle_end/clambda.mli | 4 +- middle_end/closure/closure.ml | 124 +- .../flambda/augment_specialised_args.ml | 2 + middle_end/flambda/closure_conversion.ml | 2 + middle_end/flambda/closure_conversion_aux.ml | 1 + middle_end/flambda/closure_conversion_aux.mli | 1 + middle_end/flambda/flambda.ml | 6 +- middle_end/flambda/flambda.mli | 3 + middle_end/flambda/flambda_to_clambda.ml | 2 + middle_end/flambda/flambda_utils.ml | 9 +- middle_end/flambda/flambda_utils.mli | 1 - middle_end/flambda/freshening.ml | 1 + middle_end/flambda/inline_and_simplify.ml | 3 +- middle_end/flambda/inlining_cost.ml | 8 +- middle_end/flambda/inlining_transforms.ml | 1 + middle_end/flambda/invariant_params.ml | 2 +- middle_end/flambda/remove_unused_arguments.ml | 2 + middle_end/flambda/simple_value_approx.ml | 4 +- middle_end/flambda/simple_value_approx.mli | 1 + middle_end/flambda/un_anf.ml | 5 +- ocaml-variants.opam | 10 +- ocamldoc/.depend | 8 +- ocamldoc/Makefile | 2 - ocamldoc/Makefile.best_ocamldoc | 37 +- ocamldoc/odoc_ast.ml | 14 +- ocamldoc/odoc_env.ml | 51 +- ocamldoc/odoc_misc.ml | 55 +- ocamldoc/odoc_misc.mli | 4 - ocamldoc/odoc_print.ml | 33 +- ocamldoc/odoc_sig.ml | 6 +- ocamldoc/odoc_str.ml | 9 +- ocamldoc/odoc_value.ml | 7 +- ocamltest/actions_helpers.ml | 4 +- ocamltest/environments.ml | 56 +- ocamltest/environments.mli | 5 + ocamltest/main.ml | 5 +- ocamltest/ocaml_actions.ml | 17 +- ocamltest/ocaml_tests.ml | 12 +- ocamltest/ocaml_variables.ml | 4 +- ocamltest/run_unix.c | 12 +- ocamltest/run_win32.c | 38 +- ocamltest/tsl_ast.ml | 1 + ocamltest/tsl_ast.mli | 1 + ocamltest/tsl_lexer.mll | 1 + ocamltest/tsl_parser.mly | 4 +- ocamltest/tsl_semantics.ml | 15 +- ocamltest/tsl_semantics.mli | 4 +- ocamltest/variables.ml | 7 +- ocamltest/variables.mli | 2 +- otherlibs/dynlink/Makefile | 2 +- otherlibs/str/str.mli | 29 +- otherlibs/str/strstubs.c | 27 +- otherlibs/systhreads/st_stubs.c | 6 + otherlibs/systhreads/thread.ml | 31 +- otherlibs/systhreads/thread.mli | 29 +- otherlibs/unix/socketaddr.c | 6 - otherlibs/unix/socketaddr.h | 24 +- otherlibs/unix/unix.mli | 73 +- otherlibs/unix/unixLabels.mli | 73 +- otherlibs/unix/unlink.c | 2 +- otherlibs/win32unix/Makefile | 4 +- otherlibs/win32unix/accept.c | 5 +- otherlibs/win32unix/close_on.c | 19 +- otherlibs/win32unix/dup.c | 107 +- otherlibs/win32unix/dup2.c | 42 - otherlibs/win32unix/readlink.c | 1 + otherlibs/win32unix/socket.c | 5 +- otherlibs/win32unix/socketpair.c | 201 + otherlibs/win32unix/stat.c | 13 +- otherlibs/win32unix/unix.ml | 6 +- otherlibs/win32unix/unixsupport.c | 13 + otherlibs/win32unix/unixsupport.h | 43 +- parsing/ast_helper.ml | 7 +- parsing/ast_helper.mli | 6 +- parsing/ast_iterator.ml | 10 +- parsing/ast_iterator.mli | 7 +- parsing/ast_mapper.ml | 10 +- parsing/asttypes.mli | 4 +- parsing/depend.ml | 2 +- parsing/location.ml | 12 +- parsing/parse.ml | 2 + parsing/parse.mli | 2 + parsing/parser.mly | 118 +- parsing/parsetree.mli | 989 +- parsing/pprintast.ml | 72 +- parsing/pprintast.mli | 9 + parsing/printast.ml | 15 +- release-info/howto.md | 24 +- runtime/Makefile | 22 +- runtime/array.c | 4 +- runtime/bigarray.c | 2 +- runtime/caml/compatibility.h | 427 +- runtime/caml/domain_state.h | 14 +- runtime/caml/domain_state.tbl | 3 + runtime/caml/exec.h | 2 +- runtime/caml/io.h | 3 + runtime/caml/major_gc.h | 26 +- runtime/caml/memory.h | 4 +- runtime/caml/misc.h | 64 +- runtime/caml/osdeps.h | 1 + runtime/caml/s.h.in | 9 + runtime/caml/signals.h | 4 +- runtime/caml/version.h.in | 24 + runtime/caml/winsupport.h | 65 + runtime/debugger.c | 28 +- runtime/extern.c | 3 + runtime/fail_nat.c | 6 +- runtime/i386.S | 4 +- runtime/i386nt.asm | 2 +- runtime/intern.c | 3 +- runtime/io.c | 21 + runtime/main.c | 6 +- runtime/major_gc.c | 340 +- runtime/memory.c | 19 +- runtime/riscv.S | 57 +- runtime/sak.c | 6 +- runtime/signals_byt.c | 3 + runtime/signals_nat.c | 57 +- runtime/signals_osdep.h | 6 +- runtime/startup_nat.c | 8 +- runtime/sys.c | 48 +- runtime/weak.c | 113 +- runtime/win32.c | 45 + stdlib/.depend | 48 +- stdlib/Makefile | 8 +- stdlib/StdlibModules | 10 +- stdlib/atomic.mli | 5 +- stdlib/bigarray.mli | 9 +- stdlib/buffer.ml | 103 +- stdlib/buffer.mli | 8 +- stdlib/bytes.ml | 322 + stdlib/bytes.mli | 66 +- stdlib/bytesLabels.mli | 66 +- stdlib/dune | 8 - stdlib/ephemeron.ml | 217 +- stdlib/ephemeron.mli | 224 +- stdlib/expand_module_aliases.awk | 2 +- stdlib/filename.ml | 5 +- stdlib/filename.mli | 9 +- stdlib/format.mli | 8 +- stdlib/gc.mli | 29 +- stdlib/genlex.ml | 2 + stdlib/genlex.mli | 2 + stdlib/hashtbl.mli | 10 +- stdlib/in_channel.ml | 173 + stdlib/in_channel.mli | 152 + stdlib/int32.mli | 6 +- stdlib/int64.mli | 6 +- stdlib/lexing.mli | 2 - stdlib/map.mli | 8 +- stdlib/moreLabels.mli | 24 +- stdlib/nativeint.mli | 7 +- stdlib/obj.ml | 5 - stdlib/obj.mli | 34 +- stdlib/option.mli | 4 +- stdlib/out_channel.ml | 66 + stdlib/out_channel.mli | 160 + stdlib/parsing.mli | 2 - stdlib/queue.mli | 2 +- stdlib/random.ml | 19 + stdlib/random.mli | 18 + stdlib/result.mli | 10 +- stdlib/scanf.mli | 3 +- stdlib/seq.ml | 616 +- stdlib/seq.mli | 775 +- stdlib/set.mli | 6 +- stdlib/stdlib.ml | 2 + stdlib/stdlib.mli | 20 +- stdlib/string.ml | 11 + stdlib/string.mli | 34 + stdlib/stringLabels.mli | 34 + stdlib/{sys.mlp => sys.ml.in} | 29 +- stdlib/sys.mli | 20 +- stdlib/templates/hashtbl.template.mli | 10 +- stdlib/templates/map.template.mli | 8 +- stdlib/templates/set.template.mli | 6 +- stdlib/uchar.ml | 33 + stdlib/uchar.mli | 43 + testsuite/Makefile | 13 +- testsuite/tests/asmcomp/evaluation_order.ml | 78 + .../tests/asmcomp/evaluation_order.reference | 30 + .../poll_attr_both.compilers.reference | 6 + testsuite/tests/asmcomp/poll_attr_both.ml | 21 + .../poll_attr_inserted.compilers.reference | 3 + testsuite/tests/asmcomp/poll_attr_inserted.ml | 16 + .../poll_attr_prologue.compilers.reference | 5 + testsuite/tests/asmcomp/poll_attr_prologue.ml | 16 + .../poll_attr_user.compilers.reference | 6 + testsuite/tests/asmcomp/poll_attr_user.ml | 21 + testsuite/tests/asmcomp/polling_insertion.ml | 2 +- testsuite/tests/backtrace/callstack.reference | 2 +- .../basic-modules/anonymous.ocamlc.reference | 5 +- .../anonymous.ocamlopt.flambda.reference | 6 +- .../anonymous.ocamlopt.reference | 4 +- testsuite/tests/basic/boxedints.ml | 32 +- testsuite/tests/basic/boxedints.reference | 12 +- testsuite/tests/basic/eval_order_8.ml | 22 + testsuite/tests/basic/eval_order_8.reference | 4 + testsuite/tests/basic/objects.ml | 14 + testsuite/tests/basic/objects.reference | 1 + testsuite/tests/basic/opt_variants.ml | 6 +- .../tests/basic/patmatch_for_multiple.ml | 165 +- testsuite/tests/basic/patmatch_split_no_or.ml | 56 +- testsuite/tests/basic/tailcalls.ml | 49 + testsuite/tests/basic/tailcalls.reference | 4 + testsuite/tests/compatibility/main.ml | 16 - testsuite/tests/compatibility/main.reference | 1 - testsuite/tests/compatibility/stub.c | 20 - testsuite/tests/embedded/cmmain.c | 8 +- testsuite/tests/generalized-open/gpr1506.ml | 12 +- testsuite/tests/lib-bytes-utf/test.ml | 275 + testsuite/tests/lib-bytes-utf/test.reference | 1 + testsuite/tests/lib-channels/buffered.ml | 34 + .../tests/lib-channels/buffered.reference | 10 + testsuite/tests/lib-channels/input_all.ml | 114 + testsuite/tests/lib-hashtbl/htbl.ml | 3 + .../tests/lib-obj/reachable_words_bug.ml | 9 + testsuite/tests/lib-printf/tprintf.ml | 22 +- testsuite/tests/lib-printf/tprintf.reference | 40 +- testsuite/tests/lib-random/chi2.ml | 10 + testsuite/tests/lib-seq/test.ml | 254 +- .../tests/lib-stream/count_concat_bug.ml | 1 + testsuite/tests/lib-stream/mpr7769.ml | 1 + testsuite/tests/lib-threads/pr7638.ml | 4 +- .../lib-threads/uncaught_exception_handler.ml | 40 + .../uncaught_exception_handler.reference | 15 + testsuite/tests/lib-uchar/test.ml | 30 + .../tests/lib-unix/common/redirections.ml | 1 + .../lib-unix/common/test_unix_cmdline.ml | 14 +- testsuite/tests/lib-unix/unix-execvpe/exec.ml | 1 + .../tests/lib-unix/unix-socket/recvfrom.ml | 18 +- testsuite/tests/lib-unix/win-env/test_env.ml | 2 + .../lib-unix/win-socketpair/has-afunix.sh | 8 + .../tests/lib-unix/win-socketpair/test.ml | 32 + .../lib-unix/win-socketpair/test.reference | 2 + testsuite/tests/lib-unix/win-stat/test.ml | 5 +- testsuite/tests/lib-unix/win-symlink/test.ml | 51 +- .../tests/lib-unix/win-symlink/test.reference | 6 + testsuite/tests/messages/highlight_tabs.ml | 13 + testsuite/tests/misc/ephe_infix.ml | 3 + testsuite/tests/misc/ephe_infix_new.ml | 24 + testsuite/tests/misc/ephe_issue9391.ml | 70 + testsuite/tests/misc/ephetest.ml | 3 + testsuite/tests/misc/ephetest2.ml | 3 + testsuite/tests/misc/ephetest2_new.ml | 147 + testsuite/tests/misc/ephetest2_new.reference | 5 + testsuite/tests/misc/ephetest_new.ml | 158 + testsuite/tests/misc/ephetest_new.reference | 29 + .../tests/output-complete-obj/test.ml_stub.c | 10 +- testsuite/tests/output-complete-obj/test2.ml | 1 + .../locations_test.compilers.reference | 335 +- testsuite/tests/parsetree/locations_test.ml | 22 + testsuite/tests/parsetree/source.ml | 16 + .../tests/printing-types/disambiguation.ml | 6 +- .../tests/runtime-errors/stackoverflow.ml | 5 +- .../stackoverflow.native.reference | 1 + .../runtime-errors/stackoverflow.reference | 1 + .../cannot_shadow_error.compilers.reference | 6 +- testsuite/tests/shadow_include/shadow_all.ml | 42 +- testsuite/tests/shapes/comp_units.ml | 187 + testsuite/tests/shapes/functors.ml | 242 + testsuite/tests/shapes/incl_md_typeof.ml | 50 + testsuite/tests/shapes/open_arg.ml | 41 + testsuite/tests/shapes/open_struct.ml | 99 + testsuite/tests/shapes/recmodules.ml | 100 + testsuite/tests/shapes/rotor_example.ml | 87 + testsuite/tests/shapes/shape_size_blowup.ml | 68 + testsuite/tests/shapes/simple.ml | 134 + testsuite/tests/shapes/typeof_include.ml | 19 + testsuite/tests/tmc/ambiguities.ml | 289 + testsuite/tests/tmc/other_features.ml | 60 + .../partial_application.compilers.reference | 5 + testsuite/tests/tmc/partial_application.ml | 19 + testsuite/tests/tmc/readable_output.ml | 220 + testsuite/tests/tmc/semantic.ml | 45 + testsuite/tests/tmc/semantic.reference | 7 + testsuite/tests/tmc/stack_space.ml | 42 + testsuite/tests/tmc/tupled_function.ml | 28 + .../tmc/tupled_function_calls.byte.reference | 0 testsuite/tests/tmc/tupled_function_calls.ml | 21 + .../tupled_function_calls.native.reference | 17 + testsuite/tests/tmc/usage_warnings.ml | 271 + .../module_named_main/input_script | 7 + .../tool-debugger/module_named_main/main.ml | 30 + .../module_named_main/main.reference | 6 + .../tests/tool-debugger/printer/printer.ml | 2 +- .../tests/tool-ocaml/directive_failure.ml | 9 + testsuite/tests/tool-toplevel/show.ml | 20 + .../tool-toplevel/topeval.compilers.reference | 10 + testsuite/tests/tool-toplevel/topeval.ml | 47 + .../array_spec.compilers.flat.reference | 5 +- .../array_spec.compilers.no-flat.reference | 4 +- .../comparison_table.compilers.reference | 118 +- .../translprim/ref_spec.compilers.reference | 32 +- .../tests/typing-extensions/extensions.ml | 16 +- .../tests/typing-extensions/open_types.ml | 5 +- testsuite/tests/typing-gadts/ambiguity.ml | 8 + testsuite/tests/typing-gadts/omega07.ml | 6 +- testsuite/tests/typing-gadts/pr10189.ml | 18 - testsuite/tests/typing-gadts/pr10735.ml | 30 + testsuite/tests/typing-gadts/pr10907.ml | 53 + testsuite/tests/typing-gadts/pr5689.ml | 6 +- testsuite/tests/typing-gadts/pr5948.ml | 4 +- testsuite/tests/typing-gadts/pr7160.ml | 5 +- testsuite/tests/typing-gadts/pr7260.ml | 9 +- testsuite/tests/typing-gadts/pr7378.ml | 5 +- testsuite/tests/typing-gadts/pr7391.ml | 10 +- .../typing-gadts/principality-and-gadts.ml | 20 +- testsuite/tests/typing-gadts/return_type.ml | 36 + testsuite/tests/typing-gadts/test.ml | 133 + testsuite/tests/typing-misc/constraints.ml | 37 +- testsuite/tests/typing-misc/deep.ml | 98 + testsuite/tests/typing-misc/distant_errors.ml | 34 + .../tests/typing-misc/enrich_typedecl.ml | 10 +- .../tests/typing-misc/exotic_unifications.ml | 4 +- .../tests/typing-misc/includeclass_errors.ml | 3 +- testsuite/tests/typing-misc/labels.ml | 30 +- testsuite/tests/typing-misc/optbinders.ml | 103 + testsuite/tests/typing-misc/polyvars.ml | 12 + testsuite/tests/typing-misc/pr6416.ml | 22 +- testsuite/tests/typing-misc/pr6634.ml | 7 +- testsuite/tests/typing-misc/pr7103.ml | 12 +- testsuite/tests/typing-misc/pr7668_bad.ml | 8 + testsuite/tests/typing-misc/pr7937.ml | 10 +- testsuite/tests/typing-misc/printing.ml | 2 +- testsuite/tests/typing-misc/records.ml | 19 +- testsuite/tests/typing-misc/variant.ml | 17 +- testsuite/tests/typing-misc/wrong_kind.ml | 249 + .../tests/typing-missing-cmi-3/middle.ml | 7 + .../tests/typing-missing-cmi-3/original.ml | 6 + testsuite/tests/typing-missing-cmi-3/user.ml | 12 + .../pr10693_bad.compilers.reference | 55 + .../tests/typing-modules-bugs/pr10693_bad.ml | 46 + .../pr7414_2_bad.compilers.reference | 3 + .../pr7414_bad.compilers.reference | 3 + testsuite/tests/typing-modules/Test.ml | 12 +- .../applicative_functor_type.ml | 1 + .../extension_constructors_errors_test.ml | 21 +- testsuite/tests/typing-modules/functors.ml | 34 +- .../tests/typing-modules/inclusion_errors.ml | 553 +- .../tests/typing-modules/merge_constraint.ml | 174 + .../module_type_substitution.ml | 11 +- .../typing-modules/nondep_private_abbrev.ml | 3 + testsuite/tests/typing-modules/pr10399.ml | 46 + testsuite/tests/typing-modules/pr6394.ml | 1 + testsuite/tests/typing-modules/pr7818.ml | 7 +- testsuite/tests/typing-modules/pr7851.ml | 9 +- .../typing-modules/records_errors_test.ml | 380 +- .../typing-modules/variants_errors_test.ml | 232 +- .../pr3968_bad.compilers.reference | 14 +- .../pr4018_bad.compilers.reference | 12 +- testsuite/tests/typing-objects/Exemples.ml | 18 +- testsuite/tests/typing-objects/Tests.ml | 445 +- testsuite/tests/typing-objects/dummy.ml | 161 +- testsuite/tests/typing-objects/errors.ml | 37 + testsuite/tests/typing-objects/field_kind.ml | 73 + testsuite/tests/typing-objects/pr6907_bad.ml | 3 +- testsuite/tests/typing-poly/error_messages.ml | 12 +- testsuite/tests/typing-poly/poly.ml | 29 +- .../typing-polyvariants-bugs/pr7817_bad.ml | 4 + .../private.compilers.principal.reference | 10 +- .../private.compilers.reference | 10 +- .../short-paths.compilers.reference | 1 + .../tests/typing-short-paths/short-paths.ml | 4 + testsuite/tests/typing-sigsubst/sigsubst.ml | 6 +- .../test_locations.compilers.reference | 6 + testsuite/tests/typing-unboxed/test.ml | 355 +- .../ambiguous_guarded_disjunction.ml | 52 +- .../disable_warnings_classes.ml | 152 + testsuite/tests/typing-warnings/pr6587.ml | 3 + testsuite/tests/warnings/w32.ml | 4 + testsuite/tests/warnings/w32.mli | 4 + .../win-unicode/mltest.compilers.reference | 12 +- testsuite/tests/win-unicode/mltest.ml | 11 +- testsuite/tools/expect_test.ml | 3 +- testsuite/tools/parsecmm.mly | 7 +- tools/.depend | 2 + tools/autogen | 2 + tools/caml_tex.ml | 68 +- tools/check-parser-uptodate-or-warn.sh | 3 - tools/check-typo | 5 +- tools/ci/actions/check-changes-modified.sh | 17 +- tools/ci/actions/runner.sh | 5 +- tools/ci/appveyor/appveyor_build.cmd | 2 +- tools/ci/inria/bootstrap/script | 6 +- tools/ci/inria/main | 14 + tools/ci/inria/other-configs/script | 2 +- tools/ci/inria/sanitizers/lsan-suppr.txt | 2 - tools/eventlog_metadata.in | 2 +- tools/make-version-header.sh | 55 - tools/objinfo.ml | 11 +- tools/pre-commit-githook | 4 +- toplevel/byte/topeval.ml | 62 +- toplevel/byte/topmain.ml | 20 +- toplevel/byte/trace.ml | 4 +- toplevel/genprintval.ml | 23 +- toplevel/native/topeval.ml | 206 +- toplevel/native/tophooks.ml | 111 + toplevel/native/tophooks.mli | 35 + toplevel/native/topmain.ml | 19 +- toplevel/topcommon.ml | 60 + toplevel/topcommon.mli | 7 + toplevel/topdirs.ml | 128 +- toplevel/toploop.ml | 62 +- toplevel/toploop.mli | 22 +- typing/btype.ml | 605 +- typing/btype.mli | 179 +- typing/ctype.ml | 2890 +++-- typing/ctype.mli | 180 +- typing/datarepr.ml | 24 +- typing/env.ml | 736 +- typing/env.mli | 42 +- typing/errortrace.ml | 76 +- typing/errortrace.mli | 90 +- typing/includeclass.ml | 28 +- typing/includeclass.mli | 3 +- typing/includecore.ml | 790 +- typing/includecore.mli | 63 +- typing/includemod.ml | 528 +- typing/includemod.mli | 41 +- typing/includemod_errorprinter.ml | 124 +- typing/mtype.ml | 128 +- typing/oprint.ml | 32 +- typing/oprint.mli | 3 +- typing/outcometree.mli | 10 +- typing/parmatch.ml | 69 +- typing/patterns.ml | 6 +- typing/predef.ml | 97 +- typing/printtyp.ml | 1186 +- typing/printtyp.mli | 80 +- typing/printtyped.ml | 56 +- typing/rec_check.ml | 30 +- typing/shape.ml | 521 + typing/shape.mli | 157 + typing/signature_group.ml | 4 +- typing/signature_group.mli | 4 +- typing/stypes.ml | 3 +- typing/subst.ml | 442 +- typing/subst.mli | 63 + typing/tast_iterator.ml | 7 +- typing/tast_mapper.ml | 9 +- typing/typeclass.ml | 1749 +-- typing/typeclass.mli | 28 +- typing/typecore.ml | 1215 +- typing/typecore.mli | 71 +- typing/typedecl.ml | 284 +- typing/typedecl.mli | 15 +- typing/typedecl_immediacy.ml | 8 +- typing/typedecl_separability.ml | 44 +- typing/typedecl_unboxed.ml | 23 +- typing/typedecl_unboxed.mli | 7 +- typing/typedecl_variance.ml | 34 +- typing/typedtree.ml | 15 +- typing/typedtree.mli | 14 +- typing/typemod.ml | 641 +- typing/typemod.mli | 11 +- typing/typeopt.ml | 91 +- typing/types.ml | 565 +- typing/types.mli | 324 +- typing/typetexp.ml | 292 +- typing/typetexp.mli | 20 +- typing/untypeast.ml | 10 +- utils/Makefile | 1 + utils/clflags.ml | 5 +- utils/clflags.mli | 3 + utils/config.mli | 5 + utils/config.mlp | 30 +- utils/diffing.ml | 341 +- utils/diffing.mli | 125 +- utils/diffing_with_keys.ml | 208 + utils/diffing_with_keys.mli | 77 + utils/lazy_backtrack.ml | 6 + utils/lazy_backtrack.mli | 1 + utils/local_store.mli | 10 +- utils/misc.ml | 8 + utils/misc.mli | 12 +- utils/warnings.ml | 486 +- utils/warnings.mli | 10 + yacc/Makefile | 10 +- yacc/defs.h | 1 + yacc/main.c | 12 +- 649 files changed, 34853 insertions(+), 15371 deletions(-) create mode 100644 build-aux/ocaml_version.m4 create mode 100644 debugger/ocamldebug_entry.ml create mode 100644 lambda/tmc.ml create mode 100644 lambda/tmc.mli rename man/{ocaml.m => ocaml.1} (98%) rename man/{ocamlc.m => ocamlc.1} (81%) create mode 100644 man/ocamlc.opt.1 rename man/{ocamlcp.m => ocamlcp.1} (100%) rename man/{ocamldebug.m => ocamldebug.1} (100%) rename man/{ocamldep.m => ocamldep.1} (100%) rename man/{ocamldoc.m => ocamldoc.1} (100%) rename man/{ocamllex.m => ocamllex.1} (100%) rename man/{ocamlmktop.m => ocamlmktop.1} (100%) rename man/{ocamlopt.m => ocamlopt.1} (99%) create mode 100644 man/ocamlopt.opt.1 create mode 100644 man/ocamloptp.1 rename man/{ocamlprof.m => ocamlprof.1} (100%) rename man/{ocamlrun.m => ocamlrun.1} (86%) rename man/{ocamlyacc.m => ocamlyacc.1} (100%) create mode 100644 manual/src/cmds/tail-mod-cons.etex rename manual/src/html_processing/src/{common.ml => common.ml.in} (89%) create mode 100644 manual/src/version.tex.in delete mode 100644 manual/tools/htmltransf.mll delete mode 100644 otherlibs/win32unix/dup2.c create mode 100644 otherlibs/win32unix/socketpair.c create mode 100644 runtime/caml/version.h.in create mode 100644 runtime/caml/winsupport.h create mode 100644 stdlib/in_channel.ml create mode 100644 stdlib/in_channel.mli create mode 100644 stdlib/out_channel.ml create mode 100644 stdlib/out_channel.mli rename stdlib/{sys.mlp => sys.ml.in} (91%) create mode 100644 testsuite/tests/asmcomp/evaluation_order.ml create mode 100644 testsuite/tests/asmcomp/evaluation_order.reference create mode 100644 testsuite/tests/asmcomp/poll_attr_both.compilers.reference create mode 100644 testsuite/tests/asmcomp/poll_attr_both.ml create mode 100644 testsuite/tests/asmcomp/poll_attr_inserted.compilers.reference create mode 100644 testsuite/tests/asmcomp/poll_attr_inserted.ml create mode 100644 testsuite/tests/asmcomp/poll_attr_prologue.compilers.reference create mode 100644 testsuite/tests/asmcomp/poll_attr_prologue.ml create mode 100644 testsuite/tests/asmcomp/poll_attr_user.compilers.reference create mode 100644 testsuite/tests/asmcomp/poll_attr_user.ml create mode 100644 testsuite/tests/basic/eval_order_8.ml create mode 100644 testsuite/tests/basic/eval_order_8.reference create mode 100644 testsuite/tests/basic/objects.ml create mode 100644 testsuite/tests/basic/objects.reference delete mode 100644 testsuite/tests/compatibility/main.ml delete mode 100644 testsuite/tests/compatibility/main.reference delete mode 100644 testsuite/tests/compatibility/stub.c create mode 100644 testsuite/tests/lib-bytes-utf/test.ml create mode 100644 testsuite/tests/lib-bytes-utf/test.reference create mode 100644 testsuite/tests/lib-channels/buffered.ml create mode 100644 testsuite/tests/lib-channels/buffered.reference create mode 100644 testsuite/tests/lib-channels/input_all.ml create mode 100644 testsuite/tests/lib-obj/reachable_words_bug.ml create mode 100644 testsuite/tests/lib-threads/uncaught_exception_handler.ml create mode 100644 testsuite/tests/lib-threads/uncaught_exception_handler.reference create mode 100755 testsuite/tests/lib-unix/win-socketpair/has-afunix.sh create mode 100644 testsuite/tests/lib-unix/win-socketpair/test.ml create mode 100644 testsuite/tests/lib-unix/win-socketpair/test.reference create mode 100644 testsuite/tests/messages/highlight_tabs.ml create mode 100644 testsuite/tests/misc/ephe_infix_new.ml create mode 100644 testsuite/tests/misc/ephe_issue9391.ml create mode 100644 testsuite/tests/misc/ephetest2_new.ml create mode 100644 testsuite/tests/misc/ephetest2_new.reference create mode 100644 testsuite/tests/misc/ephetest_new.ml create mode 100644 testsuite/tests/misc/ephetest_new.reference create mode 100644 testsuite/tests/shapes/comp_units.ml create mode 100644 testsuite/tests/shapes/functors.ml create mode 100644 testsuite/tests/shapes/incl_md_typeof.ml create mode 100644 testsuite/tests/shapes/open_arg.ml create mode 100644 testsuite/tests/shapes/open_struct.ml create mode 100644 testsuite/tests/shapes/recmodules.ml create mode 100644 testsuite/tests/shapes/rotor_example.ml create mode 100644 testsuite/tests/shapes/shape_size_blowup.ml create mode 100644 testsuite/tests/shapes/simple.ml create mode 100644 testsuite/tests/shapes/typeof_include.ml create mode 100644 testsuite/tests/tmc/ambiguities.ml create mode 100644 testsuite/tests/tmc/other_features.ml create mode 100644 testsuite/tests/tmc/partial_application.compilers.reference create mode 100644 testsuite/tests/tmc/partial_application.ml create mode 100644 testsuite/tests/tmc/readable_output.ml create mode 100644 testsuite/tests/tmc/semantic.ml create mode 100644 testsuite/tests/tmc/semantic.reference create mode 100644 testsuite/tests/tmc/stack_space.ml create mode 100644 testsuite/tests/tmc/tupled_function.ml create mode 100644 testsuite/tests/tmc/tupled_function_calls.byte.reference create mode 100644 testsuite/tests/tmc/tupled_function_calls.ml create mode 100644 testsuite/tests/tmc/tupled_function_calls.native.reference create mode 100644 testsuite/tests/tmc/usage_warnings.ml create mode 100644 testsuite/tests/tool-debugger/module_named_main/input_script create mode 100644 testsuite/tests/tool-debugger/module_named_main/main.ml create mode 100644 testsuite/tests/tool-debugger/module_named_main/main.reference create mode 100644 testsuite/tests/tool-ocaml/directive_failure.ml create mode 100644 testsuite/tests/tool-toplevel/topeval.compilers.reference create mode 100644 testsuite/tests/tool-toplevel/topeval.ml create mode 100644 testsuite/tests/typing-gadts/pr10735.ml create mode 100644 testsuite/tests/typing-gadts/pr10907.ml create mode 100644 testsuite/tests/typing-gadts/return_type.ml create mode 100644 testsuite/tests/typing-misc/deep.ml create mode 100644 testsuite/tests/typing-misc/distant_errors.ml create mode 100644 testsuite/tests/typing-misc/optbinders.ml create mode 100644 testsuite/tests/typing-misc/wrong_kind.ml create mode 100644 testsuite/tests/typing-modules-bugs/pr10693_bad.compilers.reference create mode 100644 testsuite/tests/typing-modules-bugs/pr10693_bad.ml create mode 100644 testsuite/tests/typing-modules/pr10399.ml create mode 100644 testsuite/tests/typing-objects/field_kind.ml create mode 100644 testsuite/tests/typing-warnings/disable_warnings_classes.ml delete mode 100755 tools/make-version-header.sh create mode 100644 toplevel/native/tophooks.ml create mode 100644 toplevel/native/tophooks.mli create mode 100644 typing/shape.ml create mode 100644 typing/shape.mli create mode 100644 utils/diffing_with_keys.ml create mode 100644 utils/diffing_with_keys.mli diff --git a/.depend b/.depend index b516be08..dfc878b3 100644 --- a/.depend +++ b/.depend @@ -59,10 +59,23 @@ utils/consistbl.cmx : \ utils/consistbl.cmi : \ utils/misc.cmi utils/diffing.cmo : \ + utils/misc.cmi \ utils/diffing.cmi utils/diffing.cmx : \ + utils/misc.cmx \ + utils/diffing.cmi +utils/diffing.cmi : \ + utils/misc.cmi +utils/diffing_with_keys.cmo : \ + utils/misc.cmi \ + utils/diffing.cmi \ + utils/diffing_with_keys.cmi +utils/diffing_with_keys.cmx : \ + utils/misc.cmx \ + utils/diffing.cmx \ + utils/diffing_with_keys.cmi +utils/diffing_with_keys.cmi : \ utils/diffing.cmi -utils/diffing.cmi : utils/domainstate.cmo : \ utils/domainstate.cmi utils/domainstate.cmx : \ @@ -538,6 +551,7 @@ typing/ctype.cmi : \ typing/ident.cmi \ typing/errortrace.cmi \ typing/env.cmi \ + typing/btype.cmi \ parsing/asttypes.cmi typing/datarepr.cmo : \ typing/types.cmi \ @@ -563,6 +577,7 @@ typing/env.cmo : \ utils/warnings.cmi \ typing/types.cmi \ typing/subst.cmi \ + typing/shape.cmi \ typing/predef.cmi \ typing/persistent_env.cmi \ typing/path.cmi \ @@ -584,6 +599,7 @@ typing/env.cmx : \ utils/warnings.cmx \ typing/types.cmx \ typing/subst.cmx \ + typing/shape.cmx \ typing/predef.cmx \ typing/persistent_env.cmx \ typing/path.cmx \ @@ -605,6 +621,7 @@ typing/env.cmi : \ utils/warnings.cmi \ typing/types.cmi \ typing/subst.cmi \ + typing/shape.cmi \ typing/path.cmi \ utils/misc.cmi \ parsing/longident.cmi \ @@ -679,6 +696,7 @@ typing/includeclass.cmx : \ typing/includeclass.cmi typing/includeclass.cmi : \ typing/types.cmi \ + typing/printtyp.cmi \ parsing/location.cmi \ typing/env.cmi \ typing/ctype.cmi @@ -689,9 +707,11 @@ typing/includecore.cmo : \ typing/printtyp.cmi \ typing/primitive.cmi \ typing/path.cmi \ + utils/misc.cmi \ typing/ident.cmi \ typing/errortrace.cmi \ typing/env.cmi \ + utils/diffing_with_keys.cmi \ typing/ctype.cmi \ parsing/builtin_attributes.cmi \ typing/btype.cmi \ @@ -704,9 +724,11 @@ typing/includecore.cmx : \ typing/printtyp.cmx \ typing/primitive.cmx \ typing/path.cmx \ + utils/misc.cmx \ typing/ident.cmx \ typing/errortrace.cmx \ typing/env.cmx \ + utils/diffing_with_keys.cmx \ typing/ctype.cmx \ parsing/builtin_attributes.cmx \ typing/btype.cmx \ @@ -720,11 +742,13 @@ typing/includecore.cmi : \ parsing/location.cmi \ typing/ident.cmi \ typing/errortrace.cmi \ - typing/env.cmi + typing/env.cmi \ + utils/diffing_with_keys.cmi typing/includemod.cmo : \ typing/types.cmi \ typing/typedtree.cmi \ typing/subst.cmi \ + typing/shape.cmi \ typing/printtyp.cmi \ typing/primitive.cmi \ typing/predef.cmi \ @@ -747,6 +771,7 @@ typing/includemod.cmx : \ typing/types.cmx \ typing/typedtree.cmx \ typing/subst.cmx \ + typing/shape.cmx \ typing/printtyp.cmx \ typing/primitive.cmx \ typing/predef.cmx \ @@ -768,6 +793,7 @@ typing/includemod.cmx : \ typing/includemod.cmi : \ typing/types.cmi \ typing/typedtree.cmi \ + typing/shape.cmi \ typing/path.cmi \ parsing/longident.cmi \ parsing/location.cmi \ @@ -923,7 +949,6 @@ typing/patterns.cmo : \ typing/ident.cmi \ typing/env.cmi \ typing/ctype.cmi \ - typing/btype.cmi \ parsing/asttypes.cmi \ typing/patterns.cmi typing/patterns.cmx : \ @@ -934,7 +959,6 @@ typing/patterns.cmx : \ typing/ident.cmx \ typing/env.cmx \ typing/ctype.cmx \ - typing/btype.cmx \ parsing/asttypes.cmi \ typing/patterns.cmi typing/patterns.cmi : \ @@ -1089,6 +1113,7 @@ typing/printtyped.cmo : \ typing/types.cmi \ typing/typedtree.cmi \ parsing/printast.cmi \ + parsing/pprintast.cmi \ typing/path.cmi \ parsing/parsetree.cmi \ parsing/longident.cmi \ @@ -1101,6 +1126,7 @@ typing/printtyped.cmx : \ typing/types.cmx \ typing/typedtree.cmx \ parsing/printast.cmx \ + parsing/pprintast.cmx \ typing/path.cmx \ parsing/parsetree.cmi \ parsing/longident.cmx \ @@ -1134,6 +1160,22 @@ typing/rec_check.cmx : \ typing/rec_check.cmi : \ typing/typedtree.cmi \ typing/ident.cmi +typing/shape.cmo : \ + typing/path.cmi \ + utils/misc.cmi \ + utils/identifiable.cmi \ + typing/ident.cmi \ + typing/shape.cmi +typing/shape.cmx : \ + typing/path.cmx \ + utils/misc.cmx \ + utils/identifiable.cmx \ + typing/ident.cmx \ + typing/shape.cmi +typing/shape.cmi : \ + typing/path.cmi \ + utils/identifiable.cmi \ + typing/ident.cmi typing/signature_group.cmo : \ typing/types.cmi \ typing/ident.cmi \ @@ -1173,6 +1215,7 @@ typing/subst.cmo : \ utils/misc.cmi \ parsing/location.cmi \ utils/local_store.cmi \ + utils/lazy_backtrack.cmi \ typing/ident.cmi \ utils/clflags.cmi \ typing/btype.cmi \ @@ -1185,6 +1228,7 @@ typing/subst.cmx : \ utils/misc.cmx \ parsing/location.cmx \ utils/local_store.cmx \ + utils/lazy_backtrack.cmx \ typing/ident.cmx \ utils/clflags.cmx \ typing/btype.cmx \ @@ -1193,6 +1237,7 @@ typing/subst.cmx : \ typing/subst.cmi : \ typing/types.cmi \ typing/path.cmi \ + parsing/parsetree.cmi \ parsing/location.cmi \ typing/ident.cmi typing/tast_iterator.cmo : \ @@ -1305,6 +1350,7 @@ typing/typecore.cmo : \ typing/typedtree.cmi \ typing/typedecl.cmi \ typing/subst.cmi \ + typing/shape.cmi \ typing/rec_check.cmi \ typing/printtyp.cmi \ typing/printpat.cmi \ @@ -1336,6 +1382,7 @@ typing/typecore.cmx : \ typing/typedtree.cmx \ typing/typedecl.cmx \ typing/subst.cmx \ + typing/shape.cmx \ typing/rec_check.cmx \ typing/printtyp.cmx \ typing/printpat.cmx \ @@ -1363,6 +1410,7 @@ typing/typecore.cmx : \ typing/typecore.cmi : \ typing/types.cmi \ typing/typedtree.cmi \ + typing/shape.cmi \ typing/path.cmi \ parsing/parsetree.cmi \ parsing/longident.cmi \ @@ -1521,13 +1569,11 @@ typing/typedecl_separability.cmi : \ typing/env.cmi typing/typedecl_unboxed.cmo : \ typing/types.cmi \ - typing/predef.cmi \ typing/env.cmi \ typing/ctype.cmi \ typing/typedecl_unboxed.cmi typing/typedecl_unboxed.cmx : \ typing/types.cmx \ - typing/predef.cmx \ typing/env.cmx \ typing/ctype.cmx \ typing/typedecl_unboxed.cmi @@ -1569,6 +1615,7 @@ typing/typedecl_variance.cmi : \ parsing/asttypes.cmi typing/typedtree.cmo : \ typing/types.cmi \ + typing/shape.cmi \ typing/primitive.cmi \ typing/path.cmi \ parsing/parsetree.cmi \ @@ -1580,6 +1627,7 @@ typing/typedtree.cmo : \ typing/typedtree.cmi typing/typedtree.cmx : \ typing/types.cmx \ + typing/shape.cmx \ typing/primitive.cmx \ typing/path.cmx \ parsing/parsetree.cmi \ @@ -1591,6 +1639,7 @@ typing/typedtree.cmx : \ typing/typedtree.cmi typing/typedtree.cmi : \ typing/types.cmi \ + typing/shape.cmi \ typing/primitive.cmi \ typing/path.cmi \ parsing/parsetree.cmi \ @@ -1609,6 +1658,7 @@ typing/typemod.cmo : \ typing/typeclass.cmi \ typing/subst.cmi \ typing/signature_group.cmi \ + typing/shape.cmi \ typing/printtyp.cmi \ typing/path.cmi \ parsing/parsetree.cmi \ @@ -1643,6 +1693,7 @@ typing/typemod.cmx : \ typing/typeclass.cmx \ typing/subst.cmx \ typing/signature_group.cmx \ + typing/shape.cmx \ typing/printtyp.cmx \ typing/path.cmx \ parsing/parsetree.cmi \ @@ -1671,6 +1722,7 @@ typing/typemod.cmi : \ typing/types.cmi \ typing/typedtree.cmi \ typing/typedecl.cmi \ + typing/shape.cmi \ typing/path.cmi \ parsing/parsetree.cmi \ parsing/longident.cmi \ @@ -1682,7 +1734,8 @@ typing/typemod.cmi : \ typing/typeopt.cmo : \ typing/types.cmi \ typing/typedtree.cmi \ - typing/typedecl.cmi \ + typing/typedecl_unboxed.cmi \ + typing/type_immediacy.cmi \ typing/predef.cmi \ typing/path.cmi \ lambda/lambda.cmi \ @@ -1690,12 +1743,14 @@ typing/typeopt.cmo : \ typing/env.cmi \ typing/ctype.cmi \ utils/config.cmi \ + utils/clflags.cmi \ parsing/asttypes.cmi \ typing/typeopt.cmi typing/typeopt.cmx : \ typing/types.cmx \ typing/typedtree.cmx \ - typing/typedecl.cmx \ + typing/typedecl_unboxed.cmx \ + typing/type_immediacy.cmx \ typing/predef.cmx \ typing/path.cmx \ lambda/lambda.cmx \ @@ -1703,6 +1758,7 @@ typing/typeopt.cmx : \ typing/env.cmx \ typing/ctype.cmx \ utils/config.cmx \ + utils/clflags.cmx \ parsing/asttypes.cmi \ typing/typeopt.cmi typing/typeopt.cmi : \ @@ -1713,38 +1769,40 @@ typing/typeopt.cmi : \ typing/env.cmi typing/types.cmo : \ typing/type_immediacy.cmi \ + typing/shape.cmi \ typing/primitive.cmi \ typing/path.cmi \ parsing/parsetree.cmi \ utils/misc.cmi \ parsing/longident.cmi \ parsing/location.cmi \ - utils/identifiable.cmi \ + utils/local_store.cmi \ typing/ident.cmi \ utils/config.cmi \ parsing/asttypes.cmi \ typing/types.cmi typing/types.cmx : \ typing/type_immediacy.cmx \ + typing/shape.cmx \ typing/primitive.cmx \ typing/path.cmx \ parsing/parsetree.cmi \ utils/misc.cmx \ parsing/longident.cmx \ parsing/location.cmx \ - utils/identifiable.cmx \ + utils/local_store.cmx \ typing/ident.cmx \ utils/config.cmx \ parsing/asttypes.cmi \ typing/types.cmi typing/types.cmi : \ typing/type_immediacy.cmi \ + typing/shape.cmi \ typing/primitive.cmi \ typing/path.cmi \ parsing/parsetree.cmi \ parsing/longident.cmi \ parsing/location.cmi \ - utils/identifiable.cmi \ typing/ident.cmi \ parsing/asttypes.cmi typing/typetexp.cmo : \ @@ -2791,6 +2849,8 @@ asmcomp/polling.cmo : \ utils/numbers.cmi \ utils/misc.cmi \ asmcomp/mach.cmi \ + parsing/location.cmi \ + lambda/debuginfo.cmi \ asmcomp/dataflow.cmi \ asmcomp/cmm.cmi \ asmcomp/polling.cmi @@ -2798,6 +2858,8 @@ asmcomp/polling.cmx : \ utils/numbers.cmx \ utils/misc.cmx \ asmcomp/mach.cmx \ + parsing/location.cmx \ + lambda/debuginfo.cmx \ asmcomp/dataflow.cmx \ asmcomp/cmm.cmx \ asmcomp/polling.cmi @@ -3504,6 +3566,7 @@ lambda/runtimedef.cmx : \ lambda/runtimedef.cmi : lambda/simplif.cmo : \ utils/warnings.cmi \ + lambda/tmc.cmi \ typing/primitive.cmi \ parsing/location.cmi \ lambda/lambda.cmi \ @@ -3514,6 +3577,7 @@ lambda/simplif.cmo : \ lambda/simplif.cmi lambda/simplif.cmx : \ utils/warnings.cmx \ + lambda/tmc.cmx \ typing/primitive.cmx \ parsing/location.cmx \ lambda/lambda.cmx \ @@ -3530,6 +3594,24 @@ lambda/switch.cmo : \ lambda/switch.cmx : \ lambda/switch.cmi lambda/switch.cmi : +lambda/tmc.cmo : \ + utils/warnings.cmi \ + parsing/location.cmi \ + lambda/lambda.cmi \ + typing/ident.cmi \ + lambda/debuginfo.cmi \ + parsing/asttypes.cmi \ + lambda/tmc.cmi +lambda/tmc.cmx : \ + utils/warnings.cmx \ + parsing/location.cmx \ + lambda/lambda.cmx \ + typing/ident.cmx \ + lambda/debuginfo.cmx \ + parsing/asttypes.cmi \ + lambda/tmc.cmi +lambda/tmc.cmi : \ + lambda/lambda.cmi lambda/translattribute.cmo : \ utils/warnings.cmi \ typing/typedtree.cmi \ @@ -3803,6 +3885,7 @@ file_formats/cmt_format.cmo : \ typing/types.cmi \ typing/typedtree.cmi \ typing/tast_mapper.cmi \ + typing/shape.cmi \ utils/misc.cmi \ parsing/location.cmi \ utils/load_path.cmi \ @@ -3816,6 +3899,7 @@ file_formats/cmt_format.cmx : \ typing/types.cmx \ typing/typedtree.cmx \ typing/tast_mapper.cmx \ + typing/shape.cmx \ utils/misc.cmx \ parsing/location.cmx \ utils/load_path.cmx \ @@ -3828,6 +3912,7 @@ file_formats/cmt_format.cmx : \ file_formats/cmt_format.cmi : \ typing/types.cmi \ typing/typedtree.cmi \ + typing/shape.cmi \ utils/misc.cmi \ parsing/location.cmi \ typing/env.cmi \ @@ -5856,6 +5941,7 @@ driver/compile_common.cmo : \ typing/typemod.cmi \ typing/typedtree.cmi \ typing/typecore.cmi \ + typing/shape.cmi \ utils/profile.cmi \ typing/printtyped.cmi \ typing/printtyp.cmi \ @@ -5876,6 +5962,7 @@ driver/compile_common.cmx : \ typing/typemod.cmx \ typing/typedtree.cmx \ typing/typecore.cmx \ + typing/shape.cmx \ utils/profile.cmx \ typing/printtyped.cmx \ typing/printtyp.cmx \ @@ -6183,6 +6270,7 @@ toplevel/genprintval.cmi : \ typing/outcometree.cmi \ typing/env.cmi toplevel/topcommon.cmo : \ + typing/typedtree.cmi \ parsing/printast.cmi \ typing/predef.cmi \ parsing/pprintast.cmi \ @@ -6205,9 +6293,11 @@ toplevel/topcommon.cmo : \ driver/compmisc.cmi \ driver/compenv.cmi \ utils/clflags.cmi \ + parsing/asttypes.cmi \ parsing/ast_helper.cmi \ toplevel/topcommon.cmi toplevel/topcommon.cmx : \ + typing/typedtree.cmx \ parsing/printast.cmx \ typing/predef.cmx \ parsing/pprintast.cmx \ @@ -6230,11 +6320,13 @@ toplevel/topcommon.cmx : \ driver/compmisc.cmx \ driver/compenv.cmx \ utils/clflags.cmx \ + parsing/asttypes.cmi \ parsing/ast_helper.cmx \ toplevel/topcommon.cmi toplevel/topcommon.cmi : \ utils/warnings.cmi \ typing/types.cmi \ + typing/typedtree.cmi \ typing/path.cmi \ parsing/parsetree.cmi \ typing/outcometree.cmi \ @@ -6357,6 +6449,7 @@ toplevel/byte/topeval.cmo : \ toplevel/topcommon.cmi \ bytecomp/symtable.cmi \ lambda/simplif.cmi \ + typing/shape.cmi \ typing/printtyped.cmi \ typing/printtyp.cmi \ lambda/printlambda.cmi \ @@ -6380,7 +6473,6 @@ toplevel/byte/topeval.cmo : \ file_formats/cmo_format.cmi \ utils/clflags.cmi \ bytecomp/bytegen.cmi \ - parsing/asttypes.cmi \ toplevel/byte/topeval.cmi toplevel/byte/topeval.cmx : \ utils/warnings.cmx \ @@ -6392,6 +6484,7 @@ toplevel/byte/topeval.cmx : \ toplevel/topcommon.cmx \ bytecomp/symtable.cmx \ lambda/simplif.cmx \ + typing/shape.cmx \ typing/printtyped.cmx \ typing/printtyp.cmx \ lambda/printlambda.cmx \ @@ -6415,12 +6508,12 @@ toplevel/byte/topeval.cmx : \ file_formats/cmo_format.cmi \ utils/clflags.cmx \ bytecomp/bytegen.cmx \ - parsing/asttypes.cmi \ toplevel/byte/topeval.cmi toplevel/byte/topeval.cmi : \ toplevel/topcommon.cmi \ parsing/parsetree.cmi toplevel/byte/topmain.cmo : \ + typing/types.cmi \ toplevel/byte/trace.cmi \ toplevel/toploop.cmi \ toplevel/byte/topeval.cmi \ @@ -6438,6 +6531,7 @@ toplevel/byte/topmain.cmo : \ utils/clflags.cmi \ toplevel/byte/topmain.cmi toplevel/byte/topmain.cmx : \ + typing/types.cmx \ toplevel/byte/trace.cmx \ toplevel/toploop.cmx \ toplevel/byte/topeval.cmx \ @@ -6493,9 +6587,10 @@ toplevel/native/topeval.cmo : \ typing/typedtree.cmi \ typing/typecore.cmi \ lambda/translmod.cmi \ + toplevel/native/tophooks.cmi \ toplevel/topcommon.cmi \ lambda/simplif.cmi \ - asmcomp/proc.cmi \ + typing/shape.cmi \ typing/printtyped.cmi \ typing/printtyp.cmi \ lambda/printlambda.cmi \ @@ -6507,21 +6602,13 @@ toplevel/native/topeval.cmo : \ utils/load_path.cmi \ lambda/lambda.cmi \ typing/includemod.cmi \ - middle_end/flambda/import_approx.cmi \ typing/ident.cmi \ - middle_end/flambda/flambda_middle_end.cmi \ typing/env.cmi \ utils/config.cmi \ driver/compmisc.cmi \ middle_end/compilenv.cmi \ - middle_end/closure/closure_middle_end.cmi \ utils/clflags.cmi \ - middle_end/backend_intf.cmi \ - parsing/asttypes.cmi \ - parsing/ast_helper.cmi \ asmcomp/asmlink.cmi \ - asmcomp/asmgen.cmi \ - asmcomp/arch.cmo \ toplevel/native/topeval.cmi toplevel/native/topeval.cmx : \ utils/warnings.cmx \ @@ -6530,9 +6617,10 @@ toplevel/native/topeval.cmx : \ typing/typedtree.cmx \ typing/typecore.cmx \ lambda/translmod.cmx \ + toplevel/native/tophooks.cmx \ toplevel/topcommon.cmx \ lambda/simplif.cmx \ - asmcomp/proc.cmx \ + typing/shape.cmx \ typing/printtyped.cmx \ typing/printtyp.cmx \ lambda/printlambda.cmx \ @@ -6544,25 +6632,52 @@ toplevel/native/topeval.cmx : \ utils/load_path.cmx \ lambda/lambda.cmx \ typing/includemod.cmx \ - middle_end/flambda/import_approx.cmx \ typing/ident.cmx \ - middle_end/flambda/flambda_middle_end.cmx \ typing/env.cmx \ utils/config.cmx \ driver/compmisc.cmx \ middle_end/compilenv.cmx \ + utils/clflags.cmx \ + asmcomp/asmlink.cmx \ + toplevel/native/topeval.cmi +toplevel/native/topeval.cmi : \ + toplevel/topcommon.cmi \ + parsing/parsetree.cmi +toplevel/native/tophooks.cmo : \ + toplevel/topcommon.cmi \ + asmcomp/proc.cmi \ + utils/misc.cmi \ + lambda/lambda.cmi \ + middle_end/flambda/import_approx.cmi \ + middle_end/flambda/flambda_middle_end.cmi \ + utils/config.cmi \ + middle_end/compilenv.cmi \ + middle_end/closure/closure_middle_end.cmi \ + utils/clflags.cmi \ + middle_end/backend_intf.cmi \ + asmcomp/asmlink.cmi \ + asmcomp/asmgen.cmi \ + asmcomp/arch.cmo \ + toplevel/native/tophooks.cmi +toplevel/native/tophooks.cmx : \ + toplevel/topcommon.cmx \ + asmcomp/proc.cmx \ + utils/misc.cmx \ + lambda/lambda.cmx \ + middle_end/flambda/import_approx.cmx \ + middle_end/flambda/flambda_middle_end.cmx \ + utils/config.cmx \ + middle_end/compilenv.cmx \ middle_end/closure/closure_middle_end.cmx \ utils/clflags.cmx \ middle_end/backend_intf.cmi \ - parsing/asttypes.cmi \ - parsing/ast_helper.cmx \ asmcomp/asmlink.cmx \ asmcomp/asmgen.cmx \ asmcomp/arch.cmx \ - toplevel/native/topeval.cmi -toplevel/native/topeval.cmi : \ + toplevel/native/tophooks.cmi +toplevel/native/tophooks.cmi : \ toplevel/topcommon.cmi \ - parsing/parsetree.cmi + lambda/lambda.cmi toplevel/native/topmain.cmo : \ toplevel/toploop.cmi \ toplevel/native/topeval.cmi \ diff --git a/.gitattributes b/.gitattributes index 956d2136..4ac00cad 100644 --- a/.gitattributes +++ b/.gitattributes @@ -45,6 +45,7 @@ # No header for text files (would be too obtrusive). *.md typo.missing-header README* typo.missing-header +VERSION typo.missing-header *.adoc typo.missing-header api_docgen/*.mld typo.missing-header api_docgen/alldoc.tex typo.missing-header @@ -102,6 +103,7 @@ otherlibs/win32unix/stat.c typo.long-line otherlibs/win32unix/symlink.c typo.long-line runtime/sak.c typo.non-ascii +runtime/caml/compatibility.h typo.very-long-line stdlib/hashbang typo.white-at-eol typo.missing-lf @@ -116,6 +118,7 @@ testsuite/tests/generated-parse-errors/errors.* typo.very-long-line testsuite/tools/*.S typo.missing-header testsuite/tools/*.asm typo.missing-header testsuite/typing typo.missing-header +testsuite/tests/messages/highlight_tabs.ml typo.tab # prune testsuite reference files testsuite/tests/**/*.reference typo.prune @@ -179,8 +182,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 # These are all Perl scripts, so may not actually require this diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a508ad0..338a60b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ jobs: MAKE_ARG=-j make distclean - name: configure tree run: | - MAKE_ARG=-j XARCH=x64 CONFIG_ARG='--enable-flambda --enable-cmm-invariants --enable-dependency-generation' OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh configure + MAKE_ARG=-j XARCH=x64 CONFIG_ARG='--enable-flambda --enable-cmm-invariants --enable-dependency-generation --enable-native-toplevel' OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh configure - name: Build run: | MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh build diff --git a/.gitignore b/.gitignore index cd5bf11c..f3a839fe 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ _build /ocamlopt /ocamlopt.opt /ocamlnat +/_opam # specific files and patterns in sub-directories @@ -96,6 +97,7 @@ _build /lex/parser.output /manual/src/cmds/warnings-help.etex +/manual/src/html_processing/src/common.ml /manual/src/warnings-help.etex /api_docgen/build diff --git a/.mailmap b/.mailmap index 730ac07b..08c772e0 100644 --- a/.mailmap +++ b/.mailmap @@ -132,6 +132,7 @@ Joris Giovannangeli Wilfred Hughes John Skaller Eduardo Rafael +Runhang Li # These contributors prefer to be referred to pseudonymously whitequark diff --git a/Changes b/Changes index deb5c534..a8ce94bd 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,525 @@ -OCaml 4.13.1 (01 October 2021) --------------------------------- +OCaml 4.14.0 (28 March 2022) +---------------------------- + +### Language features (highlights): + +- #10437: Allow explicit binders for type variables. + (Stephen Dolan, review by Leo White) + +- #181, #9760, #10740: opt-in tail-modulo-cons (TMC) transformation + let[@tail_mod_cons] rec map f li = ... + (Frédéric Bour, Gabriel Scherer, Basile Clément, + review by Basile Clément and Pierre Chambart, + tested by Konstantin Romanov) + +### Runtime system (highlights): + +- #10195, #10680: Speed up GC by prefetching during marking + (Stephen Dolan, review by Xavier Leroy, Guillaume Munch-Maccagnoni, + Jacques-Henri Jourdan, Damien Doligez and Leo White) + +### Code generation and optimizations (highlights): + +- #10595: Tail calls with up to 64 arguments are guaranteed to be compiled + as tail calls. To this end, memory locations in the domain state + are used for passing arguments that do not fit in registers. + (Xavier Leroy, review by Vincent Laviron) + +### Standard library (highlights): + +* #10710: Add UTF tools, codecs and validations to the Uchar, Bytes and + String modules. + (Daniel Bünzli, review by Florian Angeletti, Nicolás Ojeda Bär, Alain + Frisch and Gabriel Scherer) + +* #10482: mark the Stream and Genlex modules as deprecated, in preparation + for a future removal. These modules (without deprecation alert) + are now provided by the camlp-streams library. + (Xavier Leroy, review by Nicolás Ojeda Bär) + +- #10545: Add In_channel and Out_channel modules. + (Nicolás Ojeda Bär, review by Daniel Bünzli, Simon Cruanes, Gabriel Scherer, + Guillaume Munch-Maccagnoni, Alain Frisch and Xavier Leroy) + +### Compiler user-interface and warnings (highlights) + +- #10328, #10780: Give more precise error when disambiguation could not + possibly work. + (Leo White, review by Gabriel Scherer and Florian Angeletti) + +- #10361: Improve error messages for mismatched record and variant + definitions. + (Florian Angeletti, review by Gabriel Radanne and Gabriel Scherer) + +- #10407: Produce more detailed error messages that contain full error traces + when module inclusion fails. + (Antal Spector-Zabusky, review by Florian Angeletti) + +### Internal/compiler-libs changes (highlights): + +- #10718, #11012: Add "Shape" information to the cmt files. Shapes are an + abstraction of modules that can be used by external tooling to perform + definition-aware operations. + (Ulysse Gérard, Thomas Refis and Leo White, review by Florian Angeletti) + + +### Language features: + +- #10462: Add attribute to produce a compiler error for polls. + (Sadiq Jaffer, review by Mark Shinwell, Stephen Dolan + and Guillaume Munch-Maccagnoni) + +- #10441: Remove unnecessary parentheses surrounding immediate objects. + Allow 'object ... end # f', 'f object ... end', etc. + (Yan Dong, review by Nicolás Ojeda Bär, Florian Angeletti and Gabriel Scherer) + +### Runtime system: + +* #9391, #9424: Fix failed assertion in runtime due to ephemerons *set_* and + *blit_* function during Mark phase + (François Bobot, reported by Stephen Dolan, reviewed by Damien Doligez) + +- #10549: Stack overflow detection and naked pointers checking for ARM64 + (Xavier Leroy, review by Stephen Dolan) + +* #10675, #10937: Emit deprecation warnings when old C runtime function names + are used. This will break C stub code that uses these old names and + treats warnings as errors. The workaround is to use the new names. + (Xavier Leroy and David Allsopp, review by Sébastien Hinderer and + Damien Doligez) + +- #10698, #10726, #10891: Free the alternate signal stack when the main OCaml + code or an OCaml thread stops + (Xavier Leroy, review by David Allsopp 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 + parameter passing on PowerPC (16 registers) and on s390x (8 registers). + (Xavier Leroy, review by Mark Shinwell) + +- #10591, #10615: Tune the heuristic for CSE of integer constants + so as to avoid excessive CSE on compiler-generated constants + and long register allocation times. + (Xavier Leroy, report by Edwin Török, review by Nicolás Ojeda Bär) + +- #10681: Enforce boolean conditions for the native backend + (Vincent Laviron, review by Gabriel Scherer) + +- #10719: Ensure that build_apply respects Lambda.max_arity + (Stephen Dolan, review by Xavier Leroy) + +- #10728: Ensure that functions are evaluated after their arguments + (Stephen Dolan, review by Mark Shinwell) + +- #10732: Ensure right-to-left evaluation of arguments in cmm_helpers + (Greta Yorsh, review by Xavier Leroy) + +### Standard library: + +* #10622: Annotate `Uchar.t` with immediate attribute + (Hongbo Zhang, reivew by Gabriel Scherer and Nicolás Ojeda Bär) + +* #7812, #10475: `Filename.chop_suffix name suff` now checks that `suff` + is actually a suffix of `name` and raises Invalid_argument otherwise. + (Xavier Leroy, report by whitequark, review by David Allsopp) + +- #10526: add Random.bits32, Random.bits64, Random.nativebits + (Xavier Leroy, review by Gabriel Scherer and François Bobot) + +* #10568: remove Obj.marshal and Obj.unmarshal + (these functions have been deprecated for a while and are superseded + by the functions from module Marshal) + (François Pottier, review by Gabriel Scherer and Kate Deplaix) + +- #10538: add Out_channel.set_buffered and Out_channel.is_buffered to control + the buffering mode of output channels. + (Nicolás Ojeda Bär, review by John Whitington, Daniel Bünzli, David Allsopp + and Xavier Leroy) + +* #10583, #10998: Add over 40 new functions in Seq. + (François Pottier and Simon Cruanes, review by Nicolás Ojeda Bär, + Daniel Bünzli, Naëla Courant, Craig Ferguson, Wiktor Kuchta, + Xavier Leroy, Guillaume Munch-Maccagnoni, Raphaël Proust, Gabriel Scherer + and Thierry Martinez) + +- #10596, #10978: Add with_open_bin, with_open_text and with_open_gen to + In_channel and Out_channel. Also, add In_channel.input_all. + (Nicolás Ojeda Bär, review by Daniel Bünzli, Jérémie Dimino, Damien Doligez + and Xavier Leroy) + +- #10658: add detailed information about the current version of OCaml + to the Sys module of the standard library. + (Sébastien Hinderer, review by Damien Doligez, Gabriel Scherer, David + Allsopp, Nicolás Ojeda Bär, Vincent Laviron) + +- #10642: On Windows, Sys.remove and Unix.unlink now remove symlinks + to directories instead of raising EACCES. Introduce + caml/winsupport.h to hold more common code between the runtime, + lib-sys, and win32unix. + (Antonin Décimo, review by David Allsopp and Xavier Leroy) + +- #10737: add new ephemeron API for forward compatibility with Multicore + OCaml. + (Damien Doligez, review by Stephen Dolan) + +* #10922: Add deprecation warnings on {Int32,Int64,Nativeint}.format. + (Nicolás Ojeda Bär, review by Xavier Leroy and Florian Angeletti) + +### Other libraries: + +- #10192: Add support for Unix domain sockets on Windows and use them + to emulate Unix.socketpair (only available on Windows 1803+) + (Antonin Décimo, review by David Allsopp) + +- #10469: Add Thread.set_uncaught_exception_handler and + Thread.default_uncaught_exception_handler. + (Enguerrand Decorne, review by David Allsopp) + +- #10697: Bindings of dup and dup2 in win32unix now correctly call + WSADuplicateSocket on sockets instead of DuplicateHandle. + (Antonin Décimo, review by Xavier Leroy and Nicolás Ojeda Bär) + +- #10951: Introduce the Thread.Exit exception as an alternative way to + terminate threads prematurely. This alternative way will become + the standard way in 5.00. + (Xavier Leroy, review by Florian Angeletti) + +### Tools: + +- #10839: Fix regression of #show when printing class type + (Élie Brami, review by Florian Angeletti) + +- #3959, #7202, #10476: ocaml, in script mode, directive errors + (`#use "missing_file";;`) use stderr and exit with an error. + (Florian Angeletti, review by Gabriel Scherer) + +- #10438: add a new toplevel cli argument `-e