Commits

camlspotter committed 2f3f8b6

version/3.12 revision 10585

Comments (0)

Files changed (656)

-.cvsignore
 .depend
 configure
 ocamlc
 _build
 _log
 myocamlbuild_config.ml
+ocamlnat
 typing/includecore.cmi: typing/types.cmi typing/typedtree.cmi \
     typing/ident.cmi typing/env.cmi
 typing/includemod.cmi: typing/types.cmi typing/typedtree.cmi typing/path.cmi \
-    typing/ident.cmi typing/env.cmi typing/ctype.cmi
+    typing/includecore.cmi typing/ident.cmi typing/env.cmi typing/ctype.cmi
 typing/mtype.cmi: typing/types.cmi typing/path.cmi typing/ident.cmi \
     typing/env.cmi
 typing/oprint.cmi: typing/outcometree.cmi
     parsing/parsetree.cmi parsing/longident.cmi parsing/location.cmi \
     typing/ident.cmi typing/env.cmi parsing/asttypes.cmi typing/annot.cmi
 typing/typedecl.cmi: typing/types.cmi typing/path.cmi parsing/parsetree.cmi \
-    parsing/longident.cmi parsing/location.cmi typing/ident.cmi \
-    typing/env.cmi
+    parsing/longident.cmi parsing/location.cmi typing/includecore.cmi \
+    typing/ident.cmi typing/env.cmi
 typing/typedtree.cmi: typing/types.cmi typing/primitive.cmi typing/path.cmi \
     parsing/location.cmi typing/ident.cmi typing/env.cmi parsing/asttypes.cmi
 typing/typemod.cmi: typing/types.cmi typing/typedtree.cmi \
     parsing/longident.cmx parsing/location.cmx typing/ident.cmx \
     typing/env.cmx typing/ctype.cmx utils/clflags.cmx typing/btype.cmx \
     parsing/asttypes.cmi typing/annot.cmi typing/typecore.cmi
-typing/typedecl.cmo: typing/typetexp.cmi typing/types.cmi \
+typing/typedecl.cmo: utils/warnings.cmi typing/typetexp.cmi typing/types.cmi \
     typing/typedtree.cmi typing/subst.cmi typing/printtyp.cmi \
     typing/primitive.cmi typing/predef.cmi typing/path.cmi \
     parsing/parsetree.cmi utils/misc.cmi parsing/longident.cmi \
     parsing/location.cmi typing/includecore.cmi typing/ident.cmi \
     typing/env.cmi typing/ctype.cmi utils/config.cmi utils/clflags.cmi \
     typing/btype.cmi parsing/asttypes.cmi typing/typedecl.cmi
-typing/typedecl.cmx: typing/typetexp.cmx typing/types.cmx \
+typing/typedecl.cmx: utils/warnings.cmx typing/typetexp.cmx typing/types.cmx \
     typing/typedtree.cmx typing/subst.cmx typing/printtyp.cmx \
     typing/primitive.cmx typing/predef.cmx typing/path.cmx \
     parsing/parsetree.cmi utils/misc.cmx parsing/longident.cmx \
     parsing/asttypes.cmi bytecomp/typeopt.cmi
 asmcomp/asmgen.cmi: bytecomp/lambda.cmi asmcomp/cmm.cmi
 asmcomp/asmlibrarian.cmi:
-asmcomp/asmlink.cmi: asmcomp/compilenv.cmi
+asmcomp/asmlink.cmi: asmcomp/cmx_format.cmi
 asmcomp/asmpackager.cmi:
 asmcomp/clambda.cmi: bytecomp/lambda.cmi typing/ident.cmi \
     asmcomp/debuginfo.cmi parsing/asttypes.cmi
 asmcomp/closure.cmi: bytecomp/lambda.cmi asmcomp/clambda.cmi
 asmcomp/cmm.cmi: typing/ident.cmi asmcomp/debuginfo.cmi
-asmcomp/cmmgen.cmi: asmcomp/compilenv.cmi asmcomp/cmm.cmi asmcomp/clambda.cmi
+asmcomp/cmmgen.cmi: asmcomp/cmx_format.cmi asmcomp/cmm.cmi \
+    asmcomp/clambda.cmi
+asmcomp/cmx_format.cmi: asmcomp/clambda.cmi
 asmcomp/codegen.cmi: asmcomp/cmm.cmi
 asmcomp/coloring.cmi:
 asmcomp/comballoc.cmi: asmcomp/mach.cmi
-asmcomp/compilenv.cmi: typing/ident.cmi asmcomp/clambda.cmi
+asmcomp/compilenv.cmi: typing/ident.cmi asmcomp/cmx_format.cmi \
+    asmcomp/clambda.cmi
 asmcomp/debuginfo.cmi: parsing/location.cmi bytecomp/lambda.cmi
 asmcomp/emit.cmi: asmcomp/linearize.cmi asmcomp/cmm.cmi
 asmcomp/emitaux.cmi: asmcomp/debuginfo.cmi
 asmcomp/selection.cmi: asmcomp/mach.cmi asmcomp/cmm.cmi
 asmcomp/spill.cmi: asmcomp/mach.cmi
 asmcomp/split.cmi: asmcomp/mach.cmi
-asmcomp/arch.cmo: utils/misc.cmi utils/config.cmi
-asmcomp/arch.cmx: utils/misc.cmx utils/config.cmx
+asmcomp/arch.cmo:
+asmcomp/arch.cmx:
 asmcomp/asmgen.cmo: bytecomp/translmod.cmi asmcomp/split.cmi \
     asmcomp/spill.cmi asmcomp/selection.cmi asmcomp/scheduling.cmi \
     asmcomp/reload.cmi asmcomp/reg.cmi asmcomp/proc.cmi asmcomp/printmach.cmi \
     asmcomp/comballoc.cmx asmcomp/coloring.cmx asmcomp/cmmgen.cmx \
     asmcomp/cmm.cmx asmcomp/closure.cmx utils/clflags.cmx asmcomp/asmgen.cmi
 asmcomp/asmlibrarian.cmo: utils/misc.cmi utils/config.cmi \
-    asmcomp/compilenv.cmi utils/clflags.cmi asmcomp/clambda.cmi \
-    utils/ccomp.cmi asmcomp/asmlink.cmi asmcomp/asmlibrarian.cmi
+    asmcomp/compilenv.cmi asmcomp/cmx_format.cmi utils/clflags.cmi \
+    asmcomp/clambda.cmi utils/ccomp.cmi asmcomp/asmlink.cmi \
+    asmcomp/asmlibrarian.cmi
 asmcomp/asmlibrarian.cmx: utils/misc.cmx utils/config.cmx \
-    asmcomp/compilenv.cmx utils/clflags.cmx asmcomp/clambda.cmx \
-    utils/ccomp.cmx asmcomp/asmlink.cmx asmcomp/asmlibrarian.cmi
+    asmcomp/compilenv.cmx asmcomp/cmx_format.cmi utils/clflags.cmx \
+    asmcomp/clambda.cmx utils/ccomp.cmx asmcomp/asmlink.cmx \
+    asmcomp/asmlibrarian.cmi
 asmcomp/asmlink.cmo: bytecomp/runtimedef.cmi asmcomp/proc.cmi utils/misc.cmi \
     parsing/location.cmi asmcomp/emitaux.cmi asmcomp/emit.cmi \
     utils/consistbl.cmi utils/config.cmi asmcomp/compilenv.cmi \
-    asmcomp/cmmgen.cmi utils/clflags.cmi utils/ccomp.cmi asmcomp/asmgen.cmi \
-    asmcomp/asmlink.cmi
+    asmcomp/cmx_format.cmi asmcomp/cmmgen.cmi utils/clflags.cmi \
+    utils/ccomp.cmi asmcomp/asmgen.cmi asmcomp/asmlink.cmi
 asmcomp/asmlink.cmx: bytecomp/runtimedef.cmx asmcomp/proc.cmx utils/misc.cmx \
     parsing/location.cmx asmcomp/emitaux.cmx asmcomp/emit.cmx \
     utils/consistbl.cmx utils/config.cmx asmcomp/compilenv.cmx \
