Commit Graph

9848 Commits (d1b1fbee667b5ce1c3b466d438418d4e9ff45e81)

Author SHA1 Message Date
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 4907bcf803 typecore.ml: fix format's expected-type mistake
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14826 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:07 +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 6a8f12080b testsuite for %_[nNlL]
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14824 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:03 +00:00
Gabriel Scherer ddf133e90f finish %_[nNlL] boostrap (same bootstrap steps)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14823 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:38:01 +00:00
Gabriel Scherer ee90232220 add typer support for the new formats
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14822 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:59 +00:00
Gabriel Scherer 3f37e56fe1 temporary bootstrap (%_[nNlL] not yet handled by the typer)
Bootstrap steps:

  disable "-warn-error A" in Makefile

  make library -j3 \
  && cp stdlib/stdlib.cma stdlib/std_exit.cmo stdlib/*.cmi boot/ \
  && make partialclean \
  && make ocamlc ocaml -j5

  enable -warn-error A again

cp ocamlc boot/

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14821 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:58 +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 3ab9516300 a testsuite to measure format behavior changes and the effectiveness of legacy mode
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14819 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:54 +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 e0ed68b842 bootstrap
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14812 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:41 +00:00
Gabriel Scherer 628a2a2ed9 sync threads/pervasives.ml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14811 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:39 +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 9fa17c95a5 temporarily remove %(%) to avoid weaker typing
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14809 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:34 +00:00
Gabriel Scherer be3eca64ed update Benoît's patch wrt. Parsetree changes
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14808 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:33 +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 a64648eae6 temporarily revert the bootstrap of naked-pointers before merging format+gadts
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14805 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 15:37:26 +00:00
Luc Maranget f8a3649190 Correct PR#6412 by ruling out sharing of Levents
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14804 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 14:57:24 +00:00
Damien Doligez 5d7864a8d4 ci-build: do not change directory for Unix slaves
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14803 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 14:46:59 +00:00
Damien Doligez 6d688eadc1 add missing instructions to ci-build for msvc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14802 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 14:26:25 +00:00
Damien Doligez d0368bc2c5 update distclean target
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14801 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 14:03:04 +00:00
Alain Frisch f4654c8952 Add entry in Changelog for #5779.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14800 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 13:52:14 +00:00
Damien Doligez e9e2154e03 mark PR#5580 as potentially breaking change
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 13:46:57 +00:00
Damien Doligez aebb9e144d fix missing archs
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14798 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 13:46:19 +00:00
Jacques Garrigue c36565a6c6 avoid warning just before an error happens using -no-alias-deps
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14797 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 12:42:15 +00:00
Damien Doligez 4736382a39 add universal CI build script
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14796 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 12:19:20 +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
Alain Frisch 68ae2cc74b Enable warning 27 in tools/ and fix occurrences. It's good to mark in depend and untypeast parts which are explicitly ignored.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14794 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 10:41:21 +00:00
Mark Shinwell 0875b3c630 update Changes for -no-naked-pointers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14793 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 10:37:15 +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
Mark Shinwell 881ec04f39 no-naked-pointers patch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14791 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-12 07:29:24 +00:00
Jacques Garrigue 48ecf7eb15 Fix PR#6410: Error message for an attempt to use a functor as a module is confusing
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14790 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-11 08:13:04 +00:00
Jacques Garrigue d2194b72fe comment out Ctype.local_non_recursive_abbrev
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14789 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-11 07:48:55 +00:00
Jacques Garrigue 4365e3888e fix man pages: should be open!
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14788 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-11 00:25:57 +00:00