Commit Graph

11099 Commits (7f8019fe309b2059d66813c4b0b8abaf851ad104)

Author SHA1 Message Date
Damien Doligez 7f8019fe30 testsuite/tests/lib-dynlink-*/Makefile: fix wrong include dir 2015-11-25 15:47:53 +01:00
Nicolas Ojeda Bar a524920aa2 Remove Typedtree.optional
From comments in typedtree.mli:

When introduced in 2000, this [type] enabled a more efficient code
generation for optional arguments. However, today the information is
redundant as labels are passed to [transl_apply] too. Could be cleaned
up.
2015-11-25 00:37:46 +01:00
alainfrisch e02650addb Doc (catenate -> concatenate, which is more common and coherent with other doc strings). 2015-11-24 16:05:30 +01:00
Alain Frisch 3cbeede734 Merge pull request #309 from hcarty/patch-1
Document that ( @ ) is not tail recursive
2015-11-24 16:03:36 +01:00
Hezekiah M. Carty 0fedfc1b74 Document that ( @ ) is not tail recursive
See http://caml.inria.fr/mantis/view.php?id=7057 for the initial report.

Text copied from [List.append]'s documentation comment.
2015-11-24 09:51:31 -05:00
alainfrisch fe68945a20 Only the return idents are useful in pat_bound_idents, simplify accordingly. 2015-11-24 15:43:26 +01:00
Gabriel Scherer 6d5b2403bd Merge pull request #29 from superbobry/ocamldoc-errors
PR#4518: change location format for reporting errors in ocamldoc
2015-11-23 23:20:10 +01:00
Sergei Lebedev 9dc2b25a0e PR#4518: change location format for reporting errors in ocamldoc 2015-11-24 00:47:31 +03:00
alainfrisch 657e6be3dd Be more consistent in caml_alloc_shr_no_raise: it can never raise. 2015-11-23 13:52:04 +01:00
alainfrisch 95233ec9ca Cosmetic (as suggested by G. Scherer). 2015-11-23 13:51:02 +01:00
alainfrisch 092c5e4506 Fixes for MSVC. 2015-11-23 13:30:34 +01:00
Alain Frisch 4788ab33d6 Merge pull request #283 from mlasson/trunk
Fix memory leaks in intern.c when OOM is raised
2015-11-23 13:25:34 +01:00
Marc Lasson bf0fc9fc9c Apply xleroy patch to implement alloc_shr_no_raise 2015-11-23 12:09:16 +01:00
Gabriel Scherer 264bc665de minor Changes: renaming whitequark 2015-11-23 10:43:03 +01:00
Gabriel Scherer f5131709c7 Merge pull request #304 from ygrek/stack_len
make Stack.length constant time
2015-11-23 10:04:50 +01:00
alainfrisch a9ef6428fc MSVC (at least some old version) does not support inline. Use _inline instead. This #define should perhaps go somewhere else, e.g. caml/misc.h (defined as caml_inline?). 2015-11-23 09:58:44 +01:00
alainfrisch 4c8affc1ca MSVC doesn't support variable declaration within code blocks. 2015-11-23 09:49:23 +01:00
Gabriel Scherer 6a91a85132 Merge pull request #169 from nojb/lapply-record
Turn Lapply case of Lambda.lambda into a record
2015-11-23 06:58:57 +01:00
Nicolas Ojeda Bar aaed35bf87 Turn Lapply case of Lambda.lambda into a record 2015-11-22 23:08:47 +01:00
ygrek 53ea437ecd add tests for Stack 2015-11-22 12:42:23 -08:00
ygrek c1d82c7650 make Stack.length constant-time 2015-11-22 12:15:29 -08:00
Gabriel Scherer abf21032f8 Merge pull request #175 from OCamlPro-Iguernlala/simple-sharing-Maps
Simple sharing maps
2015-11-22 19:23:28 +01:00
iguer 2b25384df5 simple sharing in maps: update Changes 2015-11-22 18:36:37 +01:00
iguer fd163982d7 update the doc of Map.(add, remove, filter) 2015-11-22 18:29:16 +01:00
iguer d689a686b9 Map.add x y m returns the original map if x is already bound to a value that is physically equal to y in m 2015-11-22 18:29:16 +01:00
iguer 37159fbc42 Map.filter returns the original map when the given predicate satisfies all the bindings of the map 2015-11-22 18:29:16 +01:00
iguer 81ca324ef3 Map.remove returns the original map when the binding to be removed is not present in the map 2015-11-22 18:29:15 +01:00
Gabriel Scherer 5db98d0074 Merge pull request #298 from lijunsong/trunk
PR#6935:ocamldebug:load_printer raise uncaught exception when passing directory
2015-11-22 17:23:04 +01:00
lijunsong 99a552926e Add an entry in Changes. 2015-11-22 07:41:45 -08:00
Gabriel Scherer d2ea69c501 minor debugger/Makefile.shared fix 2015-11-21 10:01:58 +01:00
Jacques Garrigue f4f85881fc Fix problem reported by trefis in PR#6437 2015-11-21 14:33:18 +09:00
Marc Lasson 448d365d32 Update changelog & remove useless vertical spaces 2015-11-20 17:51:43 +01:00
Marc Lasson 1a2c6310fc Adds a function intern_init to set global state 2015-11-20 17:51:00 +01:00
Marc Lasson 061525dae0 Typo in comment 2015-11-20 17:45:07 +01:00
Marc Lasson 66714a3af1 Use a global variable to implement caml_alloc_shr_no_raise 2015-11-20 17:45:07 +01:00
Marc Lasson 8414d46214 Simplify intern state. 2015-11-20 17:45:07 +01:00
Marc Lasson 15b51b1c7b Assert intern is in a clean state
Assert that intern is in a clean state at the beginning of demarshaling
primitives.
2015-11-20 17:38:35 +01:00
Marc Lasson d6d3744d6f Idempotent intern_cleanup 2015-11-20 17:37:45 +01:00
Marc Lasson 01ef4800b3 alloc_shr is a wrapper around alloc_shr_no_raise
It is explicitly unfolded in the minor_gc.c for performance.
2015-11-20 17:37:45 +01:00
Marc Lasson 522453659a Remove useless declaration in memory.h. 2015-11-20 17:37:45 +01:00
Marc Lasson 4e2891b97b Remove useless stdio #include 2015-11-20 17:37:45 +01:00
Marc Lasson 5766c2de36 Delete stat_alloc_no_raise and duplicate alloc_shr
I replaced all calls to stat_alloc_no_raise by plain mallocs.
Also, I reimplemented alloc_shr_no_raise by duplicating the code of alloc_shr to avoid any overhead induced by an extra function call.
2015-11-20 17:37:45 +01:00
Marc Lasson d4d7bcd48e Fix indentation. 2015-11-20 17:37:45 +01:00
Marc Lasson ddd51af088 Fix memory leaks in intern.c in alloc_shr case
Prevents the function `caml_alloc_shr` to raise an OOM exception
before intern_cleanup could be called (this complete commit 1e62f1b).

