Commit Graph

20284 Commits (bdd9ca391e3a56253d7480b07bb1a8aac361904c)

Author SHA1 Message Date
Gabriel Scherer a5b6fd198a Makefiles: require only the bootstrap compiler for BEST_OCAMLDEP 2020-05-01 22:23:28 +01:00
Gabriel Scherer acbe348228
Merge pull request #9518 from dra27/fix-win-deps
Specify C compiler flags correctly in win32unix Makefile
2020-05-01 22:35:09 +02:00
Florian Angeletti 3903f9fab5 parmatch: normalize_pat is not used anymore 2020-05-01 21:58:28 +02:00
Gabriel Scherer 3527653363 matching: add a comment suggested by Florian Angeletti's review 2020-05-01 21:58:28 +02:00
Gabriel Scherer 50fdc06fcd [minor] matching.ml: tune ~scopes handling 2020-05-01 21:56:27 +02:00
Gabriel Scherer ac1243cbd1 matching: use heads in the make_*_matching specialization calls 2020-05-01 21:56:27 +02:00
Gabriel Scherer ae4621c03c Changes 2020-05-01 21:56:15 +02:00
Gabriel Scherer a26e509c57 matching: finally, merge matcher and Context.ctx_matcher 2020-05-01 21:56:15 +02:00
Gabriel Scherer 387955e189 matching: refine the types in Context.ctx_matcher 2020-05-01 21:56:15 +02:00
Gabriel Scherer 0f5a1c4d1e matching: consolidate all matcher_ functions in a single matcher_head
This commit is delicate and needs a careful review.

The `matcher_of_pattern` function is a temporary measure to reduce the
invasiveness of the patch, and make it easier to review.

(Note for reviewers: in the previous version the Record case had
a funny handling of Any, but it is in fact equivalent to just adding
omegas as we now do in all cases.)

There are two obvious directions for improvement:

- Get rid of matcher_of_pattern and pass a head directly to the
  various make_matching_* functions.

- Try to factorize this code with ctx_matcher which, it is now
  obvious, does essentially the same thing.

