Commit Graph

1472 Commits (f7d20f161ae2103d376bd7432c1c7ba2b64023dc)

Author SHA1 Message Date
Gabriel Scherer 512d128918 Add sort_uniq to ListLabels.
From: Jeremy Yallop <yallop@gmail.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15684 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-19 17:31:41 +00:00
Gabriel Scherer 2799cb2677 Add make_float to ArrayLabels.
From: Jeremy Yallop <yallop@gmail.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15683 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-19 17:31:40 +00:00
Gabriel Scherer 7e47735db8 Simplify the use of custom .() and .[]
This commit modifies the parser to use the newly defined .() and .[] operators. It also moves the definition of the standard .() and .[] operator for String/Bytes and Array to the pervasives module.

Before this commit, expressions of the form array.(index) and string.(index) where desugared to Array.get[_unsafe] array index and Strinf.get[_unsafe] string index. The unsafe or unsafe version were chosen depending on the presence of the "-unsafe" compiler option. Such expression are now desugared to ( .() ) array index and ( .[] ) string index respectively. The same desugar operation is applied to array.(index) <- value which becomes ( .()<- ) array index value.

In order to keep the standard semantic for the string and array index operations, these new index operators are defined in the pervasives module using new compiler primitives, e.g.
let .() = "%array_opt_get".
These new primitives are then mapped to safe or unsafe version depending on the
the "-unsafe" compiler option. Consequently, these modifications should have no impact on existing code.

With these modifications, defining custom .() and .[] operators should be easier, at the cost of losing access to the standard index operator for either array or string.

From: octachron <octa@polychoron.fr>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15661 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-12-13 22:13:34 +00:00
Gabriel Scherer b0b1922aac Update documentation of Sys.int_size
From: hhugo <hugo.heuzard@gmail.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15591 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 12:21:48 +00:00
Gabriel Scherer 8b59f8faef Sys: Use constant for some runtime limitations. After bootstrap
From: Hugo Heuzard <hugo.heuzard@gmail.com>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15590 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-17 12:21:46 +00:00
Gabriel Scherer 8591c2532e missing @since on List.sort_uniq
From: Simon Cruanes <simon.cruanes.2007@m4x.org>

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15579 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-11-16 17:39:50 +00:00
Jérémie Dimino 98e0051f5c PR#6619: update documentation of Printexc.set_uncaught_exception_handler
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15560 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-10-20 13:15:33 +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 bc3439603a #6577: fix performance of %C format.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15321 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-24 09:26:19 +00:00
Alain Frisch f8ca8db7bb #6577: fix performance of %S format.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15320 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-24 09:24:36 +00:00
Alain Frisch 45e9ebde3c #6577: fix performance of %L, %l, %n formats.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15319 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-24 09:20:05 +00:00
Mark Shinwell 830a4fba2a minor update of comment in gc.mli
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15212 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-11 11:17:36 +00:00
Jérémie Dimino d095ba7f89 PR#6540: update documentation of default values in gc.mli
(Patch by Daniel Richman)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15185 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-03 13:35:48 +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
Xavier Leroy b868c05ec9 PR#6517: use ISO C99 types {,u}int{32,64}_t in preference to our homegrown
types {,u}int{32,64}.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15131 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-27 09:58:33 +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 33a52ba692 minor typo spotted by Jeremy Yallop
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15093 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-16 20:30:27 +00:00
Gabriel Scherer 6d3318df9f I forgot about {Bytes,String}Labels.mapi; thanks Alain!
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15091 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-16 17:48:45 +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
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
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
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
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 d6bfdc7002 fix PR#6431 (patch by Benoît Vaugon)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14954 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-06-04 20:19:53 +00:00
Gabriel Scherer e0b000527b format+gadts: make format types "relational" to fix %(...%) typing
See the long comment in pervasives.ml for an explanation of the
change. The short summary is that we need to prove more elaborate
properties between the format types involved in the typing of %(...%),
and that proving things by writing GADT functions in OCaml reveals
that Coq's Ltac is a miracle of usability.

