Commit Graph

740 Commits (f9ea209cb7dd08634917e332aba8c61962bc5168)

Author SHA1 Message Date
Gabriel Scherer f9ea209cb7 GPR#171: allow custom warning printers / catchers
(Benjamin Canou, review by Damien Doligez)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16049 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-26 21:05:26 +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
Mark Shinwell fd923a6366 forgot to update Changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16038 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-24 09:38:06 +00:00
Jacques Garrigue 721266bf30 Fix PR#6842: export Typemod.modtype_of_package
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16033 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-23 07:07:43 +00:00
Alain Frisch 918f584b64 #6845: -no-check-prims to tell ocamlc not to check primitives in runtime.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16031 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-22 10:53:47 +00:00
Jacques Garrigue ebbf345d29 Fix PR#5663: program rejected due to nongeneralizable type variable that appears nowhere
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16029 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-22 07:12:49 +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
Jacques Garrigue 8cbc2b6781 Fix PR#6841
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16022 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-20 07:30:58 +00:00
Damien Doligez 5618914e0b document commit 16003 / PR#6816
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16019 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-14 21:49:44 +00:00
Jacques Garrigue 00e7279141 Fix PR#6836: Assertion failure using -short-paths
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-13 07:17:22 +00:00
Gabriel Scherer 19a5d5eb50 `type 'a result = Ok of 'a | Error of 'b` in Pervasives
(Yaron Minsky)

To whoever reads commit messages: the consensus on this change is
weak, which means the opinions can still evolve with experience using
the feature or seeing which external packages it affects. It is not
impossible that the change be reverted before a 4.03 release.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16011 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-12 18:44:59 +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 4530ee379c GPR#118 ocamldep -allow-approx: fallback to a lexer-based approximation
(Frédéric Bour)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16009 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-12 17:43:04 +00:00
Gabriel Scherer 543bc99a94 PR#6719: improve Buffer.add_channel when not enough input is available
When Buffer.add_channel fails with [End_of_input] because not enough
characters are available, the insufficiently-many characters that were
read are still kept in the buffer.

(Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16006 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-12 11:10:17 +00:00
Gabriel Scherer 3376907929 PR#6635: Support M.[], M.(), M.{< >} and M.[| |].
(Jeremy Yallop)

A small follow-up to PR#6054, which added support for the forms

  M.[e1; e2; ... en]
  M.[|e1; e2; ...; en|]
  M.{l1=e1; l2=e2; ... ln=en}
  M.{<e1; e2; ... en>}

This patch adds support for the empty cases:

  M.[]
  M.[||]
  M.()
  M.{<>}

The empty forms aren't particularly useful in themselves, of course,
but the uniformity is convenient.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16002 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-12 09:54:41 +00:00
Gabriel Scherer df05508cfc PR#6793: ocamlbuild passes nonsensical "-ocamlc ..." commands to menhir
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15993 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-11 17:40:27 +00:00
Gabriel Scherer ff6c5b70ce fix PR#6809: make PR#6794 (ocamlbuild uses ocamlfind's C flags) trunk-only
The change broke current Oasis, so we reverted it from 4.02 and
included it only in trunk -- oasis should get fixed before 4.03.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15992 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-11 17:40:26 +00:00
Gabriel Scherer a0ddc6ff30 PR#6774: new menhir-specific flags "only_tokens" and "external_tokens(Foo)"
(François Pottier)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15991 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-11 17:40:23 +00:00
Damien Doligez b014f28923 PR#6776: Failure to kill the "tick" thread, segfault when exiting the runtime
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15975 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-31 20:46:10 +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
Damien Doligez 16aab59a09 PR#4832: Filling bigarrays may block out runtime
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15947 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-17 16:03:53 +00:00
Jérémie Dimino ad58837224 Update Changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15925 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-13 11:09:32 +00:00
Jacques Garrigue 73756628c0 fix PR#6812
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15917 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-13 03:58:38 +00:00
Damien Doligez 1c01597a86 better change log for r15901 (PR#6521)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15902 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-11 19:55:30 +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
Alain Frisch 90a956b47e #6575: fail early in Array.init when size < 0 to avoid calling the callback in that case. (Cherry-picked from 4.02, rev 15898.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15899 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-11 15:13:59 +00:00
Alain Frisch 11333d938c #6583: support for custom #... binary operators (also allowing '#' in trailing symbols, although the operator is then rejected by the type-checker).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15892 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-09 17:39:50 +00:00
Gabriel Scherer ad85a8c1df use open recursion in untypeast.ml
This allows library user to override the untyping behavior of specific
typedtree nodes.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15888 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-08 10:22:35 +00:00
Gabriel Scherer 3ad7f526a2 PR#6452, GPR#140: add internal support for custom printing formats
(Jérémie Dimino)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15884 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-08 09:36:10 +00:00
Gabriel Scherer 0db2316653 PR#6794: pass package-specific include flags when building C files
(Jérémie Dimino, request by Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15883 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-08 09:03:24 +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
Damien Doligez 3d89f3ef7e PR#6664: Crash when finalising lazy values of the wrong type.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15876 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-04 19:58:49 +00:00
Jacques Garrigue 22a3f9fc16 Fix PR#6787
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15851 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-19 09:57:41 +00:00
Gabriel Scherer a125011b70 PR#6775: Digest.file leaks file descriptor on error
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15840 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-15 21:11:07 +00:00
Damien Doligez 4c1b09cdc4 GPR#143: fix getsockopt behaviour for boolean socket options
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15837 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-10 22:48:16 +00:00
Gabriel Scherer 304c9c91a5 PR#6468: toplevel now supports backtraces if invoked with OCAMLRUNPARAM=b
(Peter Zotov and Jake Donham,
 review by Gabriel Scherer and Jacques-Henri Jourdan)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15830 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 14:10:12 +00:00
Gabriel Scherer 5302d101be PR#6760: closures evaluated in the toplevel can now be marshalled
(Peter Zotov, review by Jacques-Henri Jourdan)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15829 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 14:10:08 +00:00
Gabriel Scherer 41e0ecf2ef PR#6642: replace $CAMLORIGIN in -ccopt with the path to cma or cmxa
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15828 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 11:18:29 +00:00
Gabriel Scherer e7df5313a5 minor Changes fix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15826 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 10:03:45 +00:00
Gabriel Scherer 218f16f5ee PR#6749: ocamlopt returns n for (n mod 1) instead of 0
(Mark Shinwell and Jérémie Dimino)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15824 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 10:00:18 +00:00
Gabriel Scherer 81e8d5bdbb Cmm arithmetic optimisations.
Constant additions and tagging operations are moved out of
subexpressions when possible. Often they can be merged.

From Stephen Dolan:
  https://github.com/ocaml/ocaml/pull/17

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15820 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-07 11:32:12 +00:00
Damien Doligez a0727de0f3 PR#6340: Incorrect handling of \r when processing "Windows" source files
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15815 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-06 20:19:11 +00:00
Damien Doligez 11bc5fe4bf GPR#142: add a CAMLdrop macro for undoing CAMLparam*/CAMLlocal*
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15814 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-06 15:54:05 +00:00
Jacques Garrigue a5252548c6 Fix PR#6768: Typechecker overflow the stack on cyclic type
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15810 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-05 07:47:14 +00:00
Jacques Garrigue df4916451b Fix PR#6763
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15798 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-30 02:02:28 +00:00
Gabriel Scherer 95f626c9ff PR#6691: install .cmt[i] files for stdlib and compiler-libs
(patch by David Sheets)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15794 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-24 16:35:29 +00:00
Gabriel Scherer eca0967403 PR#6167: OCAMLPARAM support for disabling PIC generation ('pic=0')
(Gabor Pali)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15793 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-24 16:35:26 +00:00