Commit Graph

20882 Commits (55973d1203e290709f30dcda443311fac0e371e1)

Author SHA1 Message Date
Florian Angeletti 55973d1203 Bump magic numbers for 4.12 (and trunk) 2020-10-19 15:33:26 +02:00
Florian Angeletti 7acf73f2b0
Merge pull request #9980 from xavierleroy/ocamlopt-doc
Ocamlopt documentation updates
2020-10-19 14:38:20 +02:00
Xavier Leroy be02a26305 Revise explanation of -nodynlink 2020-10-19 12:00:01 +02:00
Stephen Dolan 9b3931a156
Ensure Mtype.nondep_sig checks use the correct environment (#9946) 2020-10-19 10:40:25 +01: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
David Allsopp 64f6f83f44
Update HACKING.adoc (#9966)
Clarify why basing topic branches on release tags is bad.
Documented the configure options implied by dev-mode.
2020-10-18 07:59:56 +01:00
David Allsopp 36faf1a2a6
Merge pull request #9967 from dra27/configurable-opt
Add (developer) ability to disable the use of the .opt compilers in the build
2020-10-18 07:57:23 +01:00
Xavier Leroy a9f1f9ee1b
Update manual/manual/cmds/native.etex
Co-authored-by: Vincent Laviron <vincent.laviron@gmail.com>
2020-10-16 10:28:32 +02:00
Xavier Leroy e7d2c394c0 Modernize the description of target-specific ocamlopt aspects
No more "Intel Pentium" and "AMD Athlon".
2020-10-16 10:12:30 +02:00
Xavier Leroy 0fac4b030b Explain -nodynlink better
Including interactions with PIE.

Closes: #8867
2020-10-16 09:55:22 +02:00
Xavier Leroy 8b7ff3532c
Move the examples of labeled functions to StdLabels (#9976)
In the old days, the interfaces of the labeled modules
(ArrayLabels, BytesLabels, ListLabels, StringLabels)
started with short examples of labelings.

Now, the interfaces of the non-labeled modules
(Array, Bytes, List, String) are automatically generated
from the interfaces of the labeled modules.  As a side effect,
the interfaces of Array, Bytes, List and String also start
with short examples of labelings, which is somewhat strange.

This commit reorganizes the documentation as follows:
- The documentation of the StdLabels module is expanded, and includes
  the examples of labeled functions previously scattered in
  ArrayLabels, BytesLabels, ListLabels, StringLabels.
- Array, Bytes, List, String and their labeled counterparts
  briefly mention the labeled modules and point to StdLabels,
  but no longer contain examples.
2020-10-15 15:07:31 +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
Greta Yorsh 5410d0c5d3
Fix example of external C function in the manual (#9977) 2020-10-14 16:31:33 +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
Nicolás Ojeda Bär 246564e8db
Remove dead code (#9974) 2020-10-13 09:48:16 +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 d910c35301 Add a test for --enable-reserved-header-bits 2020-10-09 14:51:00 +02:00
Xavier Leroy 53ed75072d configure --enable-reserved-header-bits=N: fix range of accepted N
It ranges between 0 and 31, not 0 and 21.
2020-10-09 14:50:13 +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 8420c3ea9f Bootstrap 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 7e4392a39e Changes 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 899a2013aa Adapt tests 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 43883ae4bc Remove labels after calls, checkbound, and GC points 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 67c9c0772e Remove Spacetime support in marshaller 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 3869f71e98 Remove Cblockheader 2020-10-08 20:28:15 +02:00
Nicolás Ojeda Bär 540996d21e Remove Spacetime 2020-10-08 20:28:12 +02:00
David Allsopp 0e6bc29b2b
Use CAMLprim in all manual examples (#9898) 2020-10-07 16:37:37 +02:00
Thomas Refis 66e5cd11f2 Changes 2020-10-07 15:54:23 +02:00
Thomas Refis c7f9c8e559 pat_env: I must not tell lies 2020-10-07 15:54:23 +02:00
Thomas Refis b938cb32c5 add test from PR#9799 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
Stephen Dolan e87b7ce437
Use Cmm_helpers for boxed int arithmetic (#9959)
This way, Cmm's arithmetic optimisations also apply to boxed integer arithmetic.
2020-10-05 19:19:35 +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
Nicolás Ojeda Bär 5381e13626
Fix handling of Exit_compiler exception in toplevel (#9798) 2020-10-05 09:46:20 +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
珊瑚 cb32b88aa1
use UTF-8 encoding for ocamldoc (#9942)
See https://github.com/ocaml/ocaml/pull/1789#issuecomment-695785998
Currently ocamldoc default encoding is isolatin, however it seems that some files in `libref` already use UTF8 encoding, so I assume it would be better to generate HTML files with "charset=UTF-8".
2020-09-27 00:26:02 +02:00