Commit Graph

980 Commits (974733bb8a0fd71f2dc2d0b945d3cb7167d09eb3)

Author SHA1 Message Date
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
Jacques Garrigue 9229b15aaa Fix PR#6980 and remove unused Ctype.iterative_generalization 2015-11-30 13:49:30 +09:00
Gabriel Scherer 9d7ea1a9f2 Merge pull request #313 from chambart/quadratic_behavior_in_CSE
Prevent quadratic cases in CSE
2015-11-29 22:37:33 +01:00
Gabriel Scherer df69745553 user-defined indexing operators: revert Changes 2015-11-29 21:01:31 +01:00
Gabriel Scherer 894d76d2f1 manual: Changes entry 2015-11-29 08:50:01 +01:00
Pierre Chambart 547ae2e2a2 Update Changes 2015-11-28 21:57:14 +01:00
Gabriel Scherer 312d977037 testsuite for formatting of hexadecimal floats 2015-11-28 19:14:08 +01:00
Vincent Laporte abb35cbdb1 ocamlbuild: use ocamlfind to discover camlp4 path
and default to `+camlp4`
2015-11-27 22:04:58 +01:00
Jeremie Dimino 4ffefb4183 update Changes 2015-11-27 18:23:48 +00:00
Xavier Leroy 906558a155 PR#7038: out of memory condition in caml_io_mutex_lock
Check the return code of st_mutex_create so that, in particular, out-of-memory conditions cause an exception.
2015-11-27 15:33:15 +01:00
Xavier Leroy bf87415c1c PR#7024: in documentation of Str regular expressions, clarify what "end of line" means for "^" and "$" regexps. 2015-11-26 15:08:34 +01:00
Damien Doligez 2512b48307 arg: add changelog entry and test 2015-11-25 22:22:24 +01:00
Sergei Lebedev 9dc2b25a0e PR#4518: change location format for reporting errors in ocamldoc 2015-11-24 00:47:31 +03:00
Alain Frisch 4788ab33d6 Merge pull request #283 from mlasson/trunk
Fix memory leaks in intern.c when OOM is raised
2015-11-23 13:25:34 +01:00
Gabriel Scherer 264bc665de minor Changes: renaming whitequark 2015-11-23 10:43:03 +01:00
iguer 2b25384df5 simple sharing in maps: update Changes 2015-11-22 18:36:37 +01:00
Gabriel Scherer 5db98d0074 Merge pull request #298 from lijunsong/trunk
PR#6935:ocamldebug:load_printer raise uncaught exception when passing directory
2015-11-22 17:23:04 +01:00
lijunsong 99a552926e Add an entry in Changes. 2015-11-22 07:41:45 -08:00
Marc Lasson 448d365d32 Update changelog & remove useless vertical spaces 2015-11-20 17:51:43 +01:00
Damien Doligez 274be1bdc2 remove duplicate entry for GPR#171 in Changes 2015-11-20 15:51:05 +01:00
Xavier Leroy 93735adf47 z port: dedication. 2015-11-19 17:01:06 +01:00
Xavier Leroy 32def141e5 z port: update Changes 2015-11-19 08:26:59 -05:00
Xavier Leroy 0c5e862a3e GPR#268: Hexadecimal notation for floating-point numbers
Merge of branch 'hex-float'.

- Add support in byterun/floats.c for conversions between floats and strings in hex notation. We cannot rely on the C standard library here because Microsoft consistently fails at supporting hex notation as standardized in C99. Instead, the conversions are implemented from scratch.
- Add support in the lexer so that hex float literals are recognized in OCaml sources.
- Add support in formats. The ISO C99 format letters for hex floats are %a and %A, but %a is already taken. I chose %h and %H, which are rejected today as bad formats (hence no backward incompatibility) and don't mean anything in C either (h is a modifier, not a format letter).
- Add support in printf. All the trimmings are there in the implementation of %h and %H, including sign modifier and fixed precision.
- Benoit Vaugon contributed support in scanf.

