summaryrefslogtreecommitdiff
path: root/otherlibs
Commit message (Collapse)AuthorAgeFilesLines
...
* | Of--by-one-bit error in two_power_m1_big_int, causing out-of-bound write if ↵Xavier Leroy2015-07-281-3/+4
| | | | | | | | | | | | n is a multiple of length_of_digit. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16293 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* | float_of_big_int: for negative arguments, the top 55 bits must round towards ↵Xavier Leroy2015-07-281-1/+1
| | | | | | | | | | | | -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
* | GPR#165: Missing Noreturn moved before the functions and added a missing ↵Gabriel Scherer2015-07-261-0/+1
| | | | | | | | | | | | | | | | undef in socketaddr.c (Bernhard Schommer) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16265 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* | GPR#165: Undef the erno values and redefine them using the winsocket values.Gabriel Scherer2015-07-261-74/+37
| | | | | | | | | | | | (Bernhard Schommer) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16263 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* | GPR#165: Changed the definition of the Noreturn macro to also work with ↵Gabriel Scherer2015-07-262-3/+3
| | | | | | | | | | | | | | | | Visual Studio Version >= 2008 using the __declspec(noreturn). (Bernhard Schommer) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16262 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* | GPR#165: Added define guards around the macros in unixsupport and for the ↵Gabriel Scherer2015-07-261-1/+74
| | | | | | | | | | | | | | | | isnan and isfinite macro. (Bernhard Schommer) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16261 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* | GPR#196: Make [Thread.id] and [Thread.self] [noalloc].Gabriel Scherer2015-07-263-6/+6
| | | | | | | | | | | | | | | | | | | | | | (Clark Gaebel) These functions are called every tick of the Async scheduler, and are the only remaining calls to [caml_c_call] every cycle. It would be nice to remove them, especially since these functions don't allocate. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16259 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* | big_int.ml: clarify comments.Xavier Leroy2015-07-251-3/+4
| | | | | | | | | | | | | | 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
* | Follow-up to r16247: garbled comment.Xavier Leroy2015-07-241-2/+2
| | | | | | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16248 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* | PR#6896: serious reimplementation of Big_int.float_of_big_int andXavier Leroy2015-07-243-8/+96
| | | | | | | | | | | | | | | | | | 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
* | PR#6902, GPR#210: runtime emits a warning when finalizing an I/O channel ↵Alain Frisch2015-07-241-2/+12
| | | | | | | | | | | | which is still open. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16245 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* | remove redundant -O option from C compiler argumentsDamien Doligez2015-07-222-7/+1
|/ | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16234 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* fix small problem introduced by merging 4.02Damien Doligez2015-07-201-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16219 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* update .depend and bootstrap compilers after 4.02 mergeDamien Doligez2015-07-177-697/+747
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16218 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev ↵Damien Doligez2015-07-1726-132/+264
| | | | | | 16205) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Attach documentation comments to ParsetreeLeo White2015-06-281-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16189 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Port fix for GPR#191 to trunk (making gc.h and some part of memory.h public)Mark Shinwell2015-06-084-65/+106
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16163 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* deduplicate some startup code and fix PR#6808: the parsing of OCAMLRUNPARAM ↵Damien Doligez2015-05-044-21/+22
| | | | | | is too lax git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16074 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* `type 'a result = Ok of 'a | Error of 'b` in PervasivesGabriel Scherer2015-04-121-0/+4
| | | | | | | | | | | (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
* use the official name of Jane Street in headersDamien Doligez2015-04-071-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15986 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#6776: Failure to kill the "tick" thread, segfault when exiting the runtimeDamien Doligez2015-03-313-22/+24
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15975 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* fix commit 15947: MS compiler does not handle 'inline'Damien Doligez2015-03-181-5/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15950 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* do not use -O flag when compiling with MS's C compilerDamien Doligez2015-03-182-1/+7
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15949 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#4832: Filling bigarrays may block out runtimeflambda_fork_pointDamien Doligez2015-03-171-14/+51
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15947 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#6285: add support for nanosecond precision in Unix.stat()Jérémie Dimino2015-03-052-3/+30
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15877 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* GPR#143: fix getsockopt behaviour for boolean socket optionsDamien Doligez2015-02-101-0/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15837 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#6468: toplevel now supports backtraces if invoked with OCAMLRUNPARAM=bGabriel Scherer2015-02-081-0/+7
| | | | | | | (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
* PR#6573: extern "C" for systhreads/threads.hDamien Doligez2015-01-201-0/+8
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15788 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#5418 (comments) : generate dependencies with $(CC) instead of gccDamien Doligez2015-01-209-18/+21
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#5887: move the byterun/*.h headers to byterun/caml/*.h to avoid header ↵Gabriel Scherer2014-12-27166-1126/+1206
| | | | | | | | | name clashes (Jérôme Vouillon and Adrien Nader and Peter Zotov) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15757 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#6494 backtrack: revert the new 'equal' functions from Num and Big_intGabriel Scherer2014-12-214-10/+0
| | | | | | We already have eq_num and eq_big_int. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15733 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR6694: Un-warn-error deprecation warnings in Str to preserve legacy behavior.Gabriel Scherer2014-12-211-9/+13
| | | | | | From: Peter Zotov <whitequark@whitequark.org> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR6695: Make sure the compiler only uses ASCII string functions.Gabriel Scherer2014-12-211-1/+1
| | | | | | | | | | This should cover all places involving filenames in the compiler. There are a few more paths still using Latin-1 in other ways, e.g. in ocamldoc. From: Peter Zotov <whitequark@whitequark.org> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15727 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#6494: Add equal function in modules Big_int, Bytes, Char, Digest, Int32, ↵Gabriel Scherer2014-12-214-0/+10
| | | | | | | | | | Int64, Nativeint, Num and String (Romain Calascibetta) From: Romain Calascibetta <romain.calascibetta@gmail.com> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15725 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Allow Android builds with systhreads support.Gabriel Scherer2014-12-131-0/+16
| | | | | | From: Peter Zotov <whitequark@whitequark.org> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15666 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Simplify the definition of custom .{} operatorsGabriel Scherer2014-12-132-0/+60
| | | | | | | | | | | | | | | | | | This commits modify the Bigarray syntax extension in order to facilitate the use of custom .{} operators. The compatibility with the existing Bigarray syntax has been preserved as much as possible. However, this commit will break code which use the Bigarray .{} syntax without opening the Bigarray module first! Like the previous commit, this commit modifies the parser to desugar bigarray1.{index} to ( .{} ) bigarray1 index. Following the bigarray syntax, the index operator used in the desugaring changes if the index is a n-tuple: 1-tuple => .{} 2-tuple => .{,} 3-tuple => .{,,} 4 and more tuples => .{,..,} The bigarray modules has been modified to use this new index operators. Note that this means that these index operators are not anymore accessible without opening the bigarray module. From: octachron <octa@polychoron.fr> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15662 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Simplify the use of custom .() and .[]Gabriel Scherer2014-12-131-0/+9
| | | | | | | | | | | | | | | | | This commit modifies the parser to use the newly defined .() and .[] operators. It also moves the definition of the standard .() and .[] operator for String/Bytes and Array to the pervasives module. Before this commit, expressions of the form array.(index) and string.(index) where desugared to Array.get[_unsafe] array index and Strinf.get[_unsafe] string index. The unsafe or unsafe version were chosen depending on the presence of the "-unsafe" compiler option. Such expression are now desugared to ( .() ) array index and ( .[] ) string index respectively. The same desugar operation is applied to array.(index) <- value which becomes ( .()<- ) array index value. In order to keep the standard semantic for the string and array index operations, these new index operators are defined in the pervasives module using new compiler primitives, e.g. let .() = "%array_opt_get". These new primitives are then mapped to safe or unsafe version depending on the the "-unsafe" compiler option. Consequently, these modifications should have no impact on existing code. With these modifications, defining custom .() and .[] operators should be easier, at the cost of losing access to the standard index operator for either array or string. From: octachron <octa@polychoron.fr> git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15661 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Use specialized marshal module in threads.cma.Alain Frisch2014-11-251-1/+1
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15607 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge branch 4.02 from release 4.02.0 to release 4.02.1Damien Doligez2014-10-153-18/+22
|\ | | | | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* | #6585: fix memory leak in win32unix/createprocess.c.Alain Frisch2014-10-021-0/+2
|/ | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15417 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge changes of version/4.02 from r15121 to r15155Damien Doligez2014-08-291-3/+3
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* (in|out)_channel_of_descr: improve documentation (Christophe Troestler)Gabriel Scherer2014-08-281-2/+17
| | | | | | | | Following a discussion on the mailing list, it appears that more explanation on the closing of channels created from file descriptors is desirable. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15142 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR#6517: use ISO C99 types {,u}int{32,64}_t in preference to our homegrownXavier Leroy2014-08-273-32/+32
| | | | | | | types {,u}int{32,64}. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev ↵Damien Doligez2014-08-2210-44/+51
| | | | | | 15121) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Add missing Noreturn qualifiersGabriel Scherer2014-08-061-1/+2
| | | | | | (patch by Peter Zotov, review by Max Mouratov) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15057 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Fix PR#6417: sprintf broken when local module named Pervasives is in scopeGabriel Scherer2014-06-092-479/+1
| | | | | | (Backport from Jacques' commit 4.02@14921) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14972 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* PR 6439 part 2: use sysconf instead of the deprecated getpagesize functionMark Shinwell2014-05-301-2/+2
| | | | git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14926 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* format+gadts: make format types "relational" to fix %(...%) typingGabriel Scherer2014-05-211-53/+124
| | | | | | | | | | | | | | | | | | | | See the long comment in pervasives.ml for an explanation of the change. The short summary is that we need to prove more elaborate properties between the format types involved in the typing of %(...%), and that proving things by writing GADT functions in OCaml reveals that Coq's Ltac is a miracle of usability. Proofs on OCaml GADTs are runtime functions that do have a runtime semantics: it is legitimate to hope that those proof computations are as simple as possible, but the current implementation was optimized for feasability, not simplicity. François Bobot has some interesting suggestions to simplify the reasoning part (with more equality reasoning where I used transitivity and symmetry of the relation profusely), which may make the code simpler in the future (and possibly more efficient: the hope is that only %(...%) users will pay a proof-related cost). git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14897 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* Use a nominal datatype for CamlinternalFormat.format6Gabriel Scherer2014-05-141-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should make the type-checking of formats simpler and more robust: instead of trying to find a pair as previously, we can now use the path of the format6 type directly. A nice side-effect of the change is that the internal definition of formats (as a pair) is not printed in error messages anymore. Because format6 is in fact defined in the CamlinternalFormatBasics submodule of Pervasives, and has an alias at the toplevel of Pervasives, error messages still expand the definition: > Error: This expression has type > ('a, 'b, 'c, 'd, 'd, 'a) format6 = > ('a, 'b, 'c, 'd, 'd, 'a) CamlinternalFormatBasics.format6 > but an expression was expected of type ... Passing the option `-short-paths` does avoid this expansion and returns exactly the same error message as 4.01: > Error: This expression has type ('a, 'b, 'c, 'd, 'd, 'a) format6 > but an expression was expected of type ... (To get this error message without -short-paths, one would need to define format6 directly in Pervasives; but this type is mutually recursive with several GADT types that we don't want to add in the Pervasives namespace unqualified. This is why I'll keep the alias for now.) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14868 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
* move code from pervasives.ml to camlinternalFormat.mlGabriel Scherer2014-05-121-138/+3
| | | | | | | | This simplifies the charset-handling code, as camlinternalFormat is allowed to depend on Bytes and String instead of re-importing the needed primitives. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14837 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02