Another, less immediate area of attack would be to consider
a presentation of Pattern_head.t where the Any case can be statically
ruled out -- maybe the description could have two levels, one
isomorphic to option (Any or not?) and one for non-any heads.
2020-05-01 21:56:15 +02:00
Gabriel Scherer 97caf289b5 matching: specialize_matrix uses non-empty rows 2020-05-01 21:56:15 +02:00
Gabriel Scherer 67c56e6ec8 matching: matcher_* take Simple.pattern arguments 2020-05-01 21:56:15 +02:00
David Allsopp c8dcbac5c9 Update Changes entry 2020-05-01 11:19:26 +01:00
David Allsopp 7cfd81073e Remove unnecessary -MG from systhreads
It's use in runtime/Makefile is also clarified.
2020-05-01 10:33:48 +01:00
David Allsopp e3c4ba9cb9 Fix win32unix Makefile
EXTRACFLAGS should in fact be EXTRACPPFLAGS, which is now introduced and
used.
2020-05-01 10:13:14 +01:00
David Allsopp 5efcc1b474 AppVeyor: test dependency generation on msvc64 2020-05-01 09:53:01 +01:00
David Allsopp e5c8bee85e
Merge pull request #9332 from dra27/ocaml-dyndepend
Cease storing C dependencies in the repository
2020-05-01 07:36:02 +01:00
Nicolás Ojeda Bär e20736dda0
unboxed-primitive-args: test does not require unix (#9517) 2020-04-30 18:26:24 +02:00
Nicolás Ojeda Bär f52f00d76c
Merge pull request #9516 from xavierleroy/riscv-abi
RISC-V: Update C calling conventions to use the ELF psABI
2020-04-30 17:49:16 +02:00
Jeremy Yallop afe681cc16 Fix some issues in the Map documentation:
- Add the key argument in the description of 'merge'
  - Note that the keys of 'union f m1 m2' are a subset of the
    input keys, not all the keys, since

        bindings (union (fun _ _ _ -> None) m m) = []

  - Fix grammar in the descriptions of 'filter', 'union', 'merge'
  - Fix mismatched variable name in the description of 'partition'
  - Note that 'find' and 'find_opt' return values, not bindings
2020-04-30 16:10:00 +01:00
David Allsopp 42b8c20cce Fix instrumented-runtime test on OpenBSD 2020-04-30 15:52:50 +01:00
Xavier Leroy ea6896f9f1 Update C calling conventions to the RISC-V ELF psABI
The original implementation of loc_external_arguments and
loc_external_results was following an older ABI,
where an FP argument passed in an FP register "burns" an integer register.

In the ELF psABI, integer registers and FP registers are used independently,
as in the OCaml calling convention.  Plus, if all FP registers are used
but an integer register remains, the integer register is used to pass
the next FP argument.

Fixes: #9515
2020-04-30 16:20:46 +02:00
Xavier Leroy 16794b9405 Support FP reg -> int reg moves
Using instruction fmv.x.d.

This is necessary to implement the ELF psABI calling conventions,
whereas some FP arguments may have to be passed in integer registers.
2020-04-30 16:20:46 +02:00
David Allsopp c4684d9364 Add ocamlbuild to separated components 2020-04-30 13:38:52 +01:00
David Allsopp f5de44454f Configure GitHub issue tracker 2020-04-30 13:32:59 +01:00
David Allsopp 169aadbaa7 Add details of removed items to README.adoc 2020-04-30 13:32:49 +01:00
David Allsopp 1056187348
Merge pull request #9082 from Engil/eventlog_ctf
Eventlog tracing system
2020-04-30 12:24:38 +01:00
Enguerrand Decorne b7f0494df5 Rewrite the instrumented runtime to store traces in the CTF format.
The instrumentation code in the instrumented runtime was replaced
with new APIs to gather runtime statistics and output them in a new format
(Common Trace Format).
This commit also exposes new functions in the Gc module to pause or resume
instrumentation during a program execution (Gc.eventlog_pause and
Gc.eventlog_resume).
2020-04-30 10:32:01 +02:00
David Allsopp a9f7d74bcf Add snprintf_os 2020-04-30 10:31:30 +02:00
Jeremy Yallop 2e30946419
Support marshalling of bigarrays with dimensions that don't fit in 4 bytes (#8791)
Use a variable-length encoding (suggested by @stedolan) for dimensions that supports dimensions up to 2^64-1 each.

Change the marshalling identifier for bigarrays:_bigarray ~> _bigarr02
The identifier change reflects a change in the bigarray marshalling format.
2020-04-29 18:51:01 +02:00
Stephen Dolan 6923fd1590
fix module_coercion test on no-flat-floatarray mode (#9508) 2020-04-28 17:32:49 +01:00
Hannes Mehnert ec24f98bec
remove caml_init_ieee_floats() (#9506)
This used to call fpsetmask(0) on FreeBSD systems (< 4). FreeBSD 4 is not
anymore supported since 2007, it is safe to remove this code now.
2020-04-28 16:19:23 +02:00
Leo White f6e5592965
Merge pull request #9246 from lpw25/avoid-rechecking-functor-applications
Avoid rechecking functor applications
2020-04-28 12:04:47 +01:00
Stephen Dolan 81119c53d1
Merge pull request #9445 from jhjourdan/fix-statmemprof-flat-float-array
Alternative fix for statmemprof tests in `-disable-flat-float-array` mode
2020-04-28 09:54:52 +01:00
David Allsopp 9421eeae2c
Merge pull request #9507 from edwintorok/docs
Fix docs: runtime warnings are not enabled by default
2020-04-28 09:26:45 +01:00
Edwin Török f66e395c70 Fix docs: runtime warnings are not enabled by default
The docs on this are out of date: they say runtime warnings are enabled by
default, but the source code has a commit 6c90da4 pointing to
https://github.com/ocaml/ocaml/pull/210 that disables them by default.

It seems like enabling runtime warnings by default never made its way into a
release and the docs could just be updated to say that runtime warnings are
disabled by default.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
2020-04-27 21:38:58 +01:00
Jacques-Henri Jourdan 90871480d9 Fix statmemprof/callstacks.ml when --disable-flat-float-array is used.
We do this by using a specific reference file in the case this option is used.
2020-04-27 19:14:55 +02:00
Jacques-Henri Jourdan 687076d662 Remove redundancy in testsuite/tests/statmemprof/comballoc.ml 2020-04-27 18:45:16 +02:00
Stephen Dolan 8f85e002b2
Merge pull request #9096 from stedolan/backtrace-names
Print function names in backtraces
2020-04-27 14:51:15 +01:00
Stephen Dolan fa037cb0d6 Changes 2020-04-27 12:58:53 +01:00
Stephen Dolan fc2aee9429 Bootstrap 2020-04-27 12:58:53 +01:00
Stephen Dolan b7716c4625 Update testsuite with new backtrace format, and add test for names 2020-04-27 12:58:53 +01:00
Stephen Dolan 0040c5d783 Print function names (derived from Lambda.scoped_location) in backtraces
Function names now appear in backtraces and are available via Printexc.
2020-04-27 12:58:53 +01:00
Stephen Dolan 2986beaa78 Replace Location.t with Lambda.scoped_location in Lambda code
This commit threads scopes through translation from Typedtree to
Lambda, extending the scopes when entering functions, modules,
classes and methods.
2020-04-27 12:58:53 +01:00
Stephen Dolan a5292808d2 Introduce the Lambda.scoped_location type 2020-04-27 12:51:46 +01:00
Anarchos abfd5d87bb
Compiling for Haiku OS: network functions reside in libnetwork (#9486)
Compiling for Haiku : network functions reside in libnetwork
2020-04-27 10:36:28 +01:00
Xavier Leroy 080ac7421c
Update documentation for the Thread module and deprecate some functions (#9419)
- Deprecate Thread.kill, Thread.wait_read, Thread.wait_write
  for reasons explained in the documentation comments.
- Update documentation comments for Thread functions.
- Deprecate ThreadUnix module, documented as deprecated since 2002
  (commit 0a47a75d56).
- In the manual, remove leftover mentions of the VM threads
  implementation; focus on the system threads implementation.
- In the manual, remove the documentation of ThreadUnix.

Closes: #9206
2020-04-25 19:13:34 +02:00
Xavier Leroy 68c6f89409
Use diversion when calling external tools with a very long argument list (#9492)
It's not just on Windows that the length of the command passed to Sys.command
can exceed system limits:
- On Linux there is a per-argument limit of 2^17 bytes
  (the whole command is a single argument to /bin/sh)
- On macOS with default parameters, the limit is between 70000 and 80000
- On BSDs with default parameters, the limit is around 2^18.

In parallel, response files (@file) are supported by all the C compilers
we've encountered: GCC, Clang, Intel's ICC, and even CompCert.  They all
seem to follow quoting rules similar to that of the native shell
for the contents of the response file.

This commit forces the use of a response file when the total size of
the arguments to the linker is greater than 2^16.

Arguments passed via a response file are quoted using Filename.quote
as if they were passed on the command line.

Closes: #9482
Closes: #8549
2020-04-25 19:09:35 +02:00
Nicolás Ojeda Bär 1e98c52e93
Link std_exit.cmo into binaries compiled with -output-complete-exe (#9495) 2020-04-25 13:01:03 +02:00
Xavier Leroy 4d3b4311ac
configure: move -fexcess-precision=standard to the internal cflags (#9496)
Follow-up to c5afa9303.

The GCC option -fexcess=precision is supported for C but not for C++.

Some users use ocamlc -c or ocamlopt -c to compile C++ source files,
causing errors since -fexcess-precision=standard was added to the
common C flags in commit c5afa9303.

This commit moves -fexcess-precision=standard to the internal C flags,
so that ocamlc -c and ocamlopt -c will not apply it to C / C++ source files.
2020-04-24 18:00:05 +02:00