Reasons:
- Better abstraction in memprof.h
- Simpler Saving/restore functions
- We introduce a current's thread context, so that we don't need to do a spacial case for the current thread
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.
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.
* 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)
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.