Resolved conflicts:
	boot/ocamlc
	boot/ocamldep
	boot/ocamllex
	parsing/lexer.mll
2015-11-19 10:37:20 +01:00
Xavier Leroy 2641daf1fe PR#6910 and GPR#224: extend marshaling to support data encodings beyond 4 Gb
- Update Changelog
- #define inline in config/m-nt.h to support MSVC (to be tested).
2015-11-19 09:59:40 +01:00
Xavier Leroy 6cd8656249 PR#7024 and GPR#295: CSE confuses +0.0 and -0.0
The fix consists in representing float literals by their bit patterns (int64) in the Mach and Linear intermediate languages.

A regression test was added to the test suite.
2015-11-19 09:25:02 +01:00
Thomas Refis ce793e16ef update Changes 2015-11-16 11:06:09 +01:00
Xavier Leroy e7f339e6bd Improve speed of classify_float
As suggested in the discussion of GPR#272:
- Do not go through fpclassify()  (speedup: 2 to 3)
- Add 64-bit variant of the code  (additional speedup: 10%-20%)
2015-11-15 16:43:46 +01:00
Xavier Leroy 50648ed2b7 PR#4023 and GPR#68: add Unix.sleepf and improve Unix.sleep
Unix.sleepf provides sleep with sub-second resolution.
Unix.sleep is implemented on top of Unix.sleepf.
If a handled signal causes the sleep to return early with an EINTR
error, catch it and restart the sleep for the remaining time.
2015-11-15 15:34:45 +01:00
Jacques Garrigue eb0de16ee0 Fix PR#4166, PR#6959: force linking when calling external C primitives 2015-11-13 13:59:14 +09:00
Xavier Leroy dc043a7b62 PR#6945 and GPR#227: protect Sys and Unix functions against string arguments containing the null character '\000'
Implementation notes:
- Based on c-cube's GPR#227 code, but many Unix functions were missing.
- For Unix.bind and Unix.connect to a PF_UNIX address, tolerate
  file names whose first character is '\000': in Linux, these have
  a meaning as "abstract socket addresses", and in other operating
  systems, the resulting empty path name causes a EINVAL error
  (tested under MacOS X).
- Very lightly tested.
- win32unix remains to be fixed.
2015-11-11 17:07:44 +01:00
Xavier Leroy 23ed29da6b Merge branch 'trunk' of ssh://github.com/ocaml/ocaml into trunk 2015-11-11 11:40:47 +01:00
Xavier Leroy ed0a785f02 PR#7039: Unix.getsockname returns garbage for unnamed PF_UNIX sockets.
Fix implemented: return ADDR_UNIX "" in this case (the file name is the empty string).
2015-11-11 11:39:10 +01:00
Xavier Leroy b09f3ff9b1 Merge pull request #280 from mshinwell/parallel-make-fixes
Fix stdlib dependencies for .p.cmx
2015-11-11 10:29:59 +01:00
Gabriel Scherer 1fb2a8166c update Changes for GPR#279 2015-11-05 16:52:03 +01:00
François Bobot 26b8189fe8 Update Changes 2015-11-05 13:09:27 +01:00
Leo White 44306923a8 Merge pull request #261 from lpw25/fix-pr6998
Fix PR6998
2015-11-05 11:35:55 +00:00
Jeremie Dimino 5ed4d5bb4b add missing author in Changes 2015-11-05 10:41:13 +00:00
Jeremie Dimino 6676784f63 PR#6806: Allow type annotations before the "->" in "fun <args> -> <expr>"
Patch by Valentin Gatien-Baron
2015-11-05 10:41:13 +00:00
Jeremie Dimino 26657d5736 PR#6806: Syntactic sugar for type annotations on record fields
Add the following syntactic sugars, in both expressions and patterns:
- { f : typ = x } to mean { f = (x : typ) }
- { f : typ     } to mean { f = (f : typ) }