-    asmcomp/cmmgen.cmx utils/clflags.cmx utils/ccomp.cmx asmcomp/asmgen.cmx \
-    asmcomp/asmlink.cmi
+    asmcomp/cmx_format.cmi asmcomp/cmmgen.cmx utils/clflags.cmx \
+    utils/ccomp.cmx asmcomp/asmgen.cmx asmcomp/asmlink.cmi
 asmcomp/asmpackager.cmo: typing/typemod.cmi bytecomp/translmod.cmi \
     utils/misc.cmi parsing/location.cmi bytecomp/lambda.cmi typing/ident.cmi \
-    typing/env.cmi utils/config.cmi asmcomp/compilenv.cmi utils/clflags.cmi \
-    asmcomp/clambda.cmi utils/ccomp.cmi asmcomp/asmlink.cmi \
-    asmcomp/asmgen.cmi asmcomp/asmpackager.cmi
+    typing/env.cmi utils/config.cmi asmcomp/compilenv.cmi \
+    asmcomp/cmx_format.cmi utils/clflags.cmi asmcomp/clambda.cmi \
+    utils/ccomp.cmi asmcomp/asmlink.cmi asmcomp/asmgen.cmi \
+    asmcomp/asmpackager.cmi
 asmcomp/asmpackager.cmx: typing/typemod.cmx bytecomp/translmod.cmx \
     utils/misc.cmx parsing/location.cmx bytecomp/lambda.cmx typing/ident.cmx \
-    typing/env.cmx utils/config.cmx asmcomp/compilenv.cmx utils/clflags.cmx \
-    asmcomp/clambda.cmx utils/ccomp.cmx asmcomp/asmlink.cmx \
-    asmcomp/asmgen.cmx asmcomp/asmpackager.cmi
+    typing/env.cmx utils/config.cmx asmcomp/compilenv.cmx \
+    asmcomp/cmx_format.cmi utils/clflags.cmx asmcomp/clambda.cmx \
+    utils/ccomp.cmx asmcomp/asmlink.cmx asmcomp/asmgen.cmx \
+    asmcomp/asmpackager.cmi
 asmcomp/clambda.cmo: bytecomp/lambda.cmi typing/ident.cmi \
     asmcomp/debuginfo.cmi parsing/asttypes.cmi asmcomp/clambda.cmi
 asmcomp/clambda.cmx: bytecomp/lambda.cmx typing/ident.cmx \
 asmcomp/cmmgen.cmo: typing/types.cmi bytecomp/switch.cmi asmcomp/proc.cmi \
     typing/primitive.cmi utils/misc.cmi bytecomp/lambda.cmi typing/ident.cmi \
     asmcomp/debuginfo.cmi utils/config.cmi asmcomp/compilenv.cmi \
-    asmcomp/cmm.cmi utils/clflags.cmi asmcomp/clambda.cmi \
-    parsing/asttypes.cmi asmcomp/arch.cmo asmcomp/cmmgen.cmi
+    asmcomp/cmx_format.cmi asmcomp/cmm.cmi utils/clflags.cmi \
+    asmcomp/clambda.cmi parsing/asttypes.cmi asmcomp/arch.cmo \
+    asmcomp/cmmgen.cmi
 asmcomp/cmmgen.cmx: typing/types.cmx bytecomp/switch.cmx asmcomp/proc.cmx \
     typing/primitive.cmx utils/misc.cmx bytecomp/lambda.cmx typing/ident.cmx \
     asmcomp/debuginfo.cmx utils/config.cmx asmcomp/compilenv.cmx \
-    asmcomp/cmm.cmx utils/clflags.cmx asmcomp/clambda.cmx \
-    parsing/asttypes.cmi asmcomp/arch.cmx asmcomp/cmmgen.cmi
+    asmcomp/cmx_format.cmi asmcomp/cmm.cmx utils/clflags.cmx \
+    asmcomp/clambda.cmx parsing/asttypes.cmi asmcomp/arch.cmx \
+    asmcomp/cmmgen.cmi
 asmcomp/codegen.cmo: asmcomp/split.cmi asmcomp/spill.cmi asmcomp/reload.cmi \
     asmcomp/reg.cmi asmcomp/printmach.cmi asmcomp/printlinear.cmi \
     asmcomp/printcmm.cmi asmcomp/liveness.cmi asmcomp/linearize.cmi \
 asmcomp/comballoc.cmx: asmcomp/reg.cmx asmcomp/mach.cmx utils/config.cmx \
     asmcomp/comballoc.cmi
 asmcomp/compilenv.cmo: utils/misc.cmi typing/ident.cmi typing/env.cmi \
-    utils/config.cmi asmcomp/clambda.cmi asmcomp/compilenv.cmi
+    utils/config.cmi asmcomp/cmx_format.cmi asmcomp/clambda.cmi \
+    asmcomp/compilenv.cmi
 asmcomp/compilenv.cmx: utils/misc.cmx typing/ident.cmx typing/env.cmx \
-    utils/config.cmx asmcomp/clambda.cmx asmcomp/compilenv.cmi
+    utils/config.cmx asmcomp/cmx_format.cmi asmcomp/clambda.cmx \
+    asmcomp/compilenv.cmi
 asmcomp/debuginfo.cmo: parsing/location.cmi bytecomp/lambda.cmi \
     asmcomp/debuginfo.cmi
 asmcomp/debuginfo.cmx: parsing/location.cmx bytecomp/lambda.cmx \
     asmcomp/debuginfo.cmi
 asmcomp/emit.cmo: asmcomp/reg.cmi asmcomp/proc.cmi utils/misc.cmi \
-    asmcomp/mach.cmi parsing/location.cmi asmcomp/linearize.cmi \
-    asmcomp/emitaux.cmi asmcomp/debuginfo.cmi utils/config.cmi \
-    asmcomp/compilenv.cmi asmcomp/cmm.cmi utils/clflags.cmi asmcomp/arch.cmo \
-    asmcomp/emit.cmi
+    asmcomp/mach.cmi asmcomp/linearize.cmi asmcomp/emitaux.cmi \
+    asmcomp/debuginfo.cmi utils/config.cmi asmcomp/compilenv.cmi \
+    asmcomp/cmm.cmi utils/clflags.cmi asmcomp/arch.cmo asmcomp/emit.cmi
 asmcomp/emit.cmx: asmcomp/reg.cmx asmcomp/proc.cmx utils/misc.cmx \
-    asmcomp/mach.cmx parsing/location.cmx asmcomp/linearize.cmx \
-    asmcomp/emitaux.cmx asmcomp/debuginfo.cmx utils/config.cmx \
-    asmcomp/compilenv.cmx asmcomp/cmm.cmx utils/clflags.cmx asmcomp/arch.cmx \
-    asmcomp/emit.cmi
+    asmcomp/mach.cmx asmcomp/linearize.cmx asmcomp/emitaux.cmx \
+    asmcomp/debuginfo.cmx utils/config.cmx asmcomp/compilenv.cmx \
+    asmcomp/cmm.cmx utils/clflags.cmx asmcomp/arch.cmx asmcomp/emit.cmi
 asmcomp/emitaux.cmo: asmcomp/reg.cmi asmcomp/linearize.cmi \
     asmcomp/debuginfo.cmi asmcomp/cmm.cmi asmcomp/arch.cmo \
     asmcomp/emitaux.cmi
     asmcomp/mach.cmx asmcomp/debuginfo.cmx asmcomp/cmm.cmx asmcomp/arch.cmx \
     asmcomp/printmach.cmi
 asmcomp/proc.cmo: asmcomp/reg.cmi utils/misc.cmi asmcomp/mach.cmi \
-    utils/config.cmi asmcomp/cmm.cmi utils/clflags.cmi utils/ccomp.cmi \
-    asmcomp/arch.cmo asmcomp/proc.cmi
+    utils/config.cmi asmcomp/cmm.cmi utils/ccomp.cmi asmcomp/arch.cmo \
+    asmcomp/proc.cmi
 asmcomp/proc.cmx: asmcomp/reg.cmx utils/misc.cmx asmcomp/mach.cmx \
