Commit Graph

617 Commits (047749ec9a5f19cab959263516b0af3ac580864d)

Author SHA1 Message Date
Xavier Leroy c157926a36 float_of_big_int: for negative arguments, the top 55 bits must round towards -inf, otherwise wrong rounding occurs. Hence, use shift_right_big_int and not shift_right_towards_zero_big_int.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16284 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-28 07:49:50 +00:00
Damien Doligez debaf6edb2 fix regression test for PR#6938 for 32-bit machines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16283 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 18:44:10 +00:00
Xavier Leroy 53231bcdc3 Update to trunk r16267.
A change on trunk in cmmgen was causing problems: the use of array_indexing
in bigarray_indexing was constructing derived pointers of Addr type
instead of the correct Int type.  (Because bigarray inner pointers
are outside the heap, and because they are live across allocations.)
Added an optional argument to array_indexing to specify expected
pointer type, and adapted bigarray_indexing to use it with type Int.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cmm-mach-types@16268 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 08:18:53 +00:00
Gabriel Scherer 235ee2ddef GPR#26: support for "(type a b ..)" as sugar for "(type a) (type b) .."
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16258 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:01:42 +00:00
Gabriel Scherer 907305ce20 PR#6938: fix regression on "%047.27{l,L,n}{d,i,x,X,o,u}"
(Benoît Vaugon, report by Arduino Cascella)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16250 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-25 20:44:02 +00:00
Xavier Leroy 8fc4849b83 big_int.ml: clarify comments.
test_ratios.ml: on x86-32 with x87 extended precision, the computation of the expected result is sometimes wrong because of double rounding in FP division.  Reduce the number of test rounds so that we don't run into this problem.  Note that the float_of_ratio function being tested produces the correct results on x86-x87, because it is immune to double rounding (exact -> extended precision -> double precision).


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16249 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-25 15:25:01 +00:00
Xavier Leroy af4e6bff91 PR#6896: serious reimplementation of Big_int.float_of_big_int and
Ratio.float_of_ratio, ensuring that the result is correctly rounded.

The previous implementations were embarassingly imprecise and slow.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16247 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 17:44:12 +00:00
Damien Doligez 60c854b66d tests/float-unboxing: fix test for Windows
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16220 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-20 12:53:17 +00:00
Alain Frisch 748ec06e6e GPR#109: new unboxing strategy (patch by vbrankov).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16215 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 15:47:59 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Damien Doligez ca2db8a939 fix problems with FORTRAN tests
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16210 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-15 14:52:12 +00:00
Damien Doligez 222562d376 typo in FORTRAN test
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16209 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-15 14:51:42 +00:00
Damien Doligez 002122b2da remove spurious verbosity in test makefile
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16208 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-15 14:51:08 +00:00
Damien Doligez 999d9ca008 remove spurious verbosity in test makefile
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16207 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-15 14:50:36 +00:00
Damien Doligez ea671f7f0b fix problems with FORTRAN tests
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16206 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-15 14:50:04 +00:00
Jérémie Dimino 9ad65262de add test for PR#6865
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16200 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-13 11:22:13 +00:00
Jacques Garrigue c2984fe481 add tests related to PR#6899
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16190 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-29 07:33:28 +00:00
Leo White 5c55e4cc08 Attach documentation comments to Parsetree
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16189 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-28 13:11:50 +00:00
Jacques Garrigue fbcfd218f1 Fix PR#6899
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16184 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-23 08:40:10 +00:00
Jacques Garrigue 0e56dde7be For PR#6897
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16183 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-23 08:38:16 +00:00
Jacques Garrigue b650a13145 Fix PR#6897 as suggested by Alain
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16176 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-17 11:09:49 +00:00
Gabriel Scherer 92c67a5a02 minor: the previous commit had an old version of the patch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16139 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-24 08:15:41 +00:00
Gabriel Scherer e9785253b2 PR#6876: improve warning 6 by listing the omitted labels.
(Eyyüb Sari)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16137 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-24 07:33:32 +00:00
Jacques Garrigue 10c907f99c test case for PR#5545
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-19 22:33:07 +00:00
Jacques Garrigue bf2c5c3c17 Fix PR#6870
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16122 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-17 03:07:10 +00:00
Jacques Garrigue 6f5241de44 Fix PR#6872
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16121 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-17 02:36:30 +00:00
Damien Doligez 5fe760c7da remove "external" testsuite (superseded by opam)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16116 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-12 16:50:44 +00:00
Jacques Garrigue 691aabb723 Fix PR#6849 and PR#6862
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16102 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-09 02:17:36 +00:00
Alain Frisch b94c4b840f GPR#174: ensure that Set.remove and Set.filter return the original set (physically) when no change is required. Also avoid allocations in this case. Similar to what had been done for Set.add in #6645.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16080 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-05 16:08:00 +00:00
Damien Doligez ea845ce074 GPR#159: Better locations for structure/signature items
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16075 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-04 18:44:11 +00:00
Gabriel Scherer 0d3d003198 GPR#168: fix bad interaction of warning 34 (unused type declaration) with "nonrec"
(Frédéric Bour)

