Commit Graph

10679 Commits (0b1575a6b02455d742cdb4e0780089f697a17492)

Author SHA1 Message Date
Gabriel Scherer 0b1575a6b0 GPR#201: Keep general types of Printf.{ifprintf,ikfprintf}
(Maxence Guesdon)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16309 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 15:36:58 +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 60314e38c5 fix -dsource error on recursive modules
(Hongbo Zhang)

when printing recursive module the old version would print no space
before 'and':
  A : ... = struct
    ...
  endand B : ... = ...

this tiny PR fixes such problem

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16307 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:53 +00:00
Gabriel Scherer 5756c0ae69 update Changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16306 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:51 +00:00
Gabriel Scherer 36d53043b2 ocamlbuild: + Log.is_logging to skip allocation in hot path
(user 'ygrek')

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16305 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:50 +00:00
Gabriel Scherer c2704c259b ocamlbuild: Log: do not wrap format unless it will be used
(user 'ygrek')

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16304 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:48 +00:00
Gabriel Scherer 7569a5f7a0 ocamlbuild: specialize Hashtbl for Resource.Cache
(user 'ygrek')

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16303 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-02 13:05:47 +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
Xavier Leroy 688d5a5915 Changed OCamlbuild's license to LGPL with static linking exception.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16294 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-28 13:18:34 +00:00
Xavier Leroy 047749ec9a Of--by-one-bit error in two_power_m1_big_int, causing out-of-bound write if n is a multiple of length_of_digit.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16293 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-28 11:52:21 +00:00
Alain Frisch ef5bfc9a66 #6940: fix regression on 32-bit machine related to new unboxing strategy.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16292 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-28 10:56:23 +00:00
Xavier Leroy c157926a36 float_of_big_int: for negative arguments, the top 55 bits must round towards -inf, otherwise wrong rounding occurs. Hence, use shift_right_big_int and not shift_right_towards_zero_big_int.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16284 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-28 07:49:50 +00:00
Damien Doligez debaf6edb2 fix regression test for PR#6938 for 32-bit machines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16283 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 18:44:10 +00:00
Xavier Leroy 66e958ef0f Still following up on commit 16278.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16282 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 17:25:17 +00:00
Alain Frisch b71ce51227 Hopefully finish 16278 (again).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16281 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 16:48:32 +00:00
Alain Frisch 2b25dd5d4a Hopefully finish 16278.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16280 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 16:35:28 +00:00
Xavier Leroy 7027b858eb Update "register_class" followign the introduction of the Val machine type.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16278 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 11:37:52 +00:00
Alain Frisch 438cbf52cc Rvert 16273. gasche pointed to a counterexample: 'let rec x = (x;1)'.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16277 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 11:33:21 +00:00
Alain Frisch 76e5208983 Cosmetic.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16276 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 10:40:48 +00:00
Alain Frisch a32821b740 Inline transl_unbox_let to clarify code.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16275 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 10:16:57 +00:00
Alain Frisch 1a31367f74 Allow unbox in let-rec bindings, for uniformity.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16274 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 10:12:35 +00:00
Alain Frisch acab661fed Fix suspicious (harmless) case in cmm-compilation of letrec.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16273 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 09:58:07 +00:00
Xavier Leroy bd88ddb4fb Mention commit r16269 (merge of GPR#115).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16272 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 09:44:20 +00:00
Alain Frisch 01d4824c21 GPR#107: Prevent more unnecessary float boxing, especially in if and match. Patch by V. Brankov.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16271 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 09:40:27 +00:00
Xavier Leroy 09428028b1 More precise typing at the C-- and Mach level.
(Merge of branch cmm-mach-types and PR#115.)

- Register type "Addr" is split into
    . "Val" (well-formed OCaml values, appropriate as GC roots)
    . "Addr" (derived pointers within the heap, must not survive a GC)
- memory_chunk "Word" is split into
    . "Word_val" (OCaml value)
    . "Word_int" (native-sized integer, not a pointer into the heap)

Cmmgen was updated to use Word_val or Word_int as appropriate.

Application #1: fail at compile-time if a derived pointer within the heap
survives a GC point (cf. PR#6484).

Application #2: CSE can do a better job across allocation points
(keep factoring expressions of type Int, Val, Float, but not Addr).

Application #3: slightly fewer roots given to the GC
(e.g. pointers into bigarray data).



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16269 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 09:20:39 +00:00
Xavier Leroy 53231bcdc3 Update to trunk r16267.
A change on trunk in cmmgen was causing problems: the use of array_indexing
in bigarray_indexing was constructing derived pointers of Addr type
instead of the correct Int type.  (Because bigarray inner pointers
are outside the heap, and because they are live across allocations.)
Added an optional argument to array_indexing to specify expected
pointer type, and adapted bigarray_indexing to use it with type Int.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cmm-mach-types@16268 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-27 08:18:53 +00:00
Gabriel Scherer 14a844ece1 update Changelog
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16267 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:58 +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 a1063f29bf GPR#165: Undef the erno values and redefine them using the winsocket values.
(Bernhard Schommer)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16263 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:28:52 +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
Gabriel Scherer 5a47e0cb7b GPR#156: Optimize reallocation of caml_frame_descriptors
(Pierre Chambart)

It now reallocates and reinitialises the whole table only when it is
too small. This avoids quadratic behavior when loading a lot of module
with dynlink.

This was problematic on frama-c when inlining increase the code
size. The frame table initialisation took ~0.5 second. This is quite
noticeable on real examples where the whole frama-c analysis is ~1.5s
long.

Also allows to unregister a frametable.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16260 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:01:47 +00:00
Gabriel Scherer e91bb93784 GPR#196: Make [Thread.id] and [Thread.self] [noalloc].
(Clark Gaebel)

These functions are called every tick of the Async scheduler, and
are the only remaining calls to [caml_c_call] every cycle. It would
be nice to remove them, especially since these functions don't
allocate.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16259 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:01:45 +00:00
Gabriel Scherer 235ee2ddef GPR#26: support for "(type a b ..)" as sugar for "(type a) (type b) .."
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16258 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 19:01:42 +00:00
Gabriel Scherer 618abdad8d bootstrap (hoping to un-stuck the CI instances on format typing)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16255 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-26 05:47:03 +00:00
Gabriel Scherer 6c419e8a17 PR#6924: Tiny optim to avoid some spilling of floats in x87
(Alain Frisch)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16254 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-25 20:44:08 +00:00
Gabriel Scherer 454538ae93 GPR#213: Simplif.emit_tail_infos: recurse on function body in an application
(Frédéric Bour)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16253 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-25 20:44:07 +00:00
Gabriel Scherer d939804269 GPR#208: add "asm" ocamlbuild tag to enable -S
(Patch by ygrek)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16252 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-25 20:44:05 +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
Gabriel Scherer 907305ce20 PR#6938: fix regression on "%047.27{l,L,n}{d,i,x,X,o,u}"
(Benoît Vaugon, report by Arduino Cascella)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16250 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-25 20:44:02 +00:00
Xavier Leroy 8fc4849b83 big_int.ml: clarify comments.
test_ratios.ml: on x86-32 with x87 extended precision, the computation of the expected result is sometimes wrong because of double rounding in FP division.  Reduce the number of test rounds so that we don't run into this problem.  Note that the float_of_ratio function being tested produces the correct results on x86-x87, because it is immune to double rounding (exact -> extended precision -> double precision).


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16249 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-25 15:25:01 +00:00
Xavier Leroy f9176a1e26 Follow-up to r16247: garbled comment.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16248 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 18:01:03 +00:00
Xavier Leroy af4e6bff91 PR#6896: serious reimplementation of Big_int.float_of_big_int and
Ratio.float_of_ratio, ensuring that the result is correctly rounded.

The previous implementations were embarassingly imprecise and slow.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16247 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 17:44:12 +00:00
Alain Frisch f29322000e Text.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16246 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 16:11:38 +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