-    utils/config.cmx asmcomp/cmm.cmx utils/clflags.cmx utils/ccomp.cmx \
-    asmcomp/arch.cmx asmcomp/proc.cmi
+    utils/config.cmx asmcomp/cmm.cmx utils/ccomp.cmx asmcomp/arch.cmx \
+    asmcomp/proc.cmi
 asmcomp/reg.cmo: asmcomp/cmm.cmi asmcomp/reg.cmi
 asmcomp/reg.cmx: asmcomp/cmm.cmx asmcomp/reg.cmi
 asmcomp/reload.cmo: asmcomp/reloadgen.cmi asmcomp/reg.cmi asmcomp/mach.cmi \
-    asmcomp/cmm.cmi asmcomp/arch.cmo asmcomp/reload.cmi
+    asmcomp/cmm.cmi utils/clflags.cmi asmcomp/arch.cmo asmcomp/reload.cmi
 asmcomp/reload.cmx: asmcomp/reloadgen.cmx asmcomp/reg.cmx asmcomp/mach.cmx \
-    asmcomp/cmm.cmx asmcomp/arch.cmx asmcomp/reload.cmi
+    asmcomp/cmm.cmx utils/clflags.cmx asmcomp/arch.cmx asmcomp/reload.cmi
 asmcomp/reloadgen.cmo: asmcomp/reg.cmi utils/misc.cmi asmcomp/mach.cmi \
     asmcomp/reloadgen.cmi
 asmcomp/reloadgen.cmx: asmcomp/reg.cmx utils/misc.cmx asmcomp/mach.cmx \
     asmcomp/cmm.cmx asmcomp/arch.cmx asmcomp/selectgen.cmi
 asmcomp/selection.cmo: asmcomp/selectgen.cmi asmcomp/reg.cmi asmcomp/proc.cmi \
     utils/misc.cmi asmcomp/mach.cmi asmcomp/debuginfo.cmi asmcomp/cmm.cmi \
-    asmcomp/arch.cmo asmcomp/selection.cmi
+    utils/clflags.cmi asmcomp/arch.cmo asmcomp/selection.cmi
 asmcomp/selection.cmx: asmcomp/selectgen.cmx asmcomp/reg.cmx asmcomp/proc.cmx \
     utils/misc.cmx asmcomp/mach.cmx asmcomp/debuginfo.cmx asmcomp/cmm.cmx \
-    asmcomp/arch.cmx asmcomp/selection.cmi
+    utils/clflags.cmx asmcomp/arch.cmx asmcomp/selection.cmi
 asmcomp/spill.cmo: asmcomp/reg.cmi asmcomp/proc.cmi utils/misc.cmi \
     asmcomp/mach.cmi asmcomp/spill.cmi
 asmcomp/spill.cmx: asmcomp/reg.cmx asmcomp/proc.cmx utils/misc.cmx \
     driver/errors.cmx utils/config.cmx driver/compile.cmx utils/clflags.cmx \
     bytecomp/bytepackager.cmx bytecomp/bytelink.cmx \
     bytecomp/bytelibrarian.cmx driver/main.cmi
-driver/main_args.cmo: driver/main_args.cmi
-driver/main_args.cmx: driver/main_args.cmi
+driver/main_args.cmo: utils/warnings.cmi driver/main_args.cmi
+driver/main_args.cmx: utils/warnings.cmx driver/main_args.cmi
 driver/optcompile.cmo: utils/warnings.cmi typing/unused_var.cmi \
     typing/typemod.cmi typing/typedtree.cmi bytecomp/translmod.cmi \
     typing/stypes.cmi bytecomp/simplif.cmi typing/printtyp.cmi \
     asmcomp/asmgen.cmx driver/opterrors.cmi
 driver/optmain.cmo: utils/warnings.cmi asmcomp/printmach.cmi \
     driver/opterrors.cmi driver/optcompile.cmi utils/misc.cmi \
-    utils/config.cmi utils/clflags.cmi asmcomp/asmpackager.cmi \
-    asmcomp/asmlink.cmi asmcomp/asmlibrarian.cmi asmcomp/arch.cmo \
-    driver/optmain.cmi
+    driver/main_args.cmi utils/config.cmi utils/clflags.cmi \
+    asmcomp/asmpackager.cmi asmcomp/asmlink.cmi asmcomp/asmlibrarian.cmi \
+    asmcomp/arch.cmo driver/optmain.cmi
 driver/optmain.cmx: utils/warnings.cmx asmcomp/printmach.cmx \
     driver/opterrors.cmx driver/optcompile.cmx utils/misc.cmx \
-    utils/config.cmx utils/clflags.cmx asmcomp/asmpackager.cmx \
-    asmcomp/asmlink.cmx asmcomp/asmlibrarian.cmx asmcomp/arch.cmx \
-    driver/optmain.cmi
+    driver/main_args.cmx utils/config.cmx utils/clflags.cmx \
+    asmcomp/asmpackager.cmx asmcomp/asmlink.cmx asmcomp/asmlibrarian.cmx \
+    asmcomp/arch.cmx driver/optmain.cmi
 driver/pparse.cmo: utils/misc.cmi parsing/location.cmi utils/clflags.cmi \
     utils/ccomp.cmi driver/pparse.cmi
 driver/pparse.cmx: utils/misc.cmx parsing/location.cmx utils/clflags.cmx \
     asmcomp/asmlink.cmx asmcomp/asmgen.cmx toplevel/opttoploop.cmi
 toplevel/opttopmain.cmo: utils/warnings.cmi asmcomp/printmach.cmi \
     toplevel/opttoploop.cmi toplevel/opttopdirs.cmi driver/opterrors.cmi \
-    utils/misc.cmi utils/config.cmi utils/clflags.cmi asmcomp/arch.cmo \
+    utils/misc.cmi driver/main_args.cmi utils/config.cmi utils/clflags.cmi \
     toplevel/opttopmain.cmi
 toplevel/opttopmain.cmx: utils/warnings.cmx asmcomp/printmach.cmx \
     toplevel/opttoploop.cmx toplevel/opttopdirs.cmx driver/opterrors.cmx \
-    utils/misc.cmx utils/config.cmx utils/clflags.cmx asmcomp/arch.cmx \
+    utils/misc.cmx driver/main_args.cmx utils/config.cmx utils/clflags.cmx \
     toplevel/opttopmain.cmi
 toplevel/opttopstart.cmo: toplevel/opttopmain.cmi
 toplevel/opttopstart.cmx: toplevel/opttopmain.cmx
     utils/config.cmx driver/compile.cmx utils/clflags.cmx \
     bytecomp/bytegen.cmx typing/btype.cmx toplevel/toploop.cmi
 toplevel/topmain.cmo: utils/warnings.cmi toplevel/toploop.cmi \
-    toplevel/topdirs.cmi utils/misc.cmi driver/errors.cmi utils/config.cmi \
-    utils/clflags.cmi toplevel/topmain.cmi
+    toplevel/topdirs.cmi utils/misc.cmi driver/main_args.cmi \
+    driver/errors.cmi utils/config.cmi utils/clflags.cmi toplevel/topmain.cmi
 toplevel/topmain.cmx: utils/warnings.cmx toplevel/toploop.cmx \
-    toplevel/topdirs.cmx utils/misc.cmx driver/errors.cmx utils/config.cmx \
-    utils/clflags.cmx toplevel/topmain.cmi
+    toplevel/topdirs.cmx utils/misc.cmx driver/main_args.cmx \
+    driver/errors.cmx utils/config.cmx utils/clflags.cmx toplevel/topmain.cmi
 toplevel/topstart.cmo: toplevel/topmain.cmi
 toplevel/topstart.cmx: toplevel/topmain.cmx
 toplevel/trace.cmo: typing/types.cmi toplevel/toploop.cmi typing/printtyp.cmi \
   "S with type t1 = ... and ... and type tn = ..." (S refers to a module type).
 - Local opening of modules in a subexpression.
   Syntax: "let open M in e", or "M.(e)"
+- In class definitions, method and instance variable override can now
+  be made explicit, by writing "method!", "val!" or "inherit!" in place of
+  "method", "val" and "inherit". It is an error to override an
+  undefined member (or to use overriding inheritance when nothing get
+  overridden). Additionally, these constructs disactivate respectively
+  warnings 7 (method override, code 'M') and 13 (instance variable
+  override, code 'V'). Note that, by default, warning 7 is inactive
+  and warning 13 is active.
+- "Destructive" substitution in signatures.
+  By writing "<signature> with type t := <typeconstr>" and
+  "<signature> with module M := <module-path>" one replaces "t" and "M"
+  inside the signature, removing their respective fields. Among other
+  uses, this allows to merge two signatures containing identically
+  named fields.
+* While fixing PR#4824, also corrected a gaping hole in the type checker,
+  which allowed instantiating separately object parameters and instance
+  variables in an interface. This hole was here since the beginning of
+  ocaml, and as a result many programs using object inheritance in a non
+  trivial way will need to be corrected. You can look at lablgtk2 for an
+  example.
 
 Compilers and toplevel:
