Commit Graph

18341 Commits (bcfb3d2fa91b0b92193c6680867d04e772582094)

Author SHA1 Message Date
Nicolás Ojeda Bär bcfb3d2fa9
Merge pull request #8518 from nojb/dynlink_linall_doc
dynlink: add doc about -linkall
2019-03-19 06:51:03 +01:00
Nicolás Ojeda Bär b43bf50bbf
Merge pull request #8509 from nojb/fix_unix_tests
Actually run all lib-unix tests
2019-03-19 06:43:33 +01:00
Nicolás Ojeda Bär 1d98b394db Simplify 2019-03-18 19:58:05 +01:00
Nicolás Ojeda Bär fe83737cbb dynlink: add doc about -linkall 2019-03-18 16:55:16 +01:00
Nicolás Ojeda Bär 31f4c37080 Fix lib-unix/common/process_pid test 2019-03-18 16:32:46 +01:00
Nicolás Ojeda Bär cc8457f72e Actually run all lib-unix tests 2019-03-18 16:29:42 +01:00
Jérémie Dimino c413136fa3 Delete otherlib/{graph,win32graph} (#2318)
The Graphics library is now distributed as a separate package.
The sources are at https://github.com/ocaml/graphics .

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-03-18 15:05:57 +01:00
Mark Shinwell 0933593596 Fix ppc64 TOC load for exception handler addresses (#8506)
The address was loaded from the TOC into register r0.  This generated  bad code in the "big TOC" case, as r0 was used as index register.  The fix is to use another temporary register instead of r0.
Add "arch_power" builtin to ocamltest.
Add test case.
2019-03-18 13:31:57 +01:00
Nicolás Ojeda Bär db1e59d727
Merge pull request #8507 from mshinwell/flambda_name_mangling
Shorten symbol names of anonymous functions in Flambda mode
2019-03-18 12:31:01 +01:00
Mark Shinwell c843e2dd72 Changes 2019-03-18 10:57:01 +00:00
Mark Shinwell c4272f7fe5 Shorten symbol names of anonymous functions in Flambda mode 2019-03-18 10:57:01 +00:00
Stephen Dolan 4f03a1467d
Merge pull request #2293 from stedolan/named-value-const
Make caml_named_value return a const value*
2019-03-18 09:45:02 +00:00
Stephen Dolan 838e44a245
Update issue numbers in comments after Mantis -> Github migration. (#8505) 2019-03-18 09:42:23 +00:00
Mark Shinwell e3a62eef91
Add Compute_ranges pass (#2291) 2019-03-18 08:52:34 +00:00
Xavier Leroy c5efbb42a4
MPR#3249: ocamlmklib does not support .cmxa files as arguments (#8512)
That's because ocamlopt -a doesn't support .cmxa files as arguments.
It is better to reject those files in ocamlmklib than later.
The manual never said that ocamlmklib accepts .cmxa files.

Closes: #3249
2019-03-18 09:11:36 +01:00
Florian Angeletti 798dc35c9e
manual: refresh moduleref macro (#8508) 2019-03-16 20:47:20 +01:00
Mark Shinwell 2cc1ea26b9 Remove gprof support (#2314)
This commit removes support for gprof-based profiling (the -p option to ocamlopt).  It follows a discussion on the core developers' list, which indicated that removing gprof support was a reasonable thing to do. The rationale is that there are better easy-to-use profilers out there now, such as perf for Linux and Instruments on macOS; and the gprof support has always been patchy across targets. We save a whole build of the runtime and simplify some other parts of the codebase by removing it.
2019-03-16 19:56:53 +01:00
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 c58cddf219 Add const annotation to win32unix 2019-03-12 12:07:34 +00:00
Stephen Dolan 17ad05b55a Changes 2019-03-12 12:07:34 +00:00
Stephen Dolan 850eb1bce6 Use generational_global_root for named values.
This is a mild optimisation, valid now that named values cannot
be modified directly from C code.
2019-03-12 12:07:04 +00:00
Stephen Dolan 9f0bebf7f7 Make caml_named_value return a const value*.
This commit just adds "const" in several places.
2019-03-12 12:07:04 +00: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