Commit Graph

980 Commits (974733bb8a0fd71f2dc2d0b945d3cb7167d09eb3)

Author SHA1 Message Date
alainfrisch 129df0ae09 Fix Changes file. 2016-01-18 11:11:39 +01:00
Mark Shinwell f4443180f8 merge with ocaml/trunk 2016-01-18 08:34:56 +00:00
Mark Shinwell b36f05bb34 Changes entry for GPR#431 2016-01-18 08:34:33 +00:00
David Allsopp 124672aa13 Filter out the display of .c files by MSVC
Microsoft's C Compiler displays several lines on every invocation - most
of this is removed by specifying the /nologo command line option, but
the compiler still displays the name of every C file it compiles. The
Microsoft Macro Assembler (MASM) does the same thing, but ocamlopt by
default is able to pipe the output of that command directly to NUL, as
the assembler code should never produce errors.

The same cannot be done for invocations of the C compiler, as obviously
syntax errors must be displayed. This relative small cosmetic change
pipes the output of cl to a temporary file and filters out the first
line if it is exactly as expected. The most elegant solution would
require pipes and process handling to be merged from the Unix module
into the compilers.
2016-01-17 19:21:45 +00:00
David Allsopp b46843fb69 Allow compilation using bootstrapped FlexDLL
Extend the previous patch allowing make -f Makefile.nt flexdll
install-flexdll not to require the install-flexdll stage.

OCAML_FLEXLINK is utilised as required to allow compilation of the entire
system using an in-tree compiled flexlink. The build process simply
required the flexdll target to appear before world.

opt.opt compiles a native code version of flexlink.exe as flexlink.opt.

install always installs flexlink.exe if it was compiled along with any
required .manifest files. It also installs the appropriate .o/.obj files
to $(INSTALL_LIBDIR).

At present, the bootstrapping is not extended to the Cygwin ports.
2016-01-15 17:07:12 +00:00
David Allsopp fe4b643c4e Support OCAML_FLEXLINK environment variable
OCAML_FLEXLINK is inspected by ocamlopt, ocamlc and ocamlmklib and allows
the flexlink command to be overriden. This is primarily intended as a
solution for bootstrapping OCaml with FlexDLL, thus allowing a bytecode
image of flexlink launched with ocamlrun to be executed, instead of
requiring flexlink to be in PATH.
2016-01-15 17:07:11 +00:00
David Allsopp 1be30315ba Fix build process for Visual Studio 2015
Visual Studio 2015 is the first version incorporating Microsoft's
Universal CRT. In this new version, rather than just linking msvcrt.lib,
ucrt.lib and vcruntime.lib must also be linked.

In virtually all instances, the linker handles this automatically. One
of the highly specific cases in which it appears not to is when there
are #pragma directives specifying linker libraries and options and then
the final program is linked using link directly rather than cl.

Fixes stdlib/headernt.c to add ucrt.lib and vcruntime.lib when compiling
against the Universal CRT.
2016-01-08 12:58:29 +00:00
alainfrisch b626516a32 Fix #7119 (@@@warning attribute not persistent from one toplevel phrase to the next one). 2016-01-08 09:23:24 +01:00
Hezekiah M. Carty 2229298595 Add Changes entry for GPR#80 (Uchar module) 2016-01-06 11:37:07 -05:00
Mark Shinwell d1c05bc963 Merge pull request #383 from tkob/aix-all-source
GPR#383: Define _ALL_SOURCE for AIX 7.1
2016-01-05 13:45:26 +00:00
alainfrisch e1e03820e5 Fix #7097: improve syntax errors for illegal package types
The current fix is to rely on the parsing rules for generic module types, and then
extract a package type, enabling more explicit error messages.  Alternatively, one
could keep the generic module type in the Parsetree and extract the package type
at type-checking time.  But I don't feel like touching the Parsetree definition so
close from a release, consider the impact on Camlp4/5, PPX mappers and other
syntactic tools.
2016-01-05 13:10:25 +01:00
alainfrisch 4e8cb78bf5 Fix #7115: shadowing in a branch of a GADT match breaks unused variable warning. 2016-01-05 11:19:10 +01:00
alainfrisch 324ed6b711 PR#6449: add Map.union. 2016-01-04 18:21:18 +01:00
Armael f60e1d7a5c PR#7108: ocamldoc, have -html preserve custom/extended html generators
Previsously
  ocamldoc -g better_html.cmo -html