Proofs on OCaml GADTs are runtime functions that do have a runtime
semantics: it is legitimate to hope that those proof computations are
as simple as possible, but the current implementation was optimized
for feasability, not simplicity. François Bobot has some interesting
suggestions to simplify the reasoning part (with more equality
reasoning where I used transitivity and symmetry of the
relation profusely), which may make the code simpler in the future
(and possibly more efficient: the hope is that only %(...%) users will
pay a proof-related cost).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14897 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-21 13:23:13 +00:00
Gabriel Scherer a5e4f0631c update .depend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14886 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-16 17:32:47 +00:00
Gabriel Scherer 6d25df3c9b fix PR#6415: format had forgotten about 'b' boxes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14874 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-15 07:37:15 +00:00
Gabriel Scherer a9aea4306c replay trunk@13911: better behavior of printf on nan/infinity floats
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14871 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-14 16:01:10 +00:00
Gabriel Scherer 3ffa399b37 Use a nominal datatype for CamlinternalFormat.format6
This should make the type-checking of formats simpler and more robust:
instead of trying to find a pair as previously, we can now use the
path of the format6 type directly.

A nice side-effect of the change is that the internal definition of
formats (as a pair) is not printed in error messages anymore.
Because format6 is in fact defined in the CamlinternalFormatBasics
submodule of Pervasives, and has an alias at the toplevel of
Pervasives, error messages still expand the definition:

> Error: This expression has type
>          ('a, 'b, 'c, 'd, 'd, 'a) format6 =
>            ('a, 'b, 'c, 'd, 'd, 'a) CamlinternalFormatBasics.format6
>        but an expression was expected of type ...

Passing the option `-short-paths` does avoid this expansion and
returns exactly the same error message as 4.01:

> Error: This expression has type ('a, 'b, 'c, 'd, 'd, 'a) format6
>        but an expression was expected of type ...

(To get this error message without -short-paths, one would need to
define format6 directly in Pervasives; but this type is mutually
recursive with several GADT types that we don't want to add in the
Pervasives namespace unqualified. This is why I'll keep the alias
for now.)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14868 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-14 15:07:13 +00:00
Gabriel Scherer 0e1584665e fix a regression in Format formatting printing routines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14842 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:37 +00:00
Gabriel Scherer eccf1e2975 formats: enable the legacy mode by default
Given that there still remains a small incompatibility (typing of
%(..%)), I decided to keep the legacy mode enabled for now. This means
that any failure related to format can be traced to this
incompatiblity (or unknown regressions), which will simplify the
monitoring and handling of changes considerably. As soon as the %(..%)
typing is generalized, we can turn the legacy mode off (or maybe
simply add warnings for ignored formats).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14841 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:35 +00:00
Gabriel Scherer f0e39fee7d For %{..%}, restore Pierre's semantics
(printf {%foo%} bar) will print the string representation of the
format type of both `foo` and `bar`, instead of printing `bar`
(for this purpose one can just use %s). `bar` content is ignored, but
the typer should check that its type is compatible with the one of
`foo`.

