Commit Graph

19810 Commits (d0bab08f15c768c07bc88547043e26237b69085e)

Author SHA1 Message Date
Stephen Dolan 060f6e8e47 Avoid scanning the stack twice when collecting callstacks in Memprof. 2020-02-03 10:51:53 +00:00
Pieter Goetschalckx 99224a96b7
Quoted extensions in comments, ocamllex and ocamlyacc (#9166)
* Support quoted extensions in comments
* Support quoted extensions in ocamllex
* Support quoted extensions in ocamlyacc
* Fix copying of comments in ocamlyacc
2020-02-03 10:55:28 +01:00
Daniel Bünzli 47b9410b33 objinfo: print cm[x]a extra C object, options and dlls in the cli order.
Follow up to #4949. Closes #9276.
2020-01-31 15:12:47 +01:00
Florian Angeletti c7b1fe8513
manual: a cautionary internal runtime API section (#9257) 2020-01-31 13:54:31 +01:00
Florian Angeletti 38230a7fa7
Merge pull request #9274 from Octachron/unload_module_lookup
Printtyp: don't touch the file system
2020-01-31 13:44:57 +01:00
Daniel Bünzli 45d480a8fa Cm[ox]_format: document fields that are stored in reverse order. 2020-01-31 11:20:17 +01:00
Gabriel Scherer 5d3fc5692a
Merge pull request #9271 from stedolan/bytecode-backtrace-fix-again
Fix bytecode backtrace generation when large integers are present.
2020-01-31 08:57:11 +01:00
Florian Angeletti 51292c2956 Printtyp: don't read cmis when printing
This commit adds a function in Printtyp for searching elements of
the printing environment without reading cmis.
This function is used to ensure that the printing of types does not
trigger unrelated errors by trying to access cmis on the file system.
2020-01-30 18:07:59 +01:00
Florian Angeletti 11b57a7027
Merge pull request #9157 from mkarutz/noalloc-master-lock-docs
Added [doesn't release the master lock] constraint to [@@noalloc] doc.
2020-01-30 13:56:01 +01:00
Gabriel Scherer e1addb7962
Merge pull request #9269 from Octachron/fix_annot
#9218: wrong file name error with -annot and inline records
2020-01-30 08:41:20 +01:00
Malcolm Karutz 33347f87a2
Added forward reference to "master lock" 2020-01-30 10:44:16 +08:00
Florian Angeletti 807c162069 Move change to 4.10 2020-01-29 17:06:10 +01:00
Florian Angeletti 5302b09764
ci: check the prefixing policy for runtime symbols (#9260)
* ci: check runtime symbol policy on travis and Appveyor
* tune check-symbol-names:
** ignore all local symbol
** ignore Caml_ prefix
** ignore x86: pic-related symbols
** windows: ignore debugging, unicode and wmain symbols
2020-01-29 15:30:15 +01:00
Arseniy Alekseyev 315620d22f
Merge branch 'trunk' into faster-Weak.blit 2020-01-29 13:30:09 +00:00
Stephen Dolan 8dd88c792d Fix bytecode backtrace generation when large integers are present.
Again.
2020-01-29 10:14:33 +00:00
Gabriel Scherer b237282e97 Merge pull request #9270 from gadmm/doc_stack_overflow
Documentation: Stack_overflow is reliable, Out_of_memory is not.
(cherry picked from commit 84f62eee5d26efb936cde0e799b7aaa39e46c010)
2020-01-29 11:08:57 +01:00
Gabriel Scherer 13ab6b4a64
Merge pull request #2188 from rlepigre/recursive-yet-unboxed
Recursive yet unboxed
2020-01-29 10:16:33 +01:00
Florian Angeletti 62699c1ce3 review 2020-01-29 10:00:15 +01:00
Gabriel Scherer 7e41a961e9
Merge pull request #9268 from stedolan/bytecode-backtrace-fix
Fix bytecode backtrace generation when large integers are present
2020-01-28 22:39:30 +01:00
Stephen Dolan d0e0cc8280
Merge pull request #9230 from stedolan/memprof-native
Memprof support for native allocations
2020-01-28 16:59:11 +00:00
Florian Angeletti 9f696f0a8e 9218, avoid module/type path collitsion
In presence of -annot, the type printer can be requested to print the
inner path of inline records (i.e "t.A"). Before this commit, the
printing of these paths could trigger a lookup to a module with a
invalid name "t".
If this lookup fails this is fine.
However, if there is a cmi file in the environment sharing the name "t",
the lookup can partially succeed (since cmi are not required to start
with a capital letter) until we compare the module name stored in the
cmi with the requested module name.
Obviously, the valid module name "T" of the cmi cannot match the invalid
module name "t" that was requested, and the cmi reader raises a wrong
module file name error.

This commit avoids this whole process by detecting in the type printer
when we are printing an inlined record type constructor.
2020-01-28 16:30:56 +01:00
Arseniy Alekseyev 5903aa0f70 Small optimization: don't clean the keys about to be overwritten 2020-01-28 15:04:35 +00:00
Arseniy Alekseyev e447fb152b Make `Weak.blit` and `Ephemeron.blit_key` faster 2020-01-28 15:04:07 +00:00
Stephen Dolan 994cf75fbc Fix bytecode backtrace generation when large integers are present 2020-01-28 15:00:11 +00:00
Jacques-Henri Jourdan ca5f81ccd0 Fix callstack test by forcing flambda not to optimize. 2020-01-28 14:47:20 +00:00
Jacques-Henri Jourdan 35104694b5 Fix test comballoc.ml 2020-01-28 14:47:20 +00:00
Gabriel Scherer e940f925ad typedecl_separability: handle GADT equations in a more predictable order
The separability signature of a type declaration is not inferred in
a principal way, it depends on the order in which GADT equations are
processed. In non-principal cases, we may have two parameters that are
related by an equality, with one of them being given mode Ind and the
other Sep. Either choice of which to make Sep is sound, but (Ind, Ind)
would be unsound.

We change the implementation to ensure that equations are processed in
an order such that the lefmost parameters are the most constained: if
equations imply that ('a = 'b), with the parameter 'a coming before 'b
in the type declaration, and they must be separable, then 'a gets the
mode Sep and 'b gets the mode Ind. This corresponds intuitively to
remembering that 'b is equal to a previous parameter, instead of
remembering than 'a is equal to a not-seen-yet parameter.
2020-01-28 13:56:23 +01:00
Gabriel Scherer 6bf7e16f8e changes from review comments 2020-01-28 13:56:23 +01:00
Rodolphe Lepigre e8533dcb0e Update changelog. 2020-01-28 12:09:33 +01:00
Gabriel Scherer c62c9d19f9 separability: add some interesting examples to the testsuite 2020-01-28 12:09:33 +01:00
Gabriel Scherer 96f1ad4e63 bootstrap 2020-01-28 12:09:33 +01:00
Rodolphe Lepigre 15a6ff229d typedecl: use the new Separability implementation, remove old code
Because this changes the separability of standard library types, and
those separabilities are stored in the .cmi files, this commit changes
the .cmi files in the standard libraries in way that appear to require
a bootstrap (it looks like some part of the stdlib is built with
boot/ocamlc and others with ocamlc, and the two should produce/expect
the same .cmi exactly). The bootstrap will come as a separate commit.
2020-01-28 12:09:33 +01:00
Rodolphe Lepigre dd5f8d3d4d typedecl_separability: expose the generic Typedecl_properties interface 2020-01-28 11:39:52 +01:00
Gabriel Scherer cc61027a8e typedecl_separability: protect against infinite cyclic types 2020-01-28 11:39:52 +01:00
Gabriel Scherer 87d3664a1d typedecl_separability: support for GADTs 2020-01-28 11:39:52 +01:00
Rodolphe Lepigre f3fc46adb5 typedecl_separability: support for algebraic datatypes (non-GADTs) 2020-01-28 11:39:52 +01:00
Gabriel Scherer 63f05ad962 bootstrap 2020-01-28 11:39:52 +01:00
Gabriel Scherer 358c7cecd5 add separability signatures in type declarations
(this changes the .cmi format and thus requires a bootstrap,
to follow as a separate commit)

(includes bug fixes by Rodolphe Lepigre)
2020-01-28 11:39:52 +01:00
Gabriel Scherer d87c2104f2 typedecl_separability: destructure type definition to access unboxing information
In the future, we could move the arity-related checks
(one constructor, one parameter) and error logic from typedecl.ml to
typedecl_separability.ml.
2020-01-28 11:39:52 +01:00
Rodolphe Lepigre beb750b5ee typedecl_separability: interfaces and basic definitions, implementations missing 2020-01-28 11:39:52 +01:00
Rodolphe Lepigre 20b62c8386 Cleaned up [@@unbox] validity check. 2020-01-28 11:39:52 +01:00
Kate 6aa2ceaf08 Avoid inclusion of caml/roots.h to fail when CAML_INTERNALS is defined but not CAML_NAME_SPACE (#9241)
* Avoid inclusion of caml/roots.h to fail when CAML_INTERNALS is defined but not CAML_NAME_SPACE

* preserve documentation

Co-authored-by: Florian Angeletti <octa@polychoron.fr>
(cherry picked from commit 51b5a6fe874b20fcfb1d88e38e37856de80613a8)
2020-01-27 17:21:27 +01:00
Florian Angeletti b131dd935f make ff_merge_block static (#9262) 2020-01-27 13:27:11 +01:00
Armaël Guéneau f8047f7c29
Merge pull request #9263 from sonologico/printexc-default-uncaught-exception-handler
Add Printexc.default_uncaught_exception_handler (issue #9248)
2020-01-26 12:31:56 +01:00
Raphael Sousa Santos c9d7cc7da4 Add Printexc.default_uncaught_exception_handler (issue #9248)
Printexc.uncaught_exception_handler ceases to be an option ref and becomes
a ref to the handler function initialized to
Printexc.default_uncaught_exception_handler.
2020-01-26 12:00:27 +01:00
Stephen Dolan 8633c32525 Distinguish "0" from "don't care" in caml_current_callstack_write. 2020-01-25 22:55:56 +01:00
Stephen Dolan 2ab32f4772 Comments per review. 2020-01-25 22:55:56 +01:00
Stephen Dolan f874b3ee01 Memprof: report different callstacks for different combined allocations 2020-01-25 22:55:56 +01:00
Stephen Dolan 07bf49db5b Statmemprof support for native allocations (incl. Comballoc) 2020-01-25 22:55:56 +01:00
Gabriel Scherer d408e58ea1
Merge pull request #9261 from lthls/rec_check_ignore_fix
Fix soundness bug in Rec_check with anonymous let module
2020-01-24 22:06:37 +01:00