Commit Graph

9352 Commits (349f151c0d7f0747d03a1e6d9a0696d480523abf)

Author SHA1 Message Date
Alain Frisch 7334bb026a #5899: expose Printexc.get_callstack. (Cherry-picked 13884, 13885 from trunk.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13886 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-11 12:37:10 +00:00
Fabrice Le Fessant 2602e82995 Remove non-ASCII chars from headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13880 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-09 13:21:45 +00:00
Alain Frisch f836495698 Fix #5571.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13877 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-09 11:16:25 +00:00
Alain Frisch edb771d22b #4986. Add two common operations: List.sort_uniq (more efficient that sorting then removing duplicates) and Set.of_list (more efficient than folding Set.add over the list).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13876 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-09 11:01:42 +00:00
Hongbo Zhang 72af5c7cd0 fix PR#6062: camlp4 macro parser uncaught exception
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13875 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-07 14:21:35 +00:00
Gabriel Scherer e94ecc00a4 ocamlbuild: fix typo for short_paths+infer_interface
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13873 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-04 14:00:57 +00:00
Alain Frisch b4c2dc9336 Remove duplicated declaration.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13872 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-04 12:27:06 +00:00
Luc Maranget 32bcc186ea Patch for PR#5788
(Exception binding fools pattern matching optimisations)

Hopefully it's complete...





git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13871 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-02 16:05:48 +00:00
Fabrice Le Fessant c77d5ac9c3 Add Graphics.loop_at_exit function
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13869 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-02 15:12:00 +00:00
Wojciech Meyer 0425a7246b Revert "build: make building ocamldoc, ocamlbuild and ocamldebug optional."
This patch fixes build failure.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13867 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 21:33:22 +00:00
Wojciech Meyer 21b780c0a5 configure: store $target and $host in the build configuration (fix-pt2). (Patch by Adrien Nader!)
Fixing builds continued.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13866 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 21:33:21 +00:00
Wojciech Meyer 70659109f2 build: make building ocamldoc, ocamlbuild and ocamldebug optional.
(modified patch from Adrien Nader!)

