Commit Graph

18320 Commits (e141d9e2401d01c6ecb34ba7bf11dc1e50024437)

Author SHA1 Message Date
Mark Shinwell e141d9e240
Add a few utility functions in Misc (#2284) 2019-03-15 11:28:19 +00:00
Thomas Refis 3755f8f576 main_args: remove some redundancy in Ocamldoc_options. 2019-03-15 10:57:06 +00:00
thierry-martinez 815c275529 Fix documentation for Result.bind: return [f v] and not [Ok (f v)] (#8503) 2019-03-15 00:37:20 +01:00
Nicolás Ojeda Bär bd69c678c2 Add CSV file with Mantis=>GitHub renumbering information 2019-03-15 00:01:48 +01:00
Mark Shinwell 618e5dbfbd More debugging information in Cmm terms (#2308)
Following on from GPR#851 and GPR#873, this pull request further enhances debugging information in Cmm terms. This was driven both by manually examining the debugger's behaviour and also by a report received from a user regarding substandard DWARF location information.
2019-03-13 15:40:04 +00:00
Mark Shinwell 0bd539ae24 GPR#2082: New option -no-insn-sched 2019-03-13 15:03:49 +00:00
Vincent Laviron baa1888f4e Reuse the variable introduced in GPR#2083 for integer operations symbols (#2260)
No change entry needed
2019-03-13 11:58:34 +00:00
Jérémie Dimino 9387160a21 Delete old compatibility from the bigarray stubs (#2315)
The compatibility macros (that were introduced while moving bigarray file mapping functions to the Unix library) are no longer necessary, so let's get rid of them.

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-03-13 11:51:02 +01:00
Sébastien Hinderer 58cfcb6589 Update Changes 2019-03-13 10:49:31 +00:00
Sébastien Hinderer 5b5513963b Fix detection of assembler on some platforms
This commit fixes MPR#7919
2019-03-13 10:49:31 +00:00
Sébastien Hinderer f48b107bc7 Clarify the invocation of the C preprocessor
Most of the time, the C preprocessor needs to be invoked through the C
compiler, e.g. so that the paths to the header files are resolved properly.
In some cases, though, we really need to be able to call the C
preprocessor directly, just to expand macros in .ml files (this only
happens in the testsuite, at the moment). In those cases, it is
simply impossible to call the C preprocessor through the compiler,
e.g. because this would require the input files to have a '.c'
extension, which the OCaml compiler would misinterprete as meaning this file
should be compiled with the C compiler.

Thus, this commit clarifies the distinction between CPP and DIRECT_CPP
and provides both variables to the build system. The ocamltest build system
is also updated to take advantage of this.

We rely on autoconf's macros to detect how to call the C preprocessor
via the C compiler, except for the MSVC port where its value is hard-coded
to guarantee backward compatibility.
2019-03-13 10:49:31 +00:00
Mark Shinwell 36c163248d Remove support for compiler plugins (#2276)
After consultation on the core developers' list I am proposing this patch to remove support for compiler plugins.

The main motivations for removing compiler plugins are:
- They are a potential security risk.
 - They increase the complexity of the build system and make maintenance of the Dynlink libraries more difficult (although actually, this complexity could probably be reduced after #2268 is merged).
 - Many applications of plugins should be able to be expressed by building custom compiler drivers that link against compilerlibs.

* Remove compiler plugins and hooks
* Add new function Dynlink.unsafe_get_global_symbol but keep it outside the documented API.
* Remove otherlibs/dynlink/nodynlink.ml
* Update Changes
2019-03-13 11:46:37 +01:00
Oxana Kostikova f5ab75bd63 MPR#7548 Add an example of using the printf function to the manual (#2272)
* Creating a new section in the first chapter of the manual

* Add an introduction of custom printer for int

* Add an easy example of %a combinator

* Add an example of using the printf function on complex data structure
2019-03-13 10:49:45 +01:00
David Allsopp 6e84987715 Restore -vmthreads flag as an error (#2312)
This GPR restores -vmthread with an adapted version of the deprecation message as an error message and also keeps the use_vmthreads part of ppx contexts.

* Partially revert #2289
* Convert -vmthread to an error
* Neuter use_vmthreads in ppx context
* Remove Clflags.use_vmthreads
2019-03-13 10:46:30 +01:00
Stephen Dolan f9099524e2
Merge pull request #2305 from mshinwell/selectgen_env
Propagate environments further in Selectgen
2019-03-12 12:05:14 +00:00
Sébastien Hinderer 2ac104cd3c Update Inria's bootstrap CI job
This commit adapts Inria's bootstrap CI job to take into account the
removal of the threads library. More precisely, it updates the patch
that removes the sinh primitive from the runtime to not patch
otherlibs/threads/stdlib.ml any longer since this file has been removed
from the repository.
2019-03-12 03:33:26 +01:00
Sébastien Hinderer 32dc5b8290 Fix typo in CI script 2019-03-12 03:28:20 +01:00
Nicolás Ojeda Bär 29d139c838
Merge pull request #2310 from nojb/vmthreads_fix
Makefile: adapt to removal from vmthreads
2019-03-11 21:56:17 +01:00
Nicolás Ojeda Bär 612dbf1b74 Makefile: adapt to removal from vmthreads 2019-03-11 20:52:17 +01:00
Jérémie Dimino 705054b346 Delete the vmthreads library (#2289)
* Delete the deprecated vmthreads library

It was deprecated in 4.08.

* Remove the byte/native argument of init_path

It is no longer necessary.

* Error out when passing --{enable,disable}-vmthreads to ./configure

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-03-11 19:38:16 +01:00
Gabriel Scherer f9e64906a5
Merge pull request #2307 from Julow/hint_num_infix
Hint on type error on int operators
2019-03-11 17:21:19 +01:00
Jules Aguillon 0eefeae92f Changes 2019-03-11 13:52:55 +01:00
Jules Aguillon 0bc5b7164c Tests 2019-03-11 13:27:48 +01:00
Jules Aguillon a241675676 Fix tools/caml-tex printing of sub message locations
List printer fields explicitly to avoid the same problem from happening again
2019-03-11 13:27:48 +01:00
Xavier Leroy 187ceb63a0
MPR#7903: make Thread.delay interruptible again (#2306)
In OCaml 4.07, Unix.sleepf and Thread.delay were changed so that they
would restart the sleep when interrupted by a signal (error EINTR).

The unintended consequence is that Thread.delay will not run
signal handlers until the full delay has expired.  If the effect
of the handler is to raise an exception, as with Sys.catch_break,
the delay is not terminated early.

(This is specific to threaded programs, where asynchronous invocation
of signal handlers is turned off and handlers are only run at the next
leave-blocking-section.  Using Unix.sleepf in a non-threaded program
doesn't show the issue because the handler is invoked asynchronously.)

This commit implements a more intuitive behavior, closer to that of 4.06:
signals received during Thread.delay are handled immediately, and if
the handler returns normally, the delay is restarted with the remaining time.

A test is added in testsuite/tests/lib-threads/delayintr.ml
2019-03-11 09:33:18 +01:00
Jules Aguillon d926fdb9f8 Add hint on numeric operator type clash 2019-03-11 01:58:52 +01:00
Jules Aguillon e1ca14da22 Refactor report_error to return a Location.error 2019-03-10 23:48:17 +01:00
Nicolás Ojeda Bär 3bde063f20 nodynlink.ml: add missing definition for run_shared_startup 2019-03-10 10:14:19 +01:00
Gabriel Scherer aaea44cd87
Merge pull request #2262 from proux01/printf-F
Enforce precision in printf %F
2019-03-09 18:48:29 +01:00
Pierre Roux ed74b5b237 Enforce precision in printf %F 2019-03-09 12:03:43 +01:00
Gabriel Scherer 0c9b121661
Merge pull request #2301 from Julow/warning_int_literal
Hint on type error on int literal
2019-03-08 19:03:06 +01:00
Mark Shinwell 765c4e659f Whitespace 2019-03-08 16:51:40 +00:00
Jules Aguillon 241f90a554 Changes 2019-03-08 16:37:49 +01:00
Jules Aguillon 6794943b32 Implements on patterns 2019-03-08 16:37:49 +01:00
Jules Aguillon 9ab5efc1ec Add hint on int literals where expecting int32 or int64 literal 2019-03-08 16:37:49 +01:00
Jules Aguillon 109f0b2b34 Add the explain function to Ctype.Unification_trace 2019-03-08 16:37:49 +01:00
Mark Shinwell 24e12ad9e1 Propagate environments further in Selectgen 2019-03-08 13:06:31 +00:00
Mark Shinwell d47ba6ec18
Functorize Consistbl (with some background info on Compilation_unit.t) (#2286) 2019-03-07 16:19:51 +00:00
Nicolás Ojeda Bär 9dda8fae43
Merge pull request #2297 from nojb/fix_dynlink_shared_startup
Dynlink: run _shared_startup only once per plugin
2019-03-07 14:50:52 +01:00
Vincent Laviron 1dba5329a2 Linearize: for Trywith, remove the jump/call to the handler (#2237) 2019-03-07 10:37:22 +00:00
Nicolás Ojeda Bär a097dfabfd Update Changes 2019-03-07 11:18:58 +01:00
Mark Shinwell 784c9da23c Remove IA32 macOS (Darwin) support (#2278)
This patch removes support for 32-bit Darwin (macOS, iOS, etc) targets on Intel hardware. This enables various special cases to be removed in the i386 backend.  

The current version of macOS (Mojave) is the last one that will support 32-bit x86 binaries.  The current version of iOS does not support execution of 32-bit binaries any more.
2019-03-07 11:12:00 +01:00
Nicolás Ojeda Bär 8da6a7d4d2 Dynlink: run _shared_startup only once per plugin 2019-03-07 11:10:19 +01:00
Florian Angeletti 00c18be73c MPR#7937: avoid Unify in extract_concrete_typedecl (#2287) 2019-03-07 16:06:00 +09:00
Mark Shinwell c975b15de4 List prefix functions for Misc.Stdlib.List (#2283) 2019-03-06 11:59:03 +01:00
Ulugbek Abdullaev 8b1fda569d Added tutorial on Lazy expressions to tutorial section of manual (#2273)
* Added tutorial on Lazy expressions to the tutorial of manual
* Modified tutorial on Lazy expressions to make it easier to understand
* Add small modifications in wording and a better lazy pattern matching example
* Add minor modification
* Change wording regarding <lazy> as a display of value
* Change a word
* Append Changes to mention the added tutorial
* Add GPR number
2019-03-05 21:51:30 +01:00
David Allsopp 1befa5bb3e Ensure failed build terminates AppVeyor run
The mingw32 build log is post-processed for AppVeyor, but this was done
without setting -o pipefail.
2019-03-05 17:49:28 +00:00
Mark Shinwell 7cb0da58f1
Don't generate Clambda constants during Cmmgen, etc. (#2280) 2019-03-05 17:09:40 +00:00
Gabriel Scherer 3efa0394bb
Merge pull request #2184 from lthls/contrib-bench
Add benchmarking section to CONTRIBUTING.md
2019-03-05 14:34:33 +01:00
Florian Angeletti 3b78da59a1
Merge pull request #2282 from gasche/mpr7936
manual: remove duplicate table of contents in the 'objects' tutorial chapter
2019-03-04 17:30:34 +01:00