Previously, there was a dedicated traversal of the Parsetree to
collect and report all ocaml.ppwarning attributes. This approach has
the drawback that ocaml.warning settings for the current scope around
the ocaml.ppwarnign attribute were not taken into account.
Thanks to previous commits, we have a specific place in the code were
all attributes go through. So we re-use it to detect ocaml.ppwarning
attributes, completely avoiding the dedicated traversal and the
drawback mentioned above.
* Complier: -compat-32 flag when building cmo/cma.
Compiler: refactor -compat-32 support
Update Changes
Complier: more -compat-32 checks in emitcode.
* add tests for the -compat-32 flag
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.
Deprecation warning (3) is currently only reported when directly
accessing a component marked with the deprecated attribute; but it is
missed when we coerce the signature contaning the deprecated component
to a signature without the attribute.
This commit adds the required machinery to detect such cases
and report the same warning. (An alternative design could be
to introduce a new warning for that purpose.)
Some of the new machinery could be used for other purposes:
- During the inclusion check, keep the location that would used in
the error message if the check fails.
- Warnings can now hold extra "sub-locations" (and associated
messages).
The code in this commit was written by Marcell Fischbach & Benedikt Meurer.
See [Mantis#5324](http://caml.inria.fr/mantis/view.php?id=5324) for some
context.
The code (which was originally written against 3.12) was ported to trunk by
doing
```bash
git clone https://github.com/bmeurer/ocaml-experimental/
cd ocaml-experimental
git diff master...linear-scan-register-allocator > t.diff
```
and then applying the diff by hand.
Previously, `ocamlc`, `ocamlopt`, `ocamllex`, and `ocamldep` defaulted
to the bytecode versions of the tools. However, there is normally no
advantage to the bytecode versions if the native-code versions are
available, except in unusual circumstances. Instead, install the
native-code versions without the `.opt` suffix. They are still
installed with the `.opt` suffix for backwards compatibility. Finally,
install the bytecode versions with the `.byte` suffix, and build
native-code versions of tools that are not currently built in native
code.
Also, remove some duplication in tools/Makefile.shared.
Supersedes GPR #512.
This allows external tools to rely on the features provided by this module. An example
is ocamldoc itself, which could now be implemented as an external tool.
Note that LexiFi variants of OCaml has been embedding depend.ml in the compiler for a long
time in order to support a stricter dependency mode where the compiler is only allowed to load .cmi
files corresponding to dependencies as inferred by ocamldep (hereby ensuring that ocamldep is
sound by construction).
This module checks all the AST invariants. This is to ensure that all
invariants are written down in one place and are consistently checked
between the various clients of the AST (typer, pprintast, ...).
The invariants are checked in Pparsee, after applying the ppx
rewriters.