This semantics allows to use (printf %{..%}) for testing/debugging the
use of %(...%): put in the brackets what you believe to be the format
type you want to use, and as argument the format you wish to pass, and
you'll get type-checking confidence and the "canonical" representation
of the format string which you can use in the %(...%) -- note that
using the canonical format type is not mandatory.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14840 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:33 +00:00
Gabriel Scherer 8e52400ebe move code from pervasives.ml to camlinternalFormat.ml
This simplifies the charset-handling code, as camlinternalFormat is
allowed to depend on Bytes and String instead of re-importing the
needed primitives.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14837 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:27 +00:00
Gabriel Scherer f3a309d5ef simplification in bprint_char_set
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14836 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:25 +00:00
Gabriel Scherer 543e542a27 charset-parsing: require that '%' be written '%%' in charsets, as per the documentation
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14835 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:23 +00:00
Gabriel Scherer ce41f4f905 implement (^^) correctly wrt. string_of_format (Thanks to Pierre Weis)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14834 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:21 +00:00
Gabriel Scherer 2da1602532 printf behavior of %{..%}
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14833 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:19 +00:00
Gabriel Scherer 7f8e43aa9a minor strengthening of the typing of %{...%} formats
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14832 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:17 +00:00
Gabriel Scherer 0a7224fd23 some characters were not allowed in charsets
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14831 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:15 +00:00
Gabriel Scherer 11fdab809d accept and ignore '+' and '-' before precision integers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14830 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:14 +00:00
Gabriel Scherer 8f7b47a137 allow incompatible or unsupported numeric formatting flags
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14829 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:12 +00:00
Gabriel Scherer 3cb315b6fc fix printing bug: (Printf.printf "% 04d" 3) => "00 3"
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14828 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:10 +00:00
Gabriel Scherer 42aca981e2 parse the ignore flag before all others
The legacy implementation doesn't support "%+_", "%-_" etc. which were
accepted by Benoît's patches. This creates a discrepancy (though not
a regression) that is not necessarily desirable (and in any case makes
fuzz-testing for difference return non-bugs). Long-term, I think that
we're good with the previous, simpler structure where "_" must always
be the first flag.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14827 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:09 +00:00
Gabriel Scherer 39ab064baf introduce type aliases for simple padding and precision types
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14825 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:05 +00:00
Gabriel Scherer bf6e3185c0 Add support for ignored scan_get_counter formats (%_[nlNL])
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14820 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:56 +00:00
Gabriel Scherer e69ee15ef7 when passed to Printf, %l%n%L should be interepreted as %u, not %d
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14818 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:52 +00:00
Gabriel Scherer 689d9aff79 allows some more ignored formats
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14817 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:50 +00:00
Gabriel Scherer fa67173b24 ignore more incompatible flags
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14816 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:49 +00:00
Gabriel Scherer b3b3518c29 disable incompatible flags in legacy mode
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14815 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:47 +00:00
Gabriel Scherer b56ea67724 some benine meaningless formats were previously ignored
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14814 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:45 +00:00
Gabriel Scherer fb90637095 sets up a 'legacy mode'
When the OCAML_LEGACY_FORMAT environment variable is set, the compiler
will try to emulate the behaviour of the previous implementation of
format.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14813 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:43 +00:00
Gabriel Scherer 72669307e8 second part of Benoît Vaugon's format+gadts patch
To finish the bootstrap cycle, run:

  make library-cross
  make promote
  make partialclean
  make core

  make library-cross
  make promote-cross
  make partialclean
  make ocamlc ocamllex ocamltools

  make library-cross
  make promote
  make partialclean
  make core
  make compare

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14810 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:37 +00:00
Gabriel Scherer 736876eaea convert Benoît's first patch to bytes/string
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14807 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:31 +00:00
Gabriel Scherer 43647ba502 first part of Benoît Vaugon's format-gadts patch
After applying this patch, you should run:

  make library-cross
  make promote-cross
  make partialclean
  make ocamlc ocamllex ocamltools

and then immediately apply the following patches until the "second
part of Benoît Vaugon's format+gadts patch"; the bootstrap cycle is
not finished yet.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14806 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:29 +00:00
Gabriel Scherer 755b19650b Reformulation of the user-facing slot-access API
- The internal [backtrace_slot] type is not exposed anymore, instead
  accessors function return orthogonal information
  (is_raise, location). This is both more extensible and more
  user-friendly.

- The [raw_backtrace_slot] is exposed separately as a low-level type
  that most users should never use. The unsafety of marshalling is
  documented. Instead of defining
  [raw_backtrace = raw_backtrace_slot array], I kept [raw_backtrace]
  an abstract type with [length] and [get] functions for
  random-access. This should allow us to change the implementation in
  the future to be more robust wrt. marshalling (boxing the trace in
  a Custom block, or even possibly the raw slots at access time).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:20:00 +00:00
Gabriel Scherer cc6b2ca107 expose Printexc.format_backtrace_slot to facilitate testing
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14781 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:19:55 +00:00
Gabriel Scherer 1fdea57c4c Printexc: OCaml-friendly access to individual backtrace slots
(Patch by Jacques-Henri Jourdan)

There are several changes:

- `raw_backtrace` is no longer an abstract type, but rather an
  `raw_backtrace_slot array`, where `raw_backtrace_slot` is a new
  abstract type. `raw_backtrace_slot` elements are hashable and
  comparable. At runtime, values of this type contain either
  a bytecode pointer or a frame_descr pointer. In order to prevent the
  GC from walking through this pointer, the low-order bit is set to
  1 when stored in the array.

- The old `loc_info` type is know public, renamed into `backtrace_slot`:

      type backtrace_slot =
        | Known_location of bool   (* is_raise *)
                          * string (* filename *)
                          * int    (* line number *)
                          * int    (* start char *)
                          * int    (* end char *)
        | Unknown_location of bool (*is_raise*)

- new primitive :

    val convert_raw_backtrace_slot: raw_backtrace_slot -> backtrace_slot

  Rather than returning an option, it raises Failure when it is not
  possible to get the debugging information. It seems more idiomatic,
  especially because the exceptional case cannot appear only for a part
  of the executable.

- the caml_convert_raw_backtrace primitive is removed; it is more
  difficult to implement in the C side because of the new exception
  interface described above.