-- New warning (activated by the warning code 'R') to signal
-  record patterns without "; _" where some labels of the record type
-  are not listed in the pattern.
+- Warnings are now numbered and can be switched on and off individually.
+  The old system with letters referring to sets of warnings is still
+  supported.
+- New warnings:
+  + 9 (code 'R') to signal record patterns without "; _" where
+    some labels of the record type are not listed in the pattern.
+  + 28 when giving a wildcard argument to a constant constructor in
+    a pattern-matching.
+  + 29 when an end-of-line appears unescaped in a string constant.
+  + 30 when the same constructor or record field is defined twice in
+    mutually-recursive type definitions.
+* The semantics of warning 7 (code 'M', method override) have changed
+  (it now detects all overrides, not just repeated definitions inside
+  the same class body), and it is now inactive by default.
 - Better error report in case of unbound qualified identifier: if the module
   is unbound this error is reported in the first place.
 - Added option '-strict-sequence' to force left hand part of sequence to have
   This option can help working around mysterious type incompatibilities
   caused by the incomplete comparison of applicative paths F(X).t.
 
+Native-code compiler:
+- AMD64: shorter and slightly more efficient code generated for 
+  float comparisons.
+
 Standard library:
 - Format: new function ikfprintf analoguous to ifprintf with a continuation
   argument.
   functions (int_of_string, Int32.of_string, Int64.of_string,
   Nativeint.of_string).  The decimal string corresponding to
   max_int + 1 is no longer accepted.
-- Format: to prevent confusion when mixing Format printing functions and
-  direct low level output, values Format.stdout and Format.stderr have been
-  added.
 - Scanf: to prevent confusion when mixing Scanf scanning functions and direct
   low level input, value Scanf.stdin has been added.
