Commit Graph

18220 Commits (17e26146823ab916155addab399fc74841d0a458)

Author SHA1 Message Date
Kate 17e2614682 Correct name of a contributor 2019-02-20 16:51:56 +00:00
Damien Doligez 58f9eff953 bump magic numbers and bootstrap to catch up with branch 4.08 (#2249) 2019-02-19 15:57:28 +01:00
Sébastien Hinderer c4d0fec025 Remove spurious file in testsuite
This commit removes an unused file introduced by commit
6526a0c3d9

It is important to remove this file because it does not quite work:
it assumes ocamlc.byte has already been installed and thus uses an
installed compiler rather than the one to test so that would be a
misleading source of inspiration for test writers.
2019-02-19 15:48:31 +01:00
Daniel Bünzli f7cf156e19 stdlib.mli: add a stable doc link to the list of modules. 2019-02-19 11:40:57 +00:00
Gabriel Scherer b145a4114e
Merge pull request #2228 from gasche/refactor-env
Refactor typing/env to separate the filesystem-related logic
2019-02-18 21:16:56 +01:00
Gabriel Scherer 7c638e32be Changes entry 2019-02-18 17:03:16 +01:00
Gabriel Scherer e82a28af60 env refactoring: use a custom ADT for missing pers_struct entries
The hope is that a tailor-made algebraic datatype is more readable /
less confusing than using ('a option) directly -- one may confuse
getting None when looking in a table with the Not_found case.

(Suggested by Jérémie Dimino)
2019-02-18 17:03:16 +01:00
Gabriel Scherer 61ca6599f0 env refactoring: move current_unit in a submodule
(suggested by Jérémie Dimino)
2019-02-18 17:03:15 +01:00
Gabriel Scherer 1d3943881f update the code in tests/self-contained-toplevel
The hope is that the (env => persistent_env) refactoring does not
break reasonable user code; the fact that this test had to be updated
is a bad sign. On the other hand, we believe that utop is unaffected
by the change, which suggests that real-world toplevel are less likely
to be affected.
2019-02-18 17:03:15 +01:00
Gabriel Scherer 93f0ce31bb env refactoring: separate the cmi/crc handling into a persistent_env module
Persistent_env is a new module that handles the relation between the
type-checking state and the "persistent" typing information laying in
.cmi files on the filesystem. In particular, it handles the collection
and production of CRC information for the .cmi files being read and
written to the filesystem; the using modules (in our case, only Env)
are in charge of turning the cmi files into higher-level information
(components and signatures).

Persistent_env exposes a type `'a t` of a persistent environment,
which acts as a mutable store of `'a` values. There is no global state
in the module itself: while Env (and thus the OCaml type-checker) uses
a single global persistent environment, it should be possible to
create several independent environments to represent, for example,
several independent type-checking sessions.
2019-02-18 17:02:47 +01:00
Florian Angeletti 54d5877834
manual: add compilerlibref to release target (#2253) 2019-02-18 09:37:13 +01:00
Gabriel Scherer b33c4b46d4 env refactoring: remove the current unit name from some exceptions
This small change of behavior simplifies the internal plumbing of env
by avoiding the need to passes the 'current_unit_name' state to
cmi-checking exceptions -- it allows to separate the cmi/crc logic to
a separate module in a future commit.

We believe that the change does not actually reduce error message
clarity, as the name of the offending unit appears in the location
filename anyway (see how these exceptions are handled by
Location.error_of_printer_file in the error printer).

Before:

    File "a.mli", line 1:
    Error: Unit A imports from B, which uses recursive types.
           The compilation flag -rectypes is required

After:

    File "a.mli", line 1:
    Error: Invalid import of B, which uses recursive types.
           The compilation flag -rectypes is required
2019-02-16 11:40:28 +01:00
Gabriel Scherer dcc8a366aa env refactoring: move EnvLazy to utils/misc.ml 2019-02-16 11:40:28 +01:00
Gabriel Scherer 6c5ddd3686 env refactoring: separate consistency from typing logic in persistent_env 2019-02-16 11:40:28 +01:00
Nicolás Ojeda Bär 4d165c22e1
Merge pull request #2254 from lyncmi07/hacking_doc_update
HACKING.adoc: fixed dead link
2019-02-15 21:58:16 +01:00
Michael Lynch 1b5f05d758 fixed link 2019-02-15 20:44:55 +00:00
Sébastien Hinderer 520e22a24e ocmaltest: fix paths_same_file in run_unix.c 2019-02-15 14:48:20 +01:00
Gabriel Scherer 717b24fd40 env refactoring: aggregate the state for persistent structures into one record 2019-02-15 10:26:19 +01:00
Gabriel Scherer a6f0caa8de env refactoring: avoid external uses of {add_import,crc_units}
There is a small change of behavior in this patch due to a different
handling of weak dependencies (those with crco=None); in
Env.check_consistency, only non-weak dependencies would get
[Env.add_import] called, while the `toplevel/` implementations would
also call [Env.add_import] on weak dependencies. After this patch, we
systematically call [add_import] only on non-weak dependencies, even
in `toplevel/`.

([Gabriel:] As far as I can see, the use of [add_import] in the
toplevel never leads to a use of [Env.imports()] for producing
a dependency list, as the toplevel does not produce cmi/cmo files; are
they just no-ops?)
2019-02-15 10:24:49 +01:00
Gabriel Scherer 7ae59eeb8d env refactoring: move code around (no change) 2019-02-15 10:24:49 +01:00
Gabriel Scherer c549588241 env refactoring: factorize clear/reset logic 2019-02-15 10:23:31 +01:00
Gabriel Scherer a89e859bec env refactoring: isolate unit_name reference 2019-02-15 10:21:54 +01:00
Thomas Refis 3a193111f6 update dune file 2019-02-14 16:15:04 +00:00
Gabriel Scherer 24b240c852 ocamldoc doc: fix the URL of the graphviz project
report by Frédéric Blanqui in MPR#7921.
2019-02-14 16:21:03 +01:00
Pierre Chambart 1e6c739811
Merge pull request #1579 from chambart/split_backend_primitives
Use a different type for primitives in clambda and lambda
2019-02-14 15:30:37 +01:00
Gabriel Scherer 5a29ea7c2b
Merge pull request #1725 from stedolan/deprecate-set-tag
Deprecate Obj.set_tag
2019-02-14 15:16:48 +01:00
Stephen Dolan 05e08bbd17 update Changes 2019-02-14 10:43:20 +00:00
Fourchaux 1946594bd7 Fixing typos in various files (#2246)
Note: Typos found with https://github.com/codespell-project/codespell

Here is the (semi-manual) command used to get (and correct) the typos:

$ codespell -i 3 -w --skip=".png,.gif,./ocaml/boot,./ocaml/.git,./ocaml/manual/styles,./ocaml/manual/manual/htmlman" -L minimise,instal,contructor,"o'caml",cristal,pres,clos,cmo,uint,iff,te,objext,nto,nd,mut,upto,larg,exten,leage,mthod,delte,tim,atleast,langage,hten,iwth,mke,contant,succint,methids,eles,valu,clas,modul,que,classe,missings,froms,defaut,correspondance,differents,configury,reachs,cas,approche,normale,dur,millon,amin,oje,transfert
2019-02-13 14:04:56 +01:00
Stephen Dolan 4721c930f5 Bootstrap 2019-02-13 11:49:58 +00:00
Stephen Dolan fa6304f6c3 check_typo fix 2019-02-12 16:46:06 +00:00
Pierre Chambart 80ad15d45f Please check-typo 2019-02-12 16:35:25 +01:00
Pierre Chambart ccceae88e5 Update Changes 2019-02-12 16:35:25 +01:00
Stephen Dolan a17b37c7ac Changes entry and review fixes 2019-02-12 15:22:37 +00:00
Stephen Dolan 51025d1729 Add optimisations in simplif.ml for Obj.with_tag. 2019-02-12 11:13:55 +00:00
Stephen Dolan c39f771a33 Deprecate Obj.set_tag.
- Adds Obj.with_tag as a partial replacement.
  - Adds caml_obj_make_forward for use of Camlinternal{Lazy,Mod}
2019-02-12 11:13:48 +00:00
Leo White 07794568eb Add Changes entry 2019-02-12 00:07:17 +01:00
Leo White 986477daef Fix match miscompilation with flambda 2019-02-12 00:07:17 +01:00
Leo White 421933e39c Add test for GPR#2239 2019-02-12 00:07:17 +01:00
Pierre Chambart 11fd078359 Ignore compare binary test on lib-threads/pr4466.ml 2019-02-11 17:29:35 +01:00
Pierre Chambart 032fb92560 Fix string_set => bytes_set 2019-02-11 17:16:44 +01:00
Pierre Chambart 8b0bf6f4b0 Disable some binary compare tests 2019-02-11 17:16:44 +01:00
Pierre Chambart 9f9dc9bae6 Update .depend 2019-02-11 17:16:44 +01:00
Pierre Chambart 45b28a90b2 Move Semantics_of_primitives into asmcomp 2019-02-11 17:16:44 +01:00
Pierre Chambart 88ca181b48 Rename is_pure_clambda to is_pure 2019-02-11 17:16:44 +01:00
Pierre Chambart 94b50698ce Rename for_primitive_clambda to for_primitive 2019-02-11 17:16:44 +01:00
Pierre Chambart f8058ac367 Remove lambda version of Semantics_of_primitives 2019-02-11 17:16:44 +01:00
Pierre Chambart 3843351876 Ensure that is_pure_clambda is more general than is_pure 2019-02-11 17:16:44 +01:00
Pierre Chambart 6dfd40f72f Push clambda_primitives to flambda 2019-02-11 17:16:44 +01:00
Pierre Chambart 3185e85e83 Factorize string/bigstring primitives handling 2019-02-11 17:16:43 +01:00
Pierre Chambart 7c5cc144a5 Clean string load/set primitives 2019-02-11 17:16:43 +01:00