Commit Graph

511 Commits (bdd9ca391e3a56253d7480b07bb1a8aac361904c)

Author SHA1 Message Date
Pierre Chambart 1624c8e7a0 Also remove the forced dependency dummy code hack for closure
This also share the result type of transl_implementation_flambda
and transl_store_implementation
2016-07-08 16:02:26 +02:00
Pierre Chambart cb388c762a Some cleanup to explicit transl_implementation_flambda return values 2016-07-08 16:02:26 +02:00
Pierre Chambart 7286a4978f Allow to force linking modules without generating dummy code 2016-07-08 16:02:26 +02:00
Marc Lasson 2a0341cd09 Fix: use OCAMLPARAM include dir even with threads 2016-07-04 09:53:31 +02:00
Marc Lasson 0fd2964dff Use OCAMLPARAM's objects in toplevel
Only the non-native one (it does not support OCAMLPARAM at all atm).
2016-07-04 09:53:23 +02:00
Gabriel Scherer 5f1bc3ef6f Make Pparse functions type-safe
In order to remove some redundancy, the Pparse modules used a dirty
Obj.magic trick to manipulate either structure or signature values
(ASTs parsed from source files). This unsafe approach means that
programming mistakes may result in broken type soudness, and indeed
I myself had to track a very puzzling Segfault during the development
of my Menhir backend (due to a copy-paste error I was passing
Parse.implementation instead of Parse.interface somewhere). Wondering
why your parser generator seems to generate segfaulting parsers is
Not Fun.