In expressions, the type annotation can also be a coercion. For
instance: { f :> typ } to mean { f = (f :> typ) }.

Patch by Valentin Gatien-Baron
2015-11-05 10:41:13 +00:00
Jacques Garrigue f32db119ce Fix PR#7036: Module alias and package type equality 2015-11-05 14:20:50 +09:00
Mark Shinwell 211791a409 Changes 2015-11-04 11:09:48 +00:00
Leo White e714e25a01 Take the P out of my name 2015-11-04 11:01:34 +00:00
Leo White c0ea8bf779 Add Changes entry 2015-11-04 11:01:34 +00:00
alainfrisch 6e0352187b Changelog. 2015-11-03 21:05:07 +01:00
Jérémie Dimino 8fee9d45e1 Merge pull request #277 from diml/more-unboxed-on-externals
Switch a few externals to [@@unboxed]
2015-11-03 17:59:21 +00:00
Jeremie Dimino 770c0531c8 Update Changes 2015-11-03 17:22:05 +00:00
Gabriel Scherer 9e190ed926 update Changes for GPR #276 2015-11-03 14:31:25 +01:00
Mark Shinwell bbd0ac54ab Changes entries for GPR#270 and GPR#271 2015-11-02 14:51:03 +00:00
Gabriel Scherer 6ca3ce56ee Changes elaboration 2015-10-31 16:58:17 +01:00
Gabriel Scherer b2e81d7800 Merge pull request #267 from yallop/faster-ifprintf
A more efficient implementation of ifprintf
2015-10-31 16:54:40 +01:00
Jeremy Yallop afccdb3609 Changelog entry for PR7034. 2015-10-31 12:27:01 +00:00
Xavier Leroy 4bd9adbdc7 PR#7030: libasmrun_shared.so fails to build on SPARC Solaris 2015-10-27 18:16:08 +01:00
Gabriel Scherer 54e039901e GPR#42: Add simpler functor type syntax
(Leo White)

Add support for simple functor types of the form:

    S -> T

equivalent to:

    functor (_ : S) -> T

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16546 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-25 16:24:47 +00:00
Gabriel Scherer 8afbaa5747 New representation for queues, avoiding Obj.magic
(Jérémie Dimino)

- use inline-records to avoid using Obj.magic while keeping
  indirections to the minumum
- change the representation from a cyclic list to a simply-linked
  list. The drawback is one more word per queue, but it makes the
  implementation clearer

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16545 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-25 13:39:07 +00:00
Gabriel Scherer 2d9ff61b02 Improve the code generation for if equivalent to seqand or sequor
(Pierre Chambart)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16544 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-25 13:39:05 +00:00
Gabriel Scherer 1ee366e423 Changes: rename 'octachron' into Florian Angeletti
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16541 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-25 12:06:36 +00:00
Xavier Leroy 6054bcb3dd GPR#164: more efficient (branchless) implementation of Pervasives.compare
specialized at type 'float'.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16539 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-25 10:21:13 +00:00
Mark Shinwell ca39ac766e GPR#262: Multiple GC roots per compilation unit
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16538 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 15:16:22 +00:00
Jacques Garrigue a335b18a45 merge branches/gadt-warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 08:33:44 +00:00
Mark Shinwell e27e699fca GPR#173: Attributes to control inlining
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16530 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-23 08:18:08 +00:00
Alain Frisch 4984cd0f8f PR#7022, GPR#259: unbox float and boxed ints earlier, avoid second pass.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16527 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-20 15:11:11 +00:00
Damien Doligez 587e2d9cbb remove duplicate entry in Changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16526 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-19 15:50:12 +00:00
Damien Doligez 659615c7b1 fix PR#7003 and a few other bugs caused by misuse of Int_val
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-19 15:47:33 +00:00
Damien Doligez be79451d83 PR#7008: Fatal error in ocamlc with empty compilation unit name
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16523 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-19 13:01:28 +00:00