From e61263c0ac282dd8d16da8eb09093519c4aa28c7 Mon Sep 17 00:00:00 2001 From: Lucas Pluvinage Date: Mon, 11 Mar 2019 12:45:55 +0100 Subject: Introduce the -without-runtime option. --- Changes | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index 945616c7b5..16bd7eac9f 100644 --- a/Changes +++ b/Changes @@ -39,6 +39,11 @@ Working version (Jules Aguillon, with help from Armaël Guéneau, review by Gabriel Scherer and Florian Angeletti) +- #2309: New options -with-runtime and -without-runtime in ocamlopt/ocamlc + that control the inclusion of the runtime system in the generated program. + (Lucas Pluvinage, review by Daniel Bünzli, Damien Doligez, David Allsopp + and Florian Angeletti) + - #2314: Remove support for gprof profiling. (Mark Shinwell, review by Xavier Clerc and Stephen Dolan) -- cgit v1.2.1 From c91e2125dab2c9e0ae713f74e35493d3f2ce4288 Mon Sep 17 00:00:00 2001 From: Stephen Dolan Date: Wed, 15 May 2019 12:14:49 +0100 Subject: Optimise Switch code generation on booleans. If the value being matched is known to be 0 or 1, we need not do a further comparison with 0 before dispatching. --- Changes | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index 9628540e6b..935d7a13d2 100644 --- a/Changes +++ b/Changes @@ -20,6 +20,11 @@ Working version [Flambda_middle_end]. Run [Un_anf] from the middle end, not [Cmmgen]. (Mark Shinwell, review by Pierre Chambart) +### Code generation and optimizations: + +- #8672: Optimise Switch code generation on booleans. + (Stephen Dolan, review by Pierre Chambart) + ### Runtime system: - #8619: Ensure Gc.minor_words remains accurate after a GC. -- cgit v1.2.1 From 79088fb09d23d6d8bde3258f856df2a1d6e31ddf Mon Sep 17 00:00:00 2001 From: Jacques-Henri Jourdan Date: Thu, 23 May 2019 13:32:22 +0200 Subject: Guarantee that no finalisers will be called while allocating memory in OCaml heap from C code. The finalizers and all the other asynchronous callbacks (including signal handlers, memprof callbacks and finalizers) are now called in a common function, [caml_async_callbacks]. It is called in [caml_check_urgent_gc] and wherever [caml_process_pending_signals] was called. This makes it possible to simplify the [caml_gc_dispatch] logic by removing the loop it contains, since it no longer calls finalizers. --- Changes | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index 518d7b4e1b..edeb91d8e4 100644 --- a/Changes +++ b/Changes @@ -36,6 +36,10 @@ Working version OCaml heap. (Jacques-Henri Jourdan, review by Damien Doligez) +- #8691: Allocation functions are now guaranteed not to trigger any + OCaml callback when called from C. + (Jacques-Henri Jourdan, review by Stephen Dolan and Gabriel Scherer) + ### Standard library: - #8657: Optimization in [Array.make] when initializing with unboxed -- cgit v1.2.1 From 9a9223098c3d789362c8531adef3b9788f3b5356 Mon Sep 17 00:00:00 2001 From: Damien Doligez Date: Fri, 22 Mar 2019 15:17:57 +0100 Subject: Fix the installation of the camlheader[di] files. They were installed under the wrong names, which made -runtime-variant fail for bytecode. --- Changes | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index 4aa49c2068..09855253ff 100644 --- a/Changes +++ b/Changes @@ -125,6 +125,9 @@ OCaml 4.09.0 - #3819, #8546 more explanations and tests for illegal permutation (Florian Angeletti, review by Gabriel Scherer) +- #8537: fix the -runtime-variant option for bytecode + (Damien Doligez, review by David Allsopp) + - #8541: Correctly print multi-lines locations (Louis Roché, review by Gabriel Scherer) -- cgit v1.2.1 From 6e1b7f465e6e2f44e65d478d76b9e4ec60b965aa Mon Sep 17 00:00:00 2001 From: Jacques Garrigue Date: Thu, 13 Jun 2019 11:09:45 +0900 Subject: Fix PR8701 by expanding types in lower_contravariant (#8725) --- Changes | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index 559890e27d..63786cc91a 100644 --- a/Changes +++ b/Changes @@ -318,6 +318,9 @@ OCaml 4.09.0 ocamldep. It used to turn some errors into successes (Jérémie Dimino) +- #8701, #8725: Variance of constrained parameters causes principality issues + (Jacques Garrigue, report by Leo White, review by Gabriel Scherer) + OCaml 4.08.0 ------------ -- cgit v1.2.1 From 2acab0d7b2d72464827aa2b32116540b076aee71 Mon Sep 17 00:00:00 2001 From: Damien Doligez Date: Fri, 14 Jun 2019 14:52:02 +0200 Subject: fix typo in Changes entry #1711 --- Changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Changes') diff --git a/Changes b/Changes index 63786cc91a..f8aee37e69 100644 --- a/Changes +++ b/Changes @@ -850,7 +850,7 @@ OCaml 4.08.0 fixes an imenu crash. (Wilfred Hughes, review by Christophe Troestler) -- #1711: the new 'open' flag in OCAMLRUNPARAM takes a comma-separated list of +- #1711: the new 'open' flag in OCAMLPARAM takes a comma-separated list of modules to open as if they had been passed via the command line -open flag. (Nicolás Ojeda Bär, review by Mark Shinwell) -- cgit v1.2.1 From 466950b48f698cb2d9fbb5571a3ed203a8765044 Mon Sep 17 00:00:00 2001 From: Ian Zimmerman Date: Thu, 20 Jun 2019 17:12:08 -0700 Subject: Stop talking about Pervasives in core library documentation --- Changes | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index ad2e8bc4ad..910664ac94 100644 --- a/Changes +++ b/Changes @@ -295,6 +295,9 @@ OCaml 4.09.0 ### Manual and documentation: +- #8757: Rename Pervasives to Stdlib in core library documentation. + (Ian Zimmerman, review by David Allsopp) + - #7584, #8538: Document .cmt* files in the "overview" of ocaml{c,opt} (Oxana Kostikova, rewiew by Florian Angeletti) -- cgit v1.2.1 From 4fca5e08a47d5a1fc2846331f5db1c56c905fc4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ojeda=20B=C3=A4r?= Date: Wed, 19 Jun 2019 17:29:08 +0200 Subject: Changes --- Changes | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index 910664ac94..65750fb44a 100644 --- a/Changes +++ b/Changes @@ -85,6 +85,10 @@ Working version (Gabriel Scherer and Florian Angeletti, review by Florian Angeletti and Gabriel Radanne) +- #8751: fix bug that could result in misaligned data section when compiling to + native-code on amd64. (observed with the mingw64 compiler) + (Nicolás Ojeda Bär, review by David Allsopp) + OCaml 4.09.0 ------------ -- cgit v1.2.1 From d8b6a1713b50132fc96b6cda40c8aad4ec4f8008 Mon Sep 17 00:00:00 2001 From: Greta Yorsh <45005955+gretay-js@users.noreply.github.com> Date: Mon, 24 Jun 2019 14:18:37 +0100 Subject: Add pseudo-instruction `Ladjust_trap_depth` (#2322) Ladjust_trap_depth replaces dummy Lpushtrap generated in linearize of Iexit to notify assembler generation about updates to the stack. Ladjust_trap_depth is used to keep the virtual stack pointer in sync and emit dwarf information, without emitting any assembly instructions. It therefore avoids generating dead code. This patch is extract from PR1482 @lthls --- Changes | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index 65750fb44a..bc485a5daa 100644 --- a/Changes +++ b/Changes @@ -31,6 +31,10 @@ Working version - #8672: Optimise Switch code generation on booleans. (Stephen Dolan, review by Pierre Chambart) +- #2322: Add pseudo-instruction `Ladjust_trap_depth` to replace + dummy Lpushtrap generated in linearize + (Greta Yorsh and Vincent Laviron, review by Xavier Leroy) + ### Runtime system: - #8619: Ensure Gc.minor_words remains accurate after a GC. -- cgit v1.2.1 From a8daa89500f2aee6d73b6915928f9f65f0a8dff3 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 25 Jun 2019 14:21:58 +0200 Subject: Add Filename.quote_command function (#1492) MPR#7672: add a Filename.quote_command function This function takes care of quoting the command and its arguments so that they are correctly parsed by the system shell (/bin/sh for Unix, cmd.exe for Win32). Redirections for std input (< file) and std output (> file) and std error (2> file) can also be specified as optional arguments. A 2>&1 redirection is used if stdout and stderr are redirected to the same file. The result is a string that can be passed directly to Sys.command or to the Unix functions that expect shell command lines. --- Changes | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index bc485a5daa..c3686b9272 100644 --- a/Changes +++ b/Changes @@ -63,6 +63,10 @@ Working version (Jacques-Henri Jourdan, review by Stephen Dolan, Gabriel Scherer and Damien Doligez) +- #7672, #1492: Add `Filename.quote_command` to produce properly-quoted + commands for execution by Sys.command. + (Xavier Leroy, review by David Allsopp and Damien Doligez) + ### Other libraries: - #1939, #2023: Implement Unix.truncate and Unix.ftruncate on Windows. -- cgit v1.2.1 From 30a210100cddd3bebba4f690cebae8856845be11 Mon Sep 17 00:00:00 2001 From: Gabriel Scherer Date: Thu, 27 Jun 2019 16:01:35 +0200 Subject: Simplif: fix the local-function optimization on Tupled functions (#8707) This is a fix of #8705 proposed for trunk: instead of disabling the problematic behavior (the Tupled case) as proposed in #8706, we propose an auxiliary function to correctly determine whether an application is exact, and use it there and also for existing Simplif transformations. As a side-benefit, the other Simplif optimizations are also improved (thanks to a suggestion of Alain Frisch for constant blocks). For example, the following beta-redex was not reduced by Simplif before this patch, due to the fact that its arguments are constant: (fun (x,y) -> x + y) (1, 2) --- Changes | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index c3686b9272..3089450737 100644 --- a/Changes +++ b/Changes @@ -35,6 +35,9 @@ Working version dummy Lpushtrap generated in linearize (Greta Yorsh and Vincent Laviron, review by Xavier Leroy) +- #8707: Simplif: more regular treatment of Tupled and Curried functions + (Gabriel Scherer, review by Leo White and Alain Frisch) + ### Runtime system: - #8619: Ensure Gc.minor_words remains accurate after a GC. -- cgit v1.2.1 From 11edca87984441924c86b64b1358481251783d18 Mon Sep 17 00:00:00 2001 From: Leo White Date: Fri, 28 Jun 2019 14:31:42 +0100 Subject: Fix #8769 (#8770) * Don't generate illegal Pfield's when compiling alias coercions * Simplify lambda code when compiling packs * Add regression test for pr8769 * Add Changes entry --- Changes | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index 3089450737..f5842d6a99 100644 --- a/Changes +++ b/Changes @@ -344,6 +344,9 @@ OCaml 4.09.0 - #8701, #8725: Variance of constrained parameters causes principality issues (Jacques Garrigue, report by Leo White, review by Gabriel Scherer) +- #8769, #8770: Fix assertion failure with -pack + (Leo White, review by Gabriel Scherer, report by Fabian @copy) + OCaml 4.08.0 ------------ -- cgit v1.2.1 From a49589911ab89e7836452574ea700266093dd295 Mon Sep 17 00:00:00 2001 From: Leo White Date: Thu, 11 Jul 2019 14:01:41 +0100 Subject: Add Changes entry --- Changes | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index f5842d6a99..4061287469 100644 --- a/Changes +++ b/Changes @@ -347,6 +347,9 @@ OCaml 4.09.0 - #8769, #8770: Fix assertion failure with -pack (Leo White, review by Gabriel Scherer, report by Fabian @copy) +- #8800: Fix soundness bug in extension constructor inclusion + (Leo White, review by Jacques Garrigue) + OCaml 4.08.0 ------------ -- cgit v1.2.1 From a45189331b75c4be012627b3b85ffe964884c887 Mon Sep 17 00:00:00 2001 From: Jeremy Yallop Date: Thu, 11 Jul 2019 17:22:39 +0100 Subject: caml_output_value_to_bytes: avoid integer overflow (#8788) Use intnat, not int, to represent pointer difference and avoid integer overflow in caml_output_value_to_bytes and caml_output_value_to_malloc --- Changes | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index 4061287469..74785b3da8 100644 --- a/Changes +++ b/Changes @@ -40,6 +40,9 @@ Working version ### Runtime system: +- #8787, #8788: avoid integer overflow in caml_output_value_to_bytes + (Jeremy Yallop, report by Marcello Seri) + - #8619: Ensure Gc.minor_words remains accurate after a GC. (Stephen Dolan, Xavier Leroy and David Allsopp, review by Xavier Leroy and Gabriel Scherer) -- cgit v1.2.1 From ef8d8a70554a5d85c946376ff106f3a25b9e9b51 Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Thu, 11 Jul 2019 17:19:52 +0100 Subject: Move Changes for #8788 to 4.09.0 --- Changes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Changes') diff --git a/Changes b/Changes index 74785b3da8..6ca8d41e55 100644 --- a/Changes +++ b/Changes @@ -40,9 +40,6 @@ Working version ### Runtime system: -- #8787, #8788: avoid integer overflow in caml_output_value_to_bytes - (Jeremy Yallop, report by Marcello Seri) - - #8619: Ensure Gc.minor_words remains accurate after a GC. (Stephen Dolan, Xavier Leroy and David Allsopp, review by Xavier Leroy and Gabriel Scherer) @@ -271,6 +268,9 @@ OCaml 4.09.0 - #8656: Fix a bug in [caml_modify_generational_global_root] (Jacques-Henri Jourdan, review by Gabriel Scherer) +- #8787, #8788: avoid integer overflow in caml_output_value_to_bytes + (Jeremy Yallop, report by Marcello Seri) + ### Standard library: - #2262: take precision (.) and flags ('+' and ' ') into account -- cgit v1.2.1 From 658233568930c9b1c291f78d8ac2177e67aa9981 Mon Sep 17 00:00:00 2001 From: Florian Angeletti Date: Fri, 12 Jul 2019 17:47:25 +0200 Subject: #8702: fix some polymorphic variant error messages (#8777) improved error messages for fixed row polymorphic variants: keep track of the motivation behind a fixed row (e.g it was bound to an universal or existential type variable, or private) in the types themselves and use this explanation in error messages. --- Changes | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Changes') diff --git a/Changes b/Changes index 6ca8d41e55..301f134690 100644 --- a/Changes +++ b/Changes @@ -86,6 +86,11 @@ Working version (Stephen Dolan, review by Gabriel Scherer, Sébastien Hinderer and Thomas Refis) +### Compiler user-interface and warnings: + +- #8702, #8777: improved error messages for fixed row polymorphic variants + (Florian Angeletti, report by Leo White, review by Thomas Refis) + ### Bug fixes: - #8622: Don't generate #! headers over 127 characters. -- cgit v1.2.1