Commit Graph

2919 Commits (5f16c553161d1e8c425f93123be97fcd5c4490a9)

Author SHA1 Message Date
Leo White adc354c167
Merge pull request #9452 from lpw25/add-locations-to-docstring-attributes
Add locations to docstring attributes
2020-04-17 22:30:36 +01:00
Gabriel Scherer 9568154248
Merge pull request #9389 from Anukriti12/trunk
call_linker now returns exit_code for better user response on linking_error, fixes #7141
2020-04-17 17:05:56 +02:00
Florian Angeletti 9108648867
Merge pull request #9409 from Octachron/yet_another_implicit_deps_error
packed modtype lookup can fail due to missing cmi
2020-04-17 16:28:19 +02:00
David Allsopp c29450548a
Merge pull request #9057 from dra27/debugging-the-debugger
Aid debugging the debugger
2020-04-17 12:15:34 +01:00
Leo White a5da4162b1 Add Changes entry 2020-04-17 11:20:10 +01:00
octachron 35dbd85b3e packed modtype lookup can fail due to missing cmi
This commit removes an assert false and makes the missing
cmi case behaves like the abstract case.
2020-04-17 11:22:38 +02:00
David Allsopp 43c84d2750
Merge pull request #9335 from dra27/fix-stdlib-manpages
Correct implementation of --disable-stdlib-manpages
2020-04-17 10:17:16 +01:00
Leo White 59fac074fe
Merge pull request #9349 from lpw25/inline-hint
Add [@inlined hint] attribute
2020-04-17 08:27:58 +01:00
Xavier Leroy 67ada54ce3
Reimplement output_value using a hash table to detect sharing (#9353)
The previous implementation was doing temporary in-place modifications
of the OCaml value being marshaled.  This is incompatible with
Multicore OCaml.
2020-04-16 17:56:28 +02:00
Leo White 3dee10ec6a Add Changes entry 2020-04-16 15:58:09 +01:00
Gabriel Scherer 761383d597 Changes 2020-04-15 17:33:38 +02:00
Guillaume Munch-Maccagnoni b1fdc44547
Install a pretty printer for the Fun.Finally_raised exception (#9266) 2020-04-13 19:09:47 +02:00
Stephen Dolan 2208a4cbe6
Fix tail-call optimisation with a mutable ref (#9443)
Fix tail-call optimisation with a mutable ref
(Clet_mutable was not recognized properly in tail position.)

Add a test for tail-call optimisation with a mutable ref
2020-04-13 18:20:56 +02:00
Xavier Leroy 88a1bceb1b
configure: use cc as assembler with clang and for all FreeBSD platforms (#9437)
In recent FreeBSD, `cc` is Clang and `ld` is LLD, the LLVM linker, but
`as` is still GNU binutils.  Moreover, Clang contains its own
assembler and does not call `as`.  Consequently, object files produced
by invoking `as` directly are slightly different from those produced
by `cc`.

This can cause obscure errors such as issue #9068: `ld -r` fails when
combining objects produced by `as` and objects produced by `cc`.

The workaround is to use `cc` as the assembler.  We already did that
for the ARM and ARM64 targets, but #9068 shows that it is necessary
for AMD64 too.  Just use `cc` as assembler for all FreeBSD targets.

Similar issues were reported under Linux when clang and LLD are used
instead of GCC and binutils.  We already used clang as the preprocessed
assembler in this case.  Also use clang as the assembler in this case.

Closes: #9068
2020-04-11 11:17:11 +02:00
Xavier Leroy 286d4d6390 Update Changes for PR#9426 2020-04-08 19:17:36 +02:00
Jacques Garrigue d67c704c4d
In `{expr with ...}`, always evaluate `expr` even if all labels are redefined (#9432)
This commit reverts c1a7ace (originally c545e04), which was a
temporary fix that is no longer needed because it was superseded by
#6608.

The temporary fix caused `{expr with lbl1 = e1; ... }` to not evaluate
`expr` if all labels of its type are overriden.  As reported in #7696
this is not desirable.  Reverting the temporary fix causes `expr` to
be evaluated always.

As a consequence, a corner case of value "let rec" is no longer accepted.
The corresponding test was updated.

Closes: #7696
2020-04-08 18:58:43 +02:00
Xavier Leroy 3d4564c54b Update Changes 2020-04-08 10:13:19 +02:00
Xavier Leroy d235f167fa
PowerPC, System Z: do not reset backtrace_pos in caml_raise_exception (#9428)
* PowerPC, System Z: do not reset backtrace_pos in caml_raise_exception
* Add Changes entry
2020-04-07 15:47:55 +02:00
Gabriel Scherer 2e82c0e843 Changes entry for the refactoring of the pattern-matching compiler 2020-04-07 15:25:06 +02:00
Gabriel Scherer 7bc2663a0e
Merge pull request #9422 from Anukriti12/gcd
replaced fib example with gcd in coreexample.etex
2020-04-07 15:08:58 +02:00
Florian Angeletti abda688b03
Merge pull request #1706 from Octachron/extension_disambiguated_bis
Spellchecker hints and type-directed disambiguation for extensible variants: bis
2020-04-06 11:28:37 +02:00
Anukriti12 97b9bed89e replaced fib example with gcd in coreexample.etex 2020-04-05 16:54:36 +05:30
octachron 4f9f41e73a disambiguation for extension constructors
This commit exposes all extension constructors when looking up for
a construction with a given type in the environment.

This makes constructor disambiguation work for extension constructors.

Going one step further, when the name of an extension constructors
is misspelled, we cannot rely on the type to find all possible
names. However, since we are in an error path, we have some
path at hand.
Thus, this commit alters the "lookup_from_type" function in the
Constructor module to make it scan the whole environment for
extension constructors with the right type.

This commit should not change anything for labels and standard constructors.
2020-04-03 16:05:23 +02:00
Gabriel Scherer 1d76e2ca91
Merge pull request #9365 from gasche/Set-Map-filter_map
Map.filter_map and Set.filter_map
2020-04-02 17:59:51 +02:00
Gabriel Scherer 86066c8a59 Changes -- and justification.
On my machine, running the whole testsuite generates 1.5Gio of test
data. I have 11 workdirs for the OCaml repository (versions from 4.08
to trunk, plus several experimental workdirs); at any point in time
there can be more than a dozen gibibytes of test data on my disk, and
this is too much.

I use the test data saved by ocamltest when a test fails, to diagnose
the failure. I don't remember ever looking at the test data of
a succesful test.

The present patchset changes ocamltest to, by default, discard the
test directory of succesful tests -- the test artefacts are kept only
when there is a failure.

If one wishes to preserve the test data of succesful tests, one should
explicitly pass the -keep-test-dir-on-success flag. The
testsuite/Makefile is then changed to pass this flag if the user set
the KEEP_TEST_DIR_ON_SUCCESS variable to a non-empty value.
2020-04-02 16:19:56 +02:00
Gabriel Scherer 017d4a3ead
Merge pull request #9254 from gasche/memprof-record
Gc.Memprof.start: take a record instead of 5 optional parameters
2020-04-02 02:27:55 +02:00
Gabriel Scherer ff6b20098f Gc.Memprof.start: take a record instead of 5 optional parameters
The Gc.Memprof module provides a low-level API, that will hopefully be
paired with user libraries that provide high-level instrumentation
choices.

A natural question is: how are the higher-level API going to expose
their choice of instrumentation to their users? With the current
Memprof.start API (before this patch), they would have to either
provide their own `start` function wrapping Memprof.start, or provide
a tuple of callbacks for to their users to pass to Memprof.start
themselves.

    val start : params -> unit
    (* or *)
    val callback : params ->
      ((allocation -> foo option) * (allocation -> bar option) * ... )

With an explicit record, it is easier for libraries to expose an
instrumentation choice (possibility parametrized over
user-provided settings):

    val tracker : params -> (foo, bar) Gc.Memprof.tracker

In addition, providing a record instead of optional parameters makes
it much easier to provide "default settings" (helper functions) that
instantiates the types `'minor` and `'ḿajor`, see for example
`simple_tracker` in this patch (which stores the same information for
the minor and major heap, and does not observe promotion), or to later
define checking predicates that can verify that a given choice of
callbacks is sensible (for example: providing a major-dealloc callback
but no promotion callback (dropping all tracked value on promotion) is
probably not a good idea).

Bootstrap: to avoid requiring an awkward bootstrap, this commit keeps
the (now unused) function caml_memprof_start_byt unchanged -- it is
used in the bootstrap binaries, so removing it would break the
build. The intention is to remove it in the following commit.
2020-04-01 16:37:28 +02:00
Jeremie Dimino 05c209f5c9 Move changelog entry for #9344's fix in 4.10 section
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2020-04-01 14:41:28 +01:00
Gabriel Scherer 1cd6e4451f Map.filter_map and Set.filter_map 2020-03-31 15:01:41 +02:00
Anukriti12 7feaeb52a1
Merge branch 'trunk' into trunk 2020-03-31 15:50:39 +05:30
Gabriel Scherer f8758a8bf8
Merge pull request #9403 from muskangarg21/warn67
Added warning 67 description and nitpick for "."
2020-03-31 10:34:34 +02:00
muskangarg21 e831b47457 Added: Warning 67 description. 2020-03-30 21:51:54 +05:30
Sébastien Hinderer d51d823326
Merge pull request #9222 from gasche/fix-ocamltest-dependencies
fix Makefile dependencies of ocamltest
2020-03-30 17:31:58 +02:00
YOSHIMURA Yuu 49d0580093
Remove sudo:false in .travis.yml (#9402) 2020-03-28 17:15:48 +00:00
Gabriel Scherer f4915d5f20 minor Changes change 2020-03-28 16:48:30 +01:00
octachron 3e7de343e7 fix attribute examples in the manual 2020-03-27 17:12:23 +01:00
muskangarg21 4019c33aaa
Stdlib: added Printf.ikbprintf, Printf.ibprintf (#9364) 2020-03-26 14:28:00 +01:00
Greta Yorsh 824ce35492
Replace caml_int_compare and caml_float_compare with primitives (#2324) 2020-03-26 10:58:10 +01:00
Gabriel Scherer bc3246c528
Merge pull request #9374 from muskangarg21/refactor
Refactor typing/typeclass.ml class environments
2020-03-25 21:50:56 +01:00
Stephen Dolan b4e34ae220 Fix Changes entry 2020-03-25 15:31:53 +00:00
muskangarg21 52dc5d793b [Refactor]: Typing/typeclass.ml 2020-03-24 04:33:45 +05:30
Anukriti12 8f235efdf5 call_linker now returns exit_code for better error response on linking_error, fixes #7141 2020-03-23 06:12:05 +05:30
David Allsopp e4f3aa8c81 Don't assume . in AWKPATH
Ensure all script invocations explicitly refer to a directory.
2020-03-20 09:38:33 +00:00
Jérémie Dimino c7de942730
Fix #9344 (#9368)
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2020-03-17 11:38:45 +00:00
Stephen Dolan 6246d5ce03
Merge pull request #9367 from stedolan/unify-backtraces
Make bytecode and native-code backtraces agree
2020-03-17 10:45:34 +00:00
Florian Angeletti 3dd86faa2c
Merge pull request #9357 from muskangarg21/makedepend
[Ocamldep] [TOOLS] : -nocwd argument to not include current dir to search path
2020-03-17 10:18:31 +01:00
Gabriel Scherer 18e545207d
Merge pull request #9362 from stedolan/memprof-debuginfo-fix
Avoid looking up nonexistent Comballoc debuginfo
2020-03-17 06:57:02 +01:00
Stephen Dolan 97f15cde1c Changes entry 2020-03-16 18:15:09 +00:00
Jérémie Dimino e54876a869
Add a new toplevel directive #use_output "<command>"
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
Co-authored-by: David Allsopp <david.allsopp@metastack.com>
2020-03-16 17:48:41 +00:00
muskangarg21 e0b31a6abc TOOLS: Ocamldep arg to not include current dir to search path 2020-03-16 01:00:08 +05:30