Commit Graph

943 Commits (ec8203077a47324195d33d65189402e69a2e66dc)

Author SHA1 Message Date
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
Simon Cruanes 6c5665393e fix 0007026
- remove write barrier for constant poly variants
- add tests
2015-12-06 19:24:31 +01:00
Gabriel Scherer c6b5a28d77 Merge pull request #320 from gasche/revert-user-defined-indexing-operators
Revert user defined indexing operators
2015-12-06 17:56:40 +01:00
Xavier Leroy 0939a59850 PR#6289: Unix.utimes uses the current time only if both arguments are exactly 0.0
Also: use utimes() in preference to utime() so as to get sub-second resolution.
2015-12-06 17:35:34 +01:00
Xavier Leroy 9d78aa722f PR#6780: Poor error message for wrong -farch and -ffpu options (ocamlopt, ARM) 2015-12-06 16:57:17 +01:00
Xavier Leroy 8e6606d729 PR#6108, PR#6802: fail cleanly if dynlink.cma or ocamltoplevel.cma are loaded inside the toplevel loop 2015-12-06 12:59:23 +01:00
Xavier Leroy 45343f6a39 PR#6989: in Str library, make sure that all \(...\) groups are binding and can be consulted with Str.matched_group.
There used to be a limitation to 32 binding groups, which is now lifted by dynamically allocating the groups data if it is too big.

Also:
- Modernize strstubs.c to use the Caml namespace
- Fixed a potential bug with backreferences \\n referring to a nonexistent group.
2015-12-06 12:43:02 +01:00
Rich Neswold 2893da8be1 Mention addition of NetBSD/arm support in "Feature wishes" section of
"Changes" file.
2015-12-05 10:18:01 -06:00
Xavier Leroy 4d478a0cfd PR#6296: Some documentation on the floating-point representations recognized by Pervasives.float_of_string 2015-12-05 11:50:25 +01:00
alainfrisch f443b1b617 Merge branch 'trunk' of ssh://github.com/ocaml/ocaml into trunk 2015-12-04 16:51:52 +01:00
alainfrisch d94488d7b5 Fix Changelog. 2015-12-04 16:47:23 +01:00
alainfrisch 1ff6db10bf Merge branch 'trunk' of https://github.com/bvaugon/ocaml into bvaugon-trunk 2015-12-04 16:31:59 +01:00
Alain Frisch 1fa12312a1 Merge pull request #329 from bschommer/array-functions
Add array functions: for_all, exists, mem, memq.
2015-12-04 15:47:33 +01:00
Bernhard Schommer 83dcf62ebf Removed for_all2, exists2 and find again. 2015-12-04 15:41:48 +01:00
Xavier Leroy 5551db5778 Branch win32-sockets: add documentation, update Changes. 2015-12-04 14:32:30 +01:00
Louis Gesbert 24e42d4d22 Add v=0x400 to OCAMLRUNPARAM to print more Gc stats on exit
In a format following that of Gc.print_stat. I chose to print only the "quick_stat"
values rather than call gc_ctrl.c::heap_stats because it's lighter, and the extra
information is typically not very useful at program exit.

Also adds documentation for the 0x400 flag (in man and Gc module)

This replaces the previous undocumented 0x400 that only displayed the
total (minwords + majwords - prowords) and with a different format,
since keeping both wouldn't provide more information.
2015-12-04 21:09:27 +09:00
Benoit Vaugon e9bb7e117b Update Changes. 2015-12-04 11:30:46 +01:00
Bernhard Schommer 7a082785be Fixed typos and changed exists2 and for_all2.
Now exist2 and for_all2 only raise the invalid_arg excpetion when
the end of one array is reached.
Also some new tests in the testsuite.
2015-12-04 11:15:40 +01:00
Bernhard Schommer dcc1421e1e Added exists2, for_all2, mem, memq and find.
The functions are implemented as their pendants in the List module.
2015-12-04 10:10:36 +01:00
Bernhard Schommer 7f23ad6692 Early exit versions of exists and for_all.
The functions now return earlier when either an element is found that
does satisfy the condition in the case of exists or an element that does
not satisfy the condition in the case of for_all.
2015-12-04 01:46:25 +01:00
maranget e8625747fa PR#6805 Duplicated expression in case of hole in a non-failing switch. 2015-12-03 17:52:50 +01:00
Hugo Heuzard 34a14a1193 update Change log
GPR#170 can break existing programs
especially ppx rewriter as the Parsetree is updated
2015-12-03 17:20:49 +01:00
alainfrisch fab5144d99 PR#6939: Segfault with improper use of let-rec. 2015-12-03 14:57:39 +01:00
alainfrisch 837bcd6e7b PR#6396: Warnings-as-errors not properly flushed in the toplevel. 2015-12-03 14:31:46 +01:00
alainfrisch 110835872c This also reserves the use of '_' as a valid expression (i.e. other
changes to the grammar that would introduce a conflict with it will now
be detected) for possible later use.
2015-12-03 13:42:24 +01:00
alainfrisch 2c48e6f276 PR#6342, changelog. 2015-12-03 00:07:41 +01:00
alainfrisch ac62abe4d2 #6342: fix error message when constraints differ in type declarations. 2015-12-03 00:06:18 +01:00
alainfrisch 75f4afd801 Mark previous commit as possibly breaking (for ppx). 2015-12-02 23:45:55 +01:00
alainfrisch 01bf671f33 PR#6865: remove special case for "let _ = expr" structure items.
This form used to produce Pstr_eval instead of Pstr_let.  This would
probably come as a suprise for people matching on the Parsetree (e.g.
for a ppx).  This special case is now removed.

To avoid a (probably harmless) regression in bytecode, the compilation
of "let _ = ..." bindings (including local ones) is optimized to remove
a useless introduction of a variable (which would occupy a stack slot
otherwise).

The source code printer (-dsource) now prints Pstr_eval as ";;expr",
which should always be ok.  One could avoid ";;" at the beginning of
the structure, but since it is allowed, it is probably not worth adding
complexity here.
2015-12-02 23:39:19 +01:00
alainfrisch a79825f7a6 #6401: use proper error reporting for toplevel's environment initialization (original patch from Gabriel Scherer). 2015-12-02 16:59:30 +01:00
alainfrisch 90544ab95e Merge with trunk. 2015-12-02 12:00:44 +01:00
alainfrisch ded101210f Changelog. 2015-12-02 09:48:53 +01:00
Jeremie Dimino ca7721e536 update Changes 2015-12-01 10:22:06 +00:00
alainfrisch 11ea50d8e2 PR#6762: improve warning 45 (shadowing caused by open) for labels/constructors in presence of re-exported type definitions. 2015-12-01 09:30:41 +01:00
Jacques Garrigue 381328e92e add module alias support to ocamldep 2015-12-01 00:07:36 +09:00
alainfrisch 6c90da49f1 GPR#210: runtime warnings are disabled by default. 2015-11-30 10:18:10 +01:00
Jacques Garrigue a1bb57048c Fix PR#6946 2015-11-30 16:45:44 +09:00
Jacques Garrigue 20b59a3318 Fix PR#6981 2015-11-30 15:17:41 +09:00