It defines a new caml_alloc_shr_no_raise function.
2015-11-20 17:37:45 +01:00
Marc Lasson bd471eb198 Fix a memory leak in concat_array
There is a memory leak when the second or the third call to `caml_stack_alloc`
in `caml_array_concat` raises Out_of_memory. This will fix it.
2015-11-20 17:37:45 +01:00
Marc Lasson de7424404b Fix memory leaks in intern.c when OOM is raised
In the function, `intern_alloc` a call to caml_alloc_for_heap is very likely to
return NULL when reading a big marshaled value. If that happens, before raising
out_of_memory, it should call the `intern_cleanup` function to free the stack
as well as `intern_input` that may have been malloced by `caml_input_val`.
Similarly, `intern_cleanup` should also be called when we are not able to
allocate `intern_obj_table`. To do that, I added a function
`caml_stat_alloc_no_raise` which, like its brother, `caml_stat_alloc` wraps
some debugging information around a call to malloc. I could have used directly
malloc instead of adding a new function to memory.c, as it is done in other
places of the code (it has the drawback of not adding the debug tag).

Note that this fix is not perfect. The function `intern_alloc` could also raise
out_of_memory through its call to `caml_alloc_shr`. It is less likely to happen
since caml_alloc_shr is only called when the input is smaller than Max_wosize
but it could happen. In that case, there will be leak (but a smaller one).
2015-11-20 17:37:45 +01:00
Damien Doligez 60e7055d9f fix wrong C++ bracketing in hash.h 2015-11-20 15:51:37 +01:00
Damien Doligez 274be1bdc2 remove duplicate entry for GPR#171 in Changes 2015-11-20 15:51:05 +01:00
Xavier Leroy 93735adf47 z port: dedication. 2015-11-19 17:01:06 +01:00
Xavier Leroy 4640bd0c10 Merge pull request #275 from xavierleroy/zsystem
IBM z Systems port of ocamlopt

This is a port of the OCaml native-code compiler to IBM's z Systems architecture under Linux.

z Systems (https://en.wikipedia.org/wiki/IBM_System_z), also known as "s390x" in the GNU/Linux world, is IBM's line of mainframe computers. They are supported by several Linux distributions: RHEL, Suse, Debian.

The OCaml port was developed by Bill O'Farrell at IBM Toronto, with help from Tristan Amini, based on OCaml 4.02.1. I upgraded the port to the current OCaml trunk and performed some simplifiications and fixes. A CLA was signed to cover the reuse of Bill O'Farrell's code.
2015-11-19 14:28:37 +01:00