- In the bytecode runtime, the events are no longer deserialized once
  for each conversion, but once and for all at the first conversion,
  and stored in a global array (*outside* the OCaml heap), sorted by
  program counter value. I believe this information should not take
  much memory in practice (it uses the same order of magnitude memory
  as the bytecode executable). It also makes location lookup much more
  efficient, as a dichomoty is used instead of linear search as
  previously.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14776 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-10 19:19:47 +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
Jacques Garrigue b56dc4b3df PR#5584: merge open extensible types, extension-patch-4.0.2
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14737 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-04 23:08:45 +00:00
Gabriel Scherer c03e155885 stdlib/map: Add some usage exemple in the documentation.
(Patch by Nicolas Braud-Santoni)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-03 13:24:29 +00:00
Damien Doligez 9baf42b72d safe-string: documentation fixes and add a couple of functions in Pervasives and Digest
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14721 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-01 21:54:15 +00:00
Fabrice Le Fessant a72d304fa4 document __LOC__ in pervasives.mli
Also removes __FILE_OF__ and __MODULE_OF__, since they are not more precise
than __FILE__ and __MODULE__



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14715 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-30 14:22:27 +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
Alain Frisch df68e916c4 #6119: document that the set of values contained in a closure is not specified and how this impacts marshaling references captured in closures, for instance.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14670 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23 16:04:02 +00:00
Alain Frisch 5a463e6176 Fix doc for unmarshaled exception values and structural comparison.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14669 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-23 15:54:26 +00:00
Gabriel Scherer dd7178e2b1 [minor] documentation typo in Hashtbl
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14647 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 10:35:07 +00:00
Gabriel Scherer 1ba4d3486b [minor] improvement over the Hashtbl doc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14646 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 10:15:28 +00:00
Gabriel Scherer 5ef784b7b2 an example of functor application for Hashtbl
(Patch by Simon Cruanes)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14644 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-19 09:05:30 +00:00
Jérémie Dimino d3ec5feb26 PR#5941: add Printexc.set_uncaught_exception_handler
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14643 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 15:36:08 +00:00
Damien Doligez 34752cdc5a minor clean-ups
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14642 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-18 15:29:56 +00:00
Damien Doligez 65d56e7164 merge COMPFLAGS and OPTCOMPFLAGS
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14621 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-17 09:49:33 +00:00
Gabriel Scherer 2fc7ac7e8b [whitespace] bring threads/pervasives.ml closer to stdlib/pervasives.ml
(report by Hugo Heuzard)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14604 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-15 13:10:33 +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 369a77acfd remove broken link in doc comment
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14579 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12 07:20:13 +00:00
Damien Doligez 834253b976 fix wrong type name: string --> usage_msg
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14578 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-12 07:18:39 +00:00
Fabrice Le Fessant 2859498cad Add %loc_* primitives and corresponding values in Pervasives
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14571 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-10 14:11:25 +00:00
Gabriel Scherer de4f4cf8b3 PR#6358: obey DESTDIR in install targets
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14536 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-07 07:06:17 +00:00
Luc Maranget c2a88c27fd #PR6269 Optimized string matching
Noticed that I had to bootstrap to test on ARM, so I commit  a new bootstrap
compiler.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14479 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-21 17:02:44 +00:00
Gabriel Scherer eeae918f35 Pervasives: define [min_int] and [max_int] without assuming that integers are either 31 or 63 bits.
(Patch by Jérôme Vouillon)

