Commit Graph

1196 Commits (b6bdf20ff797c07ae099b71d6442b3d9aa442243)

Author SHA1 Message Date
Gabriel Scherer 24c118d7b6 fix undefined left shift of negative value.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16520 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-17 14:21:19 +00:00
Gabriel Scherer bedb4e3ac1 Build system: fix a few hardcoded ar commands.
(Daniel Bünzli)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16485 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-09 20:41:57 +00:00
Damien Doligez 3397e7ff16 GPR#243: Faster test suite
(Xavier Leroy)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16466 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-09 15:45:37 +00:00
Xavier Leroy c065a0995c Typo: >> should have been <<.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/big-marshal@16425 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-15 14:28:12 +00:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Damien Doligez 76c4f9c009 add create_float_array and deprecate make_float_array
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16407 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-07 13:51:27 +00:00
Gabriel Scherer 1fcc11e8cd backtrace: Require caml_val_raw_backtrace_slot to return an immediate value
From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16370 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:27 +00:00
Gabriel Scherer 8da9ae04bb Adjust documentation
From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16368 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:24 +00:00
Gabriel Scherer c94118d61f Only register caml_backtrace_last_exn as root once.
This simplify the code, would have prevented GPR#205 and prepare ground
for upcoming improved backtrace generation.

From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16367 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:22 +00:00
Gabriel Scherer 91d1e34e2d Document backtrace infrastructure, make types more explicit
From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16366 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:20 +00:00
Gabriel Scherer 23d10e0875 Move backend specific backtrace code to backtrace_prim.c
And share backtrace.c between asmrun and byterun.

From: Frédéric Bour <frederic.bour@lakaban.net>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16365 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-22 06:04:18 +00:00
Gabriel Scherer d020ae12af Handle custom block with finalizers in deserialization. Fix PR#3612
(Pierre Chambart)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16358 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-16 21:23:49 +00:00
Gabriel Scherer 8851e6b7d5 Allow allocating custom blocks with finalizers in the minor heap.
(Pierre Chambart)

When allocating this kind of blocks to the minor heap, they are
added to 'caml_finalize_table' which is traversed on
'caml_empty_table' to check if any of such block is dead.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16357 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-16 21:23:47 +00:00
Gabriel Scherer ceb5e0baa8 Move bytecode debug info from the OCaml heap to static allocations
There is currently a GC bug in the bytecode debug-info handling, due
to the fact that
  void read_main_debug_info(struct debug_info *di)
is passed a internal pointer in the middle of a custom block inside
the OCaml heap. I could only observe the bug when such custom blocks
are allocated on the minor heap -- which does not happen with the
current implementation, but becomes possible after GPR#92 for example
(which let custom blocks with finalizer be allocated in the
minor heap).

This commit fixes this issue by moving debug_info chunks from the
OCaml heap to the C land, stored in a dynamic table. They are
allocated when caml_add_debug_info is called, and removed when
caml_remove_debug_info is called.