+* Random: changed the algorithm to produce better randomness.  Now passes the
+  DieHard tests.
+- Map: implement functions from Set that make sense for Map.
+
+Other libraries:
+* Str: letters that constitute a word now include digits 0-9 and
+  underscore _.  This changes the interpretation of '\b' (word boundary)
+  in regexps, but is more consistent with other regexp libraries. (PR#4874).
+
+Ocamlbuild:
+- Add support for native dynlink.
+
+New tool:
+- ocamlobjinfo: displays various information, esp. dependencies, for
+  compiled OCaml files (.cmi, .cmo, .cma, .cmx, .cmxa, .cmxs, and bytecode
+  executables).  Extends and makes more official the old objinfo tool
+  that was installed by some OCaml packages.
+
+All tools:
+- PR#4857: add a -vnum option to display the version number and nothing else
 
 Bug Fixes:
+- PR#4012: Map.map and Map.mapi do not conform to specification
+- PR#4478: better error messages for type definition mismatches
+- PR#4683: labltk script uses fixed path on windows
+- PR#4742: finalisation function raising an exception blocks other finalisations
 - PR#4775: compiler crash on crazy types (temporary fix)
+- PR#4824: narrowing the type of class parameters with a module specification
+- PR#4862: relaxed value restriction and records
+- PR#4884: optional arguments do not work when Some is redefined
+- PR#4964: parenthesized names for infix functions in annot files
+- PR#4970: better error message for instance variables
+- PR#4975: spelling mistakes
+- PR#4988: contravariance lost with ocamlc -i
 - PR#5004: problem in Buffer.add_channel with very large lengths.
 - PR#5008: on AMD64/MSVC port, rare float corruption during GC.
+- PR#5018: wrong exception raised by Dynlink.loadfile.
+- PR#5057: fatal typing error with local module + functor + polymorphic variant
+- Wrong type for Obj.add_offset.
+- Small problem with the representation of Int32, Int64, and Nativeint constants.
 
 Objective Caml 3.11.2:
 ----------------------
   type of any subexpression in the source file.  Works even in the case
   of a type error (all the types computed up to the error are available).
   This new feature is also supported by ocamlbrowser.
-- Disable "method is overriden" warning when the method was explicitly
+- Disable "method is overridden" warning when the method was explicitly
   redefined as virtual beforehand (i.e. not through inheritance). Typing
   and semantics are unchanged.
 
 
 * First public release.
 
-$Id: Changes 10216 2010-03-28 08:16:45Z xleroy $
+$Id: Changes 10566 2010-06-16 01:32:26Z garrigue $
   are all *required*.  The vendor-provided compiler, assembler and make
   have major problems.
 
+* GNU make is needed to build ocamlbuild and camlp4.  If your system's
+  default make is not GNU make, you need to define the GNUMAKE environment
+  variable to the name of GNU make, typically with this command:
+
+    export GNUMAKE=gnumake
 
 INSTALLATION INSTRUCTIONS
 
 #                                                                       #
 #########################################################################
 
-# $Id: Makefile 9547 2010-01-22 12:48:24Z doligez $
+# $Id: Makefile 10566 2010-06-16 01:32:26Z garrigue $
 
 # The main Makefile
 
 include config/Makefile
 include stdlib/StdlibModules
 
-CAMLC=boot/ocamlrun boot/ocamlc -strict-sequence -nostdlib -I boot
-CAMLOPT=boot/ocamlrun ./ocamlopt -strict-sequence -nostdlib -I stdlib -I otherlibs/dynlink
-COMPFLAGS=-warn-error A $(INCLUDES)
+CAMLC=boot/ocamlrun boot/ocamlc -nostdlib -I boot
+CAMLOPT=boot/ocamlrun ./ocamlopt -nostdlib -I stdlib -I otherlibs/dynlink
+COMPFLAGS=-strict-sequence -warn-error A $(INCLUDES)
 LINKFLAGS=
 
 CAMLYACC=boot/ocamlyacc
   driver/main_args.cmo driver/main.cmo
 
 OPTDRIVER= driver/pparse.cmo driver/opterrors.cmo driver/optcompile.cmo \
-  driver/optmain.cmo
+  driver/main_args.cmo driver/optmain.cmo
 
 TOPLEVEL=driver/pparse.cmo driver/errors.cmo driver/compile.cmo \
-  toplevel/genprintval.cmo toplevel/toploop.cmo \
+  driver/main_args.cmo toplevel/genprintval.cmo toplevel/toploop.cmo \
   toplevel/trace.cmo toplevel/topdirs.cmo toplevel/topmain.cmo
 
 TOPLEVELLIB=toplevel/toplevellib.cma
 
 NATTOPOBJS=$(OPTUTILS) $(PARSING) $(TYPING) $(COMP) $(ASMCOMP) \
   driver/pparse.cmo driver/opterrors.cmo driver/optcompile.cmo \
+  driver/main_args.cmo \
   toplevel/genprintval.cmo toplevel/opttoploop.cmo toplevel/opttopdirs.cmo \
   toplevel/opttopmain.cmo toplevel/opttopstart.cmo
 
 	 otherlibrariesopt \
 	 ocamllex.opt ocamltoolsopt.opt ocamlbuild.native camlp4opt ocamldoc.opt
 
+base.opt: checkstack runtime core ocaml opt-core ocamlc.opt otherlibraries \
+	 ocamlbuild.byte camlp4out $(DEBUGGER) ocamldoc ocamlopt.opt \
+	 otherlibrariesopt
+
 # Installation
 install:
 	if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi
 
 # Tools
 
-ocamltools: ocamlc ocamlyacc ocamllex
+ocamltools: ocamlc ocamlyacc ocamllex asmcomp/cmx_format.cmi
 	cd tools; $(MAKE) all
 
-ocamltoolsopt.opt: ocamlc.opt ocamlyacc ocamllex
+ocamltoolsopt.opt: ocamlc.opt ocamlyacc ocamllex asmcomp/cmx_format.cmi
 	cd tools; $(MAKE) opt.opt
 
 partialclean::
 
 partialclean::
 	rm -rf _build
-	if test -d test; then \
-	 (cd test; $(MAKE) clean); \
-	fi
 
 # Check that the stack limit is reasonable.
 
 #                                                                       #
 #########################################################################
 
-# $Id: Makefile.nt 9547 2010-01-22 12:48:24Z doligez $
+# $Id: Makefile.nt 10472 2010-05-28 11:21:46Z garrigue $
 
 # The main Makefile
 
 include config/Makefile
 include stdlib/StdlibModules
 
-CAMLC=boot/ocamlrun boot/ocamlc -I boot
-CAMLOPT=boot/ocamlrun ./ocamlopt -I stdlib -I otherlibs/dynlink
-COMPFLAGS=$(INCLUDES)
+CAMLC=boot/ocamlrun boot/ocamlc -nostdlib -I boot
+CAMLOPT=boot/ocamlrun ./ocamlopt -nostdlib -I stdlib -I otherlibs/dynlink
+COMPFLAGS=-strict-sequence -warn-error A $(INCLUDES)
 LINKFLAGS=
 CAMLYACC=boot/ocamlyacc
 YACCFLAGS=
   driver/main_args.cmo driver/main.cmo
 
 OPTDRIVER=driver/pparse.cmo driver/opterrors.cmo driver/optcompile.cmo \
-  driver/optmain.cmo
+  driver/main_args.cmo driver/optmain.cmo
 
 TOPLEVEL=driver/pparse.cmo driver/errors.cmo driver/compile.cmo \
-  toplevel/genprintval.cmo toplevel/toploop.cmo \
+  driver/main_args.cmo toplevel/genprintval.cmo toplevel/toploop.cmo \
   toplevel/trace.cmo toplevel/topdirs.cmo toplevel/topmain.cmo
 
 TOPLEVELLIB=toplevel/toplevellib.cma
 
 NATTOPOBJS=$(OPTUTILS) $(PARSING) $(TYPING) $(COMP) $(ASMCOMP) \
   driver/pparse.cmo driver/opterrors.cmo driver/optcompile.cmo \
+  driver/main_args.cmo \
   toplevel/genprintval.cmo toplevel/opttoploop.cmo toplevel/opttopdirs.cmo \
   toplevel/opttopmain.cmo toplevel/opttopstart.cmo
 
 	rm -rf boot/Saved/Saved.prev/*
 
 # Compile the native-code compiler
-opt: runtimeopt ocamlopt libraryopt otherlibrariesopt ocamlbuildlib.native
+opt-core: runtimeopt ocamlopt libraryopt
+opt: opt-core otherlibrariesopt ocamlbuildlib.native
 
 # Native-code versions of the tools
-opt.opt: ocamlc.opt ocamlopt.opt ocamllex.opt ocamltoolsopt.opt \
-	ocamlbuild.native camlp4opt ocamldoc.opt
+opt.opt: core opt-core ocamlc.opt all ocamlopt.opt ocamllex.opt \
+	 ocamltoolsopt.opt ocamlbuild.native camlp4opt ocamldoc.opt
+
+# Complete build using fast compilers
+world.opt: coldstart opt.opt
 
 # Installation
 install: installbyt installopt
 ocamlc.opt: $(COMPOBJS:.cmo=.cmx)
 	cd asmrun ; $(MAKEREC) meta.$(O) dynlink.$(O)
 	$(CAMLOPT) $(LINKFLAGS) -o ocamlc.opt $(COMPOBJS:.cmo=.cmx) asmrun/meta.$(O) asmrun/dynlink.$(O)
+	@sed -e 's|@compiler@|$$topdir/ocamlc.opt|' \
+	  driver/ocamlcomp.sh.in > ocamlcomp.sh
+	@chmod +x ocamlcomp.sh
 
 partialclean::
 	rm -f ocamlc.opt
 
 ocamlopt.opt: $(OPTOBJS:.cmo=.cmx)
 	$(CAMLOPT) $(LINKFLAGS) -o ocamlopt.opt $(OPTOBJS:.cmo=.cmx)
+	@sed -e 's|@compiler@|$$topdir/ocamlopt.opt|' \
+	  driver/ocamlcomp.sh.in > ocamlcompopt.sh
+	@chmod +x ocamlcompopt.sh
 
 partialclean::
 	rm -f ocamlopt.opt
 
 # Tools
 
-ocamltools:
+ocamltools: asmcomp/cmx_format.cmi
 	cd tools ; $(MAKEREC) all
-ocamltoolsopt.opt:
+ocamltoolsopt.opt: asmcomp/cmx_format.cmi
 	cd tools ; $(MAKEREC) opt.opt
 partialclean::
 	cd tools ; $(MAKEREC) clean
 # Camlp4
 
 camlp4out: ocamlc otherlibraries ocamlbuild-mixed-boot ocamlbuild.byte
-	./build/camlp4-byte-only.sh
+	OCAMLBUILD_FIND=/usr/bin/find ./build/camlp4-byte-only.sh
 camlp4opt: ocamlopt otherlibrariesopt ocamlbuild-mixed-boot ocamlbuild.native
-	./build/camlp4-native-only.sh
+	OCAMLBUILD_FIND=/usr/bin/find ./build/camlp4-native-only.sh
 
 # Ocamlbuild
 
 ocamlbuild.byte: ocamlc otherlibraries ocamlbuild-mixed-boot
-	./build/ocamlbuild-byte-only.sh
+	OCAMLBUILD_FIND=/usr/bin/find ./build/ocamlbuild-byte-only.sh
 ocamlbuild.native: ocamlopt otherlibrariesopt ocamlbuild-mixed-boot
-	./build/ocamlbuild-native-only.sh
+	OCAMLBUILD_FIND=/usr/bin/find ./build/ocamlbuild-native-only.sh
 ocamlbuildlib.native: ocamlopt otherlibrariesopt ocamlbuild-mixed-boot
-	./build/ocamlbuildlib-native-only.sh
+	OCAMLBUILD_FIND=/usr/bin/find ./build/ocamlbuildlib-native-only.sh
 
 
 .PHONY: ocamlbuild-mixed-boot
 ocamlbuild-mixed-boot:
-	./build/mixed-boot.sh
+	OCAMLBUILD_FIND=/usr/bin/find ./build/mixed-boot.sh
 partialclean::
 	rm -rf _build
 
 
 REQUIREMENTS:
 
-This port runs under MS Windows Vista, XP, and 2000.
+This port runs under MS Windows 7, Vista, XP, and 2000.
 
 The base bytecode system (ocamlc, ocaml, ocamllex, ocamlyacc, ...)
 runs without any additional tools.
 
-Statically linking Caml bytecode with C code (ocamlc -custom) requires the
-Microsoft Visual C++ compiler (items [1] and [2] in the section
-"third-party software" below) and the flexdll tool (item [5]).
+The native-code compiler (ocamlopt) requires the Microsoft Windows SDK
+(item [1]) and the flexdll tool (item [3]).
 
-The native-code compiler (ocamlopt) requires Visual C++ (items [1], [2]),
-the Microsoft assembler MASM (item [3]) and the flexdll tool (item [5]).
+Statically linking Caml bytecode with C code (ocamlc -custom) also requires
+items [1] and [3].
 
-The LablTk GUI requires Tcl/Tk 8.5 (item [4]).
+The LablTk GUI requires Tcl/Tk 8.5 (item [2]).
 
 
 INSTALLATION:
 To compile programs that use the LablTK GUI, the directory where the
 libraries tk85.lib and tcl85.lib were installed (by the Tcl/Tk
 installer) must be added to the library search path in the LIB
-environment variable.  E.g. if Tcl/Tk was installed in C:\tcl, add
-"C:\tcl\lib" to the LIB environment variable.
+environment variable.  E.g. if Tcl/Tk was installed in C:\Tcl, add
+"C:\Tcl\lib" to the LIB environment variable.
 
 THIRD-PARTY SOFTWARE:
 
-[1] Visual C++ version 2008, 2005, 2003, or 6.
-    We use Visual C++ 2008 Express Edition, which can be downloaded for free
-    from http://www.microsoft.com.
+[1] Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1.
+    Can be downloaded for free from
+    http://www.microsoft.com/downloads/en/default.aspx
+    under the name "Microsoft Windows 7 SDK".
 
-[2] Windows header files and development libraries.  They are included
-    in the Visual C++ 2008 Express Edition distribution.
-    Otherwise, you can find them in the Windows Platform SDK,
-    which can be downloaded for free from http://www.microsoft.com/.
-
-[3] MASM version 6.11 or later. The full distribution of Visual C++ 2005
-    or 2008 contains MASM version 8.  Users of the Express Edition of Visual C++
-    2005 can download MASM version 8 from
-http://www.microsoft.com/downloads/details.aspx?FamilyID=7A1C9DA0-0510-44A2-B042-7EF370530C64&displaylang=en
-    To obtain MASM version 6.11, see
-    http://users.easystreet.com/jkirwan/new/pctools.html.
-
-[4] TCL/TK version 8.5.  Windows binaries are available as part of the
+[2] TCL/TK version 8.5.  Windows binaries are available as part of the
     ActiveTCL distribution at http://www.activestate.com/products/ActiveTcl/
 
-[5] flexdll.
+[3] flexdll version 0.23 or later.
     Can be downloaded from http://alain.frisch.fr/flexdll.html
 
+
 RECOMPILATION FROM THE SOURCES:
 
 The command-line tools can be recompiled from the Unix source
-distribution (ocaml-X.YZ.tar.gz), which also contains the files modified
+distribution (ocaml-X.YY.Z.tar.gz), which also contains the files modified
 for Windows.
 
 You will need the following software components to perform the recompilation:
-- Windows NT, 2000, XP, or Vista.
-- Items [1], [2], [3], [4] and [5] from the list of recommended software above.
+- Windows NT, 2000, XP, Vista, or 7.
+- Items [1], [2] and [3] from the list of recommended software above.
 - The Cygwin port of GNU tools, available from http://www.cygwin.com/
   Install at least the following packages: diffutils, make, ncurses.
 
-Remember to add the directory where the libraries tk84.lib and
-tcl84.lib were installed (by the Tcl/Tk installer) to the LIB variable
-(library search path).
+First, you need to set up your cygwin environment for using the MS
+tools.  The following assumes that you have installed [1], [2], and [3]
+in their default directories.  If this is not the case, you will need
+to adjust the paths accordingly.
 
-To recompile, start a Cygwin shell and change to the top-level
+  Open a Windows Command Prompt and enter the following commands:
+    cd "C:\Program Files\Visual Studio 9.0\VC\bin"
+    vcvars32
+    echo VCPATH="`cygpath -p '%Path%'`" >C:\cygwin\tmp\msenv
+    echo LIB="%LIB%;C:\Tcl\lib" >>C:\cygwin\tmp\msenv
+    echo LIBPATH="%LIBPATH%" >>C:\cygwin\tmp\msenv
+    echo INCLUDE="%INCLUDE%;C:\Tcl\include" >>C:\cygwin\tmp\msenv
+    echo FLPATH="`cygpath 'C:\Program Files\flexdll'`" >>C:\cygwin\tmp\msenv
+
+  Open a Cygwin shell and enter the following commands:
+    tr -d '\r' </tmp/msenv >.msenv
+    echo '. $HOME/.msenv' >>.bashrc
+    echo 'PATH="${VCPATH}:$PATH:${FLPATH}"' >>.bashrc
+    echo 'export PATH LIB LIBPATH INCLUDE' >>.bashrc
+
+Now, close the Command Prompt and the shell and you're set up for
+using the MS tools under Cygwin.
+
+
+To recompile OCaml, start a new Cygwin shell and change to the top-level
 directory of the OCaml distribution.  Then, do
 
         cp config/m-nt.h config/m.h
         make -f Makefile.nt opt.opt
         make -f Makefile.nt install
 
-Alternatively you can use the experimental build procedure using ocamlbuild:
-
-        ./build/fastworld.sh
-        ./build/install.sh
-
 NOTES:
 
 * The VC++ compiler does not implement "computed gotos", and therefore
     Includes all we need, namely a C compiler, the masm64 assembler,
     Windows libraries and include files.
 
+    Alternatively, the more recent SDK:
+      Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1
+    can be used.
+
 [2] flexdll.
     Can be downloaded from http://alain.frisch.fr/flexdll.html
 
-3.12.0+dev17 (2010-01-20)
+3.12.0+dev27 (2010-06-16)
 
 # The version string is the first line of this file.
 # It must be in the format described in stdlib/sys.mli
 
-# $Id: VERSION 9540 2010-01-20 16:26:46Z doligez $
+# $Id: VERSION 10583 2010-06-16 11:24:33Z doligez $
 # The stdlib neither requires the stdlib nor debug information
 <stdlib/**>: -use_stdlib, -debug
 
-<**/*.ml*>: warn_Alerz
+<**/*.ml*>: warn_error_A
+
+<{bytecomp,driver,stdlib,tools,asmcomp,toplevel,typing,utils,lex,parsing}/**>: strict_sequence
 
 "toplevel/topstart.byte": linkall
 
 <ocamldoc/*.ml*>: include_unix, include_str, include_dynlink
 <ocamldoc/odoc.{byte,native}>: use_unix, use_str, use_dynlink
 
-<camlp4/**/*.ml*>: camlp4boot, -warn_Alerz, warn_Aler
+<camlp4/**/*.ml*>: camlp4boot, warn_Z
 <camlp4/Camlp4_{config,import}.ml*>: -camlp4boot
-"camlp4/Camlp4_import.ml": -warn_Aler
-<camlp4/build/*> or <camlp4/boot/*> or "camlp4/Camlp4/Struct/Lexer.ml": -camlp4boot, -warn_Aler, warn_a
+"camlp4/Camlp4_import.ml": -warn_Z
+<camlp4/build/*> or <camlp4/boot/*> or "camlp4/Camlp4/Struct/Lexer.ml": -camlp4boot, -warn_Z, warn_a
 <camlp4/Camlp4Bin.{byte,native}> or <camlp4/{mkcamlp4,boot/camlp4boot}.byte>: use_dynlink
-"camlp4/Camlp4/Printers/OCaml.ml" or "camlp4/Camlp4/Printers/OCamlr.ml": warn_Alerzv
 <camlp4/Camlp4Printers/**.ml>: include_unix
 "camlp4/Camlp4/Struct/DynLoader.ml" or "camlp4/boot/Camlp4.ml": include_dynlink
 <camlp4/Camlp4Top/**>: include_toplevel
 <camlp4/camlp4{,boot,o,r,of,rf,oof,orf}.byte>: -debug
 
-<ocamlbuild/*>: -warn_Alerz, include_unix
+<ocamlbuild/*>: include_unix
 
 <**/pervasives.ml> or <**/pervasives.mli> or <**/camlinternalOO.mli>: nopervasives
 <**/camlinternalOO*.cmx>: inline(0)
 
 "tools/addlabels.ml": warn_s
 
-<debugger/main.byte> or <debugger/main.native>: use_unix, use_dynlink, linkall
+<debugger/main.byte> or <debugger/main.native>: use_unix, linkall
 <debugger/*.ml*>: include_unix
 
 <otherlibs/{,win32}unix/unix.cm{,x}a> or <otherlibs/str/str.cm{,x}a>: ocamlmklib
 "otherlibs/labltk/browser/jglib.cma": -ocamlmklib
 "otherlibs/labltk/browser/main.byte": use_unix, use_str, ocamlbrowser, bootstrap_thread
 <otherlibs/labltk/{browser,jpf}/**.ml*>: include_unix, include_str
-<otherlibs/labltk/{tkanim,frx}/**.ml*>: include_unix

asmcomp/alpha/proc.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: proc.ml 9547 2010-01-22 12:48:24Z doligez $ *)
+(* $Id: proc.ml 10268 2010-04-18 09:02:40Z xleroy $ *)
 
 (* Description of the Alpha processor *)
 
 let assemble_file infile outfile =
   let as_cmd =
     if digital_asm && !Clflags.gprofile
-    then Config.as ^ " -pg"
-    else Config.as in
+    then Config.asm ^ " -pg"
+    else Config.asm in
   Ccomp.command (as_cmd ^ " -o " ^
                  Filename.quote outfile ^ " " ^ Filename.quote infile)
 

asmcomp/alpha/selection.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: selection.ml 3593 2001-07-24 08:01:25Z xleroy $ *)
+(* $Id: selection.ml 10296 2010-04-22 12:51:06Z xleroy $ *)
 
 (* Instruction selection for the Alpha processor *)
 
   | arg ->
       (Iindexed 0, arg)
 
-method select_operation op args =
+method! select_operation op args =
   match (op, args) with
     (* Recognize shift-add operations *)
     ((Caddi|Cadda),

asmcomp/amd64/emit.mlp

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: emit.mlp 9547 2010-01-22 12:48:24Z doligez $ *)
+(* $Id: emit.mlp 10488 2010-06-02 08:55:35Z xleroy $ *)
 
 (* Emission of x86-64 (AMD 64) assembly code *)
 
 (* Output a floating-point compare and branch *)
 
 let emit_float_test cmp neg arg lbl =
-  begin match cmp with
-  | Ceq | Cne -> `	ucomisd	`
-  | _         -> `	comisd	`
-  end;
-  `{emit_reg arg.(1)}, {emit_reg arg.(0)}\n`;
-  let (branch_opcode, need_jp) =
-    match (cmp, neg) with
-      (Ceq, false) -> ("je", true)
-    | (Ceq, true)  -> ("jne", true)
-    | (Cne, false) -> ("jne", true)
-    | (Cne, true)  -> ("je", true)
-    | (Clt, false) -> ("jb", true)
-    | (Clt, true)  -> ("jae", true)
-    | (Cle, false) -> ("jbe", true)
-    | (Cle, true)  -> ("ja", true)
-    | (Cgt, false) -> ("ja", false)
-    | (Cgt, true)  -> ("jbe", false)
-    | (Cge, false) -> ("jae", true)
-    | (Cge, true)  -> ("jb", false) in
-  let branch_if_not_comparable =
-    if cmp = Cne then not neg else neg in
-  if need_jp then
-    if branch_if_not_comparable then begin
-      `	jp	{emit_label lbl}\n`;
-      `	{emit_string branch_opcode}	{emit_label lbl}\n`
-    end else begin
+  (* Effect of comisd on flags and conditional branches:
+                     ZF PF CF  cond. branches taken
+        unordered     1  1  1  je, jb, jbe, jp
+        >             0  0  0  jne, jae, ja
+        <             0  0  1  jne, jbe, jb
+        =             1  0  0  je, jae, jbe.
+     If FP traps are on (they are off by default),
+     comisd traps on QNaN and SNaN but ucomisd traps on SNaN only.
+  *)
+  match (cmp, neg) with
+  | (Ceq, false) | (Cne, true) ->
       let next = new_label() in
-      `	jp	{emit_label next}\n`;
-      `	{emit_string branch_opcode}	{emit_label lbl}\n`;
+      `	ucomisd	{emit_reg arg.(1)}, {emit_reg arg.(0)}\n`;
+      `	jp	{emit_label next}\n`;    (* skip if unordered *)
+      `	je	{emit_label lbl}\n`;     (* branch taken if x=y *)
       `{emit_label next}:\n`
-    end
-  else begin
-    `	{emit_string branch_opcode}	{emit_label lbl}\n`
-  end
+  | (Cne, false) | (Ceq, true) ->
+      `	ucomisd	{emit_reg arg.(1)}, {emit_reg arg.(0)}\n`;
+      `	jp	{emit_label lbl}\n`;     (* branch taken if unordered *)
+      `	jne	{emit_label lbl}\n`      (* branch taken if x<y or x>y *)
+  | (Clt, _) ->
+      ` comisd	{emit_reg arg.(0)}, {emit_reg arg.(1)}\n`;  (* swap compare *)
+      if not neg then
+      `	ja	{emit_label lbl}\n`     (* branch taken if y>x i.e. x<y *)
+      else
+      `	jbe	{emit_label lbl}\n` (* taken if unordered or y<=x i.e. !(x<y) *)
+  | (Cle, _) ->
+      ` comisd	{emit_reg arg.(0)}, {emit_reg arg.(1)}\n`;  (* swap compare *)
+      if not neg then
+      `	jae	{emit_label lbl}\n`     (* branch taken if y>=x i.e. x<=y *)
+      else
+      `	jb	{emit_label lbl}\n` (* taken if unordered or y<x i.e. !(x<=y) *)
+  | (Cgt, _) ->
+      ` comisd	{emit_reg arg.(1)}, {emit_reg arg.(0)}\n`;
+      if not neg then
+      `	ja	{emit_label lbl}\n`     (* branch taken if x>y *)
+      else
+      `	jbe	{emit_label lbl}\n` (* taken if unordered or x<=y i.e. !(x>y) *)
+  | (Cge, _) ->
+      ` comisd	{emit_reg arg.(1)}, {emit_reg arg.(0)}\n`;  (* swap compare *)
+      if not neg then
+      `	jae	{emit_label lbl}\n`     (* branch taken if x>=y *)
+      else
+      `	jb	{emit_label lbl}\n` (* taken if unordered or x<y i.e. !(x>=y) *)
 
 (* Deallocate the stack frame before a return or tail call *)
 
 let begin_assembly() =
   if !Clflags.dlcode then begin
     (* from amd64.S; could emit these constants on demand *)
-    if macosx then begin
-        `	.literal16\n`;
-        `	.align  4\n`;
-        `caml_negf_mask:	.quad   0x8000000000000000, 0\n`;
-        `	.align  4\n`;
-        `caml_absf_mask:	.quad   0x7FFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF\n`;
-    end else begin
+    if macosx then
+        `	.literal16\n`
+    else
         `	.section        .rodata.cst8,\"a\",@progbits\n`;
-        `	.align  16\n`;
-        `caml_negf_mask:	.quad   0x8000000000000000, 0\n`;
-        `	.align  16\n`;
-        `caml_absf_mask:	.quad   0x7FFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF\n`;
-    end;
+    emit_align 16;
+    `{emit_symbol "caml_negf_mask"}:	.quad   0x8000000000000000, 0\n`;
+    emit_align 16;
+    `{emit_symbol "caml_absf_mask"}:	.quad   0x7FFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF\n`
   end;
   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
   `	.data\n`;

asmcomp/amd64/emit_nt.mlp

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: emit_nt.mlp 9547 2010-01-22 12:48:24Z doligez $ *)
+(* $Id: emit_nt.mlp 10460 2010-05-24 15:26:23Z xleroy $ *)
 
 (* Emission of x86-64 (AMD 64) assembly code, MASM syntax *)
 
 (* Output a floating-point compare and branch *)
 
 let emit_float_test cmp neg arg lbl =
-  begin match cmp with
-  | Ceq | Cne -> `	ucomisd	`
-  | _         -> `	comisd	`
-  end;
-  `{emit_reg arg.(0)}, {emit_reg arg.(1)}\n`;
-  let (branch_opcode, need_jp) =
-    match (cmp, neg) with
-      (Ceq, false) -> ("je", true)
-    | (Ceq, true)  -> ("jne", true)
-    | (Cne, false) -> ("jne", true)
-    | (Cne, true)  -> ("je", true)
-    | (Clt, false) -> ("jb", true)
-    | (Clt, true)  -> ("jae", true)
-    | (Cle, false) -> ("jbe", true)
-    | (Cle, true)  -> ("ja", true)
-    | (Cgt, false) -> ("ja", false)
-    | (Cgt, true)  -> ("jbe", false)
-    | (Cge, false) -> ("jae", true)
-    | (Cge, true)  -> ("jb", false) in
-  let branch_if_not_comparable =
-    if cmp = Cne then not neg else neg in
-  if need_jp then
-    if branch_if_not_comparable then begin
-      `	jp	{emit_label lbl}\n`;
-      `	{emit_string branch_opcode}	{emit_label lbl}\n`
-    end else begin
+  (* Effect of comisd on flags and conditional branches:
+                     ZF PF CF  cond. branches taken
+        unordered     1  1  1  je, jb, jbe, jp
+        >             0  0  0  jne, jae, ja
+        <             0  0  1  jne, jbe, jb
+        =             1  0  0  je, jae, jbe.
+     If FP traps are on (they are off by default),
+     comisd traps on QNaN and SNaN but ucomisd traps on SNaN only.
+  *)
+  match (cmp, neg) with
+  | (Ceq, false) | (Cne, true) ->
       let next = new_label() in
-      `	jp	{emit_label next}\n`;
-      `	{emit_string branch_opcode}	{emit_label lbl}\n`;
+      `	ucomisd	{emit_reg arg.(0)}, {emit_reg arg.(1)}\n`;
+      `	jp	{emit_label next}\n`;    (* skip if unordered *)
+      `	je	{emit_label lbl}\n`;     (* branch taken if x=y *)
       `{emit_label next}:\n`
-    end
-  else begin
-    `	{emit_string branch_opcode}	{emit_label lbl}\n`
-  end
+  | (Cne, false) | (Ceq, true) ->
+      `	ucomisd	{emit_reg arg.(0)}, {emit_reg arg.(1)}\n`;
+      `	jp	{emit_label lbl}\n`;     (* branch taken if unordered *)
+      `	jne	{emit_label lbl}\n`      (* branch taken if x<y or x>y *)
+  | (Clt, _) ->
+      ` comisd	{emit_reg arg.(1)}, {emit_reg arg.(0)}\n`;  (* swap compare *)
+      if not neg then
+      `	ja	{emit_label lbl}\n`     (* branch taken if y>x i.e. x<y *)
+      else
+      `	jbe	{emit_label lbl}\n` (* taken if unordered or y<=x i.e. !(x<y) *)
+  | (Cle, _) ->
+      ` comisd	{emit_reg arg.(1)}, {emit_reg arg.(0)}\n`;  (* swap compare *)
+      if not neg then
+      `	jae	{emit_label lbl}\n`     (* branch taken if y>=x i.e. x<=y *)
+      else
+      `	jb	{emit_label lbl}\n` (* taken if unordered or y<x i.e. !(x<=y) *)
+  | (Cgt, _) ->
+      ` comisd	{emit_reg arg.(0)}, {emit_reg arg.(1)}\n`;
+      if not neg then
+      `	ja	{emit_label lbl}\n`     (* branch taken if x>y *)
+      else
+      `	jbe	{emit_label lbl}\n` (* taken if unordered or x<=y i.e. !(x>y) *)
+  | (Cge, _) ->
+      ` comisd	{emit_reg arg.(0)}, {emit_reg arg.(1)}\n`;  (* swap compare *)
+      if not neg then
+      `	jae	{emit_label lbl}\n`     (* branch taken if x>=y *)
+      else
+      `	jb	{emit_label lbl}\n` (* taken if unordered or x<y i.e. !(x>=y) *)
 
 (* Deallocate the stack frame before a return or tail call *)
 

asmcomp/amd64/reload.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: reload.ml 8477 2007-11-06 15:16:56Z frisch $ *)
+(* $Id: reload.ml 10460 2010-05-24 15:26:23Z xleroy $ *)
 
 open Cmm
 open Arch
    Conditional branches:
      Iinttest                           S       R
                                     or  R       S
-     Ifloattest                         R       S
+     Ifloattest                         R       S    (or  S R if swapped test)
      other tests                        S
 *)
 
 
 inherit Reloadgen.reload_generic as super
 
-method reload_operation op arg res =
+method! reload_operation op arg res =
   match op with
-    Iintop(Iadd|Isub|Iand|Ior|Ixor|Icomp _|Icheckbound) ->
+  | Iintop(Iadd|Isub|Iand|Ior|Ixor|Icomp _|Icheckbound) ->
       (* One of the two arguments can reside in the stack, but not both *)
       if stackp arg.(0) && stackp arg.(1)
       then ([|arg.(0); self#makereg arg.(1)|], res)
   | _ -> (* Other operations: all args and results in registers *)
       super#reload_operation op arg res
 
-method reload_test tst arg =
+method! reload_test tst arg =
   match tst with
     Iinttest cmp ->
       (* One of the two arguments can reside on stack *)
       if stackp arg.(0) && stackp arg.(1)
       then [| self#makereg arg.(0); arg.(1) |]
       else arg
-  | Ifloattest(_, _) ->
+  | Ifloattest((Clt|Cle), _) ->
+      (* Cf. emit.mlp: we swap arguments in this case *)
+      (* First argument can be on stack, second must be in register *)
+      if stackp arg.(1)
+      then [| arg.(0); self#makereg arg.(1) |]
+      else arg
+  | Ifloattest((Ceq|Cne|Cgt|Cge), _) ->
       (* Second argument can be on stack, first must be in register *)
       if stackp arg.(0)
       then [| self#makereg arg.(0); arg.(1) |]

asmcomp/amd64/selection.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: selection.ml 9153 2008-12-03 18:09:09Z doligez $ *)
+(* $Id: selection.ml 10250 2010-04-08 03:58:41Z garrigue $ *)
 
 (* Instruction selection for the AMD64 *)
 
     | Ascaledadd(e1, e2, scale) ->
         (Iindexed2scaled(scale, d), Ctuple[e1; e2])
 
-method select_store addr exp =
+method! select_store addr exp =
   match exp with
     Cconst_int n when self#is_immediate n ->
       (Ispecific(Istore_int(Nativeint.of_int n, addr)), Ctuple [])
   | _ ->
       super#select_store addr exp
 
-method select_operation op args =
+method! select_operation op args =
   match op with
   (* Recognize the LEA instruction *)
     Caddi | Cadda | Csubi | Csuba ->
 
 (* Deal with register constraints *)
 
-method insert_op_debug op dbg rs rd =
+method! insert_op_debug op dbg rs rd =
   try
     let (rsrc, rdst) = pseudoregs_for_operation op rs rd in
     self#insert_moves rs rsrc;
   with Use_default ->
     super#insert_op_debug op dbg rs rd
 
-method insert_op op rs rd =
+method! insert_op op rs rd =
   self#insert_op_debug op Debuginfo.none rs rd
 
 end

asmcomp/arm/emit.mlp

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: emit.mlp 9547 2010-01-22 12:48:24Z doligez $ *)
+(* $Id: emit.mlp 10293 2010-04-22 09:33:18Z xleroy $ *)
 
 (* Emission of ARM assembly code *)
 
   | Cdefine_symbol s ->
       `{emit_symbol s}:\n`
   | Cdefine_label lbl ->
-      `{emit_label (10000 + lbl)}:\n`
+      `{emit_label (100000 + lbl)}:\n`
   | Cint8 n ->
       `	.byte	{emit_int n}\n`
   | Cint16 n ->
   | Cint n ->
       `	.word	{emit_nativeint n}\n`
   | Csingle f ->
-      `	.float	{emit_string	f}\n`
+      emit_float32_directive ".long" f
   | Cdouble f ->
-      (* FIXME: this version of the ARM port is mixed-endian, so we
-         use .double instead of emit_float64_directive.  The next
-         version is little-endian, so we'll use emit_float64 then. *)
-      `	.align	0\n`;
-      `	.double	{emit_string f}\n`
+      emit_float64_split_directive ".long" f
   | Csymbol_address s ->
       `	.word	{emit_symbol s}\n`
   | Clabel_address lbl ->
-      `	.word	{emit_label (10000 + lbl)}\n`
+      `	.word	{emit_label (100000 + lbl)}\n`
   | Cstring s ->
       emit_string_directive "	.ascii  " s
   | Cskip n ->

asmcomp/arm/selection.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: selection.ml 9547 2010-01-22 12:48:24Z doligez $ *)
+(* $Id: selection.ml 10295 2010-04-22 12:39:40Z xleroy $ *)
 
 (* Instruction selection for the ARM processor *)
 
 
 inherit Selectgen.selector_generic as super
 
-method regs_for tyv =
+method! regs_for tyv =
   (* Expand floats into pairs of integer registers *)
   let nty = Array.length tyv in
   let rec expand i =
   | _ ->
       super#select_operation op args
 
-method select_operation op args =
+method! select_operation op args =
   match op with
     Cadda | Caddi ->
       begin match args with
             args)])
   (* Add coercions around loads and stores of 32-bit floats *)
   | Cload Single ->
-      (Iextcall("__extendsdfd2", false), [Cop(Cload Word, args)])
+      (Iextcall("__extendsfdf2", false), [Cop(Cload Word, args)])
   | Cstore Single ->