Commit Graph

615 Commits (d1b1fbee667b5ce1c3b466d438418d4e9ff45e81)

Author SHA1 Message Date
Gabriel Scherer 3fa347743e PR#5547: ocamlbuild reverts to using -no-ocamlfind by default
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14952 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-04 20:01:16 +00:00
Xavier Leroy dbea9ee230 Reflecting commit r14943 on version/4.02:
PR#6082: on x86-32, enforce 16-byte stack alignment for compatibility
with recent GCC and Clang.  Win32/MSVC keeps 4-byte stack alignment.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14944 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-02 17:11:40 +00:00
Damien Doligez 456ba0c57b copy attributions from 4.02 branch and add a header for the next version
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14919 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-25 18:49:15 +00:00
Maxence Guesdon a61f33b87f Changes: PR#6425
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14904 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-22 09:03:46 +00:00
Gabriel Scherer ab873b81ca changes Changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14848 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:49 +00:00
Alain Frisch f4654c8952 Add entry in Changelog for #5779.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14800 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 13:52:14 +00:00
Damien Doligez e9e2154e03 mark PR#5580 as potentially breaking change
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 13:46:57 +00:00
Mark Shinwell 0875b3c630 update Changes for -no-naked-pointers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14793 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 10:37:15 +00:00
Jacques Garrigue ccce272966 commit o_and_opens.diff
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14787 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-11 00:17:05 +00:00
Gabriel Scherer 4a87d8f8c8 update Changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14785 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:26:43 +00:00
Mark Shinwell 2b6b5a5b32 add Changes note for the patch in rev 14772
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14773 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09 15:36:36 +00:00
Jacques Garrigue b6500cc2a4 Fix PR#6405: unsound interaction of -rectypes and GADTs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14769 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09 05:46:07 +00:00
Damien Doligez bdeeab69eb fix various things
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14761 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 14:05:19 +00:00
Jacques Garrigue 88e8bec163 Fix PR#6394: Assertion failed in Typecore.expand_path
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14757 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 10:55:05 +00:00
Alain Frisch 8e25b47153 Changelog.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14746 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 13:03:33 +00:00
Xavier Leroy c141951f2a PR#6385: wrong allocation of large closures by the bytecode interpreter
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14733 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 07:39:30 +00:00
Mark Shinwell 05100e597e initialize blocks with Val_unit, not zero
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14720 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 13:07:48 +00:00
Damien Doligez 5b8df637d2 merge branch "safe-string"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 11:56:17 +00:00
Jacques Garrigue 48f52f450c merge Leo's patch for PR#6384
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14702 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 02:25:04 +00:00
Jacques Garrigue 6cb386e91c Fix PR#6383: Exception Not_found when using object type in absent module
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14701 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-28 13:29:51 +00:00
Alain Frisch f1f362698f Document that the new alternative syntax for string literals can break comments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14698 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-28 08:08:08 +00:00
Alain Frisch d2de0d7b18 Revert 14616, 14617. Go back to the original syntax for toplevel directives, only allowing capitalized identifiers in addition to lowercase ones. Split #show into variants #show_val, #show_type, etc, and implement a generic #show which combines all the results.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14697 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-28 08:04:43 +00:00
Xavier Leroy 89441430c5 PR#6361: Hashtbl.hash not terminating on some lazy values w/ recursive types
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14693 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 17:11:36 +00:00
Xavier Leroy 558f40e344 New back-end optimization pass: common subexpression elimination (CSE).
(Reuses results of previous computations instead of recomputing them.)
(Cherry-picked from branch backend-optim.)
Tested on amd64/linux and i386/linux.
Other back-ends compile (after assorted updates) but are untested.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14688 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 10:40:22 +00:00
Xavier Leroy 9c1d005ebb New back-end optimization pass: dead code elimination.
(Removes arithmetic and load instructions whose results are unused.)
(Cherry-picked from branch backend-optim.)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14686 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 09:31:18 +00:00
Xavier Leroy 29b34438e0 - Constant ropagation for float and int32/int64/nativeint arithmetic.
Constant propagation for floats can be turned off with option
  -no-float-const-prop, for codes that change FP rounding modes at
  run-time.
- Clambda / C-- / Mach: represent float constants as FP numbers of type 
  float rather than literals of type string.
- Tested for AMD64; other archs need testing.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 08:41:13 +00:00
Alain Frisch 456ad30a54 #6273: fix Sys.file_exists on large files for Win32 (patch by C. Bauer).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14652 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 09:47:42 +00:00
Alain Frisch 75fd56bccb Changelog.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14625 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17 15:53:36 +00:00
Alain Frisch 26a8bc20a7 Support for toplevel primitives with multiple arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14616 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16 16:51:37 +00:00
Gabriel Scherer d74aa291d3 on i386 and AMD64, mark 'morally tail' C function calls as non-leaf
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14610 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16 08:34:21 +00:00
Xavier Leroy 774e30e138 PR#6075: avoid using unsafe C library functions (strcpy, strcat, sprintf).
An ISO C99-compliant C compiler and standard library is now assumed.
(Plus special exceptions for MSVC.)  In particular, emulation code for
64-bit integer arithmetic was removed, the C compiler must support a
64-bit integer type.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14607 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15 17:09:13 +00:00
Gabriel Scherer 192d8b44d1 Fix caml_string_{get,set}{16,32,64} bound checking in cmmgen
(Patch by Pierre Chambart)

Followup for trunk@14267:
  bound checking bug with caml_string_{get,set}{16,32,64}: fix the runtime C code

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14556 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 15:07:35 +00:00
Gabriel Scherer de4f4cf8b3 PR#6358: obey DESTDIR in install targets
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14536 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 07:06:17 +00:00
Gabriel Scherer 2b9f94b69b PR#6270: remove need for -I directives to ocamldebug in common case
(patch by Josh Watzman)

Add absolute directory names to bytecode format for ocamldebug to use

The need for a long list of -I directives makes interactively using
ocamldebug a pain in the butt. Many folks have solved this with various
`find` invocations or even Python wrappers, but those lead to other
problems when it might include files you weren't expecting (or miss
things you were). But all of this is really annoying since the tooling
should be able to figure out itself, even heuristically, where your
source files are -- gdb gets this right, why can't we?

This patch implements one of the more important heuristics from gdb: you
typically debug on the same machine you built on, so looking for the
source files and built artifacts in the absolute paths where they were
during compilation is a good first try. We write out absolute paths into
a new structure at the beginning of the debug section and then
automatically append those directories into the load path.

This means mean that if you happen to be debugging on a machine
where the original source and build artifacts are *not* available in
their original absolute locations, things will work as before, using the
standard load path mechanism. You can also explicitly use -I to prepend
directories to the load path and override the defaults located by this
new mechanism.

I personally find this makes using ocamldebug much more pleasant :)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14533 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-06 15:06:22 +00:00
Damien Doligez e8d15e704c merge branch 4.01 from 4.01.0 (revision 14115) to branch closure (revision 14525)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 17:32:35 +00:00
Jacques Garrigue fc61342e09 Fix PR#6348
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14528 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 04:17:20 +00:00
Jacques Garrigue cfb1250590 Fix PR#6347
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14527 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 03:04:45 +00:00
Jacques Garrigue 2699d155a0 Fix PR#6352
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14524 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-03 03:59:17 +00:00
Jacques Garrigue 12a2e9fa03 comment 9644 of PR#6000: principality check for coercion to format
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14523 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-03 02:52:51 +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
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
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 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 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
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