Luc Maranget
dd55c293ac
Fix PR#6359
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14520 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-02 13:22:21 +00:00
Damien Doligez
989ac0b263
stop ignoring ocamlmklib.ml, it is not a generated file any more
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14512 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 16:02:01 +00:00
Gabriel Scherer
57fe3746f6
Revert "PR#6270: remove need for -I directives to ocamldebug in common case (patch by Josh Watzman)"
...
There seems to be a problematic interaction with backtrace collection. To test this,
make world.opt
cd testsuite
make one DIR=tests/backtrace/
This needs to be sorted out before the patch can go in again.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14510 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 14:55:06 +00:00
Xavier Clerc
dd7bd5b339
PR#6270: remove need for -I directives to ocamldebug in common case (patch by Josh Watzman)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 11:48:35 +00:00
Gabriel Scherer
09900da7c0
Pprintast: factorize handling of infix/prefix binders
...
There was a bug with "external _pipe = ..." in
otherlibs/threads/unix.ml where the identifier _pipe was wrongly
detected as infix and reprinted as "external ( _pipe ) = ...", causing
a syntax error.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14503 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-28 13:55:22 +00:00
Damien Doligez
41aa61946c
ignore .cmt and .cmti files
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14502 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-27 15:06:56 +00:00
Damien Doligez
be92c8e70e
fix msvc64 port by removing unused open Misc (untested, esp. on other Windows ports)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14501 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-27 15:06:28 +00:00
Luc Maranget
4aa013f82f
In cmmgen, use previously defined 'get_size' function to emit
...
the code that extract size of blocks.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14500 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-27 14:33:28 +00:00
Alain Frisch
ab64979990
Compile with the same warning configuration under Windows.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14499 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:09:59 +00:00
Alain Frisch
da5b063687
#6352 : add a warning on implicit removal of optional arguments.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14498 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:09:28 +00:00
Alain Frisch
e2493160d0
Get rid of some uses of implicit removal of optional arguments.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14497 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:08:51 +00:00
Alain Frisch
6a39aa1e7a
Get rid of some uses of implicit removal of optional arguments.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14496 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:00:48 +00:00
Alain Frisch
f6b9b99a44
Get rid of some uses of implicit removal of optional arguments.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14495 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 18:00:16 +00:00
Alain Frisch
2a9373dc4d
More robust syntax (in case we add e.g. some 'open' statement before).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14494 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 17:58:22 +00:00
Alain Frisch
bc2413703b
Also compile with -bin-annot under Windows.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14493 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 17:41:41 +00:00
Alain Frisch
481ee603df
Remove spurious character from error message.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14492 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-26 08:46:12 +00:00
Damien Doligez
3266bce8ac
commit mergeinfo to keep svn happy
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14491 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-25 15:42:22 +00:00
Damien Doligez
f0d0c5808e
skip debugger test when dynlink is not available
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14490 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-25 15:41:46 +00:00
Gabriel Scherer
d8d7ea94d4
PR#6351: minor arm64 fix (patch by Richard W.M. Jones)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14487 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-25 10:49:24 +00:00
Alain Frisch
35ff978e3b
#6260 : fix unecessary boxing of let-bound floats/ints.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14486 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-25 08:57:26 +00:00
Alain Frisch
63e31394eb
Ensure that record patterns don't miss any field in Ast_mapper (use of optional arguments in Ast_helper makes it too easy to forget some fields).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14484 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-24 10:04:24 +00:00
Jacques Garrigue
e39065c72b
Optimize Env.find_module further for PR#6350
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14483 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-23 00:06:41 +00:00
Jacques Garrigue
1302703293
Fix PR#6350
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14482 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-22 15:49:57 +00:00
Gabriel Scherer
5f0b7f9a13
[minor] add strmatch to Makefile.nt
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14481 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21 21:37:05 +00:00
Luc Maranget
d89503fc6b
Oups
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14480 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21 18:42:49 +00:00
Luc Maranget
c2a88c27fd
#PR6269 Optimized string matching
...
Noticed that I had to bootstrap to test on ARM, so I commit a new bootstrap
compiler.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14479 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21 17:02:44 +00:00
Gabriel Scherer
3d1c1adaf3
Factor out the grammar productions for functor parameters
...
(Patch by Jeremy Yallop)
Functor parameters can occur in three contexts:
(1) in functor bindings:
module M (X : S) (Y : T) = ...
(2) in anonymous functor expressionms:
functor (X : S) (Y : T) -> ...
(3) in signature expressions
module type T = functor (X : S) (Y : T) -> ...
This patch simplifies the grammar by using common productions
(functor_arg, functor_args) to handle all three contexts, and by
combining the productions for named and unnamed parameters.
As a side effect, unnamed functor arguments are now available in
functor bindings:
module M (_ : S) (_ : T) = ...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14478 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21 13:27:07 +00:00
Gabriel Scherer
eeae918f35
Pervasives: define [min_int] and [max_int] without assuming that integers are either 31 or 63 bits.
...
(Patch by Jérôme Vouillon)
Js_of_ocaml has 32 bit integers. Currently, it patches the bytecode,
just to get the correct values for [min_int] and [max_int]. It would be
simpler if this was not necessary.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14477 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 16:09:33 +00:00
Gabriel Scherer
5c90eefd88
PR#6184: ocamlbuild: `ocamlfind ocamldep` does not support -predicate
...
(patch by Jacques-Pascal Deplaix)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14476 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 16:05:23 +00:00
Gabriel Scherer
5f67d82896
PR#6187: Add a warning when using -plugin-tag(s) without myocamlbuild.ml
...
(Patch by Jacques-Pascal Deplaix)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14475 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 15:54:10 +00:00
Gabriel Scherer
9e410c0cfe
Shorten syntax for functor signatures (patch by Thomas Gazagnaire)
...
```
(* Optional naming of parameter implementation *)
module type X = functor (X:S) -> ...
module type X = functor (_:S) -> ...
(* shortening of functor module signatures *)
module type F = functor (X:S) -> functor (Y:S) -> ...
module type F = functor (X:S) (Y:S) -> ...
```
For consistency reasons, this commits also add shortening of functor implementations:
```
(* shortening of functor implementations *)
module F = functor (X:S) -> functor (Y:S) -> ...
module F = functor (X:S) (Y:S) -> ...
```
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14474 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 15:21:00 +00:00
Alain Frisch
05982a5fc7
Fix Makefile.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14473 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 15:03:49 +00:00
Mark Shinwell
4eb7a8a644
fix error in previous register naming patch
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14472 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 14:36:12 +00:00
Gabriel Scherer
ce6e8eeb1c
PR#6349: ocamlbuild.cm{o,x} must not be included in ocamlbuild.cm{a,xa}
...
The bug, reported by Jacques-Pascal Deplaix, was only in trunk -- it
appeared in the bootstrap->Makefile transition.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14471 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 13:31:44 +00:00
Alain Frisch
7578b585a1
Also check sharing of immutable constants.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14470 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 13:27:50 +00:00
Alain Frisch
8583d7f9d5
Add non-regression test for #5779 .
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14469 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 13:25:21 +00:00
Alain Frisch
87e2ff9b06
#6345 : better compilation of optional arguments with default values.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14466 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-18 16:54:32 +00:00
Mark Shinwell
de489bde2f
improved abstractions for register naming in the native code backend
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14465 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-17 14:39:12 +00:00
Mark Shinwell
583bfd46c2
be explicit when constructing integers that are block headers
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14464 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-17 14:34:00 +00:00
Gabriel Scherer
087993d954
[minor] update Changes
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14463 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-17 09:18:17 +00:00
Gabriel Scherer
d22b112968
ocamllex: user-definable refill actions (patch by Frédéric Bour)
...
The patch introduces a new "refill" action. It's optional and if
unused the lexer specification and behavior are unchanged.
When specified, it allows the user to control the way the lexer is
refilled. For example, an appropriate refill handler could perform the
blocking operations of refilling under a concurrency monad such as Lwt
or Async, to work better in a cooperative concurrency setting.
To make use of this feature, add
refill {refill_function}
between the header and the first rule.
[refill_function] is a function which will be invoked by the lexer
immediately before refilling the buffer. The function will receive as
arguments the continuation to invoke to resume the lexing, and the
current lexing buffer.
More precisely, it's a function of type:
(Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'a
where the first argument is the continuation which captures the
processing ocamllex would usually perform (refilling the buffer, then
calling the lexing function again), and the result type ['a] should
unify with the result types of all rules.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14461 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-14 15:39:32 +00:00
Gabriel Scherer
adac89525e
[minor] forgotten Changes entry for 4.01
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14455 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-13 09:00:24 +00:00
Alain Frisch
bd7fa181cb
Fix two makeblocks incorrectly marked as Immutable. The lazy-related one is concretely problematic in presence of stronger constant propagation.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14454 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 17:25:19 +00:00
Alain Frisch
1080fec868
Optimization: if a function doesn't use its environment, one can do as if it it doesn't have any free variables, and its closure can be statically allocated (we could be more precise and remove unused free variables from the closure).
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14453 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 10:05:02 +00:00
Alain Frisch
ebd01bc49e
#6343 , #5537 , #5573 : improving access to values in nested modules.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14452 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 10:02:31 +00:00
Jacques Garrigue
65b1193406
Fix PR#6307
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14451 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 02:54:02 +00:00
Jacques Garrigue
d59bd570d7
Structural typing of first class modules (cf. PR#6333)
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14450 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 02:06:10 +00:00
Alain Frisch
7fead1f37b
#5779 : Revert change on camlinternalOO.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14449 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 17:10:02 +00:00
Mark Shinwell
1f4de8b799
use -bin-annot when building
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14448 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 14:47:30 +00:00
Alain Frisch
ccf516168f
#5779 : adopt gasche's sentinel solution.
...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14447 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 08:16:41 +00:00