This change means that the external interface of Pparse has changed
a bit. There is no way to fulfill the type of Pparse.file in
a type-safe way

    val file : formatter -> tool_name:string -> string ->
      (Lexing.lexbuf -> 'a) -> string -> 'a

as it promises to be able to process any ast type 'a depending on the
magic number (the last string argument). The knew type-safe interface is

    val file : formatter -> tool_name:string -> string ->
      (Lexing.lexbuf -> 'a) -> 'a ast_kind -> 'a

where ['a ast_kind] is a GADT type:

    type 'a ast_kind =
    | Structure : Parsetree.structure ast_kind
    | Signature : Parsetree.signature ast_kind
2016-06-29 21:23:28 -04:00
whitequark da56cf6dfd Rigorously handle -o and -c options in presence of multiple arguments.
This addresses PR#6475.

In 4.02 the behavior of ocamlc/ocamlopt with regards to these options
was as follows:
  * options and arguments are parsed left-to-right in the exact order
    in which they are passed, with compilation taking into account
    only the options leftwards from it;
  * "foo.c" is compiled to "foo.o" in current directory;
  * when "-c" is not specified:
    * "foo.ml" is compiled to "foo.cmo"/"foo.cmxo"
      in current directory;
    * after all files have been compiled, if any .ml files are passed,
      all provided files are linked as:
      * when "-o" is not specified: "a.out" in current directory;
      * when "-o out" is specified: "out".
  * when "-c" is specified:
    * "foo.ml" is compiled to:
      * when "-o" is not specified: "foo.cmo"/"foo.cmxo"
        in current directory;
      * when "-o out" is specified: "out.cmo"/"out.cmxo";
        and then compilation proceeds as if the last "-o" option
        has disappeared.
    * no final link is performed.

The behavior where the build product of the C sources always ended up
in the current directory was problematic: it required buildsystem
hacks to move the file in its proper place and ultimately was racy,
as multiple files with the same basename in different directories
may well end up overwriting each other with e.g. ocamlbuild.

On top of that, the behavior was quite confusing, since it is not
only stateful and dependent on argument order, but also the mere act
of compilation changed state.

The commit 1d8e590c has attempted to rectify that by looking at
the "-o" option when compiling C files, too. After that commit,
the behavior of ocamlc/ocamlopt was as follows (only the handling
of C files was changed, but the entire chart is provided for
posterity):
  * options and arguments are parsed left-to-right in the exact order
    in which they are passed, with compilation taking into account
    only the options leftwards from it;
  * "foo.c" is compiled to:
    * when "-o" is not specified: "foo.o" in current directory;
    * when "-o out" is specified: "out".
  * when "-c" is not specified:
    * "foo.ml" is compiled to "foo.cmo"/"foo.cmxo"
      in current directory;
    * after all files have been compiled, if any .ml files are passed,
      all provided files are linked as:
      * when "-o" is not specified: "a.out" in current directory;
      * when "-o out" is specified: "out".
  * when "-c" is specified:
    * "foo.ml" is compiled to:
      * when "-o" is not specified: "foo.cmo"/"foo.cmxo"
        in current directory;
      * when "-o out" is specified: "out.cmo"/"out.cmxo";
        and then compilation proceeds as if the last "-o" option
        has disappeared.
    * no final link is performed.

There is a non-obvious bug here. Specifically, what happens if more
than one C source file is passed together with a "-o" option? Also,
what happens if a C source file is passed together with a "-o" option
and then a final link is performed? The answer is that
the intermediate build product gets silently overwritten, with quite
opaque errors as a result.

There is some code (and even buildsystems) in the wild that is relying
on the fact that the -o option does not affect compilation of C source
files, e.g. by running commands such as (from ocamlnet):
  ocamlc -custom -o t tend.c t.ml

It might seem that the solution would be to make the behavior of
the compiler drivers for C files match that for the OCaml files;
specifically, pretend that the "-o" option has disappeared once
the C compiler has written a build product to the specified place.

However, this would still break the existing code, and moreover
does not address the underlying problem: that the option parsing
of the OCaml compiler driver is confusing and prone to creating
latent bugs.

Instead, this commit finishes (after 1d8e590c and 55d2d420) overhauls
the way option parsing in ocamlc/ocamlopt works to behave as follows:
  * options are parsed left-to-right in the order they are specified;
  * after all options are parsed, arguments are parsed left-to-right
    in the order they were specified;
  * when "-o out" and "-c" are specified:
    * when more than one file is passed, an error message
      is displayed.
    * when one file is passed:
      * "foo.c" is compiled to "out";
      * "foo.ml" is compiled to "out.cmo"/"out.cmxo".
  * when "-o out" is not specified or "-c" is not specified:
    * "foo.c" is compiled to "foo.o" in current directory;
    * "foo.ml" is compiled to "foo.cmo"/"foo.cmxo"
      in current directory;
  * when "-c" is not specified:
    * after all files have been compiled, if any .ml files are passed,
      all provided files are linked as:
      * when "-o" is not specified: "a.out" in current directory;
      * when "-o out" is specified: "out".

In short, the combination of "-o", "-c" and a single source file
compiles that one file to the corresponding intermediate
build product. Otherwise, passing "-o" will either set the name of
the final build product only or error out.

This preserves compatibility with old code, makes the handling of
C and OCaml sources consistent, and overall makes the behavior
of the option parser more straightforward. However, this may break
code that relies on the fact that options are parsed in-order, e.g.
  ocamlc -o t a.ml -g b.ml
where debug info would be built only for "b.ml".

Some alternative implementation paths I have considered:
  * Collect the C sources and process them after OCaml sources,
    while paying attention to any "-o" or "-c" that may have
    been set. This doesn't work because compilation of C sources
    is also affected by many flags, e.g. "-I", and so this would
    have the same drawbacks but none of the benefits;
  * Compile C and OCaml sources in-order as usual, but error out
    when an improper combination of flags is encountered in
    the middle of a compilation. This is technically feasible,
    and is the option that maximally preserves compatibility, but
    it is very complex: it doubles the amount of implicitly mutated
    global state, and there's no guarantee I will get all edge
    cases right. Moreover, the option parsing remains confusing,
    and I strongly believe that the current behavior should not
    remain in place.

On top of that it is hard to imagine cases where setting new options
in the middle of compilation would actually be desirable, because
this mechanism is very inexpressive: it can only add new options and
option values, since there is no way to negate or clear most of
the driver's state. Most likely is that any code that does so,
does it in error and remains operational by pure chance.
2016-06-14 11:36:35 -04:00
whitequark 4dc3efe3b0 Interpret all command-line options before compiling any files.
The behavior of ocamlc and ocamlopt drivers before this commit is
that the command-line options and arguments are processed exactly
sequentially; encountered options (e.g. "-o") modify the state of
the driver, and encountered arguments (e.g. "t.ml") compile
the corresponding file with whatever state the driver had at the time.

This can be quite confusing, because compiler drivers (e.g. gcc/g++,
clang/clang++, rustc, javac, go, ...) either parse the entire command
line before going on to compile files or reject options after
the first argument (only in the case of go). Thus the behavior
of ocamlc and ocamlopt is unexpected.

The following commit provides another reason for this change.
2016-06-14 11:36:35 -04:00
Marc Lasson 210d7aeafa Do not use OCAMLPARAM objects with -a and -pack
We add a flag 'with_ocamlparam' to the get_objfiles function.
2016-05-18 14:27:00 +02:00
Sébastien Hinderer 3bbf34319e Add the -no-version option to the toplevel.
This option requests the toplevel not to print its version number
at startup.
2016-05-09 17:22:29 +02:00
Sébastien Hinderer eef6cc5eae Option sharing between byetcode and native toplevels. 2016-05-02 15:44:46 +02:00
Demi Obenour fe05f8fc29 Add `-alias-deps` and `-app-funct`
This was meant for GPR #514, but I forgot to include it.
2016-04-19 12:21:09 -04:00
Demi Obenour 795a4d532d Add explicit command-line flags for currently-default settings
-no-keep-docs
    -no-keep-locs
    -no-principal
    -no-rectypes
    -no-strict-formats
2016-04-18 10:53:51 -04:00
Mark Shinwell ee367399a2 Attend to final Flambda CR comments for 4.03 release 2016-03-30 11:29:34 +02:00
alainfrisch 502e4f9336 More warnings when compiling the compiler. 2016-03-15 22:46:35 +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
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
Leo White 4253ed1530 Tidy up new command-line parameters 2016-02-11 16:02:02 +00:00
Mark Shinwell 4137939cd7 Make warning 59 less unhelpful (includes work by Runhang Li) 2016-02-11 14:35:18 +00:00
Leo White d79380ff63 Enable opaque option in ocamlc 2016-02-11 11:39:14 +00:00
Mark Shinwell bde2bdd206 Reformatting only (to the standards of tools/check-typo) 2016-02-10 18:28:38 +01:00
Damien Doligez 1c28b231ef Revert "PR#6475: accept -o in ocamlc when compiling C files"
This reverts commit 1d8e590c54.

Conflicts:
	Changes
	bytecomp/bytelink.ml
	driver/optcompile.ml
	ocamlbuild/ocaml_specific.ml
	ocamlbuild/testsuite/internal.ml
	utils/ccomp.ml
2016-02-10 10:34:02 +01:00
Mark Shinwell f95fb8bbb0 Bug fixes etc for Flambda 2016-02-09 18:38:16 +01:00
Mark Shinwell a397511031 Import latest Flambda changes 2016-02-09 09:59:26 +01:00
Mark Shinwell 05f1746cb5 Rename to max_arguments_for_tailcalls; revise numbers assuming no unboxed floats using the OCaml calling conventions 2016-02-08 15:02:40 +01:00
Mark Shinwell b5618e8642 max_arguments_without_passing_on-stack 2016-01-29 15:57:36 +00:00
Pierre Chambart b0b0f6609c Enable flambda 2016-01-28 15:04:47 +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
Pierre Chambart ab2e736358 Rename compiler_configuration file
Renamed to ocaml_compiler_internal_params.
2016-01-25 18:50:29 +01:00
Pierre Chambart 2555c4e773 Update main and ocamldep 2016-01-25 18:50:29 +01:00
Pierre Chambart 5b2d1e7d5d Reindent compenv 2016-01-25 18:50:29 +01:00
Pierre Chambart d6ea706a02 Add handling of OCAMLPARAM as a file 2016-01-25 18:45:04 +01:00
alainfrisch 87de6a160d Useless bindings, unit patterns, whitespace. 2016-01-19 23:40:55 +01:00
Mark Shinwell d3a8745b84 Merge remote-tracking branch 'ocaml/trunk' into flambda_prereq-clflags 2016-01-15 13:22:04 +00:00
Mark Shinwell 10e5dcfc37 Support 'opaque' in OCAMLPARAM 2016-01-15 11:38:37 +00:00
Mark Shinwell 7d1d8814c0 code review 2016-01-14 17:13:43 +00:00
Mark Shinwell fb4d06a3aa Clflags stuff and Arg_helper 2016-01-14 11:27:30 +00:00
Thomas Refis cae2a7e53c use Timings.source_provenance in more places 2015-12-31 11:00:39 +00:00
Pierre Chambart fc5acece95 Rename type build_kind and sourcefile arguments to source_provenance 2015-12-18 13:54:47 +00:00
Pierre Chambart 99fa546753 Clean up and time separately parsing and preprocessing 2015-12-18 13:35:44 +00:00
Pierre Chambart 0443e425e4 Record the source file name being built in Compilenv 2015-12-18 13:35:44 +00:00
Pierre Chambart b05b5f71f5 Remove last use of Timining.start/stop in {opt,}compile.ml 2015-12-18 13:35:44 +00:00
Pierre Chambart 828e78d4a4 Avoid using Timings.start/stop 2015-12-18 13:35:44 +00:00
Pierre Chambart 233e1b1791 Record compiler runtime 2015-12-18 13:33:10 +00:00
alainfrisch 7ad212045f Add module to deal with 'front-end' built-in attributes. 2015-12-02 14:46:14 +01:00
alainfrisch 945d0c7d7a Keep deprecation flag on compilation unit, extracted from a floating attribute in the .mli file. 2015-11-27 19:13:56 +01:00
Damien Doligez be79451d83 PR#7008: Fatal error in ocamlc with empty compilation unit name
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16523 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-10-19 13:01:28 +00:00
Damien Doligez b860d63145 whitespace cleanup, cut long lines, add some missing headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16415 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-09-11 11:58:31 +00:00
Gabriel Scherer cb3bb152ab add option handling for colors in compiler, OCAMLPARAM and ocamlbuild
(Simon Cruanes and Gabriel Scherer)

Use one of
  -color auto
  -color always
  -color never

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16348 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-08-15 15:57:51 +00:00
Alain Frisch 4e9bf58e90 Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16242 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-24 11:34:51 +00:00
Damien Doligez 860c670848 merge branch 4.02 from 4.02.1 (rev 15540) to a few fixes after 4.02.2 (rev 16205)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16214 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-07-17 14:31:05 +00:00
Leo White 5c55e4cc08 Attach documentation comments to Parsetree
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16189 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-06-28 13:11:50 +00:00
Gabriel Scherer d19a8bd2f1 PR#6636: add a --version option (Peter Zotov)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16141 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-24 14:52:57 +00:00
Alain Frisch 63945879c1 Cleanup + better interaction between -intf and -pack (the .cmi file was not added to the list of objects in that case).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16100 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-07 12:44:22 +00:00
Alain Frisch 6610c56462 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16099 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-05-07 12:41:39 +00:00
Alain Frisch 918f584b64 #6845: -no-check-prims to tell ocamlc not to check primitives in runtime.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16031 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-04-22 10:53:47 +00:00
Gabriel Scherer eca0967403 PR#6167: OCAMLPARAM support for disabling PIC generation ('pic=0')
(Gabor Pali)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15793 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-24 16:35:26 +00:00
Damien Doligez 0296d022e1 PR#6081: ocaml should add script's directory to search path, not current directory
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15779 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2015-01-16 22:45:06 +00:00
Gabriel Scherer f256b3733d minor: cut too-long lines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15735 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 12:18:10 +00:00
Gabriel Scherer 1d8e590c54 PR#6475: accept -o in ocamlc when compiling C files
(Vincent Laporte, Peter Zotov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15734 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-21 12:18:07 +00: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
Alain Frisch eb0beeba69 #6582: make backport of #5904 more backwards compatible.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15414 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-02 07:37:08 +00:00
Alain Frisch 44c2066055 #5904: improve support for ppx in the toplevel by allowing ppx processors to keep information across calls (through the use of persistent cookies). Also change Ast_mapper.register so that the function that creates the mapper from arguments is executed once the context has been restored.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15314 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-23 14:54:01 +00:00
Damien Doligez a18bc7950b merge changes of version/4.02 from r15121 to r15155
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 17:14:00 +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 d02c8fbc55 new -opaque flag: ocamlopt creates .cmx without cross-module info
(Patch by Pierre Chambart and Gabriel Scherer)
(Ack'ed by Damien Doligez)

This enables a form of incremental compilation for ocamlopt: if
A depends on B, and B is compiled with `ocamlopt -opaque`, then minor
implementation changes in B that do not affect the module interface
will not require recompilation of A.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15105 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-18 13:28:34 +00:00
Alain Frisch 047e09748c Cherry-pick 15062,15063,15064 from 4.02 (#6497).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15068 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 09:46:34 +00:00
Jacques Garrigue 77cf8b999e * split Typetexp.lookup_module and Typetexp.find_module
* fix semantics of -open by using Typemod.type_open_


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14795 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 12:02:26 +00:00
Mark Shinwell 520fad7d1c Jacques forgot a crucial detail
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14792 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 08:40:54 +00:00
Jacques Garrigue ccce272966 commit o_and_opens.diff
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14787 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-11 00:17:05 +00:00
Alain Frisch f0ef09de26 Expose a Typemod.type_interface (currently an alias of Typemod.transl_signature) by symmetry with type_implementation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14759 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-07 12:46:00 +00:00
Jacques Garrigue fc24112e25 change -trans-mod to -no-alias-deps, and update message
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-05 02:05:30 +00:00
Jérémie Dimino c31d2ab685 revert commit 14728
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14729 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-03 09:07:14 +00:00
Jérémie Dimino f0b74bd726 -o sets the module name
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14728 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-02 16:44:09 +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
Xavier Leroy 558f40e344 New back-end optimization pass: common subexpression elimination (CSE).
(Reuses results of previous computations instead of recomputing them.)
(Cherry-picked from branch backend-optim.)
Tested on amd64/linux and i386/linux.
Other back-ends compile (after assorted updates) but are untested.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14688 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 10:40:22 +00:00
Xavier Leroy 29b34438e0 - Constant ropagation for float and int32/int64/nativeint arithmetic.
Constant propagation for floats can be turned off with option
  -no-float-const-prop, for codes that change FP rounding modes at
  run-time.
- Clambda / C-- / Mach: represent float constants as FP numbers of type 
  float rather than literals of type string.
- Tested for AMD64; other archs need testing.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 08:41:13 +00:00
Fabrice Le Fessant 100909c7f7 Add OCAMLPARAM option 'can-discard' to remove warnings about unknown version-specific arguments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14653 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-22 10:10:25 +00:00
Damien Doligez 7303ac34ca fix some of the whitespace problems in the source
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14582 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12 10:17:02 +00:00
Damien Doligez e8d15e704c merge branch 4.01 from 4.01.0 (revision 14115) to branch closure (revision 14525)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14532 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-04 17:32:35 +00:00
Jacques Garrigue 3b4d7cf63b Merge module-alias branch (cf. PR#6063)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14394 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-10 07:53:33 +00:00
Jacques Garrigue d90b126bd4 Add -trans-mod option for transparent module dependencies.
Without that option, dependencies are strict, both for
typing and linking.


git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14382 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-20 06:55:26 +00:00
Xavier Leroy 33f242aaea Reverting the elimination of the ocamlcomp*.sh scripts, namely the following commits:
14278
14277
14276
14176
14175
14173
14172
14171
14169
14168
14167
These changes need to mature on their own branch.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14329 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-29 13:04:38 +00:00
Wojciech Meyer 241585bc83 build: replace ocamlcomp*.sh.
This script was built from ocamlcomp.sh.in through sed and is called
instead of "ocamlc" (for instance).
It makes it possible to switch from "ocamlc" to "ocamlc.opt" without
changing anything in the Makefiles, only calling sed.

I couldn't cleanly make it handle both a compiler for the target and for
the build. Instead I'm replacing it and doing as much as possible
directly in the Makefiles.
I hoped it would reduce the number of shell invocations, which would
speed things up quite a lot on Windows but I still had to have at least
one since it's not possible to update a make variable from inside a make
rule: i.e. it's not possible to do X=a, build a.opt and update X to be
a.opt.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-20 00:22:38 +00:00
Alain Frisch 40117f7480 #5817: new compiler flag (-keep-locs) to keep location in cmi files.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14157 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-17 12:45:05 +00:00
Alain Frisch b92a3ca792 Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14122 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 15:50:47 +00:00
Alain Frisch 884ca00fdf Continue cleanup. driver/errors.ml is no longer needed.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14120 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 14:45:03 +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
Alain Frisch bc9e5b0a51 Switch {Translmod,Translcore,Translclass}.Error.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14118 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 14:24:27 +00:00
Alain Frisch 2e16ccd61f Switch Includemod.Error, without trying to split the message (to keep current behavior).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14117 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 14:21:04 +00:00
Alain Frisch af5e566d62 Switch Typetexp.Error, Typedecl.Error, Typemod.Error, Typeclass.Error.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14114 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 14:06:48 +00:00
Alain Frisch 08ed781ecc Switch Ctype.Tags.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14113 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 13:59:45 +00:00
Alain Frisch c18155a018 Switch Cmi_format.Error.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14112 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 13:50:36 +00:00
Alain Frisch de72ef4a89 Simplify common case of unit-wide errors.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14111 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 13:47:04 +00:00
Alain Frisch 6950d6f780 Do not keep file name in exception, after all.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14110 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 13:41:01 +00:00
Alain Frisch 290fe0c0b2 Keep input file in Env.Error. Switch it to the new system.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14109 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 13:00:22 +00:00
Alain Frisch d18a044380 Keep input file in Pparse.Error. Switch it to the new system.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14108 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 12:27:33 +00:00
Alain Frisch 71efb4666b Switch Lexer.Error to the new system.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14107 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-12 11:59:45 +00:00
Alain Frisch 6ad98b3d09 Port Syntaxerr.Error to the new system. Trickier, because of special way to report some errors in the toplevel (is it really worth the trouble?).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14105 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-11 18:10:59 +00:00
Alain Frisch 47be69c2b0 Cherry-picking commit 14093 from trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14104 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-11 16:08:00 +00:00
Alain Frisch eb0f68d351 Fix order of application of ppx rewriters (matching the order on the command-line).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14086 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-10 14:15:47 +00:00
Alain Frisch e01f145c2e More direct style, remove the temporary file created by -pp processor right after it has been read.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14085 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-10 13:48:43 +00:00
Alain Frisch 0769ab46a7 Introduce and use higher-level wrappers around parsing routine for .ml/.mli files, taking care of -pp and -ppx preprocessors.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14084 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-10 13:44:34 +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
Gabriel Scherer b1c5fa3e52 PR#6071: Add a -noinit option to the toplevel [patch by David Sheets]
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13972 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-04 19:58:09 +00:00
Fabrice Le Fessant 1823936ce0 Fix OCAMLPARAM problems
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13901 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-17 12:35:26 +00:00
Fabrice Le Fessant 2602e82995 Remove non-ASCII chars from headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13880 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-09 13:21:45 +00:00
Fabrice Le Fessant db98eb647c Add cmo/cma/cmx/cmxa cases to OCAMLPARAM
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13764 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-11 11:46:02 +00:00
Fabrice Le Fessant a04798140b Fix PR#6031 : problem with -with-frame-pointers in caml_allocN
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13763 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-11 11:20:03 +00:00
Fabrice Le Fessant 504e86d722 Revert r13746 (demanded by Xavier)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13748 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 17:54:20 +00:00
Fabrice Le Fessant ad6c285818 Improved implementation of OCAMLPARAM
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13747 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 16:34:40 +00:00
Fabrice Le Fessant f9bd5f13a0 Experimental OCAMLCOMPPARAM for ocamlc/ocamlopt
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13741 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 19:13:24 +00:00
Xavier Leroy e29c9d2956 PR#5986: added flag Marshal.Compat_32 and ocamlc option -compat-32.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13554 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 11:58:59 +00:00
Damien Doligez 726da0bdfc fix whitespace and over-long lines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13429 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-22 18:19:54 +00:00
Damien Doligez 7b31f54095 It is no longer necessary to keep pre-processed files in case of errors
(see commits 3817 and 5224,5302,5816)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13406 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-18 20:13:53 +00:00
Jacques Garrigue 26e1ff7138 Merge short-paths into a fresh branch of trunk.
Also fix a bit unification and subtyping errors.
You now need the flag -short-path to activate short paths.



git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths-4.01@13285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-29 14:21:12 +00:00
Alain Frisch ef9fc7ab0f #5904: support for -ppx in the toplevel.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13278 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-01-25 09:12:31 +00:00
Alain Frisch f1d0e5afab Add a -dtypedtree flag to all tools (using Printtyped). Also fix ocamlnat.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13139 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-18 17:19:53 +00:00
Alain Frisch dfa500533a #5741: make Pprintast available from the command-line (-dsource).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13025 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-17 16:09:38 +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
Jacques Garrigue 35185d610b merge version/4.00 at revision 12866
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12869 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-08-21 07:10:35 +00:00
Alain Frisch 412ee0f3e0 Support -absname in ocamldep + update man pages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12819 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-08-03 10:22:35 +00:00
Damien Doligez 0c3a7de507 merge changes from 4.00 branching to 4.00.0 (part 1)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-26 19:21:54 +00:00
Alain Frisch 60d0694e9f #5634: parstree rewriters (merge with ast_rewriter branch).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12597 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-06-13 08:00:27 +00:00
Fabrice Le Fessant d39d43e55f merge with branch bin-annot
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12516 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-30 14:52:37 +00:00
Alain Frisch a0a14c08fa Enable and fix more warnings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12498 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:47:28 +00:00
Alain Frisch 05c973e6ed Compile with warning 33, and remove unused opens.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12497 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:10:03 +00:00
Alain Frisch 12568313ef Detecting unused open in .mli files also in ocamlopt.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12484 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-25 13:27:48 +00:00
Fabrice Le Fessant 7b9f2a7ddf Reverting commits 12385 and 12370, while waiting for a decision to be taken to install compiler files for 4.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12389 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-22 16:11:51 +00:00
Alain Frisch 9adb09c9ab #5589: 'unused' warnings for .mli files as well (detect unused open and shadowed value declarations).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12375 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-18 12:22:58 +00:00
Fabrice Le Fessant 905143bfa2 Add hooks in Asmgen
Add hooks in Asmgen to allow external developers to add
new passes on the typedtree, lambda, clambda and cmm trees.
A library 'ocamlopt.cm{a/xa}' is installed, with optmain.cm{x/o},
so that developers can create new ocamlopt executables containing
these new passes.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12370 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-04-18 08:50:26 +00:00
Damien Doligez b4b544d2a3 PR#5538: combining -i and -annot in ocamlc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-27 15:11:27 +00:00
Alain Frisch 515ab27fe3 Check for fatal warnings after link operations (#5526).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12196 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-03-07 11:07:21 +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
Xavier Leroy 2eecf2d4c0 PR#5487: addition of CFI directives and a few filename/linenumber info to generated amd64 and i386 assembly files.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12179 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-21 17:41:02 +00:00
Damien Doligez d4522f062c Change "Ocaml" to "OCaml" everywhere
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12152 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-13 17:48:41 +00:00
Damien Doligez c260567018 PR#1164: better error message when giving .cmxa input files to ocamlopt -a
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12130 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-06 16:44:43 +00:00
Damien Doligez 3836d4086a PR#1898: add -nopromptcont option to suppress secondary prompts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12085 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-27 12:48:15 +00:00
Jacques Garrigue 477b2dd743 propagate path-expansion environment everywhere
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12068 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-23 07:59:45 +00:00
Jacques Garrigue 21301af8c8 shorten paths in signatures and toplevel output
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12066 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-22 05:56:11 +00:00
Jacques Garrigue 50de05d31d first attempt: handles only unification errors
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/short-paths@12065 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-22 03:15:14 +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
Alain Frisch c45bcb892d Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@12034 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-01-18 08:31:11 +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
Damien Doligez 6b4bb576df PR#352: new option to make ocaml read stdin as a script
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11980 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-30 16:28:16 +00:00
Alain Frisch 83d48700ff Replace existing warnings 26, 27, trying to preserve their semantics.
- Warning 26 detects unused variables bound by 'let' or 'as'. In case of a or-pattern,
  a variable is considered to be an "as" variable or not according to the lhs pattern only.

- Warning 27 detects unused variables bound by 'match', 'fun', 'function', and self-variable
  in objects.

- When several values are bound by a given let pattern: if all of them are unused,
  warning 26 is trigerred; if at least one of them is used, the other unused ones
  are reported with warning 27.

This commit also introduces dedicated warnings for unused ancestor variables (objects) and
for-loop indices.




git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11976 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-29 17:49:58 +00:00
Alain Frisch 5686436fc6 Undoing previous commit.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11929 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:52:10 +00:00
Alain Frisch 1061c39aac Check for unused value declaration in interface files.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/unused_declarations@11928 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:35:36 +00:00
Alain Frisch c1f154ea70 New option to force the compilers to show absolute paths in error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11890 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-20 10:35:43 +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
Xavier Clerc 8f5e859134 fixed inconsistent order in structure elements.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11142 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-21 09:45:24 +00:00
Damien Doligez 90664f4ea1 uniform .ignore system
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11133 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 15:37:36 +00:00
Damien Doligez 405b61a9a9 restore alphabetical order
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11127 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-07-20 13:57:04 +00:00
Damien Doligez 31b0292413 renaming "Objective Caml" to "OCaml" (first pass)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11015 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-04-26 12:16:50 +00:00
Pierre Weis 60d8ffee36 Ignoring compiled files.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10989 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-03-17 23:32:23 +00:00
Damien Doligez a53ce2df70 add option -runtime-variant
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10982 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-03-17 16:18:05 +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 575555eecd merge changes from branching of 3.12 to release/3.12.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-08-02 14:37:22 +00:00
Damien Doligez 3bba52b91c PR#4857: add -vnum option to all executables
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-20 14:06:29 +00:00
Damien Doligez 50864fb4b3 rename -help-warnings to -warn-help
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10384 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-08 20:11:27 +00:00
Alain Frisch e09a12388f New -help-warnings command-line option.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10369 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-04 18:44:38 +00:00
Alain Frisch 46334f76c2 Allow range of warnings and synchronize default for warnings given in usage info with the real code.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10366 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-05-04 17:39:17 +00:00
Damien Doligez 27780d9f8a fixed several build problems
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10298 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-22 15:41:16 +00:00
Damien Doligez 83fb41dcf7 unified command-line arguments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10260 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-04-13 10:44:25 +00:00
Damien Doligez bdc0fadee2 merge changes from release/3.11.1 to release/3.11.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9540 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2010-01-20 16:26:46 +00:00
Pierre Weis 700da01338 Adding the -strict-sequence option.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9464 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-12-09 09:17:12 +00:00
Damien Doligez f2734e23cd stupid bug with warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9438 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-12-03 16:04:55 +00:00
Damien Doligez b2090f66b0 added warning 28: wildcard arg to constant constructor
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9424 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-11-19 12:27:15 +00:00
Damien Doligez 74aff36031 fine-grained control of warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9407 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-11-02 12:17:49 +00:00
Xavier Leroy 11217e8f70 Added option -no-app-funct to turn off applicative functors
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9316 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2009-07-15 14:06:37 +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
Damien Doligez 1f95b17570 merge changes from 3.10.2merged to 3.11.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-12-03 18:09:09 +00:00
Damien Doligez 2b0441401a merge changes between 3.10.2 and the end of branch 3.10
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9079 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-10-08 13:09:39 +00:00
Damien Doligez 0c26c850b3 "invalid module name" becomes a warning
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9074 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-10-06 13:53:54 +00:00
Damien Doligez adfab743f5 PR#4607 reject invalid source file names
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9016 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-09-10 15:03:33 +00:00
Alain Frisch 20bc66eb25 Enable to (old) -dlcode option by default. -nodynlink disables it.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8916 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-07-15 15:31:32 +00:00
Alain Frisch 8acf63d010 Fix an ill-formed comment.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8871 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-04-21 06:30:00 +00:00
Alain Frisch c917df6af1 Simplify the life of people who want to help evaluating the impact of -dlcode on performance for AMD64 systems.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8870 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-04-18 14:06:42 +00:00
Alain Frisch 486a6ce6d5 Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8869 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-04-16 06:53:33 +00:00
Alain Frisch ff421e9e8b Cleanup + pass -Wl,-E to linker when linking dynlink.cma in custom mode.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8868 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-04-16 06:50:31 +00:00
Alain Frisch f952dd7d11 Fix ocamlc -dtypes.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8779 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2008-01-21 08:42:14 +00:00
Damien Doligez e9a9bf9613 PR#3114 make all error messages start with a location and "Error: "
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8705 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-12-04 13:38:58 +00:00
Alain Frisch 32abe25b89 Same in native code.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8523 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-15 16:09:57 +00:00
Alain Frisch 223f7bbfea Improve -output-obj: can now build directly a dynamic library (with all the ccobjs/ccopts); can also produces simply the uncompiled .c file (e.g. to debug). The output name (-o) is now mandatory when -output-obj is used, and only an extension amongst .c, EXT_OBJ, EXT_DLL is allowed.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8522 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-15 15:18:28 +00:00
Alain Frisch 3958a92c72 Merge the natdynlink branch into HEAD.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8477 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-11-06 15:16:56 +00:00
Damien Doligez 1dd68ccf50 ajout des annotations pour variables et appels terminaux
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8232 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-05-16 08:21:41 +00:00
Xavier Leroy 4b5512c74c Stack backtraces on uncaught exceptions in native code (merge of the opt_backtrace branch)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7812 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2007-01-29 12:11:18 +00:00
Damien Doligez 1279ab4b76 fusion des changements 3.09.1 -> 3.09.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7382 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-04-16 23:28:22 +00:00
Jacques Garrigue 602146f892 add virtual instance variables
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7372 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-04-05 02:28:13 +00:00
Damien Doligez 125ea40d4c fusion 3.09.0 -> 3.09.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7307 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2006-01-04 16:55:50 +00:00
Xavier Leroy 0ba3106399 Retour en arriere sur la simplification des signatures inferees (fix du PR#3545 du 2005-08-02), qui est completement bugge
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7012 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-08-08 09:41:52 +00:00
Xavier Leroy 754bc39c90 Systematiser la simplification des signatures inferees (PR#3545)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7005 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-08-02 09:49:30 +00:00
Xavier Leroy d4d7720ca9 Revu implementation de ocamlopt -pack. Remplacement du renommage a posteriori par un renommage a priori via l'option -for-pack
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7003 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-08-01 15:51:09 +00:00
Xavier Leroy f55d676d2c Interdire les references Foo.x lorsqu'on compile foo.ml ou foo.mli (PR#3100, 3304, 3457)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6998 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-07-31 12:03:40 +00:00
Damien Doligez 6c9bac39d4 ajout de l'option -config (suggestion de Gerd Stolpmann)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6865 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2005-05-09 13:39:17 +00:00