Commit Graph

121 Commits (ce3bbea53c1da8425042b0c1ba2ebc554be5c5bf)

Author SHA1 Message Date
Jacques-Henri Jourdan 052a950dea Statistical memory profiling of blocks allocated in the major heap. 2019-05-09 16:40:45 +02:00
Stephen Dolan 501bd0bb36 Remove use of Obj.truncate from CamlinternalMod.
CamlinternalMod contains an optimisation for the initialisation
of recursive modules containing closures, where dummy closures
are updated in-place. This optimisation was buggy on bytecode,
since the bytecode interpreter relies on the lengths of blocks
containing closures (see #4008).

This commit disables the optimisation for bytecode (where it
had much less effect than on native code, and where performance
is of less concern anyway). The optimisation is still applied
on native-code, but without the use of Obj.truncate.

Also adds a test for #4008 (which introduced the truncate).
2019-04-01 14:10:12 +01:00
Mark Shinwell 2cc1ea26b9 Remove gprof support (#2314)
This commit removes support for gprof-based profiling (the -p option to ocamlopt).  It follows a discussion on the core developers' list, which indicated that removing gprof support was a reasonable thing to do. The rationale is that there are better easy-to-use profilers out there now, such as perf for Linux and Instruments on macOS; and the gprof support has always been patchy across targets. We save a whole build of the runtime and simplify some other parts of the codebase by removing it.
2019-03-16 19:56:53 +01:00
Guillaume Munch-Maccagnoni f68692ebc2 Improve protect
- Treat as an error the case where ~finally raises an exception

- Move to Fun module

- Describe the purpose in the documentation

- Remove boilerplate

https://github.com/ocaml/ocaml/pull/2118
2019-02-03 12:27:27 +01:00
Gabriel Scherer 295f71cb96 make alldepend (with new one-dep-per-file printing) 2018-12-12 09:38:49 +01:00
Thomas Refis f9b8935b2e
make alldepend (#2181) 2018-12-03 18:15:28 +01:00
Leo White fc1e6ad5a2 Update .depend 2018-11-21 03:39:34 -05:00
Stephen Dolan 122c5218e0 Fix a make -j bug, by ensuring Lazy depends on CamlinternalLazy.
Without this patch, make -j often fails to build the stdlib with
a message along the lines of:

    no cmx file was found in path for module CamlinternalLazy

The issue is that stdlib files that use `lazy` actually depend on
camlinternalLazy.cmi because matching.ml expands lazy pattern
matches to code that refers to CamlinternalLazy. However, since
this dependency does not appear in the source code, there is no
way for ocamldep to discover it. This means that when building
the stdlib, there is no constraint ensuring that CamlinternalLazy
is built before stdlib modules using Lazy.

This causes issues with parallel make, but the issue can be
reproduced using a sequential make invocation:

    cd stdlib
    make clean
    make stdlib_stream.cmo

This patch adds a dependency on CamlinternalLazy into lazy.mli.
Its presence makes ocamldep see that all files that use Lazy also
depend on camlinternalLazy.cmi.
2018-11-14 17:33:51 +00:00
Gabriel Scherer 8396c0b8bc make alldepend 2018-11-11 17:20:27 +01:00
yallop ee1c2a4d7e Add paths for built-in types (#1876)
* Add an Extension_constructor submodule to Obj.

Deprecate top-level functions extension_constructor / extension_name /
extension_id.

* Add 'true' and 'false' to the definition of Bool.t

* Add aliases for the built-in 'list' and 'array' types.

* Add an alias for 'exn' to Printexc.

* Changes entry: built-in type aliases

* Add a Unit module.

* Add paths for built-in exceptions.
2018-11-08 16:08:17 +01:00
Daniel Bünzli a7afd89003 s/string_of_int/Int.to_string/g 2018-11-07 13:52:02 +01:00
Daniel Bünzli 89e48a38e9 Stdlib: add Fun module. (#2129)
* Stdlib: add Fun module.

* Stdlib: rename Bool.negate to Fun.negate.
2018-11-06 10:36:07 +01:00
Daniel Bünzli fdba70136f Stdlib: add Bool module. 2018-10-23 11:35:08 +02:00
Daniel Bünzli 5846aecee6 Stdlib: add Int module. 2018-10-09 10:20:39 +02:00
Jérémie Dimino 9124ab82d1
Deprecate Pervasives (#1605)
- inline Pervasives in Stdlib and re-add Pervasives as a deprecated
module that aliases all elements of Stdlib except the stdlib modules.

- remove special case for Stdlib.Pervasives in printtyp.ml
2018-08-27 12:42:14 +01:00
Gabriel Scherer 87855ffcae make alldepend 2018-08-09 22:10:54 +02:00
Daniel Bünzli 1798999b65 Stdlib: add Option module. 2018-08-08 11:41:09 +02:00
Daniel Bünzli b7affbb9ef Stdlib: add Result module. 2018-08-08 10:34:03 +02:00
whitequark 1ebc9f5a4c Remove the Sort module. (PR7812)
It has been deprecated since 2000, shown a deprecation warning
since 4.02, and Sort.merge is documented to have undefined behavior
when the lists being merged are not sorted in the first place.
2018-07-13 16:04:49 +02:00
Jérémie Dimino 32da45a80a Move bigarray to the stdlib (#1685) 2018-04-09 13:14:05 +01:00
Hugo Heuzard 952fe49bac depend 2018-04-05 18:08:30 +01:00
Simon Cruanes df80f34a92 Stdlib functional iterators (#1002)
* add `Seq` module, expose iterator conversions in most containers

* small typo

* typo

* change order of arguments for `{Map,Set}.add_seq`

* watch for max string length in `Bytes.of_seq`

* wip: make it build again

* Fix dependency

Sys needs to be linked before Bytes in stdlib.

* Update threads/stdlib.ml

* Update stdlib_no_prefixed/.depend

* fix inconsistencies with label modules

* update testsuite to work with seq

* update change file

* small change in `Hashtbl.to_seq`, capturing only the underlying array

* add some documentation to seq.mli

* revert to good ol' module type names for hashtables

* fix test

* change style of comments in seq.mli

* follow some demands in review of GPR #1002

* some fixes for #1002

* add Seq-related functions to Ephemeron

* add some comments on `Hashtbl.of_seq`

* add more tests for `Hashtbl.{to,of}_seq`

* fix bug in `Ephemeron.to_seq`

* Update Changes
2018-03-16 18:25:10 +01:00
Nicolás Ojeda Bär 242b6f20a1 make depend 2018-03-15 18:26:51 +01:00
Jeremie Dimino 225d1c65b9 Prefix the compilation unit names of all modules in the stdlib
Except for the Camlinternal* modules and the new Stdlib module, all
modules in the stdlib now compile to Stdlib__<module>.

Pervasives is renamed to Stdlib and now contains a list of aliases
from the long names to the short ones, so that from inside and outside
the stdlib we can refer to the standard modules as just List or
Stdlib.List rather than Stdlib__list.

In order to avoid printing the long names in error messages and in the
toplevel, the following heuristic is added to Printtyp: given a path
Foo__bar, if Foo.Bar exists and is a direct or indirect alias to
Foo__bar, then prefer Foo.Bar.

A bootstrap step was required to replace Pervasives by Stdlib as the
module opened by default.
2018-02-12 08:29:16 +00:00
Sébastien Hinderer 40fcbb5f0a Move configuration header files from the config to the byterun/caml directory
This commit moves:
  - config/m.h to byterun/caml/m.h
  - config/s.h to byterun/caml/s.h

Consequently, m.h and s.h now get installed alongside other
OCaml header files.

This commit also updates the .depend files, introducing updates in the
dependencies which are not consequences of this commit itself.
2017-04-26 19:28:17 +02:00
Daniel Bünzli e0751d932e Add Buffer.add_utf_{8,16be,16le}_uchar and Uchar.{bom,rep} (#1091) 2017-03-16 08:28:11 +00:00
Daniel Bünzli 991ffbe7f7 MPR#7500: remove Uchar.dump (#1081)
and make the Uchar independent from the Format and Printf
modules. Previously this made it impossible to use the type in the
natural habitat that the String, Bytes and Buffer modules could be.
2017-03-07 13:19:04 +01:00
Jérémie Dimino 5ed72007f8 Deprecate Bigarray.*.map_file and add Unix.map_file (#997)
To break the circular dependency between Bigarray and Unix, a CamlinternalBigarray module was added to the stdlib. This module defines all the types used by the compiler to produce optimized code for bigarrays.

Thanks to David Allsopp for fixing Windows tests.
2017-01-10 10:03:24 +00:00
David Allsopp d168db2c78 make alldepend 2016-12-14 13:14:21 +00:00
Mark Shinwell cd0bd8aa73 Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
Damien Doligez 9166e7003e update .depend and bootstrap compilers before release 2016-02-29 14:07:07 +01:00
François Bobot 03ed6a0f51 [Stdlib] Ephemeron: add the module in the stdlib 2016-01-25 08:33:54 +01:00
Mark Shinwell 89cb79b18c fix testsuite 2016-01-12 18:01:45 +01:00
Alain Frisch 4b59df83e0 Merge pull request #80 from dbuenzli/uchar
Add Uchar module to the standard library.
2016-01-06 16:21:04 +01:00
Mark Shinwell 852efd270e Merge with trunk; remake dependencies 2015-12-22 16:28:35 +00:00
Damien Doligez c9003ac48f fix huge pages vs renaming of caml_stat_heap_size 2015-12-21 14:27:46 +01:00
Daniel Bünzli 940144f304 Add Uchar module to the standard library. 2015-12-02 14:39:32 +00:00
Mark Shinwell 248328024b fix stdlib dependencies for .p.cmx 2015-11-04 11:04:34 +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
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
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
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 bb313fa192 Fix PR#6417: sprintf broken when local module named Pervasives is in scope
(Backport from Jacques' commit 4.02@14921)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14972 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-09 13:53:45 +00:00
Gabriel Scherer a5e4f0631c update .depend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14886 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-16 17:32:47 +00:00
Gabriel Scherer 43647ba502 first part of Benoît Vaugon's format-gadts patch
After applying this patch, you should run:

  make library-cross
  make promote-cross
  make partialclean
  make ocamlc ocamllex ocamltools

and then immediately apply the following patches until the "second
part of Benoît Vaugon's format+gadts patch"; the bootstrap cycle is
not finished yet.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14806 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:29 +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
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 fe6ff6a033 remove leftover conflicts from .depend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14061 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-04 15:37:10 +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
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