Add also new comments for the new INSTALL flags.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13864 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 19:28:18 +00:00
Wojciech Meyer 2dcbc1718b win32unix: add a Makefile (not ".nt" one).
(patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13863 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 19:28:16 +00:00
Wojciech Meyer 1a241d873f configure: store $target and $host in the build configuration (fixed).
(patch by Adrien Nader!)

Compared to the previous version of this patch, this fixes too issues.

First, it updates the makefiles for mingw and msvc to set $host and
$target. I'm not completely sure why that was required since these
variables should have evaluated to empty strings which were only tested
for equality later on. Still, it's needed and it avoids an asymetry
between the regular ./configure-based builds and the ones using pre-made
Makefiles.

Second, it update the ocamlbuild config to also store $host and $target.
I had been building the cross-compilers with OCAMLBUILD_NOBOOT (which is
rather new) and updating that config wasn't needed. However it is
required for the "regular" builds.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13862 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 19:28:15 +00:00
Gabriel Scherer 20710f3675 [patch by Adrien Nader] build: avoid an unneeded gnu-style conditional in Makefile.
The OpenBSD Jenkins slave started failing because of the use of
gnu-style conditionals.
There's unfortunately no way that I know of to get a conditional syntax
that works both with gmake and mk.
Fortunately, the conditional wasn't needed at all since the value was
already computed in the configure step.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13861 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 12:12:33 +00:00
Alain Frisch cf5a7e3b50 Re-undo commit 11966 (which is the fix for #5325 that caused #5578) to be synchronized with 4.01 and have a safe trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13860 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-01 08:29:51 +00:00
Wojciech Meyer c631c7a1dd PR#6060: Add some missing compiler options to ocamlbuild. (Patch by Anil Madhavapeddy!)
* -short-paths is activated via the "short_paths" tag
* -principal is activated via the "principal" tag
* -strict_sequence now has a "strict_sequence" tag to alias the
  "strict-sequence" tag that was already there, to follow the
  convention of command-line options having dashes replaced by
  underscores.  It's easy to mess this up since incorrect tags
  are silently ignored by ocamlbuild.

Add test cases that check if principal and strict-sequence have
been passed, and tweak the test suite slightly to make it easier
to match on failing_msg output.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13859 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 23:28:18 +00:00
Wojciech Meyer 086c04495e Revert "configure: store $target and $host in the build configuration." as it breaks several builds.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13858 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 22:01:53 +00:00
Wojciech Meyer e5eeea88af configure: store $target and $host in the build configuration.
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13857 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 12:58:35 +00:00
Wojciech Meyer fdf9cde11d build: select win32 variants of unix and graph for mingw.
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13856 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 12:58:34 +00:00
Wojciech Meyer edec3c55f6 configure: add a special case to test for BSD sockets for mingw.
(Patch by Adrien Nader!)

I tried to use "hasgot" to test it but proved too difficult since you
must #include <winsock2.h> to make link succeed (windows magic) which
then makes gcc complain about the prototype being wrong.

Since windows already needs a special case in order to add -lws2_32 and
since we know for sure it will be available, skip the hasgot test and
check $target directly.
configure: add a special case to test for BSD sockets for mingw.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13855 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 12:42:24 +00:00
Wojciech Meyer 1e064ceb55 configure: when cross-compiling, set $TOOLPREF and use it.
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13854 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 12:42:23 +00:00
Wojciech Meyer feac346c2f configure: add --target and use "target" instead of "host" for variables
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13853 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 11:41:40 +00:00
Wojciech Meyer 9111707486 configure: for cross, a matching ocamlrun must be on the system.
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13852 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 11:41:39 +00:00
Wojciech Meyer 7dc8ea2b8f misc: fix indent staircase introduced by revision 13843.
(patch by Adrien Nader!)

While at it also re-add two spaces that were eaten.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13851 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 11:03:01 +00:00
Gabriel Scherer 4cedfd24c1 [PR#6059, patch by Anil Madhavapeddy] add -output-obj rules and targets to ocamlbuild for byte and native code
Three corresponding targets are added:
%.byte.o   : bytecode object file
%.byte.c   : bytecode source C file
%.native.o : native code object file


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13849 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-30 08:34:42 +00:00
Damien Doligez 338c5ce867 disable test 8 and 9 in tests/lib-threads under Windows because sometimes they deadlock on exit
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13848 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-28 15:25:14 +00:00
Jacques Garrigue b3f2e718b9 test results
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13846 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-28 10:45:25 +00:00
Jacques Garrigue 07b8b7dd74 Fix PR#6056
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13845 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-28 10:43:25 +00:00
Wojciech Meyer d6d2c4b3ea configure: fix detection of non-working C compiler.
(patch by Adrien Nader!)

The test tried to do something like:
  case "$foo,$bar" in
    *,*) echo 1 ;;
    *) echo "compiler not working" ;;
   esac
However the second case cannot match because of the first one.

Instead, check the return code of the command.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13844 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-27 21:09:25 +00:00
Wojciech Meyer 1b39eae0ae configure: remove unused variables from case...in test.
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13843 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-27 19:46:02 +00:00
Wojciech Meyer 41be48ee15 configure: fail if invoked with -param=value (instead of "-param value")
(Patch by Adrien Nader!)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13842 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-27 19:28:27 +00:00
Wojciech Meyer f85aaad77d configure: use inf/wrn/err functions to write messages for the user.
(Patch by Adrien Nader!)

This makes messages to the user more consistent.

Behaviours:
  inf(): writes its arguments to stderr
  wrn(): writes "[WARNING]" to stderr and then its arguments to stderr
  err(): writes "[ERROR!]" to stderr, then its arguments to stderr, and
         calls "exit 2"

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13841 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-27 19:10:08 +00:00
Wojciech Meyer 88059f62f5 windows: don't define lseeki64 and lseek since they already exist.
Patch by Adrien Nader!

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13840 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-27 19:03:10 +00:00
Benedikt Meurer bf6aa158de Fix typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13838 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-26 21:28:05 +00:00
Benedikt Meurer 178c423de9 [arm] Prefer instructions that enable 16-bit T1 encodings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13837 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-26 19:03:38 +00:00
Alain Frisch 0e6bf1162b #4719: changelog.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13836 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-26 11:52:47 +00:00
Xavier Leroy bfc08c41ac PR#6049: support for OpenBSD/macppc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13835 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-24 08:17:30 +00:00
Hongbo Zhang 034351e37b simplify the change on open! a bit
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13833 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-22 16:53:34 +00:00
Hongbo Zhang f0231fcc21 upgrade camlp4 to support open! and let open!
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13832 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-22 16:12:01 +00:00
Jacques Garrigue f4d0232689 fix PR#5914
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13829 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-22 07:31:37 +00:00
Gabriel Scherer c1da5f35cd fix macppc build (patch by Anil Madhavapeddy)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13827 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-21 14:59:12 +00:00
Fabrice Le Fessant f4d6eafbd3 Fix PR#6044: enabling frame pointers breaks build on MacOS X
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13826 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-20 16:26:19 +00:00
Gabriel Scherer 4ee1956aa2 testsuite/tests/backtrace: fix a stupid (but silenced) error in Makefile
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13822 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-19 15:18:46 +00:00
Gabriel Scherer d06304ee2a bootstrap after the new primitives
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13814 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-19 14:14:05 +00:00
Gabriel Scherer b06701e207 implement a caml_stash_current_backtrace primitive to save the call stack at any point
This commit only implements runtime support in asmrun/ and byterun/.
The more subjective Printexc interface will come separately.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13813 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-19 14:12:02 +00:00
Gabriel Scherer b06015bacb testsuite/tests/backtrace: new test to exercize Printexc.get_raw_backtrace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13812 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-19 14:10:27 +00:00
Gabriel Scherer 75ee032332 testsuite/tests/backtrace: no need to re-run backtrace2 which catches all exceptions
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13811 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-19 14:08:26 +00:00
Gabriel Scherer 1b1c4a4d15 tweak tests/backtrace to also test ocamlopt
Note that native and byte-test share the same reference file, so in
particular they check that ocamlc and ocamlopt report uncaught
exception in the exact same way. Passing this test required a change
in asmrun/backtrace.c/print_location.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13810 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-19 14:05:10 +00:00
Gabriel Scherer be7dca95f5 make ocamlopt pretty-print uncaught exceptions just as ocamlc and Printexc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13809 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-19 14:03:51 +00:00