| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Bigarray.Genarray.change_layout.
|
|
|
|
|
| |
The allocated memory blocks are freed in the custom block finaliser,
so it isn't necessary to use a more complicated memory manager.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a follow-up to GPR #997 with a different implementation that creates fewer dependencies.
We add to the runtime a `byterun/bigarray.c` file that contains the bigarray creation functions that used to be in `otherlibs/bigarray/bigarray_stubs.c`. In the latter file we keep all primitives needed to implement the Bigarray interface. The functions in the new `byterun/bigarray.c` make it possible to create bigarrays both from the bigarray library and from the unix library.
The header file `bigarray.h` moves to `byterun/caml/bigarray.h` accordingly.
The `map_file` implementations move to `otherlibs/unix/mmap.c` and `otherlibs/win32unix/mmap.c`. Some bigarray allocation code shared between the two implementations is put in `otherlibs/unix/mmap_ba.c`.
Through a couple of `#ifdef`, the `map_file` implementations can also be compiled from within `otherlibs/bigarray` with the same semantics they had in 4.04.
As a consequence, the bigarray library still contains a standalone, Unix-independent implementation of `Bigarray.*.map_file`; the only difference with 4.04 is that it is marked deprecated.
Current status: compiled and lightly tested under Unix. Win32 implementation neither compiled nor tested.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace a few occurrences of assert and many occurrences of Assert
by CAMLassert.
In asmrun/spacetime_snapshot.c, the line
Assert(0); /* unreachable */
in the function caml_spacetime_shape_table has been removed
rather than replaced because the caml_failwith function called
just above has the noreturn attribute which should be enough to
keep compilers happy.
The same holds in the function caml_spacetime_only_works_for_native_code
defined in byterun/spacetime.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As suggested in MPR#7492 and developed in GPR#1060. This is a first step towards more safety against overflows in the runtime system.
Currently, addition, subtraction and multiplication are provided at type "uintnat". The implementation uses GCC / Clang builtins if available, or portable C code otherwise.
Overflow-detecting multiplication was already defined and used in otherlibs/bigarrays/bigarray_stubs.c. The bigarray code was adapted to use the new runtime functions.
Squashed commit of the following:
commit e83f9f6d367e55bb289a420dc49aea239cdd6aa5
commit 2a3dc18065d2f0478b035633dcc340d62c0830fc
commit 590384b6eba45ed7419ed438d1c4aeca57ce6d3d
commit aef4ff2300ddfe24ffd4905494b85fda78893fd7
commit 41f5bcbea2b54a096e8b689ad0ab3f5d8cb38e15
commit 227b6d6033e326a31170cb30380a364c23252e80
|
| |
|
| |
|
| |
|
|
|
| |
Bigarray: support 0-dimension bigarrays (just a scalar value), with an Array0 module
|
| |
|
| |
|
|
|
|
| |
[Genarray.change_layout].
|
|
|
|
| |
Added spaces around binary operators.
|
| |
|
| |
|
|
|
|
| |
Remains to be done: remove all headers in testsuite/tests.
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15950 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15947 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
| |
types {,u}int{32,64}.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Patch by Jeremy Yallop and Leo P. White
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14391 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13141 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13087 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13069 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
| |
(related to PR#5516 and PR#5761).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12993 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12964 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
| |
(Partial revert of commit 12327, keeping the other good bits.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12432 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
|
|
|
| |
PR#5463: Bigarray.*.map_file fail if empty array is requested
Bigarray: added "release" functions that free memory and file mappings
just like GC finalization does eventually, but does it immediately.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12327 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
| |
implement flexible arrays as a GCC extension, so use flex arrays iff C99.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12312 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12188 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12180 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12149 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
|
|
| |
Also: added "custom_compare_ext_default" to all struct custom_operations:
default initialization to 0 did what we want, but explicit initialization
better documents the C sources.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11143 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
|
|
|
|
| |
- New generic hash function based on Murmur 3, with better statistical
properties (PR#5225), and better speed
- Make sure equal floats hash equally (PR#5222)
- Breadth-first traversal instead of depth-first
- Added seeded hash functions and seeded functorial interface to Hashtbl.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11056 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
| |
Name space depollution.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8748 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7341 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7064 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6824 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6021 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
|
|
|
|
|
| |
bigarray.
Revu comparaisons flottantes.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5958 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|
|
|
|
| |
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5407 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
|