diff options
author | Alain Frisch <alain@frisch.fr> | 2006-01-04 17:03:59 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2006-01-04 17:03:59 +0000 |
commit | f4954ee1155f4bae6bc30f8791ea8c5d8d95312b (patch) | |
tree | 0aff4a8e0b30ccaec00d3747cbf890d0f0fac6d9 | |
parent | 86edd057aa558a9f4ff28e65a4d257ec2991c562 (diff) | |
download | ocaml-f4954ee1155f4bae6bc30f8791ea8c5d8d95312b.tar.gz |
Synchronize with ocaml 3.09.1
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/cducetrunk@7308 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | Changes | 37 | ||||
-rw-r--r-- | README.cduce | 3 | ||||
-rwxr-xr-x | boot/ocamlc | bin | 1004134 -> 1004426 bytes | |||
-rwxr-xr-x | boot/ocamllex | bin | 159180 -> 159177 bytes | |||
-rwxr-xr-x | camlp4/etc/mkcamlp4.sh.tpl | 14 | ||||
-rw-r--r-- | camlp4/etc/pr_o.ml | 4 | ||||
-rw-r--r-- | camlp4/etc/pr_r.ml | 3 | ||||
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | ocamldoc/Changes.txt | 5 | ||||
-rw-r--r-- | ocamldoc/odoc_comments.ml | 1 | ||||
-rw-r--r-- | ocamldoc/odoc_cross.ml | 1 | ||||
-rw-r--r-- | ocamldoc/odoc_misc.ml | 10 | ||||
-rw-r--r-- | stdlib/scanf.ml | 21 | ||||
-rw-r--r-- | stdlib/scanf.mli | 14 | ||||
-rw-r--r-- | stdlib/sys.ml | 2 | ||||
-rw-r--r-- | tools/dumpobj.ml | 11 | ||||
-rwxr-xr-x | tools/make-package-macosx | 2 |
17 files changed, 92 insertions, 40 deletions
@@ -1,10 +1,37 @@ Objective Caml 3.09.1: ---------------------- -Native-code compiler (ocamlopt): -- Fixed bug in ocamlopt -for-pack (bad interaction with inlining, - caused undefined global symbols to be referenced) (PR#3825). +Bug fixes: +- compilers: raise not_found with -principal PR#3855 +- compilers: assert failure in typeclass.cml PR#3856 +- compilers: assert failure in typing/ctype.ml PR#3909 +- compilers: fatal error exception Ctype.Unify PR#3918 +- compilers: spurious warning Y PR#3868 +- compilers: spurious warning Z on loop index PR#3907 +- compilers: error message that emacs cannot parse +- ocamlopt: problems with -for-pack/-pack PR#3825, PR#3826, PR#3919 +- ocamlopt: can't produce shared libraries on x86_64 PR#3869, PR#3924 +- ocamlopt: float alignment problem on SPARC PR#3944 +- ocamlopt: can't compile on MIPS PR#3936 +- runtime: missing dependence for ld.conf +- runtime: missing dependence for .depend.nt PR#3880 +- runtime: memory leak in caml_register_named_value PR#3940 +- runtime: crash in Marshal.to_buffer PR#3879 +- stdlib: Sys.time giving wrong results on Mac OS X PR#3850 +- stdlib: Weak.get_copy causing random crashes in rare cases +- stdlib, debugger, labltk: use TMPDIR if set PR#3895 +- stdlib: scanf bug on int32 and nativeint PR#3932 +- camlp4: mkcamlp4 option parsing problem PR#3941 +- camlp4: bug in pretty-printing of lazy/assert/new +- camlp4: update the unmaintained makefile for _loc name +- ocamldoc: several fixes see ocamldoc/Changes.txt +- otherlibs/str: bug in long sequences of alternatives PR#3783 +- otherlibs/systhreads: deadlock in Windows PR#3910 +- tools: update dumpobj to handle new event format PR#3873 +- toplevel: activate warning Y in toplevel PR#3832 +New features: +- otherlibs/labltk: browser uses menu bars instead of menu buttons Objective Caml 3.09.0: ---------------------- @@ -24,8 +51,8 @@ Type checking: Both compilers: - Added warnings 'Y' and 'Z' for local variables that are bound but never used. -- Added warning for some uses non-returning functions (e.g. raise), when they are - passed extra arguments, or followed by extra statements. +- Added warning for some uses non-returning functions (e.g. raise), when they + are passed extra arguments, or followed by extra statements. - Pattern matching: more prudent compilation in case of guards; fixed PR#3780. - Compilation of classes: reduction in size of generated code. - Compilation of "module rec" definitions: fixed a bad interaction with diff --git a/README.cduce b/README.cduce index 9b7f0041e5..c172fd74c0 100644 --- a/README.cduce +++ b/README.cduce @@ -57,3 +57,6 @@ CHANGE LOG: - drop the stand-alone installation mode +3.09.1 +- synchronize with OCaml 3.09.1 (released version) +- better error messages diff --git a/boot/ocamlc b/boot/ocamlc Binary files differindex 16bf9922f2..b10e3a8285 100755 --- a/boot/ocamlc +++ b/boot/ocamlc diff --git a/boot/ocamllex b/boot/ocamllex Binary files differindex 144793e6e1..8e5246ca40 100755 --- a/boot/ocamllex +++ b/boot/ocamllex diff --git a/camlp4/etc/mkcamlp4.sh.tpl b/camlp4/etc/mkcamlp4.sh.tpl index 995ad5bac3..020e8fa89c 100755 --- a/camlp4/etc/mkcamlp4.sh.tpl +++ b/camlp4/etc/mkcamlp4.sh.tpl @@ -13,15 +13,13 @@ while test "" != "$1"; do case "$1" in -I) INCL="$INCL -I $2"; shift;; -version) echo "mkcamlp4, version $VERSION"; exit;; - *) + [a-zA-Z]*.cmi) j=`basename "$1" .cmi` - if test "$j.cmi" = "$1"; then - first="`expr "$j" : '\(.\)' | tr 'a-z' 'A-Z'`" - rest="`expr "$j" : '.\(.*\)'`" - INTERFACES="$INTERFACES $first$rest" - else - OPTS="$OPTS $1" - fi;; + first="`expr "$j" : '\(.\)' | tr 'a-z' 'A-Z'`" + rest="`expr "$j" : '.\(.*\)'`" + INTERFACES="$INTERFACES $first$rest" + ;; + *) OPTS="$OPTS $1";; esac shift done diff --git a/camlp4/etc/pr_o.ml b/camlp4/etc/pr_o.ml index 21d74d3bf5..ca585ac7f8 100644 --- a/camlp4/etc/pr_o.ml +++ b/camlp4/etc/pr_o.ml @@ -1407,7 +1407,9 @@ pr_expr.pr_levels := <:expr< for $_$ = $_$ $to:_$ $_$ do { $list:_$ } >> | <:expr< while $_$ do { $list:_$ } >> | <:expr< ($list: _$) >> | <:expr< let $opt:_$ $list:_$ in $_$ >> | - <:expr< let module $_$ = $_$ in $_$ >> as e -> + <:expr< let module $_$ = $_$ in $_$ >> | + <:expr< new $list:_$ >> | + <:expr< assert $_$ >> | <:expr< lazy $_$ >> as e -> fun curr next dg k -> [: `S LO "("; `expr e "" [: `HVbox [: `S RO ")"; k :] :] :] | e -> fun curr next _ k -> [: `not_impl "expr" e :] ]}]; diff --git a/camlp4/etc/pr_r.ml b/camlp4/etc/pr_r.ml index 810943e303..74b1322c9e 100644 --- a/camlp4/etc/pr_r.ml +++ b/camlp4/etc/pr_r.ml @@ -1315,7 +1315,8 @@ pr_expr.pr_levels := <:expr< while $_$ do { $list:_$ } >> | <:expr< let $opt:_$ $list:_$ in $_$ >> | <:expr< let module $_$ = $_$ in $_$ >> | - <:expr< new $list:_$ >> as e -> + <:expr< new $list:_$ >> | + <:expr< assert $_$ >> | <:expr< lazy $_$ >> as e -> fun curr next _ k -> [: `S LO "("; `expr e [: `HVbox [: `S RO ")"; k :] :] :] | e -> fun curr next _ k -> [: `not_impl "expr" e :] ]}]; @@ -403,7 +403,7 @@ esac # Determine alignment constraints case "$host" in - sparc-*-*|hppa*-*-*) + sparc*-*-*|hppa*-*-*) # On Sparc V9 with certain versions of gcc, determination of double # alignment is not reliable (PR#1521), hence force it. # Same goes for hppa. @@ -434,7 +434,7 @@ esac if $int64_native; then case "$host" in - hppa*-*-*) + sparc*-*-*|hppa*-*-*) if test $2 = 8; then echo "64-bit integers can be word-aligned." echo "#undef ARCH_ALIGN_INT64" >> m.h diff --git a/ocamldoc/Changes.txt b/ocamldoc/Changes.txt index e429bc9d9d..5f67b0cf44 100644 --- a/ocamldoc/Changes.txt +++ b/ocamldoc/Changes.txt @@ -5,16 +5,13 @@ TODO: - xml generator ===== -Next release: +Release 3.09.1: - fix: remove .TP for generated man pages, use .sp instead (.TP caused a lot of odd margins) - fix: html generator now output DOCTYPE and character encoding information. - add: m_text_only field in Module.t_module, to separate real modules from text files handled as modules. - fix: display only text for "text modules" - -===== -Release 3.09: - extensible {foo } syntax - user can give .txt files on the command line, containing ocamldoc formatted text, to be able to include bigger texts out of source files diff --git a/ocamldoc/odoc_comments.ml b/ocamldoc/odoc_comments.ml index fc132c21b6..54650acb51 100644 --- a/ocamldoc/odoc_comments.ml +++ b/ocamldoc/odoc_comments.ml @@ -342,4 +342,3 @@ let info_of_comment_file f = failwith s (* eof $Id$ *) - diff --git a/ocamldoc/odoc_cross.ml b/ocamldoc/odoc_cross.ml index f589858fa3..284dc4cb12 100644 --- a/ocamldoc/odoc_cross.ml +++ b/ocamldoc/odoc_cross.ml @@ -899,4 +899,5 @@ let associate module_list = ignore (associate_type_of_elements_in_comments module_list) + (* eof $Id$ *) diff --git a/ocamldoc/odoc_misc.ml b/ocamldoc/odoc_misc.ml index ec5e1f3611..ea2077759e 100644 --- a/ocamldoc/odoc_misc.ml +++ b/ocamldoc/odoc_misc.ml @@ -21,6 +21,16 @@ let no_blanks s = done; Buffer.contents buf +let no_blanks s = + let len = String.length s in + let buf = Buffer.create len in + for i = 0 to len - 1 do + match s.[i] with + ' ' | '\n' | '\t' | '\r' -> () + | c -> Buffer.add_char buf c + done; + Buffer.contents buf + let input_file_as_string nom = let chanin = open_in_bin nom in let len = 1024 in diff --git a/stdlib/scanf.ml b/stdlib/scanf.ml index 529aa087ab..eda801c2bc 100644 --- a/stdlib/scanf.ml +++ b/stdlib/scanf.ml @@ -1000,7 +1000,7 @@ let kscanf ib ef fmt f = let _x = scan_String max ib in let rf = token_string ib in if not (compatible_format_type mf rf) - then format_mismatch rf mf ib else + then format_mismatch rf mf ib else if conv = '{' then scan_fmt (stack f rf) j else let nf = scan_fmt (Obj.magic rf) 0 in scan_fmt (stack f nf) j @@ -1029,15 +1029,18 @@ let sscanf s = bscanf (Scanning.from_string s);; let scanf fmt = bscanf Scanning.stdib fmt;; -let bscanf_format ib fmt2 f = +let bscanf_format ib fmt f = + let fmt = format_to_string fmt in let fmt1 = ignore (scan_String max_int ib); token_string ib in - let fmt2 = format_to_string fmt2 in - if compatible_format_type fmt1 fmt2 - then let fresh_fmt = String.copy fmt1 in f (string_to_format fresh_fmt) - else format_mismatch fmt1 fmt2 ib;; + if not (compatible_format_type fmt1 fmt) then + format_mismatch fmt1 fmt ib else + let fresh_fmt1 = String.copy fmt1 in + f (string_to_format fresh_fmt1);; let sscanf_format s fmt = let fmt = format_to_string fmt in - if compatible_format_type s fmt - then let fresh_fmt = String.copy s in string_to_format fresh_fmt - else bad_input (format_mismatch_err s fmt);; + let fmt1 = s in + if not (compatible_format_type fmt1 fmt) then + bad_input (format_mismatch_err fmt1 fmt) else + let fresh_fmt1 = String.copy fmt1 in + string_to_format fresh_fmt1;; diff --git a/stdlib/scanf.mli b/stdlib/scanf.mli index 4f830e67c9..adf700d1a0 100644 --- a/stdlib/scanf.mli +++ b/stdlib/scanf.mli @@ -258,12 +258,14 @@ val kscanf : val bscanf_format : Scanning.scanbuf -> ('a, 'b, 'c, 'd) format4 -> (('a, 'b, 'c, 'd) format4 -> 'e) -> 'e;; -(** [bscanf_format ib fmt f] reads a [format] argument to the format - specified by the second argument. The [format] argument read in - buffer [ib] must have the same type as [fmt]. *) + +(** [bscanf_format ib fmt f] reads a format string token in buffer [ib], + according to the format string [fmt], and applies the function [f] to the + resulting format string value. + Raises [Scan_failure] if the format string value read has not the same type + as [fmt]. *) val sscanf_format : string -> ('a, 'b, 'c, 'd) format4 -> ('a, 'b, 'c, 'd) format4;; -(** [sscanf_format ib fmt f] reads a [format] argument to the format - specified by the second argument and returns it. The [format] - argument read in string [s] must have the same type as [fmt]. *) +(** Same as {!Scanf.bscanf_format}, but converts the given string to a format + string. *) diff --git a/stdlib/sys.ml b/stdlib/sys.ml index 14664f0626..8a0984205b 100644 --- a/stdlib/sys.ml +++ b/stdlib/sys.ml @@ -78,4 +78,4 @@ let catch_break on = (* OCaml version string, must be in the format described in sys.mli. *) -let ocaml_version = "3.09.1+dev6 (2005-12-28)";; +let ocaml_version = "3.09.1";; diff --git a/tools/dumpobj.ml b/tools/dumpobj.ml index 17de51e5ad..3f39687024 100644 --- a/tools/dumpobj.ml +++ b/tools/dumpobj.ml @@ -108,6 +108,9 @@ let rec print_struct_const = function (* Print an obj *) +let same_custom x y = + Obj.field x 0 = Obj.field (Obj.repr y) 0 + let rec print_obj x = if Obj.is_block x then begin let tag = Obj.tag x in @@ -123,7 +126,13 @@ let rec print_obj x = printf "%.12g" a.(i) done; printf "|]" - end else if tag < Obj.no_scan_tag then begin + end else if tag = Obj.custom_tag && same_custom x 0l then + printf "%ldl" (Obj.magic x : int32) + else if tag = Obj.custom_tag && same_custom x 0n then + printf "%ndn" (Obj.magic x : nativeint) + else if tag = Obj.custom_tag && same_custom x 0L then + printf "%LdL" (Obj.magic x : int64) + else if tag < Obj.no_scan_tag then begin printf "<%d>" (Obj.tag x); match Obj.size x with 0 -> () diff --git a/tools/make-package-macosx b/tools/make-package-macosx index 80612fb3f5..7dd79175a2 100755 --- a/tools/make-package-macosx +++ b/tools/make-package-macosx @@ -104,7 +104,7 @@ mkdir -p resources cat >resources/ReadMe.txt <<EOF This package installs Objective Caml version ${VERSION}. You need Mac OS X 10.4.x (Tiger), with X11 and the -XCode tools (v2.1) installed. +XCode tools (v2.2) installed. Files will be installed in the following directories: |