Commit Graph

20254 Commits (33416d11db5608c5a4bb7f63447d55768911947e)

Author SHA1 Message Date
Nicolás Ojeda Bär 33416d11db
Merge pull request #9469 from lpw25/fix-lazy-backtraces
Better backtraces for lazy values
2020-06-14 11:34:04 +02:00
Leo White faa56c1934 Add Changes entry 2020-06-14 07:57:39 +01:00
Leo White a02707c610 Better backtraces for lazy values 2020-06-14 07:57:35 +01:00
Leo White 9895b28d25 Add tests for backtraces from forcing lazy values 2020-06-14 07:51:31 +01:00
Gabriel Scherer cba5a765a2
Merge pull request #9653 from jhjourdan/memprof_no_shutdown
Memprof: getting rid of caml_memprof_shutdown
2020-06-13 13:53:04 +02:00
Gabriel Scherer f333db8b0f
Merge pull request #9662 from gadmm/fix-dune-build
Fix dune build after using Atomic in Stdlib
2020-06-11 21:43:09 +02:00
Xavier Leroy fe4b06b990 extern.c: #ifdef-protect a static function
Follow-up to c18409446.  Under macOS an unused static function triggers
a warning.
2020-06-11 20:21:31 +02:00
Xavier Leroy 38d2f5a92a
Merge pull request #9649 from xavierleroy/marshal-new-closure-repr
Marshaling for the new closure representation
2020-06-11 19:56:30 +02:00
Xavier Leroy 919803e09c Changes entry for #9649 2020-06-11 10:59:54 +02:00
Xavier Leroy c18409446e extern.c: use new closure representation to marshal closures
We know where the code pointers, closure info words and infix headers are,
and can output them directly.

Currently activated in no-naked-pointers mode only, but would work in
the other mode as well.
2020-06-11 10:52:13 +02:00
Xavier Leroy 21ce6b02e2 extern.c: refactor the code using auxiliary functions
This makes the core function `extern_rec` easier to read, and will
avoid code duplication in later changes.
2020-06-11 10:51:46 +02:00
Xavier Leroy 08e58c836e
More efficient management of code fragments (#9654)
* Introducing codefrag: a new runtime module to work with code fragments

This module collects all the operations on code fragments performed in
various places of the runtime systems.  Applies both to bytecode and
to native code.

The implementation is based on skiplists, so that "lookup fragment by
PC" and "lookup fragment by number" are efficient (logarithmic in the
number of code fragments).  "Lookup fragment by digest" remains
linear-time.

The new module also improves the handling of digests: now it is
possible to mark a code fragment as "no digest" i.e. not marshal-able.

* Use the new "codefrag" runtime module for marshaling and for the
  debugger interface

