Commit Graph

288 Commits (84304a3282fc5be31f657e0de9c8ff305efc4789)

Author SHA1 Message Date
Jeremie Dimino 84304a3282 Core review work
- Apply the __ heuristic more systematically
- Update tests
- Fix Windows builds
2018-02-12 08:29:17 +00:00
Gabriel Scherer cc5b7ef6be make alldepend 2018-02-05 19:30:48 +01:00
Valentin Gatien-Baron a9aef5629b Improve error reporting for ill-typed applicative functor type, F(M).t 2017-12-12 23:51:19 -05:00
Thomas Refis 60c5f6fe91 parmatch: split pretty printing out into Printpat 2017-12-04 12:11:21 +00:00
Jacques Garrigue 70b02405e0 Merge pull request #1365 from yallop/let-rec-patch-406
GPR#556, PR#7215, PR#7231, PR#6738: Add a new check that 'let rec' bindings are well formed.
2017-09-22 15:37:10 +09:00
Xavier Leroy ffa6b1ee8f Rebuilt .depend
Several asmcomp/ dependencies were missing, parallel builds failed.
2017-09-18 19:34:14 +02:00
Mark Shinwell b65096678b Register availability analysis (#856) 2017-09-15 11:08:14 +01:00
alainfrisch d1d4c6b819 Better direct support for ocaml.ppwarning attribute.
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.
2017-09-12 00:36:46 +02:00
sliquister 3f76c0525b generalize -dtimings to show allocation, top heap size (#1152) 2017-06-09 12:29:21 +01:00
Fabrice Le Fessant 8daa184d95 New -depend option for ocamlc/ocamlopt 2017-06-01 15:56:30 +02:00
Alain Frisch 1a93a20f37 Merge pull request #1138 from alainfrisch/pr7444_deprecated_warning_upon_inclusion
Deprecation warning when checking signature inclusion
2017-05-15 18:06:31 +02:00
hhugo b14e6fee9b Compiler: -compat-32 flag when building cmo/cma. (#896)
* 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
2017-05-05 07:18:40 +01: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
alainfrisch f6d53cc38f Deprecation warning when checking signature inclusion
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).
2017-04-05 19:13:59 +02:00
Pierre Chambart cb81cc6fe2 Declare record type for flambda function parameters (#1028) 2017-03-16 10:40:47 +00:00
Sébastien Hinderer 9e81b0fb4b Update .depend files 2017-03-09 17:12:02 +01:00
Valentin Gatien-Baron bf96a7ac42 display the output of -dtimings as a hierarchy 2017-03-07 15:43:57 -05:00
Nicolas Ojeda Bar e75c87dc48 Initial import of linear-scan-register-allocator
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.
2017-02-22 17:09:18 +01:00
alainfrisch 5dce0914e2 Move Semantics_of_primitives to bytecomp/ and use it in closure. 2017-01-03 15:21:15 +01:00
Gabriel Scherer 1cd606fd04 update .depend 2016-12-23 14:48:09 -05:00
Alain Frisch 807928cc50 Merge pull request #915 from objmagic/more-pprintast-fix
more -dsource bug fix
2016-12-19 12:16:11 +01:00
David Allsopp d168db2c78 make alldepend 2016-12-14 13:14:21 +00:00
Gabriel Scherer 21c147cbbe make depend
toplevel/topdirs.ml does not depend on Untypeast anymore since
  50c772ce007fe4c102172be1d0bf6fc0d8623f2a
2016-12-14 13:14:21 +00:00
Stephen Dolan a35c6117e6 Instrumentation for american fuzzy lop (afl-fuzz) (#504) 2016-12-06 17:18:04 +01:00
Runhang Li 6f51424a9b
Fix corner case GADT exp bug. 2016-11-15 09:08:16 -08:00
Mark Shinwell 2da2fcdb66 Annotate Texp_function with an Ident.t for the parameter (#831) 2016-10-14 09:34:50 +01:00
Nicolas Ojeda Bar 7bd6587180 Add new module Targetint (#759) 2016-08-16 07:29:24 +01:00
Mark Shinwell cd0bd8aa73 Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
Gabriel Scherer c59f847e7b update .depend 2016-07-29 01:24:40 +02:00
Gabriel Scherer 2b64ecac66 refresh .depend 2016-07-29 00:49:55 +02:00
Damien Doligez d5a6e50ebe GPR#606: add unboxed types 2016-07-21 13:51:46 +02:00
Fabrice Le Fessant f26c0ff8b6 Add plugins in the compiler 2016-07-18 17:43:05 +02:00
Fabrice Le Fessant bfc36003aa Add hooks on some compilation phases 2016-07-12 17:59:58 +02:00
Gabriel Scherer 4ec69f7332 refresh .depend 2016-07-09 18:18:42 -04:00
Mark Shinwell 5f00ce793e Improve location handling in the middle end (version for merging) (#666) 2016-07-06 15:42:29 +01:00
Demi Obenour d89af40f64 Install native versions of tools by default.
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.
2016-06-06 14:44:10 -04:00
alainfrisch 8d9dd27cd4 Move depend.ml into compilerlibs (ocamlcommon).
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).
2016-04-13 16:46:32 +02:00
alainfrisch 43f90e9f58 Local let exceptions. 2016-03-15 22:02:55 +01:00
Alain Frisch 8a19a63d8c Really refresh dependencies. 2016-03-15 15:31:29 +01:00
Alain Frisch 04b67e474d Update .depend (should be more stable now). 2016-03-15 15:24:25 +01:00
Mark Shinwell 5dced42768 Merge pull request #480 from mshinwell/flambda_unbox-closures
GPR#480: Flambda fix: try to make Unbox_closures behave more reasonably
2016-02-26 16:18:04 +00:00
Mark Shinwell a397511031 Import latest Flambda changes 2016-02-09 09:59:26 +01:00
Gabriel Scherer ec190a03a3 .depend: driver/optmain depends on asmcomp/proc 2016-02-08 16:01:31 -05:00
Pierre Chambart b0b0f6609c Enable flambda 2016-01-28 15:04:47 +01:00
Nicolas Ojeda Bar e343dd0ba6 Adapt emit_external_warnings and error_if_has_deep_native_repr_attributes 2016-01-27 23:05:28 +01:00
Nicolas Ojeda Bar 92d679f791 Use Ast_iterator for Ast_invariants 2016-01-27 23:02:23 +01:00
Jeremie Dimino d8704f6ba8 Add module Ast_invariants
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.
2016-01-27 18:41:12 +00:00
Leo White ebd1a90dcd Update .depends 2016-01-26 11:26:40 +00:00
Pierre Chambart 050c454765 Add middle_end to Makefiles 2016-01-22 01:24:02 +01:00
Mark Shinwell fb4d06a3aa Clflags stuff and Arg_helper 2016-01-14 11:27:30 +00:00