would just use the standard HTML generator instead of keeping the
generator extended by better_html.cmo. This patch makes sure that when
a standard option (-html, -latex, -texi, -man, -dot) is requested,
extended generators for the same format are chosen if they are
present.

Note that there is still a global "current generator setting", so in particular
  -g better_html.cmo -man
will throw away the extended generator, and
  -g better_html.cmo -man -html
corresponds to the old behaviour.
2016-01-02 07:01:14 +01:00
tkob d706ca9cf6 Add Changes entry for GPR#383 2016-01-02 10:27:18 +09:00
octachron 37bf121e6c PR#7109: update Changes 2015-12-29 12:16:28 +01:00
Gabriel Scherer a1e3921746 Changes for notable manual improvements 2015-12-28 13:29:05 +01:00
Gabriel Scherer eab493daea Merge pull request #319 from lpw25/opaque-cmis
Warning for missing .cmx files
2015-12-26 09:50:52 +01:00
Leo White 986d1f4c3a Add Changes entry 2015-12-26 08:29:48 +00:00
Gabriel Scherer 43c31e4f08 Add #help directive to the toplevel.
Nick Giannarakis proposed a first patch at
  http://caml.inria.fr/mantis/view.php?id=6113

Berke Durak and Francis Southern proposed two iterations on the patch
at:
  https://github.com/ocaml/ocaml/pull/46
  https://github.com/ocaml/ocaml/pull/376

