Commit Graph

10091 Commits (5adbb67a458f6f63deb1c1000f887ff87371c706)

Author SHA1 Message Date
Gabriel Scherer 332fa731d7 Set SVN ignore properties for the new testsuite directories
SVN does not recursively apply ignore patterns, so after creating a
new directory one should not forget to set its svn:ignore property
(otherwise `svn status` will be quite noisy after a testsuite run).

For new test directories, I just copied the property of an existing
test in the following way:

  cd testsuite/tests/basic
  svn propget svn:ignore > /tmp/test-ignore
  cd ../<NEW-DIR>
  svn propset svn:ignore -F /tmp/test-ignore .



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15086 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-15 11:03:00 +00:00
Alain Frisch e095737718 Bug is fixed.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15085 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 16:08:21 +00:00
Alain Frisch 815a3dd23e Accept test result.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15084 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 15:41:27 +00:00
Alain Frisch 67151820dc #5528: type extensions can create local type names t.A without an explicit local type t (if the extended type is non-local). We must thus check explicitly uniqueness of synthesized type names t.A instead of relying on uniqueness of declared types as before (well, we already had the problem if someone redefined a local exn type).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15083 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 15:40:52 +00:00
Alain Frisch 2acf7b75f3 #5528: -dsource printer, also fix a bug (present in trunk) when printing GADT constructors with multiple arguments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15082 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 14:58:56 +00:00
Alain Frisch b115e37fc8 #5528: improve error reporting.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15081 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 13:57:13 +00:00
Alain Frisch 9fce02d524 #5528: improve error reporting.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15080 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 13:41:50 +00:00
Alain Frisch 9dcd1459fe #5528: support rebinding inlined extension constructors with free variables.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15079 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-12 13:32:23 +00:00
Xavier Leroy fcc2da3848 PR#6501: harden the native-code generator against certain uses of "%identity".
Technically: when a C-- let-bound variable is assigned to, update its type
so that it is the lub of the types of the initial value and all values
assigned to it, with the type ordering Int <: Addr.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15078 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-11 07:46:25 +00:00
Mark Shinwell e17e2b19da PR#6507: [caml_bottom_of_stack] incorrectly set
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15076 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-08 22:17:56 +00:00
Gabriel Scherer c8940948e0 More accurate wording about when Invalid_argument is raised for list functions.
(Patch by Jeremy Yallop)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15074 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-08 16:15:13 +00:00
Gabriel Scherer c6d67e2bf9 remove redundant bound checking in Buffer.blit (patch by Philippe Wang)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15073 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-08 15:57:22 +00:00
Alain Frisch bfba47f922 Cherry pick 15071 from 4.02 (Fix #6510: Removal of shadowed constructors of extensible types can break the structure of definitions).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15072 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-08 12:17:34 +00:00
Alain Frisch fa3ab937f4 Accept.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15070 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 16:19:05 +00:00
Alain Frisch 50f47df33a Sync with trunk. Rebinding of inlined extension constructors with free variables is not yet supported.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/constructors_with_record3@15069 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 16:07:55 +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
Alain Frisch cc9cbfc755 Cherry pick commit 14900 from 4.02 (fix some whitespace and add a few copyright headers), only the in parsing/ subdirectory (it creates conflicts elsewhere).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15067 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 09:44:18 +00:00
Alain Frisch f84e4047bc Cherry pick commit 14989 from 4.02 (#6463: properly propagate errors raised when creating the mapper (typically, invalid arguments) to the compiler.).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15066 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 09:42:30 +00:00
Alain Frisch fc7d8cfecc Cherry pick commit 14857 from 4.02.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15065 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-07 09:40:07 +00:00
Gabriel Scherer 2c4b259f60 remove the Obj.magic from the string.ml implementation
It is important not to assume that String.t and Bytes.t will always
share the same representation. Using Obj.magic to convert between
functions would give a very bad example to users considering
a migration, which are very quick to imitate any moral turpitude found
in the standard library.

An unfortunate consequence of the change is the duplication of
String.concat code; other designs would be possible to share more
implementation details between Bytes and String (eg. defined
factorized operations on both in a shared internal module), but if we
consider that String representation may evolve in the future this
coincidence of implementation is really a temporary coindence rather
than an definitive duplication.

I checked that all the small functions introduced are marked as
inlinable. In the case of coercions like this, we could even have the
compiler recognize eta-expansions of the identity function and turn
them into simple rebindings.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15060 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 16:31:52 +00:00
Gabriel Scherer b7dd6d2c91 implement {Bytes,String}.mapi
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15058 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 15:57:38 +00:00
Gabriel Scherer 97b302a1ce Add missing Noreturn qualifiers
(patch by Peter Zotov, review by Max Mouratov)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15057 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 15:17:07 +00:00
Gabriel Scherer c8efe3409c update Changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15056 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 15:01:27 +00:00
Gabriel Scherer 0ca6694dc5 ocamlbuild: add no_alias_deps tag (patch by Daniel Bünzli)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15055 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 15:01:25 +00:00
Gabriel Scherer 438a6fe77e PR#6495: also add unsafe_string tag to ocamlbuild
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15054 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 15:01:23 +00:00
Gabriel Scherer c2c68e3788 PR#6495: add a safe_string tag to ocamlbuild (patch by Anil Madhavapeddy)
It kicks in for interface inference and compiler invocations.
safe_string does also alter the output of inferred types if
short_paths is used (since "bytes" is shorter than "string"),
but this requires a change to the ocamldoc driver and isn't
addressed in this PR.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15053 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 15:01:21 +00:00
Gabriel Scherer 43f47d2f5d PR#6509: Add -linkall flag to ocamlcommon archives (Patch by Frédéric Bour)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15047 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 11:58:03 +00:00
Gabriel Scherer d59a10413f PR#6474: fix the "weak dependencies" support (patch by Leo White)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15045 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 11:39:21 +00:00
Gabriel Scherer 483d773c44 PR#6502: spurious warning on "use_menhir" tag
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15044 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-06 11:15:45 +00:00
Alain Frisch 68fe1ebd5a Use labeled arguments. (Cherry-picked from commit 15031 on 4.02).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15032 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-28 16:14:44 +00:00
Alain Frisch aeead32662 #6500: add String.init, Bytes.init, Labels couterparts, Stream.of_byte. (Cherry-picked from 15029 on 4.02.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15030 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-28 13:29:50 +00:00
Damien Doligez cf6714ead2 PR#6142: add cmt file support to ocamlobjinfo
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15028 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-24 18:08:40 +00:00
Jérémie Dimino 906eb3dddc better fix for the travis script
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15024 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-23 10:11:47 +00:00
Jérémie Dimino b127859dd1 update the travis script for new opam release
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15023 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-23 09:50:44 +00:00
Xavier Leroy a9879e2119 Reflecting commit 15021 on version/4.02:
Follow-up to commit 15012: keeping checkbound equations is useless when load equations have been forgotten, as all checkbounds involve a load of a block header.  So, simplify things further by emptying the numbering after calls and allocs.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15022 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-23 07:46:59 +00:00
Damien Doligez 6ba26a91f2 allow long lines up to 132 chars in ocamldoc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15018 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-21 20:41:52 +00:00
Damien Doligez 9ac64ba6a4 PR#6406: Expose OCaml version in C headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15017 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-21 20:39:38 +00:00
Xavier Leroy 127c288ae5 Reflecting commit 15012 on version/4.02:
PR#6484 and PR#6486: CSE across memory allocations can present the GC with memory roots that are illegal.
Plus: lift the previous restriction that all arithmetic ops and loads have at most one result register, this isn't true for ARM with soft floats.
Plus: code refactoring and more comments.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-18 14:11:33 +00:00
Xavier Leroy d7f3235c1b Reflecting commit 15010 on version/4.02:
PR#6460: runtime assertion failure with large [| e1;...eN |]
float array expressions


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15011 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-18 09:14:02 +00:00
Xavier Leroy cd80c42655 Reflecting commit 15006 on version/4.02:
Typo in destroyed_at_alloc and destroyed_at_c_call, D17 was incorrectly claimed to be preserved.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15007 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-17 07:39:16 +00:00
Mark Shinwell a68f192d48 CSE bug on amd64: Ifloatsqrtf involves a memory load
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15004 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-16 09:24:59 +00:00
Mark Shinwell 5208fbc99f mantis 6489 (fix by Richard Jones)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15002 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-16 06:35:43 +00:00
Gabriel Scherer e331dacf29 PR#6482: ocamlbuild fails when _tags file in unhygienic directory
ocamlbuild lazily traverses directory to build a vision of the
filesystem tree in which the build happens. During that traversals, it
parses any configuration file `_tags` it encouters. PR#6482 was caused
by the fact that the configuration-parsing code used the relative path
of the _tags file, which was correct at the time of traversal, but
stale at the time the lazy thunk was in fact forced (a Sys.chdir had
occured in between).

The first fix is to detect when relative paths become stale, and use
the correct absolute path in that situation.

The reason why this lazy thunk was only forced after a Sys.chdir is
that, at hygiene time, only the subtrees that are selected for hygiene
checking are forced. It is an unexpected behavior that non-hygienic
subtrees could remain unforced for so long (in particular, the
semantics of parsing a configuration file only much later in the build
process is more than unclear); this commit also removes this behavior
by always forcing the whole traversed subtree just before hygiene.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15000 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-14 14:44:53 +00:00
Damien Doligez 529ad3ed12 PR#6469: -dsource prints Pervasives.(!) as Pervasives.!
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14998 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-11 12:07:54 +00:00
Gabriel Scherer 49d3f7b9f8 PR#6418: support "@[<hov %d>" in the new format implementation (Benoît Vaugon)
The bootstrap procedure, as for commit trunk@14973 (see there for
detailed build instructions), requires to first commit a temporary
patch:

> diff -Naur old/typing/typecore.ml new/typing/typecore.ml
> --- old/typing/typecore.ml        2014-06-11 18:16:24.851647309 +0200
> +++ new/typing/typecore.ml        2014-06-11 18:15:50.075646418 +0200
> @@ -2758,16 +2758,9 @@
>        let mk_int n = mk_cst (Const_int n)
>        and mk_string str = mk_cst (Const_string (str, None))
>        and mk_char chr = mk_cst (Const_char chr) in
> -      let mk_block_type bty = match bty with
> -        | Pp_hbox   -> mk_constr "Pp_hbox"   []
> -        | Pp_vbox   -> mk_constr "Pp_vbox"   []
> -        | Pp_hvbox  -> mk_constr "Pp_hvbox"  []
> -        | Pp_hovbox -> mk_constr "Pp_hovbox" []
> -        | Pp_box    -> mk_constr "Pp_box"    []
> -        | Pp_fits   -> mk_constr "Pp_fits"   [] in
>        let rec mk_formatting_lit fmting = match fmting with
> -        | Open_box (org, bty, idt) ->
> -          mk_constr "Open_box" [ mk_string org; mk_block_type bty; mk_int idt ]
> +        | Open_box _ ->
> +          assert false
>          | Close_box ->
>            mk_constr "Close_box" []
>          | Close_tag ->
> @@ -2950,6 +2943,19 @@
>            mk_constr "Alpha" [ mk_fmt rest ]
>          | Theta rest ->
>            mk_constr "Theta" [ mk_fmt rest ]
> +        | Formatting_lit (Open_box (org, _bty, _idt), rest) ->
> +          mk_constr "Formatting_gen" [
> +            mk_constr "Open_box" [
> +              mk_constr "Format" [
> +                mk_constr "String_literal" [
> +                  mk_string "<>";
> +                  mk_constr "End_of_format" [];
> +                ];
> +                mk_string "@[<>";
> +              ]
> +            ];
> +            mk_fmt rest;
> +          ]
>          | Formatting_lit (fmting, rest) ->
>            mk_constr "Formatting_lit" [ mk_formatting_lit fmting; mk_fmt rest ]
>          | Formatting_gen (fmting, rest) ->

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14984 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-14 21:08:50 +00:00
Xavier Leroy 25b93e0823 Reflecting commit 14978 on version/4.02:
PR#6268: -DMODEL_$(MODEL) not passed when building asmrun/arm.p.o


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14979 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-10 08:45:47 +00:00
Xavier Leroy bb83542732 Reflecting commit 14976 on version/4.02:
PR#6211: in toplevel interactive use, bad interaction between uncaught
exceptions and multiple bindings of the form "let x = a let y = b;;".


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14977 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-09 15:14:41 +00:00
Gabriel Scherer 7cb9d0d84e PR#6418: fix format regression on "@{<..%d..%s..>" (Benoît Vaugon)
To be able to compile this patch, you should temporarily apply the
following patch to bootstrap the format type change:

> diff -Naur old/typing/typecore.ml new/typing/typecore.ml
> --- old/typing/typecore.ml	2014-06-06 03:37:03.240926150 +0200
> +++ new/typing/typecore.ml	2014-06-06 03:37:24.696926699 +0200
> @@ -2956,7 +2956,7 @@
>          | Theta rest ->
>            mk_constr "Theta" [ mk_fmt rest ]
>          | Formatting (fmting, rest) ->
> -          mk_constr "Formatting" [ mk_formatting fmting; mk_fmt rest ]
> +          mk_constr "Formatting_lit" [ mk_formatting fmting; mk_fmt rest ]
>          | Reader rest ->
>            mk_constr "Reader" [ mk_fmt rest ]
>          | Scan_char_set (width_opt, char_set, rest) ->

Bootstrap process:

  make core
  apply the patch above
  make core
  make promote-cross
  make partialclean
  revert the patch above, apply the commit
  make partialclean
  make core
  make coreboot

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14973 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-09 13:53:47 +00:00
Gabriel Scherer bb313fa192 Fix PR#6417: sprintf broken when local module named Pervasives is in scope
(Backport from Jacques' commit 4.02@14921)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14972 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-09 13:53:45 +00:00
Gabriel Scherer c24c9ac53d Makefile factorization
reducing world's sequentialization consistently improves parallel build times

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14971 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-09 13:53:43 +00:00