Js_of_ocaml has 32 bit integers. Currently, it patches the bytecode,
just to get the correct values for [min_int] and [max_int]. It would be
simpler if this was not necessary.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14477 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-20 16:09:33 +00:00
Jacques Garrigue 65b1193406 Fix PR#6307
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14451 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-10 02:54:02 +00:00
Alain Frisch 7fead1f37b #5779: Revert change on camlinternalOO.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14449 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 17:10:02 +00:00
Mark Shinwell 1f4de8b799 use -bin-annot when building
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14448 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 14:47:30 +00:00
Alain Frisch ccf516168f #5779: adopt gasche's sentinel solution.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14447 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-07 08:16:41 +00:00
Alain Frisch 4907f6ca76 #5779: improve support for structured constants (better propagation, sharing, cleaner representation). Also fix #6337 (constants emitted several times).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14444 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-06 17:03:16 +00:00
Damien Doligez 9d86709547 fix major performance problem on large heaps by making the heap increment proportional to the heap size
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14442 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-20 13:04:01 +00:00
Damien Doligez 29ad65d954 PR#6208: Hashtbl.reset @since 4.00.0
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14437 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-02-19 15:23:17 +00:00
Damien Doligez 89735c4b9c PR#6189: items (8) and (9)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14412 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-22 14:33:38 +00:00
Damien Doligez 4311193245 PR#6189: items (5) (6) (7)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14411 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-01-22 14:05:13 +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
Damien Doligez 1ed1b20201 PR#6245: Minor inconsistencies between related signatures in arg.mli
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14332 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-30 22:15:11 +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
Alain Frisch f16534ef1a Reintegrate raise_variants branch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14289 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-13 13:55:13 +00:00
Alain Frisch b911754434 Simplify special logic for array bound error (allocate the exception value from Pervasives).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14275 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-08 16:18:21 +00:00
Alain Frisch 171a77daba Fix typos and wording (#6231).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14274 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-08 15:36:36 +00:00
Alain Frisch 7bb3e64160 Do not introduce Obj.raw_tag.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14270 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-06 10:57:20 +00:00
Alain Frisch 5ef2ee909f Support for exception values allocated in the static area (e.g. out of bound exception in native code).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14242 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-23 15:17:05 +00:00
Alain Frisch be3c4d6882 Add two functions to get the exception slot id and name from an exception value.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14240 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-23 14:35:43 +00:00
Alain Frisch 0f6f367ad4 Change the representation of exception slots: instead of being represented as 'string ref', they are now blocks
of size 2, with tag = Object_tag, the first field being the pointer to the string, and second one being a unique id, generated
from the same sequence as for object values.  Special case for predefined exceptions, represented with a negative id.

The unique id generator is moved from camlinternalOO to the C runtime system.

Also fix some bugs.



git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14239 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-23 14:28:31 +00:00
Alain Frisch d802a51be6 #6203: change representation of exception values created with a constant constructor: the value is now equal to the exception slot. This avoids some allocation when the constructor is called and an extra indirection on matching against the constructor.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14235 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-18 13:00:58 +00:00
Alain Frisch 0915cb5b5f Rename raise_nostack -> raise_notrace. Expose it in Pervasives.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14225 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 13:52:14 +00:00
Jacques Garrigue 6ffc859a5c everything works except camlp4
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/module-alias@14204 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-01 03:17:11 +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 2373f76c36 #6180: efficient creation of uninitialized float arrays.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14156 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-17 11:54:31 +00:00
Gabriel Scherer 8ba031a7db Format: pp_print_list and pp_print_text, contributed by Daniel Bünzli
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14123 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-13 15:55:41 +00:00
Damien Doligez fe6ff6a033 remove leftover conflicts from .depend
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14061 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-09-04 15:37:10 +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 bbb30a93b2 PR#6148: speed improvement for Buffer (patch by John Whitington).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14048 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-30 13:12:47 +00:00
Gabriel Scherer da3011fec2 PR#6116: more efficient implementation of Digest.to_hex [patch by ygrek]
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13971 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-08-04 19:58:07 +00:00
Damien Doligez 5fbcc8e6ae PR#4243: make the Makefiles parallelizable
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13931 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-24 14:39:31 +00:00
Gabriel Scherer cdd43f2800 PR#5644: a dumbed-down fix to fix the observable effect (Stream.of_string) with no change to the underlying code (to avoid regressions)
As I learned the hard way, it is essentially impossible to get
a satisfying behavior in presence of a mix of updates, concatenations
and counts. The best thing to do is thus to not change anything
(a good way to preserve compatibility), and only fix the
Stream.of_string function to assume nothing of the count passed to the
[from] function.

I also modified the mli documentation of [Stream.from] to warn other
users of this potential pitfall.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13915 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-21 20:03:52 +00:00
Gabriel Scherer 4574c718f8 Revert the changes of revision 12682 (PR#5644 Stream.count broken when used with Sapp or Slazy nodes) because of regressions identified by hongboz
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13914 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-21 20:02:29 +00:00
Xavier Leroy 1353262558 PR#5739: Printf.printf "%F" and nan/infinity/neg_infinity.
(Reflecting commit r13910 on version/4.01)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13911 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-19 09:07:54 +00:00
Alain Frisch 7334bb026a #5899: expose Printexc.get_callstack. (Cherry-picked 13884, 13885 from trunk.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13886 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-11 12:37:10 +00:00
Alain Frisch edb771d22b #4986. Add two common operations: List.sort_uniq (more efficient that sorting then removing duplicates) and Set.of_list (more efficient than folding Set.add over the list).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13876 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-07-09 11:01:42 +00:00
Gabriel Scherer 54a131a262 PR#4079: Queue.copy is now tail-recursive (patch from "Cristophe" on the bugtracker)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-16 16:19:30 +00:00
Damien Doligez 493704f300 PR#5827: provide a dynamic command line parsing mechanism
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13772 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-13 11:26:16 +00:00
Damien Doligez cdf6f91ba5 typo and reformatting of comments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13752 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-06 15:01:41 +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 1f9f68a328 Add String.split and String.cut_at from Misc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13746 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-05 13:27:05 +00:00
Fabrice Le Fessant ace0205b64 Add |> and @@ operators to Pervasives
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13739 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 18:22:31 +00:00
Hongbo Zhang e97c59d045 fix scanf.ml build
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13728 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-02 14:42:33 +00:00
Pierre Weis 4b3e3c7647 A thoroughly revised documentation for format strings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13726 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-01 12:05:32 +00:00
Pierre Weis e833f3c9d5 Better error messages for binary/octal/hexa integer scanning.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13725 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-01 09:01:59 +00:00
Pierre Weis 626c696aee Wrong quoting chase.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13717 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-29 18:03:55 +00:00
Pierre Weis f5e0923469 Better documentation of meta format conversion.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13714 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-29 16:44:12 +00:00
Damien Doligez db9ea0df59 PR#6024: Format syntax for printing @ is incompatible with 3.12.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13713 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-29 15:56:25 +00:00
Gabriel Scherer c089c9a6dd fix the buggy parser example in the Genlex documentation (issue reported by Armael Geneau)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13613 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-28 14:28:55 +00:00
Pierre Weis faf9cb478d Revert sprintf type. Add a new function to support %a conversions in sprintf functionality.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13609 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-25 09:14:09 +00:00
Pierre Weis 3e110da03d Details.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13608 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-25 09:11:44 +00:00
Pierre Weis a79b51b675 Complete rewriting of Format.mk_printf. Convergence between Printf and Format codes.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13606 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-24 14:56:25 +00:00
Pierre Weis 2ad00ac0ad Exporting count_printing_arguments_of_format and add_int_index.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13605 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-24 14:54:58 +00:00
Pierre Weis 1d1d751326 PR#5973 (old @ escape was still implemented in Format) + bootstrap.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13601 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-23 21:44:30 +00:00
Wojciech Meyer 16e6f2df27 PR#4978: Better wording.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13568 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 15:18:17 +00:00
Alain Frisch 261eaed8b2 Typo.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13555 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-18 12:56:28 +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
Alain Frisch b4c4c5e77b #5977: ensure that bootstrapping on 64-bit does not produce 64-bit constants that cannot be read on 32-bit platforms.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13488 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-09 12:17:05 +00:00
Wojciech Meyer 93fc228b45 PR#4978: add a warning to the Marshal module documentation about using marshaled exception.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13486 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-04-04 22:07:51 +00:00
Pierre Weis 5392f6f13e @@ should be written \@\@ for Ocamldoc...
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13416 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-19 19:25:24 +00:00
Pierre Weis 635604d822 Typo: get_formatter_out_functions was redefined. Doc.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13414 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-19 10:14:31 +00:00
Pierre Weis a2c500f8bc Details.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13413 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-19 08:06:06 +00:00
Pierre Weis 559521f125 Documentation.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13412 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-19 08:02:15 +00:00
Pierre Weis 54b4e5e79e sprintf now compatible with proper %a application with formatters. Deprecating pp_ versions of get/set_all_formatter_output_functions. Documentation review.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13411 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-19 07:58:59 +00:00
Gabriel Scherer 75b8c0184f PR#5933 type-specialize 'let compare = compare' on ints and strings
According to the reporter 'sliquister', type-specialized comparison
can nearly halve compilation time in some cases. This patch applies
type-specialization throughout the OCaml distribution sources, so not
all changes will have performance utility, but in this case I think
it's best to be consistent, as I see no downside to the change.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13410 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-19 07:22:12 +00:00
Gabriel Scherer 725da3dcc9 user-exposed abstract type for raw backtraces in Printexc.ml (original patch from Jacques-Henri Jourdan)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13394 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-11 19:04:12 +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 90dd916144 typo
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13318 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-02-26 12:46:09 +00:00