Commit Graph

20944 Commits (547f9b8126fbb558de184a3424b0fc22a3d57f27)

Author SHA1 Message Date
Gabriel Scherer 547f9b8126 minor .mailmap additions 2020-11-19 14:03:44 +01:00
Jacques-Henri Jourdan 3f1c3bed3e
Merge pull request #10024 from stedolan/alloc-shr-cleanup
Clean up caml_alloc_shr
2020-11-17 22:04:24 +01:00
Stephen Dolan 01c08d3c0c Clean up caml_alloc_shr 2020-11-17 11:59:05 +00:00
Stephen Dolan 20b7d8b2a7
Try expanding aliases in Ctype.nondep_type_rec (#10005) 2020-11-17 11:10:59 +00:00
Gabriel Scherer 6d1c87a49a
Merge pull request #10023 from gasche/minor-refactors-in-Typemod.Signature_names
Minor refactorings in typemod.signature names
2020-11-16 10:50:04 +01:00
Gabriel Scherer b24f19485c typemod: [minor] get rid of broken commented-out code 2020-11-14 18:40:57 +01:00
Gabriel Scherer c35760d36d typemod: refactor Signature_names.check_sig_item
just a refactor for concision/readability
2020-11-14 18:40:10 +01:00
Gabriel Scherer f43b49dda6 typemod: [refactor] pass `t` to `check` rather than just one table
We want to implement support for groups, several declarations that
must be removed together. For this we need `check` to be able to also
mark declarations of other kinds to be removed, and this means having
access to the whole `t.bounds` value, not just a single table.
2020-11-14 18:40:10 +01:00
Leo White 4822a88248
Improve error message for aliases to the current compilation unit (#10008) 2020-11-08 19:06:10 +01:00
Xavier Leroy f14d6d371f Minor updates 2020-11-06 19:47:17 +01:00
Gabriel Scherer d42e4663f6
Merge pull request #10006 from garrigue/type_cases_set_state
must use set_state rather than backtrack in Typecore.type_cases
2020-11-06 18:31:25 +01:00
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