The present patch contains code and ideas from all three sources.
2015-12-25 19:53:27 +01:00
Mark Shinwell ce01c0cf0d Changes 2015-12-23 11:10:31 +00:00
Mark Shinwell 852efd270e Merge with trunk; remake dependencies 2015-12-22 16:28:35 +00:00
Damien Doligez 3bbe98b6bb add missing Changes entry for PR#4231, PR#5461 2015-12-22 16:42:31 +01:00
Jacques Garrigue 83e3d1b917 Merge pull request #365 from hhugo/constraint
Prevent printing just a type variable on one side of the clash (pr#7103)
2015-12-22 10:27:49 +09:00
Damien Doligez 0225ca01e3 GC latency improvements 2015-12-21 14:27:46 +01:00
Hugo Heuzard 1720d9f42d fix pr7103
the following type error

"Type a is not compatible with type 'a"

should contain the constraint on 'a.

"Type a is not compatible with type 'a = < .. >"
"Type a is not compatible with type 'a = [> `b]"
2015-12-21 13:24:59 +00:00
alainfrisch f6b5c9d579 Fix #7101: double file opening when loading .cmo/.cma in the toplevel leads to fd leak. 2015-12-18 15:54:48 +01:00
Pierre Chambart 528d829ed1 Add Change line 2015-12-18 13:35:44 +00:00
Damien Doligez 2f3770001a Add missing Changes entry for 4.02.3 2015-12-18 13:57:45 +01:00
Damien Doligez 3b80339c64 cut overlong lines 2015-12-18 13:35:37 +01:00
Thomas Refis 960d0126e9 GPR#355: Changes 2015-12-18 10:40:03 +00:00
octachron e47870e903 PR#7075: Update changes 2015-12-17 23:46:03 +01:00
alainfrisch 713447b9e4 Fix #7098 (loss of ppx context in toplevel after an exception)
When a ppx raised an exception, it was returned as an error "extension node" to
the caller, without including the "ppx context" which includes in particular ppx
cookies.  This was fine when only one ppx was used, since in that case, the
missing context was not restored.

When multiple ppx are chained, however, the second ppx sees the result of the
first one, and it it does not contains a context, an empty one is created and
returned to the caller, which has the effect of destroying the context for the
next invocation of ppxs.

The current fix is to ensure that when a "error extension node" is returned, the
context is correctly added to it.  In addition to fixing the reported bug, it also
allow ppx to update their cookies before raising an exception, which can be
useful.
2015-12-17 14:59:33 +01:00
Jeremie Dimino b95a642bdc PR#6795, PR#6996: make ocamldep interpret [%ocaml.error] 2015-12-17 10:42:47 +00:00
Gabriel Scherer 1645e88824 PR#7096: ocamldoc uses an incorrect subscript/superscript style 2015-12-17 09:10:27 +01:00
Alain Frisch 3168430543 Typo. 2015-12-14 17:48:43 +01:00
Luc Maranget c54df509c0 PR#7031, Change file + Tests + error message 2015-12-14 15:58:11 +01:00
Jacques Garrigue 7bcfced414 Fix PR#7082 2015-12-14 12:49:51 +09:00
Xavier Leroy eef84c432a PR#7037: don't put temporary asm file names into object files.
This way, builds are reproducible.
2015-12-13 18:40:04 +01:00
Gabriel Scherer d071da2880 Revert GPR#305 (exception patterns under or-patterns) from trunk
This week we merged several changes from Thomas Refis, to allow the
use of exception patterns under or-patterns, to write code such as

  match foo x with
    | None | exception Not_found -> ...
    | Some -> ...

Unfortunately, I failed to properly assess the impact of this change,
and in particular to make sure that Luc Maranget had properly reviewed
this code -- any change to the pattern-matching machinery should be
reviewed by Luc.

The problem that I had not foreseen and that he would have immediately
realized is that, while adapting the pattern-matching *compiler* is
relatively easy (Thomas inserted a transformation at the right place
to separate exception patterns from the others and handle them
separately, using the staticraise construct used by the
pattern-matching compiler to avoid duplicating the
right-hand-side branch), adapting the pattern-matching warnings
machinery is both more subtle and easier to overlook (it may fail
silently and nobody notices, unlike wrong code production). This part
of the compiler is subtle and best understood by Luc, but he does not
have the time to do a proper review of those changes in the timeframe
for the 4.03 feature freeze (mid-December).

I believe the right move in this case, implemented in the present
commit, is to revert the change from trunk (this is not a feature that
we must *imperatively* have in 4.03), do a proper job of understanding
the changes, and integrate the change when we are confident it is
ready. I hope to do this in 2016, together with Luc Maranget and
Thomas Refis -- hopefully this would allow Thomas and I to be more
confident when changing the pattern-matching machinery in the future.

Revert "Merge pull request #343 from trefis/pr7083"
This reverts commit 22681b8d2a, reversing
changes made to a24e4edf0a.

Revert "Merge pull request #341 from trefis/or-exception"
This reverts commit f8f68bd329, reversing
changes made to 1534fe8082.

Revert "Merge pull request #305 from trefis/or-exception"
This reverts commit cfeda89396, reversing
changes made to 77cf36cf82.
2015-12-12 11:20:21 +01:00
Xavier Leroy 86d4023c98 PR#6321: guarantee that "hypot infinity nan = infinity" 2015-12-11 18:45:53 +01:00
alainfrisch 8acf64bd1f Changelog. 2015-12-11 15:39:24 +01:00
alainfrisch 4a5f11ec5b PR#5995: changelog. 2015-12-11 13:02:10 +01:00
Jeremie Dimino 87f92ab0fb PR#7081: report preprocessor warnings in the toplevel 2015-12-10 10:06:03 +00:00
alainfrisch c610f7379c The warning triggered when all clauses are guarded (previously 25) is now part of the standard non-exhaustive warning (warning 8). 2015-12-09 18:36:16 +01:00
Drup 9dcd1df306 Update Changes. 2015-12-09 14:26:06 +01:00
Thomas Refis 3363a7a19a PR#6422: Changes 2015-12-09 11:24:15 +00:00
Xavier Leroy 77cf36cf82 Merge pull request #331 from ocaml/win32-sockets
Windows sockets in asynchronous mode
2015-12-09 11:51:36 +01:00
alainfrisch e888e099e2 Revert commits related to #330.
1. Revert "Switch to -custom for bytecode tests."
This reverts commit 6b7f81caf5.

2. Revert "Fix Changelog."
This reverts commit d94488d7b5.

3.Revert "Fix testsuite: use binary channels."
This reverts commit 840f7ca506.

4. Revert "Fix testsuite: do not require a globally installed ocamlrun."
This reverts commit 0388ef46d9.

5. Revert "Merge branch 'trunk' of https://github.com/bvaugon/ocaml into bvaugon-trunk"
This reverts commit 1ff6db10bf, reversing
changes made to 89d116c514.
2015-12-08 14:44:29 +01:00
alainfrisch 9d4b3a4513 Fix PR#7067: performance regression when compiling large nested structures in native code. 2015-12-07 15:07:50 +01:00