Typechecking of nonrec types was still looking for uses in the temporary environment.
This made the compiler fail with "exception Not_found" when warning 34 was enabled.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16065 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-01 21:45:10 +00:00
Gabriel Scherer 736b4e2f8f minor testsuite fix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16051 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-26 21:57:51 +00:00
Gabriel Scherer 0cc8a6fb39 Make accessing Bigarray.t faster by optimizing Cmmgen.bigarray_indexing
(Vladimir Brankov)

bigarray_indexing now works the same way indexing ordinary arrays works.

Review note: the local ba_indexing function now returns a tagged
integer instead of an untagged integer.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16046 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-26 20:41:50 +00:00
Gabriel Scherer 926cc79f1c PR#6824: fix buffer sharing on partial application of Format.asprintf
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16043 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-26 20:00:57 +00:00
Gabriel Scherer 078afef9e1 make the edit_distance testsuite bytecode-only (Leo White)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16042 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-26 20:00:55 +00:00
Mark Shinwell 78bb2fd2e4 Fix PR#6686 and PR#6770
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16036 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-24 09:29:57 +00:00
Jacques Garrigue 8d1f813dee test for PR#5663
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16030 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-22 07:14:26 +00:00
Gabriel Scherer 8bd234ffab fix minor CI failure (the test for PR#6672 was incorrect)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16028 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-21 20:50:45 +00:00
Jacques Garrigue 3b1a33c77b PR#6672: Unused variance specification allowed in with constraint
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16024 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-20 07:57:51 +00:00
Damien Doligez 98b4109c7d extend OCAMLRUNPARAM instead of replacing it
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16021 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-15 19:22:20 +00:00
Jacques Garrigue 5b8e25d27a Fix PR#6836: Assertion failure using -short-paths
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16012 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-13 07:17:09 +00:00
Gabriel Scherer 90061455e6 GPR#111: `(f [@taillcall]) x y` warns if `f x y` is not a tail-call
(Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16010 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-12 18:26:38 +00:00
Gabriel Scherer bbf92df92c minor testsuite fix after PR#6827
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15990 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-11 13:34:03 +00:00
Damien Doligez 823be1d693 use the official name of Jane Street in headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15986 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-07 18:48:35 +00:00
Alain Frisch 30bb2c39d8 #6645: Set.add returns the original set when the element to be added is already in it, and document this invariant. Also guarantee that in that case, Set.add doesn't allocate (but do not document it for now).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15966 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-26 09:28:59 +00:00
Jacques Garrigue aa5422cdeb Fix PR#5545, cleaner use of generalize_spine
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15964 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-25 23:25:52 +00:00
Jacques Garrigue d2bed28077 Fix PR#6817
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15959 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-25 01:49:07 +00:00
Jérémie Dimino 321e95804c Fix printing of sequence of type delcarations with -short-paths
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15942 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-16 17:38:38 +00:00
Damien Doligez e60a2db81c PR#6521: {Bytes,Char,String}.escaped are locale-dependent
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15901 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-11 18:41:15 +00:00
Gabriel Scherer efa9d3bd9e PR#6791: "%s@[", "%s@{" regression in Scanf
(Benoît Vaugon)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15881 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-07 10:55:13 +00:00