Replace the previous handling of code fragments with calls to the
functions provided by the "codefrag" runtime module.
2020-06-11 10:39:19 +02:00
Jacques-Henri Jourdan bee3679aab Memprof: getting rid of caml_memprof_shutdown
This function is not needed since there is no requirement that the OCaml runtime be able to restart once shut down.
2020-06-10 19:18:48 +02:00
Sébastien Hinderer b94a3776a0
Remove temporary installation hacks (#9659)
* Remove temporary hack related to the Num library

This is a follow-up to commit 3de0115bfe

* Also do some cleanup in stdlib/Makefiile
2020-06-10 16:42:53 +02:00
Stephen Dolan 5946b93a85
Refactor skiplist to avoid UB casts (#9660)
This patch removes casts between struct skiplist * and struct skipcell *, and removes the "layout compatibility" fields in skiplist that were there to enable these casts.

The only algorithmic difference is that caml_skiplist_find is now "stop-at" (see discussion here), as this was slightly easier to write in the no-cast style.
2020-06-10 16:40:51 +02:00
Guillaume Munch-Maccagnoni 3a1901d873 Fix dune build
Introduce CamlinternalAtomic since Stdlib cannot refer to
Stdlib__-prefixed modules without breaking the dune build.

No change entry needed.
2020-06-10 14:29:21 +02:00
Jacques-Henri Jourdan 7aad86fec4
Memprof: disable sampling when memprof is suspended. (#9628)
* Memprof: disable sampling when memprof is suspended.

* Changes.
2020-06-10 13:25:11 +01:00
Gabriel Scherer c24198550a
Merge pull request #9612 from garrigue/pr6744ex
fix number and add examples for #6744
2020-06-10 14:05:31 +02:00
Gabriel Scherer 6ea0fbdddb
Merge pull request #9602 from garrigue/document-variance-flags
add explanation for variance flags
2020-06-10 13:53:03 +02:00
David Allsopp 2f38a52086
Merge pull request #9625 from dra27/warn-error
--enable-warn-error configure option
2020-06-10 11:32:13 +01:00
Sébastien Hinderer 325a0ff718
Merge pull request #9661 from shindere/ocamldoc-remove-debug-support
ocamldoc: remove debugging facility
2020-06-10 11:00:35 +02:00
Gabriel Scherer b7509ca82f
Merge pull request #9442 from gasche/tailcall-attribute-refactoring
[minor] refactoring the datatype for the [@tailcall] attribute
2020-06-10 10:18:12 +02:00
Gabriel Scherer 56f7500f5c
Merge pull request #9646 from gasche/rematch-simplify-unused
matching: refactor the local control flow of the Unused exception
2020-06-10 09:50:18 +02:00
Florian Angeletti a1e3b966ea
Merge pull request #9618 from Octachron/format_documentation_precision
Document few Format quirks
2020-06-09 13:42:23 +02:00
Sébastien Hinderer 433485b8b5 ocamldoc: remove debugging facility 2020-06-09 12:30:44 +02:00
Sébastien Hinderer 2e4d1ecc12
Remove two oldish scripts (#9656) 2020-06-09 10:49:58 +02:00
Sébastien Hinderer d8f3273292
Merge pull request #9285 from dra27/simplify-mkexe
Eliminate MKEXE_ANSI from build system
2020-06-08 17:13:05 +02:00
Gabriel Scherer d260a79416 [refactoring] gives tailcall attributes a more standard structure
We want to start allowing more information in the payload of
[@tailcall] attributes (currently no payload is supported), for
example we could consider using [@tailcall false] to ask the code
generator to disable a tail call.

A first required step in this direction is to use a custom datatype to
represent the tail-call attribute, instead of a boolean. This is
consistent with the other application-site
attributes (inline_attribute, specialise_attribute, local_attribute),
so it makes the code more regular -- but the change itself is
boilerplate-y.
2020-06-08 15:39:50 +02:00
Gabriel Scherer 792deb120f [minor] printlambda: print the 'tailcall' attribute in the same style as others 2020-06-08 15:39:20 +02:00
Xavier Leroy c61fc39caa
Merge pull request #9635 from xavierleroy/skiplists
Introduce a library of skip lists and use them to fix a performance issue in the debugger (issue #9606)
2020-06-08 15:19:29 +02:00
Xavier Leroy 4ce3b7ceba Add Changes for #9635 2020-06-08 14:12:53 +02:00
Xavier Leroy 8fd7894b2a Use the skip list library to manage overwritten instructions in the debugger
This avoids the quadratic behaviors of the previous array-based
implementation.

Closes: #9606
2020-06-08 14:13:08 +02:00
Xavier Leroy 40824de87f Use the skip list library for global GC root management
Instead of the specialized skip list implementation that was local to
this file.
2020-06-08 14:12:53 +02:00
Xavier Leroy 9a5f3b1967 Add skip lists as a reusable data structure
The implementation is taken from globroots.c, but made reusable elsewhere.
2020-06-08 14:12:53 +02:00
Nicolás Ojeda Bär 990bc3c892
Merge pull request #9633 from nojb/ocamltest_env_fix
ocamltest: do not overwrite user-defined variables
2020-06-08 13:17:38 +02:00
Nicolás Ojeda Bär a8cd077083 check-typo 2020-06-08 11:17:22 +02:00
Gabriel Scherer e717512a54
Merge pull request #9514 from gasche/parmatch-exhaust-singlecol-optim-trunk
Parmatch.exhaust: single-row optimization
2020-06-08 10:14:20 +02:00
Gabriel Scherer 28d8217130
Merge pull request #9638 from hannesm/runtime-stack-limit
documentation: clarify that l=x only affects byte-code runtime
2020-06-08 10:08:36 +02:00
octachron 8875357638 review and change entry for #9618 2020-06-08 08:59:01 +02:00
octachron 99f0910081 format: document structural box quirk 2020-06-08 08:58:25 +02:00
octachron b6ba1823c0 format: comment max indent induced line splits 2020-06-08 08:47:39 +02:00
octachron 982d4a378e Format: margin documentation precision 2020-06-08 08:47:39 +02:00
Xavier Leroy de21dafe28 Upgrade the "stale" script to v3 2020-06-08 08:45:39 +02:00
Gabriel Scherer 68a3c8eef9 matching: [minor] refactor the local control flow of the Unused exception 2020-06-07 16:27:16 +02:00
Gabriel Scherer a3b66f1b32 Parmatch.exhaust: single-row optimization
(See testsuite and code comments for an explanation.)
2020-06-07 08:03:57 +02:00
Gabriel Scherer 06cabea1df
Merge pull request #9608 from trefis/rematch-flattening
pattern-matching refactoring: clarify usage of the Cannot_flatten exception
2020-06-06 21:58:33 +02:00
Gabriel Scherer f8bf8c3f6e Changes 2020-06-06 18:46:34 +02:00
Thomas Refis ddf93aa22c matching: try => match with exception
This makes it clearer where the exception comes from.
2020-06-06 18:46:34 +02:00
Thomas Refis e17f81511c matching: flatten_simple_pattern does not raise 2020-06-06 18:46:34 +02:00
Thomas Refis f491929b3b matching: push simple types to flatten_pattern
Unfortunately since the function is exposed and used in translcore we
need to keep the generic one, and introduce a flatten_simple_pattern.
2020-06-06 18:46:34 +02:00