Jacques Garrigue
9e181ca8f4
must use set_state rather than backtrack in Typecore.type_cases
2020-11-05 11:12:01 +09:00
Gabriel Scherer
479ec01e28
Merge pull request #10000 from gasche/9999
...
fix -dsource printing of the pattern (A as x | (B as x))
2020-11-04 09:07:50 +01:00
Gabriel Scherer
89d6a2094b
change or-pattern printing to use spaces instead of cuts
...
(A p1 | B p2 | C p3) instead of (A p1|B p2|C p3)
2020-11-03 22:17:16 +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
Xavier Leroy
8575a4b577
Merge pull request #2195 from dra27/better-ulimit
...
Improve error message when bytecode program runs out of fds
2020-11-02 14:08:48 +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
Gabriel Scherer
3a094ebc36
Merge pull request #9989 from jhjourdan/fixPR9742
...
Fix a bug in PR9742: in naked pointers mode, the code could dereference a pointer before checking it is not a naked pointer.
2020-10-29 17:12:44 +01:00
Florian Angeletti
86528b09b9
manual: docitem macros for linking modules ( #9988 )
2020-10-28 17:32:42 +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
Gabriel Scherer
f449d9b298
Merge pull request #9987 from Octachron/manual_underscore_package
...
manual: use the underscore package
2020-10-24 17:43:42 +02:00
Florian Angeletti
fc2d2ccfc9
manual: use underscore package
2020-10-23 16:34:21 +02: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
cdf6953953
Merge pull request #9984 from ezal/clarify-docstring-in-str-library
...
Str: clarify matched_group documentation
2020-10-22 09:16:18 +02:00
Eugen Zalinescu
d0c0c96d19
Clarify docstring in Str module
2020-10-21 21:36:21 +02:00
Gabriel Scherer
5faeae8153
Merge pull request #9650 from gasche/matching-can-flatten
...
pattern-matching: Cannot_flatten, maybe we can?
2020-10-21 21:34:01 +02:00
Gabriel Scherer
7d5f494ff5
testsuite: include both -dlambda and -drawlambda outputs
2020-10-21 15:05:11 +02:00
Gabriel Scherer
b5f6cd4949
testsuite: clarify the allocation behavior
...
(A nice catch of Florian Angeletti's review)
2020-10-21 15:00:05 +02:00
Gabriel Scherer
dacaddc265
matching: clarify the ~vars argument of Simple.explode_or_pat
...
(suggested by Thomas Refis' review)
2020-10-21 11:49:29 +02:00
Gabriel Scherer
0ab43f822a
matching: simplify the interface of Simple.explode_or_pat
2020-10-21 11:49:29 +02:00
Gabriel Scherer
cbf69c7f53
Matching.Simple.explode_or_pat: on-demand generation of fresh identifiers
...
This change was suggested by Thomas Refis during code review.
2020-10-21 11:49:29 +02:00
Gabriel Scherer
8fc38d247f
add a comment to explain what Simple.explode_or_pat does
2020-10-21 11:49:29 +02:00
Gabriel Scherer
940149a45a
matching: avoid useless bindings in do_for_multiple_match
2020-10-21 11:49:29 +02:00
Gabriel Scherer
7aa43acacd
matching: towards a correctness argument for flatten_* ignoring variables
...
Before we ignored as-patterns in the flatten_* functions because
as-patterns would either be half-simplified or raise Cannot_flatten
(in any case, never reach the flattening functions).
Now the reasoning is a bit more subtle: the only non-simple matrices
we flatten are used as "ghost" information (default environments,
provenance) where variables do not matter, only the shape of matched values.
2020-10-21 11:49:29 +02:00
Gabriel Scherer
c0d1e8157d
Match.do_for_multiple_match: we can always flatten
2020-10-21 11:49:29 +02:00
Gabriel Scherer
bd83d67d26
Matching.explode_or_pat: handle the case where the argument has no id
2020-10-21 10:08:48 +02:00
Gabriel Scherer
31c2551c7c
matching: more complete testsuite for do_for_multiple_match
...
Note: we now use -dlambda rather than -drawlambda, because otherwise
the output is much more verbose and difficult to read.
(-drawlambda is closed to the inner workings of the pattern-matching
compiler, but the simplification in -dlambda make the output much more
readable. They are also fairly predictable/non-surprising, so I think
that we can still easily understand what the compiler did from that
output.)
2020-10-21 10:08:48 +02:00
Gabriel Scherer
cc462e0f76
matching: document the behavior of precompile_or through an example
2020-10-21 10:08:48 +02:00
Thomas Refis
10364b67d5
build_as_type: document why generic_instance can't be used ( #9983 )
2020-10-20 15:04:58 +02:00
Thomas Refis
1e07bc7ed9
fix dune build
2020-10-20 11:20:40 +02:00
Jacques-Henri Jourdan
0cb298f5e7
Merge pull request #9674 from jhjourdan/memprof_thread_alloc_callback_2
...
Memprof: provide the guarantee that an allocation callback is always run in the same thread the allocation takes place. Attempt II.
2020-10-20 10:29:56 +02:00
Florian Angeletti
9eb1a08c14
add new 4.12 badge, remove old badges in README
2020-10-19 18:23:04 +02:00
Greta Yorsh
1e91d2b7ca
add Changes entry
2020-10-19 16:47:50 +01:00
Greta Yorsh
30e1e534d7
Add named text sections for caml_system__code_begin/end symbols
2020-10-19 16:47:13 +01:00
Stephen Dolan
a6980b256d
Add a test for Memprof.stop within a Memprof callback
2020-10-19 17:11:11 +02:00
Jacques-Henri Jourdan
7e4748cf9c
Changes.
2020-10-19 17:11:11 +02:00
Jacques-Henri Jourdan
b9abf833ca
Memprof/systhreads : call [caml_memprof_delete_th_ctx] when threads gets killed by fork.
2020-10-19 17:11:11 +02:00
Jacques-Henri Jourdan
6d3065be78
Memprof: get rid of the idx_ptr pointers.
...
Instead, we use a thread-local variable [callback_status] which
contains the index of the corresponding entry when a callback is
running. We can do this since there can only be one running callback
at the same time in a given thread.
This lifts the restriction forbidding the call of Thread.exit from a
memprof callback.
2020-10-19 17:11:11 +02:00
Jacques-Henri Jourdan
f83d71830d
Memprof: provide the guarantee that an allocation callback is always run in the same thread the allocation takes place.
...
This is done by using a local entry array for each thread, containing
tracked blocks whose allocation callback has not yet been called.
This allows some simplification in the code running callbacks for
young allocations. Indeed, since the entry array is local to one
thread, we know for sure that it cannot be modified during a callback,
and therefore we no longer need to remember the indices of the
corresponding new entries.
2020-10-19 17:08:17 +02:00
Jacques-Henri Jourdan
18c0f95560
Memprof : Refactor [run_callback_exn] so that it also stores the value returned by the callback.
2020-10-19 17:00:04 +02:00
Jacques-Henri Jourdan
ea52bec84b
Memprof: thread-local context is now stored as a pointer in systhread's data structures.
...
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
2020-10-19 17:00:04 +02:00
Jacques-Henri Jourdan
13a874cf3f
Memprof : get rid of the tracking_state struct, and create an entry_array struct, which only contains information specific to the array.
2020-10-19 16:41:13 +02:00
Jacques-Henri Jourdan
11411635bc
Memprof: refactor realloc_trackst.
2020-10-19 16:41:13 +02:00
Jacques-Henri Jourdan
d1800821df
Gc.Memprof.stop does no longer try to run pending callbacks.
...
This is only effetive in native mode, since function calls in bytecode
mode will trigger polling and hence run pending callbacks.
2020-10-19 16:41:13 +02:00
Jacques-Henri Jourdan
b371c21396
Memprof: fix rounding error.
2020-10-19 16:41:13 +02:00
Jacques-Henri Jourdan
cad494b399
Whitespace, typos.
2020-10-19 16:36:23 +02:00
Florian Angeletti
af2096729b
release info update
2020-10-19 16:20:18 +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
Florian Angeletti
55973d1203
Bump magic numbers for 4.12 (and trunk)
2020-10-19 15:33:26 +02:00