Commit Graph

3263 Commits (f794d799ad7ed2a9188454f6db29cdb48a53447f)

Author SHA1 Message Date
Gabriel Scherer f794d799ad typing: fix the scope of extension constructor declarations
fixes #9970
2020-11-23 14:30:59 +01:00
Leo White d0ddf25f3d
Merge pull request #9991 from lpw25/reproducible-no-alias-deps
Fix reproducibility for `-no-alias-deps`
2020-11-22 18:22:48 +00:00
Gabriel Scherer 1a7e3df327
Merge pull request #9998 from lthls/afl-lazy
Prevent inlining of CamlinternalLazy.force
2020-11-22 15:25:31 +01:00
Gabriel Scherer 592e9eb2ad missing Changes entry for 10007 2020-11-22 15:24:26 +01:00
Leo White 0166a7018e Add Changes entry 2020-11-22 13:47:22 +00:00
Vincent Laviron 0f30379ad9 Use Sys.opaque_identity instead 2020-11-21 12:19:18 +01:00
Gabriel Scherer 7d777f20af matching: factorize the code handling toplevel matching failures 2020-11-21 10:16:48 +01:00
Stephen Dolan 20b7d8b2a7
Try expanding aliases in Ctype.nondep_type_rec (#10005) 2020-11-17 11:10:59 +00:00
Leo White 4822a88248
Improve error message for aliases to the current compilation unit (#10008) 2020-11-08 19:06:10 +01:00
Gabriel Scherer bdcd9baa03 fix -dsource printing of the pattern (A as x | (B as x))
fixes #9999
2020-11-03 22:17:16 +01:00
Daniil Baturin 0280127761
Fix Unix.utimes not working for directories on Win32. (#8796) 2020-11-03 11:03:35 +01:00
David Allsopp 692bd73123 OCAMLRUNPARAM=b=2 => load debuginfo
Load the debug information during runtime startup if OCAMLRUNPARAM=b=2.
This guards against the specific case of running out of fds, since the
debug information can't then be loaded.
2018-12-11 10:17:04 +01:00
David Allsopp 43b28fac00 Improve error messages when loading backtrace info
Before, any errors when loading bytecode backtrace information were
fatal and the error message was potentially misleading.
2018-12-11 08:54:49 +01:00
David Allsopp 46c7122888 Merge pull request #9840 from dra27/fix-9839
Partial revert of 9165: don't build the compiler with -O3 in flambda

(cherry picked from commit 6ce1c60ca97ee962ebf5d5218628bc388536325e)
2020-10-30 11:29:17 +01:00
Jacques-Henri Jourdan 0f64cc87b0 Fix a bug in PR9742: in naked pointers mode, the code could
dereference a pointer before checking it is not a naked pointer.

Algo fix a debug macro changed in PR9742 which could potentially
modify its parameter. It turns out this is not a bug, but the macro
was still particularly dangerous.
2020-10-26 10:21:59 +01:00
Leo White 055f04d189
Merge pull request #9631 from gretay-js/named_sections_for_caml_system_code
Named text sections for caml_system__code_begin/end symbols
2020-10-22 10:12:02 +01:00
Gabriel Scherer c0d1e8157d Match.do_for_multiple_match: we can always flatten 2020-10-21 11:49:29 +02:00
Greta Yorsh 1e91d2b7ca add Changes entry 2020-10-19 16:47:50 +01:00
Jacques-Henri Jourdan 7e4748cf9c Changes. 2020-10-19 17:11:11 +02:00
Florian Angeletti 21c33a53cd first commit after branching 4.12 2020-10-19 16:19:49 +02:00
Florian Angeletti 24dbb0976a last commit before branching 4.12 2020-10-19 16:08:29 +02:00
jacobly0 8a46d76bf9
Fix mergeable section flags and use .rodata.cst16 where appropriate (#9981)
On x86-64 ELF, the `.rodata.cst8` section was incorrectly used.
2020-10-18 13:57:53 +02:00
Thomas Refis 9fdc759ac0
Centralized tracking of frontend's global state (#9963)
import Local_store from merlin, with a simplified API following review comments
2020-10-15 14:47:19 +02:00
Thomas Refis efac790249
Make some locations more accurate (#8987) 2020-10-14 16:03:10 +02:00
Florian Angeletti 5e15dd8eb5
Merge pull request #9861 from trefis/9858
Catch Nondep_cannot_erase
2020-10-13 16:31:34 +02:00
Greta Yorsh 855c13cd6e
ability to restart compilation from .cmir-linear IR files 2020-10-13 15:07:13 +02:00
Xavier Leroy 426b10c6a8
Provide semaphores in the threading library (#9930)
This commit adds a new thread-related module Semaphore, implementing
counting semaphores and binary semaphores.

The two kinds of semaphores are presented as two different
abstract types in two sub-modules, Counting and Binary.
2020-10-12 19:09:52 +02:00
Xavier Leroy f809e9dec1
Make sure the process can terminate when the last thread calls Thread.exit (#9973)
To this end, the tick thread must be stopped, otherwise it prevents
the whole process from exiting.

Fixes: #9971
2020-10-12 15:24:40 +02:00
Mehdi Bouaziz 6ab6052e15
[hashtbl] Restore ongoing traversal status after filter_map_inplace (#8746) 2020-10-12 15:12:09 +02:00
Gabriel Scherer 0cec3a353b
Merge pull request #9803 from trefis/pr9799
pat_env points to the correct environment
2020-10-12 11:00:52 +02:00
Gabriel Scherer 82b29828d2
Allow `[@tailcall true]` and `[@tailcall false]` (#9754)
* remove the unused is_native_tail_call_heuristic forward reference

This forward-reference from Lambda to Asmcomp was used to generate
machine-specific tailcall information in -annot output; this only use
was removed in 57d329e07b, so we can now
remove it to simplify the codebase.

The logic was non-trivial and might be useful again in the future.

* [minor] testsuite: convert warnings/w51.ml to an expect-test

* [minor] translattribute: refactor attribute payload deconstruction

* [@tailcall false]: warn if the call *is* a tailcall

(+ constructor renaming suggested by Nicolás during review)

* Changes

* testsuite: add an example with the 'invalid payload' exception

(suggested by Nicolás during review)
2020-10-10 13:41:39 +02:00
Xavier Leroy 86c8a98f3c
Merge pull request #9948 from nojb/remove_spacetime
The Spacetime memory profiler is not going to be supported in Multicore OCaml, and  is already broken by some of the related changes in OCaml 4.12.  The core development team decided to remove Spacetime support from OCaml 4.12.
2020-10-09 14:43:23 +02:00
Damien Doligez 0069123c61
clean up and fix GC message 0x1 (#9949) 2020-10-09 12:02:00 +02:00
Nicolás Ojeda Bär 7e4392a39e Changes 2020-10-08 20:28:15 +02:00
Thomas Refis 66e5cd11f2 Changes 2020-10-07 15:54:23 +02:00
Greta Yorsh 04bceec6cc
Save Linear IR before emit (#8939)
* Save IR before emit

* Update .depend for linear_format

* Test for -save-ir-after command-line option

* Address review comments

* Add Changes entry
2020-10-07 11:32:40 +01:00
Vincent Laviron eb342da8a9
Ensure all structured constants are registered (#9940)
Allocated constants from other compilation units were not registered, resulting in missed opportunities for unboxing FP and boxed-integer constants.
2020-10-06 15:19:51 +02:00
Leo White 952281944d
Merge pull request #9429 from lpw25/more-hash-operators
Add ppx-only unary operators
2020-10-06 07:46:35 +01:00
Leo White 83f85c5521 Add Changes entry 2020-10-05 18:59:22 +01:00
Nicolás Ojeda Bär 8806ddcbba
Unix.setsid: guard against errors (#9958)
The return value of `setsid()` was not checked for errors.
2020-10-05 19:20:30 +02:00
Xavier Leroy 786ee521cf
Use "error checking" mutexes in the threads library (#9846)
- Mutex.lock raises Sys_error if the mutex is already locked by the
  calling thread.
- Mutex.unlock raises Sys_error if the mutex is unlocked or locked
  by another thread.

Add the corresponding tests.

Co-authored-by: David Allsopp <david.allsopp@metastack.com>
2020-10-05 15:00:58 +02:00
Xavier Leroy af48d9fe8f
Add a naked pointers dynamic checker (#9956)
This is selected at configure-time, option --enable-naked-pointers-checker.

The major GC warns when it detects out-of-heap pointers that could cause the no-naked-pointers runtime system to crash.

This is supported on x86-64 only, but on all ports (Unix and Windows).

Added tests involving naked pointers in tests/runtime-naked-pointers

Co-authored-by: KC Sivaramakrishnan <kc@kcsrk.info>
Co-authored-by: David Allsopp <david.allsopp@metastack.com>
Co-authored-by: Enguerrand Decorne <decorne.en@gmail.com>
2020-10-05 14:44:31 +02:00
Jacques Garrigue a5f63ba65f
Remove propagation from previous branches (#9811) 2020-10-03 10:48:57 +09:00
Bernhard Schommer b727f422bd
Do not install VERSION file. (#9895)
The installed VERSION file could clash with a C++20 standard header.

Fixes: #9523
2020-10-02 15:41:34 +02:00
KC Sivaramakrishnan 530330f3cf
Ensure that the mark stack push optimisation handles naked pointers. (#9951)
Fixes: #9950.
2020-10-02 15:13:16 +02:00
Xavier Leroy 72dbcb8433
Merge pull request #9864 from xavierleroy/is_immediate-refactored
Revised detection of arithmetic instructions with immediate operands
2020-09-22 09:22:26 +02:00
David Allsopp 001c2d1283 Restore Cygwin64 support 2020-09-21 13:36:03 +01:00
David Allsopp 37d6394874 Update Changes for #9925 2020-09-21 13:35:14 +01:00
David Allsopp 14300d3b1a Fix -fdebug-prefix-map when using flexlink
Prepend the -fdebug-prefix-map= option with -link if the "linker" is in
fact flexlink.
2020-09-21 10:11:39 +01:00
Gabriel Scherer 9f3472dc4a
Merge pull request #9669 from lpw25/fix-7538
Check for misplaced attributes on module aliases (Fix #7538)
2020-09-18 14:57:42 +02:00