Commit Graph

48 Commits (9e181ca8f446d238ba279bc22fef9d166d4f38b0)

Author SHA1 Message Date
Leo White 11edca8798 Fix #8769 (#8770)
* Don't generate illegal Pfield's when compiling alias coercions

* Simplify lambda code when compiling packs

* Add regression test for pr8769

* Add Changes entry
2019-06-28 16:17:00 +01:00
Jeremie Dimino 7e0862a212 Refactor load path management and initial environment
- Add a Load_path module which caches files lookup

- Instead of falling back to the external environment, allow to
  declare in the environment that a module comes from the external
  world. This allows persistent structures to shadows non-persistent
  ones
2019-01-30 16:36:38 +00:00
Leo White 111d4e1827 Remove positions from paths 2018-11-21 03:39:34 -05:00
sliquister ae1317caae Add option to dump the output of e.g. -dlambda in a file (#1913) 2018-07-27 08:51:53 +01:00
François Bobot da3f9f34f5 Use reraise_raw_backtrace in Misc.try_finally
And add labels ~always for previous cleanup function and
    ~exceptionally for new cleanup function in exceptional case
2018-07-25 17:58:32 +02:00
Gabriel Radanne 1be47bf7ab Just some tbl things. (#1699) 2018-07-23 13:19:41 +01:00
Valentin Gatien-Baron 0444eac687 Print warnings on the warnings formatter in the couple of places that don't
Except the OCAMLPARAM stuff, as that runs before the command line
warning settings are even parsed, so while they are reported using the
normal warnings code, they don't look like normal warnings.
2018-07-15 15:00:47 -04: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
Xavier Leroy a162156c61 PR#7479: make sure "ocamlc -pack" is only given .cmo and .cmi files, and that "ocamlopt -pack" is only given .cmx and .cmi files 2017-02-19 17:47:33 +01:00
Pierre Chambart 8703a360d5 Fix lack of link error when missing modules providing externals (#837, PR#7371)
* Check that all the required modules are provided
   Also remove provided cmo from the required globals
* Remove required globals from packs when provided
* Remove provided globals after adding required ones
   Pack modules can require globals they provide.
* Dumpobj tool can print relocation information
2016-12-14 13:14:21 +00:00
Pierre Chambart 25d24e38c2 Also remove linking hack for bytecode
Adds the required_globals information to bytecode compilation units.

This patch also bootstrap ocamlc. The cmo format is changed by this
commit, there is no way around bootstraping here. Note that ocamldep and
ocamllex does not rely on the cmo format, so they are not present in
this commit.

Changes in tests:

* Update test/transprim/comparison_table.ml.reference:
    The (opaque (global List!)) expression is not present anymore

* Update tests/no-alias-deps/aliases.cmo.reference
    The output of objinfo changed
2016-07-08 16:02:26 +02:00
alainfrisch 502e4f9336 More warnings when compiling the compiler. 2016-03-15 22:46:35 +01:00
Damien Doligez 5401ce8473 Update headers for the new license.
Remains to be done: remove all headers in testsuite/tests.
2016-02-18 16:59:16 +01:00
alainfrisch 87de6a160d Useless bindings, unit patterns, whitespace. 2016-01-19 23:40:55 +01:00
Gabriel Scherer f15f4f3ed8 PR6695: Make sure the compiler only uses ASCII string functions.
This should cover all places involving filenames in the compiler.
There are a few more paths still using Latin-1 in other ways,
e.g. in ocamldoc.

From: Peter Zotov <whitequark@whitequark.org>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15727 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 11:46:14 +00:00
Damien Doligez 031cffd155 merge branch 4.02 from release 4.02.0 to release 4.02.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15558 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-15 13:34:58 +00:00
Fabrice Le Fessant 457958a9e6 Add reset functions to make modules reentrant when used through compiler-libs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14770 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-09 12:01:21 +00:00
Jacques Garrigue 1ce29d9bfc re-commit Leo's weak-dependencies pull request
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14755 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 00:34:20 +00:00
Jacques Garrigue 95104b3924 revert commit 14719
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14723 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 06:19:55 +00:00
Mark Shinwell 521ac0213a weak dependencies with -trans-mod (github/ocamllabs/weak-depends 45e980a,21856a7,merge)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14719 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 12:50:20 +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
Gabriel Scherer 2b9f94b69b PR#6270: remove need for -I directives to ocamldebug in common case
(patch by Josh Watzman)

Add absolute directory names to bytecode format for ocamldebug to use

The need for a long list of -I directives makes interactively using
ocamldebug a pain in the butt. Many folks have solved this with various
`find` invocations or even Python wrappers, but those lead to other
problems when it might include files you weren't expecting (or miss
things you were). But all of this is really annoying since the tooling
should be able to figure out itself, even heuristically, where your
source files are -- gdb gets this right, why can't we?

This patch implements one of the more important heuristics from gdb: you
typically debug on the same machine you built on, so looking for the
source files and built artifacts in the absolute paths where they were
during compilation is a good first try. We write out absolute paths into
a new structure at the beginning of the debug section and then
automatically append those directories into the load path.

This means mean that if you happen to be debugging on a machine
where the original source and build artifacts are *not* available in
their original absolute locations, things will work as before, using the
standard load path mechanism. You can also explicitly use -I to prepend
directories to the load path and override the defaults located by this
new mechanism.

I personally find this makes using ocamldebug much more pleasant :)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14533 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-06 15:06:22 +00:00
Gabriel Scherer 57fe3746f6 Revert "PR#6270: remove need for -I directives to ocamldebug in common case (patch by Josh Watzman)"
There seems to be a problematic interaction with backtrace collection. To test this,
  make world.opt
  cd testsuite
  make one DIR=tests/backtrace/

This needs to be sorted out before the patch can go in again.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14510 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 14:55:06 +00:00
Xavier Clerc dd7bd5b339 PR#6270: remove need for -I directives to ocamldebug in common case (patch by Josh Watzman)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14507 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-31 11:48:35 +00:00
Jacques Garrigue c56d21dc76 Quick fix of PR#6325
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14434 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-17 14:03:54 +00:00
Alain Frisch 8660e346df Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14119 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 14:34:13 +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
Alain Frisch 2bbf91ca42 #5832: patch to improve 'wrong file naming' error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13618 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-29 14:57:38 +00:00
Damien Doligez c63f9e0957 fix a few problems with whitespace and over-long lines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13393 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-09 22:38:52 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Damien Doligez 997a678d5e clean up TABs and whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-30 18:04:46 +00:00
Alain Frisch 1fb4007ece #5527: absolute filenames for more error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12202 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-07 17:50:17 +00:00
Damien Doligez 5b14388ad0 refactoring the "read n bytes from a channel into a new string" idiom
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12184 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-23 19:54:44 +00:00
Alain Frisch 4cfd2fc2a6 Reverting bad commit.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12058 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:23:34 +00:00
Alain Frisch 7fe8c8ce6f Fix #5490.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12057 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-20 14:21:03 +00:00
Fabrice Le Fessant 869feeb007 Fix PR#5461
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12033 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-17 21:57:54 +00:00
Jacques Garrigue 9dc661c3bf merge branches/gadts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11160 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-29 10:32:43 +00:00
Damien Doligez 3b507dd1aa renaming of Objective Caml to OCaml and cleanup of copyright headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-27 14:17:02 +00:00
Damien Doligez c91db736b1 merge changes from 3.12.0 to 3.12.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 09:17:07 +00:00
Jacques Le Normand 6de25fef2f first commit
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10679 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-09-13 05:28:30 +00:00
Damien Doligez 5e67123bf6 PR#4975: spelling mistakes "overriden" and "informations"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10450 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-21 12:00:49 +00:00
Damien Doligez ed32f569e3 merge changes from ocaml3110 to ocaml3111rc0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-05-20 11:52:42 +00:00
Nicolas Pouillard 81cfc29b31 Better handling of multiple extensions (foo.d.cmo, foo.p.cmx...)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7909 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-02-23 13:44:51 +00:00
Xavier Leroy 09921987cc Deplacement des infos de format des .cmo et .cma dans Cmo_format
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7422 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-05-11 15:50:53 +00:00
Xavier Leroy f8ae9668d9 Pour l'option -pack, ajout possibilite de donner des .cmi sur la ligne de commande pour denoter des sous-modules dont l'implementation est identique a l'interface
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6196 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2004-04-09 13:32:28 +00:00
Xavier Leroy 24d36afe98 open inutile
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5427 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-03-10 16:56:22 +00:00
Xavier Leroy 426afa35eb Pour l'option -pack, permettre de donner une interface explicite (via un .mli) au module synthetise
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5422 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2003-03-06 15:59:55 +00:00
Xavier Leroy 71cf31f0e2 Ajout du packaging d'unites de compilation (option -pack)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4367 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2002-02-08 16:55:44 +00:00