(Another approach would be to keep the debug_info inside the OCaml
heap, but make sure that there are no dangling internal pointers. See
GPR#228 for an attack of this by Mark Shinwell.)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16356 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-16 20:56:12 +00:00
Gabriel Scherer 9a533a50cd make alldepend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16352 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:59 +00:00
Gabriel Scherer a69e3e3099 add primitive caml_sys_isatty; fix bootstrap
(Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16346 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:47 +00:00
Gabriel Scherer 162cbc8d1e minor: explicit a precondition on rootlist->level to please Clang analyzer
globroots.c:98:21: warning: Dereference of undefined pointer value
    e->forward[i] = update[i]->forward[i];
                    ^~~~~~~~~~~~~~~~~~~~~

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16336 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-05 07:50:23 +00:00
Gabriel Scherer 7a87170dfc fix the backtrace.c fix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16335 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-05 07:50:21 +00:00
Gabriel Scherer 32511c53af fix an issue spotted by the Clang analyzer (potential malloc(0) call)
byterun/backtrace.c:142:12: warning: Call to 'malloc' has an allocation size of 0 bytes
  events = malloc(*num_events * sizeof(struct ev_info));
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16332 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 20:32:09 +00:00
Xavier Leroy ac62e93d6b Fix call to undeclared function "caml_ml_enable_runtime_warnings" in startup_aux.c
This is a follow-up to commit r16245, PR#6902, GPR#210.
- Runtime warning machinery was local to io.c; make it globally usable.
- Move definitions and accessor functions to misc.c and gc_ctrl.c
  by analogy with other configurable runtime parameters.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16325 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-04 09:38:23 +00:00
Xavier Leroy e2d0a13165 Add alternate marshaling format, used when marshaled data is >= 4 Gb.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/big-marshal@16324 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-03 12:27:15 +00:00
Gabriel Scherer 1957021b27 make alldepend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16318 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 18:34:09 +00:00
Gabriel Scherer 6e224a76a1 GPR#221: use CAMLnoreturn_{start,end} in the same way as CAMLunused_{start,end}
This is ugly. C pragmas are ugly. At least we're ugly and consistent now.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16315 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:24 +00:00
Gabriel Scherer 2f2b2f0bd1 GPR#165: refactor and document CAMLunused{,_start,_end}
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16314 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:22 +00:00
Gabriel Scherer edb714dc15 GPR#221: keep Noreturn and add CAMLnoreturn_{start,end}
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16313 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:20 +00:00
Gabriel Scherer 98456ca63b GPR#165: reintroduce 'CAMLunused' for backward compatibility reasons.
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16312 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 16:54:18 +00:00
Gabriel Scherer 370677b639 PR#6649, GPR#222: accept (int_of_string "+3")
(Christopher McAlpine)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16308 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:32:44 +00:00
Gabriel Scherer a3041d9550 Added the missing POSIX signals in Sys (Guillaume Bury)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16302 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:45 +00:00
Damien Doligez 1326b12f74 merge branch 4.02 from rev 16205 to rev 16238
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16296 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-29 22:19:24 +00:00
Gabriel Scherer 394d8795a9 GPR#165: Added pragmas for MSVC do disable the unused variable warning for CAMLparam and CAMLlocal.
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16266 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:56 +00:00
Gabriel Scherer 1c29e17fd3 GPR#165: Missing Noreturn moved before the functions and added a missing undef in socketaddr.c
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16265 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:55 +00:00
Gabriel Scherer f7199a9ee2 GPR#165: Fixed small typo it should be _MSC_VER not __MSC_VER
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16264 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:53 +00:00
Gabriel Scherer 34ab11fbcc GPR#165: Changed the definition of the Noreturn macro to also work with 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
2015-07-26 19:28:50 +00:00
Gabriel Scherer 75a7b333ed GPR#165: Added define guards around the macros in unixsupport and for the isnan and isfinite macro.
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16261 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:48 +00:00
Xavier Leroy bb86f5b545 Preliminary support for hexadecimal notation for FP numbers.
- Primitives:
     caml_float_of_string  extended to recognize "0x" hexa notation
     caml_hexstring_of_float  new primitive
  We do not assume hex floats are supported by the C standard library.
  Instead, conversions hex string <-> float are implemented manually.
- Printf: hex FP output supported with formats %h / %H
- Scanf: remains to be updated (see TODO in stdlib/scanf.ml)


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/hex-float@16257 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 09:29:33 +00:00
Gabriel Scherer 7d1f7af832 fix "compatibility macros for runtime constants that recently changed names" (svn id: 16008 ; git commit: 8c1f0cff)
(Thomas Refis)

The constants weren't just renammed: they previously denoted a size in bytes,
they now denote a size in words.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16251 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-25 20:44:04 +00:00
Alain Frisch 49a2533472 PR#6902, GPR#210: runtime emits a warning when finalizing an I/O channel which is still open.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16245 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 13:11:26 +00:00
Xavier Leroy 60384ed840 For read-and-clear, use GCC/Clang atomic builtins if available.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16244 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 12:38:55 +00:00
Xavier Leroy 58c07fa89e PR#6722: compatibility with x32 architecture (x86-64 in ILP32 mode)
configure: deselect ocamlopt, which is not supported
signals_machdep.h: use i386 instruction sequence, not amd64.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16243 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 12:31:42 +00:00
Xavier Leroy a1bafbbb67 PR#6316: Scanf.scanf failure on %u formats when reading big integers.
The approach implemented is the second one suggested by Benoît Vaugon in the PR:
- The int_of_string functions accept a "0u" prefix meaning "decimal unsigned".
- The '%u' format of the scanf functions adds this "0u" prefix before conversion.
This is consistent with the current handling of unsigned hexa, octal, and binary numbers.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16241 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 09:36:03 +00:00
Damien Doligez 4b83d53fbc update .depend and bootstrap compilers after 4.02 merge
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16218 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 18:34:07 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Alain Frisch 30450e77df Fix GPR#205: Clear caml_backtrace_last_exn before registering as root.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16187 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-23 16:10:03 +00:00
Alain Frisch cd04d52523 #6902: revert commit 15817 (it causes memory leaks on input channels).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16174 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-15 08:21:36 +00:00
Damien Doligez 6e5c745447 GPR#191 followup: add `Is_in_static_data` to address_class.h
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16167 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-09 16:40:05 +00:00
Mark Shinwell 8df90ef051 Port fix for GPR#191 to trunk (making gc.h and some part of memory.h public)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16163 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-08 13:21:42 +00:00
Alain Frisch 311799dbf5 Fix bug introduced in commit 15830 (for #6468): caml_init_code_fragments also needs to be called in case of 'ocamlc -custom'. One should really think about sharing code between caml_main and caml_startup_code.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16077 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-05 14:16:22 +00:00
Damien Doligez 0477bab3bf deduplicate some startup code and fix PR#6808: the parsing of OCAMLRUNPARAM is too lax
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16074 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-04 15:44:40 +00:00
Gabriel Scherer 70450de8a1 PR#6693: also build libasmrun_shared.so and lib{asm,caml}run_pic.a
(Peter Zotov, review by Mark Shinwell)

NB: after applying this change you need to run ./configure again.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16068 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-02 15:30:41 +00:00
Gabriel Scherer f6018b0ef1 PR#6846: build failure with prefixed tools
(Niels Ole Salscheider)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16048 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-26 20:50:20 +00:00
Damien Doligez 0b3caf43bf PR#6838: Invalid memory in C thread bindings (caused by commit 15817)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16025 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-21 15:20:10 +00:00
Gabriel Scherer 8c1f0cff97 compatibility macros for runtime constants that recently changed names
(Pierre Chambart)

caml_stat_heap_size -> caml_stat_heap_wsz
caml_stat_top_heap_size -> caml_stat_top_heap_wsz

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16008 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-12 17:27:29 +00:00
Damien Doligez 2e4de14a94 fix indentation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15979 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-02 02:51:58 +00:00
Jérémie Dimino 837f94c3a0 PR#6078: Include signals.h in {nat,}dynlink.c
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15963 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-25 15:50:27 +00:00
Damien Doligez e60a2db81c PR#6521: {Bytes,Char,String}.escaped are locale-dependent
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15901 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-11 18:41:15 +00:00
Jérémie Dimino fae584230d PR#6078: release the runtime system when calling caml_dlopen
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15878 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-05 12:47:35 +00:00
Damien Doligez 3d89f3ef7e PR#6664: Crash when finalising lazy values of the wrong type.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15876 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-03-04 19:58:49 +00:00
Gabriel Scherer c984a1414d fix the MSVC fix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15833 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 15:44:04 +00:00
Gabriel Scherer 527fff9044 meta.c: one more MSVC fix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15832 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 15:11:00 +00:00
Gabriel Scherer 06414a08e7 backtrace.c: revert to C89 variable declarations to please MSVC (?!)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15831 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 14:55:41 +00:00
Gabriel Scherer 304c9c91a5 PR#6468: toplevel now supports backtraces if invoked with OCAMLRUNPARAM=b
(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
2015-02-08 14:10:12 +00:00
Gabriel Scherer 5302d101be PR#6760: closures evaluated in the toplevel can now be marshalled
(Peter Zotov, review by Jacques-Henri Jourdan)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15829 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-08 14:10:08 +00:00
Damien Doligez 46f6fe62f3 fix bug where some unclosed channels could be discarded without flushing
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15817 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-06 21:58:00 +00:00
Damien Doligez 11bc5fe4bf GPR#142: add a CAMLdrop macro for undoing CAMLparam*/CAMLlocal*
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15814 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-06 15:54:05 +00:00
Damien Doligez bd03b445d0 remove exec permission from Makefile.common
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15806 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-02-04 20:04:27 +00:00
Damien Doligez 66af6470a6 PR#5418 (comments) : generate dependencies with $(CC) instead of gcc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-20 17:02:26 +00:00
Damien Doligez 19801cfea7 PR#4539: change exception string raised when comparing functional values
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15778 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-16 21:50:24 +00:00
Damien Doligez 44eb1c5476 un-inline a call to caml_check_urgent_gc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15769 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-08 22:56:35 +00:00
Damien Doligez d5e74e456f update .ignore files
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15768 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-07 19:46:32 +00:00
Damien Doligez c09c894a3a do not compact if the heap is already near its minimum size
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15767 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-07 19:30:28 +00:00
Damien Doligez d1f4192b45 fix comment
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15766 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-07 19:29:40 +00:00
Gabriel Scherer 9072a3fbdd PR#5587: windows fix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15759 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 15:14:32 +00:00
Gabriel Scherer 7ca29ef3f7 PR#5887: move the byterun/*.h headers to byterun/caml/*.h to avoid header 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
2014-12-27 14:41:49 +00:00
Gabriel Scherer 65758c08dd PR#6729: minor Makefile.nt fix
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15755 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 10:43:38 +00:00
Gabriel Scherer f22564b84d PR#6729: Makefile: remove suffix rules to avoid -jN race conditions
(Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15751 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-27 08:44:48 +00:00
Damien Doligez d5b3d2f7e4 more cleanup of char * and sizes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15747 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-24 20:18:22 +00:00
Damien Doligez 0bb55ef40b fix type errors (warnings) reported by the C compiler
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15679 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-16 19:36:35 +00:00
Gabriel Scherer dee24a9dba PR#6560: Wrong failure message for {Int32,Int64,NativeInt}.of_string
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15672 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-14 21:20:51 +00:00
Damien Doligez 1cb0b23a08 Start tidying up the runtime:
- document most of the "size" and "length" parameters and global variables,
  specifying bytes or words. Change some of them from bytes to words.
- start getting rid of "char *" and use sensible types instead.
- other small changes


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15647 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-12 15:18:04 +00:00
Gabriel Scherer 2922831951 New primitive: caml_alloc_dummy_function ... caml_alloc_dummy_function takes the function arity as a second argument. This new information can be used by js_of_ocaml to perform better optimization.
From: Hugo Heuzard <hugo.heuzard@gmail.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15592 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 12:21:49 +00:00
Gabriel Scherer 638a953bcf Sys: Use constant for some runtime limitations.
It allows to have non-standard limits for non-standard runtime.
ie: js_of_ocaml use 32bits integer, and can handle
string much bigger than 16Mo.

From: Hugo Heuzard <hugo.heuzard@gmail.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15588 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 12:19:27 +00:00
Alain Frisch 33542b3440 Add 0x400 flag to OCAMLRUNPARAM=v. It displays the total number of words allocated by the program just before it exits.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15499 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-09 11:50:23 +00:00
Jérémie Dimino a360747bc2 PR#6539: don't divide caml_major_heap_increment by the word size
(Patch by Daniel Richman)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15186 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-03 14:08:15 +00:00
Xavier Leroy b868c05ec9 PR#6517: use ISO C99 types {,u}int{32,64}_t in preference to our homegrown
types {,u}int{32,64}.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-27 09:58:33 +00:00
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Gabriel Scherer 97b302a1ce Add missing Noreturn qualifiers
(patch by Peter Zotov, review by Max Mouratov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15057 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 15:17:07 +00:00
Damien Doligez 9ac64ba6a4 PR#6406: Expose OCaml version in C headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15017 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-21 20:39:38 +00:00
Xavier Leroy d7f3235c1b Reflecting commit 15010 on version/4.02:
PR#6460: runtime assertion failure with large [| e1;...eN |]
float array expressions


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15011 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-18 09:14:02 +00:00
Mark Shinwell dd3a286bbe PR 6439 part 1: fix mistake in backtrace.c
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14923 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-30 09:52:05 +00:00
Xavier Leroy d12328e7b5 PR#6361 continued: don't count 1 for Forward_tag, because in this case a GC can change the hash value. Instead, avoid looping on Forward_tag cycles by another mean.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14850 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 16:42:05 +00:00
Mark Shinwell 881ec04f39 no-naked-pointers patch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14791 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 07:29:24 +00:00
Gabriel Scherer 4f913f2498 reinstate the deprecated primitive caml_get_exception_backtrace
Jacques-Henri initially removed the primitive, which is deprecated
since 4.01, but I suspect there still are uses in the wild. I guess we
should wait for a few more versions.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14780 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:19:53 +00:00
Gabriel Scherer ebd3778122 factor the pointers-into-ints cleverness through pair of macros
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14779 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:19:52 +00:00
Gabriel Scherer 0b50a80ab2 cleanup cmp_ev_info
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14778 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:19:50 +00:00
Gabriel Scherer 1fdea57c4c Printexc: OCaml-friendly access to individual backtrace slots
(Patch by Jacques-Henri Jourdan)

There are several changes:

- `raw_backtrace` is no longer an abstract type, but rather an
  `raw_backtrace_slot array`, where `raw_backtrace_slot` is a new
  abstract type. `raw_backtrace_slot` elements are hashable and
  comparable. At runtime, values of this type contain either
  a bytecode pointer or a frame_descr pointer. In order to prevent the
  GC from walking through this pointer, the low-order bit is set to
  1 when stored in the array.

- The old `loc_info` type is know public, renamed into `backtrace_slot`:

      type backtrace_slot =
        | Known_location of bool   (* is_raise *)
                          * string (* filename *)
                          * int    (* line number *)
                          * int    (* start char *)
                          * int    (* end char *)
        | Unknown_location of bool (*is_raise*)

- new primitive :

    val convert_raw_backtrace_slot: raw_backtrace_slot -> backtrace_slot

  Rather than returning an option, it raises Failure when it is not
  possible to get the debugging information. It seems more idiomatic,
  especially because the exceptional case cannot appear only for a part
  of the executable.

- the caml_convert_raw_backtrace primitive is removed; it is more
  difficult to implement in the C side because of the new exception
  interface described above.

- In the bytecode runtime, the events are no longer deserialized once
  for each conversion, but once and for all at the first conversion,
  and stored in a global array (*outside* the OCaml heap), sorted by
  program counter value. I believe this information should not take
  much memory in practice (it uses the same order of magnitude memory
  as the bytecode executable). It also makes location lookup much more
  efficient, as a dichomoty is used instead of linear search as
  previously.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14776 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:19:47 +00:00
Mark Shinwell 9419b6c909 fixed bug in native caml_raise_with_string, and synced code in byterun/fail.c for that function
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14772 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09 15:33:02 +00:00
Fabrice Le Fessant b1943e1ac7 Remove FIRST_UNIMPLEMENTED_OP from interp.c
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14748 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 13:59:25 +00:00
Fabrice Le Fessant 680fe9f91d Add FIRST_UNIMPLEMENTED_OP instructioon to simplify bootstrapping after adding new bytecode instructions at the end
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14734 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 20:14:23 +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
Jérémie Dimino f0b0c82b6f add the %int_as_pointer primitive
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14726 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 12:47:02 +00:00
Mark Shinwell 2dd92969d2 fix bug in previous Val_unit initialization patch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14725 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 09:54:28 +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
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
Alain Frisch 1ef064f29c #6273: fix.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14654 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 10:14:07 +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 44845c5c17 PR#6075: fix build under Windows (there is no caml_strbuf_free).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14651 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 09:41:24 +00:00
Jérémie Dimino d3ec5feb26 PR#5941: add Printexc.set_uncaught_exception_handler
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 15:36:08 +00:00
Xavier Leroy 443b7d722a As mentioned by gcc -Wall, the variable "frame_number" is useless. Removed it.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14637 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 10:06:03 +00:00
Xavier Leroy dd17af8b43 Simpler variant of commit r14635:
- configure: no change necessary
- byterun/config.h: make sure ARCH_INT64_TYPE and related macros
  are always defined, for Coq and others to use.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14636 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 10:00:42 +00:00
Xavier Leroy 86bd9990f4 configure: always define ARCH_INT64_TYPE in config/m.h because Coq
and maybe others rely on it
byterun/config.h: select "long long" in preference to "long" for "int64",
  just because this is how it was done in earlier versions.
  (Minimizing suprises.)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14635 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 09:54:34 +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
Damien Doligez 7303ac34ca fix some of the whitespace problems in the source
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12 10:17:02 +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
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
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
Damien Doligez 9d86709547 fix major performance problem on large heaps by making the heap increment proportional to the heap size
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14442 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-20 13:04:01 +00:00
Jérémie Dimino 9fd3c41247 fix #6276: release the runtime in all stubs that might block
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14384 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-23 16:24:50 +00:00
Alain Frisch c2cab7f38d #6180: avoid redundant check in caml_make_float_vect.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14338 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-04 09:37:37 +00:00
Damien Doligez aa58e55958 port to cygwin-64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14337 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-03 14:43:02 +00:00
Alain Frisch 7c98525d0f Add proper casts.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14304 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-19 10:36:06 +00:00
Alain Frisch f16534ef1a Reintegrate raise_variants branch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14289 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-13 13:55:13 +00:00
Alain Frisch a51080b15a No need for caml_init_exceptions.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14288 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-13 13:16:15 +00:00
Alain Frisch 7bb3e64160 Do not introduce Obj.raw_tag.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-06 10:57:20 +00:00
Gabriel Scherer 9e17f24967 bound checking bug with caml_string_{get,set}{16,32,64}: fix the runtime C code
As notified by Nicolas Trangez, the following program behaves in an
unexpected way by returning 0 instead of failing with an out-of-bound
exception:

  external get16 : string -> int -> int = "%caml_string_get16"
  let test = get16 "" 0

caml_string_get16(str, idx) will access indices (idx) and (idx+1). The
bound-checking code is currently implemented as:

   if (idx < 0 || idx >= caml_string_length(str) - 1) caml_array_bound_error();

This is wrong as caml_string_length returns an mlsize_t which is
unsigned, so substracting 1 gets buggy when the size is 0. The test
should be written as follow:

   if (idx < 0 || idx + 1 >= caml_string_length(str)) caml_array_bound_error();

Note 1: we can exploit this bug to make out-of-bound access to
a string, but I think get16 examples will run into the padding
characters of OCaml strings and behave in a not-too-wrong way. It may
also be the case of get32, but get64 will access 7 bytes, so access
memory outside the string:

  # external set64: string -> int -> int -> unit = "%caml_string_get64";;
  external set64 : string -> int -> int -> unit = "%caml_string_get64"
  # set64 "" 0 0;;
  Segmentation fault

Note 2: this first commit only fixes the C code in byterun/str.c. Only
ocamlc actually uses these functions when the compiler primitive is
used ("%caml_string_get16" instead of "caml_string_get16"). ocamlopt
generates ocaml code directly, and this part has yet to be fixed in
a following commit.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14267 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-05 11:09:29 +00:00
Alain Frisch 5ef2ee909f Support for exception values allocated in the static area (e.g. out of bound exception in native code).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14242 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-23 15:17:05 +00:00
Alain Frisch fc87ceee89 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14241 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-23 15:04:00 +00:00
Alain Frisch 0f6f367ad4 Change the representation of exception slots: instead of being represented as 'string ref', they are now blocks
of size 2, with tag = Object_tag, the first field being the pointer to the string, and second one being a unique id, generated
from the same sequence as for object values.  Special case for predefined exceptions, represented with a negative id.

The unique id generator is moved from camlinternalOO to the C runtime system.

Also fix some bugs.



git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14239 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-23 14:28:31 +00:00
Alain Frisch d802a51be6 #6203: change representation of exception values created with a constant constructor: the value is now equal to the exception slot. This avoids some allocation when the constructor is called and an extra indirection on matching against the constructor.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14235 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-18 13:00:58 +00:00
Alain Frisch 0915cb5b5f Rename raise_nostack -> raise_notrace. Expose it in Pervasives.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14225 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 13:52:14 +00:00
Alain Frisch c4513e1011 Recognize reraises in handlers.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14224 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 13:21:53 +00:00
Alain Frisch f31325cbaf #6203, #5935: variants of raise. 'reraise' is currently only inserted by the compiler when an handler does not catch the exception. The default 'raise' always start with a fresh backtrace. There is also 'raise_nostack' which does not trigger the stack trace recording. Bytecode only for now.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14223 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 12:31:50 +00:00
Alain Frisch 2373f76c36 #6180: efficient creation of uninitialized float arrays.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-17 11:54:31 +00:00
Damien Doligez 7844495624 Merge branch 4.01 from branching point to 4.01.0+rc1
Command line used:
  svn merge --accept postpone -r 13776:14055 $REPO/version/4.01 .


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-04 15:12:37 +00:00
Xavier Leroy 5e78d37215 PR#5350: check return code of lseek() in read_trailer()
(Reflecting commit 13959 in version/4.01)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13960 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-01 09:19:05 +00:00
Xavier Leroy 931ec15f78 PR#6084: Define caml_modify and caml_initialize as weak symbols to help
with Netmulticore.  (Reflecting commit r13957 on version/4.01)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13958 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-01 08:24:07 +00:00
Damien Doligez 5fbcc8e6ae PR#4243: make the Makefiles parallelizable
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13931 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-24 14:39:31 +00:00
Xavier Leroy 055d5c0379 Port to the ARM 64-bits (AArch64) architecture (experimental).
Merge of branch branches/arm64.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13909 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-18 16:09:20 +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
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 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
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 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
Alain Frisch 7da2abeceb #4719: fix (when a bytecode calls ocamlrun, the name of the bytecode is in argv[0]). It would be more robust to have headernt.c extract the full path to the bytecode and pass it explicitly to ocamlrun.exe (as its first argument).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13801 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-18 11:13:01 +00:00
Alain Frisch f6890fbacb Remove debug.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13800 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-18 10:39:29 +00:00
Alain Frisch 58e99bd087 #4719: use GetModuleFileName to get an absolute path to the current executable under Windows.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-18 10:25:01 +00:00
Xavier Leroy 3dd22133ef PR#5813: GC not called when unmarshaling repeatedly in a tight loop (ocamlopt)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13755 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-07 14:06:30 +00:00
Alain Frisch 4ae200a678 Commit Xavier's fix for #6032.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13750 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-06 11:39:51 +00:00