Commits

camlspotter committed efa57ad Merge

merge

Comments (0)

Files changed (320)

 utils/terminfo.cmx : utils/terminfo.cmi
 utils/warnings.cmo : utils/warnings.cmi
 utils/warnings.cmx : utils/warnings.cmi
-parsing/asttypes.cmi :
+parsing/asttypes.cmi : parsing/location.cmi
 parsing/lexer.cmi : parsing/parser.cmi parsing/location.cmi
 parsing/location.cmi : utils/warnings.cmi
 parsing/longident.cmi :
 parsing/parse.cmi : parsing/parsetree.cmi
-parsing/parser.cmi : parsing/parsetree.cmi
+parsing/parser.cmi : parsing/parsetree.cmi parsing/longident.cmi \
+    parsing/location.cmi
 parsing/parsetree.cmi : parsing/longident.cmi parsing/location.cmi \
     parsing/asttypes.cmi
 parsing/printast.cmi : parsing/parsetree.cmi
     parsing/location.cmi parsing/lexer.cmi
 parsing/lexer.cmx : utils/warnings.cmx parsing/parser.cmx utils/misc.cmx \
     parsing/location.cmx parsing/lexer.cmi
-parsing/linenum.cmo : utils/misc.cmi
-parsing/linenum.cmx : utils/misc.cmx
 parsing/location.cmo : utils/warnings.cmi utils/terminfo.cmi \
     parsing/location.cmi
 parsing/location.cmx : utils/warnings.cmx utils/terminfo.cmx \
 parsing/syntaxerr.cmx : parsing/location.cmx parsing/syntaxerr.cmi
 typing/annot.cmi : parsing/location.cmi
 typing/btype.cmi : typing/types.cmi typing/path.cmi parsing/asttypes.cmi
+typing/cmi_format.cmi : typing/types.cmi
+typing/cmt_format.cmi : typing/types.cmi typing/typedtree.cmi \
+    parsing/location.cmi typing/env.cmi typing/cmi_format.cmi
 typing/ctype.cmi : typing/types.cmi typing/path.cmi parsing/longident.cmi \
     typing/ident.cmi typing/env.cmi parsing/asttypes.cmi
-typing/datarepr.cmi : typing/types.cmi typing/path.cmi parsing/asttypes.cmi
+typing/datarepr.cmi : typing/types.cmi typing/path.cmi typing/ident.cmi \
+    parsing/asttypes.cmi
 typing/env.cmi : utils/warnings.cmi typing/types.cmi typing/path.cmi \
     parsing/longident.cmi parsing/location.cmi typing/ident.cmi \
     utils/consistbl.cmi typing/annot.cmi
 typing/ident.cmi :
-typing/includeclass.cmi : typing/types.cmi typing/typedtree.cmi \
-    typing/env.cmi typing/ctype.cmi
+typing/includeclass.cmi : typing/types.cmi typing/env.cmi typing/ctype.cmi
 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/env.cmi
 typing/oprint.cmi : typing/outcometree.cmi
 typing/outcometree.cmi : parsing/asttypes.cmi
-typing/parmatch.cmi : typing/types.cmi typing/typedtree.cmi \
-    parsing/parsetree.cmi parsing/location.cmi typing/env.cmi
+typing/parmatch.cmi : typing/types.cmi typing/typedtree.cmi typing/path.cmi \
+    parsing/parsetree.cmi parsing/longident.cmi parsing/location.cmi \
+    typing/env.cmi parsing/asttypes.cmi
 typing/path.cmi : typing/ident.cmi
 typing/predef.cmi : typing/types.cmi typing/path.cmi typing/ident.cmi
 typing/primitive.cmi :
 typing/printtyp.cmi : typing/types.cmi typing/path.cmi \
     typing/outcometree.cmi parsing/longident.cmi typing/ident.cmi
+typing/printtyped.cmi : typing/typedtree.cmi
 typing/stypes.cmi : typing/typedtree.cmi parsing/location.cmi \
     typing/annot.cmi
 typing/subst.cmi : typing/types.cmi typing/path.cmi typing/ident.cmi
 typing/typecore.cmi : typing/types.cmi typing/typedtree.cmi typing/path.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/includecore.cmi \
-    typing/ident.cmi typing/env.cmi
+typing/typedecl.cmi : typing/types.cmi typing/typedtree.cmi typing/path.cmi \
+    parsing/parsetree.cmi parsing/longident.cmi parsing/location.cmi \
+    typing/includecore.cmi typing/ident.cmi typing/env.cmi \
+    parsing/asttypes.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
+    parsing/longident.cmi parsing/location.cmi typing/ident.cmi \
+    typing/env.cmi parsing/asttypes.cmi
 typing/typemod.cmi : typing/types.cmi typing/typedtree.cmi \
     parsing/parsetree.cmi parsing/longident.cmi parsing/location.cmi \
     typing/includemod.cmi typing/ident.cmi typing/env.cmi
 typing/types.cmi : typing/primitive.cmi typing/path.cmi \
     parsing/longident.cmi parsing/location.cmi typing/ident.cmi \
     parsing/asttypes.cmi
-typing/typetexp.cmi : typing/types.cmi typing/path.cmi parsing/parsetree.cmi \
-    parsing/longident.cmi parsing/location.cmi typing/env.cmi
+typing/typetexp.cmi : typing/types.cmi typing/typedtree.cmi typing/path.cmi \
+    parsing/parsetree.cmi parsing/longident.cmi parsing/location.cmi \
+    typing/env.cmi parsing/asttypes.cmi
 typing/btype.cmo : typing/types.cmi typing/path.cmi utils/misc.cmi \
     typing/btype.cmi
 typing/btype.cmx : typing/types.cmx typing/path.cmx utils/misc.cmx \
     typing/btype.cmi
+typing/cmi_format.cmo : typing/types.cmi utils/misc.cmi parsing/location.cmi \
+    utils/config.cmi typing/cmi_format.cmi
+typing/cmi_format.cmx : typing/types.cmx utils/misc.cmx parsing/location.cmx \
+    utils/config.cmx typing/cmi_format.cmi
+typing/cmt_format.cmo : typing/types.cmi typing/typedtree.cmi utils/misc.cmi \
+    parsing/location.cmi parsing/lexer.cmi typing/env.cmi utils/config.cmi \
+    typing/cmi_format.cmi utils/clflags.cmi typing/cmt_format.cmi
+typing/cmt_format.cmx : typing/types.cmx typing/typedtree.cmx utils/misc.cmx \
+    parsing/location.cmx parsing/lexer.cmx typing/env.cmx utils/config.cmx \
+    typing/cmi_format.cmx utils/clflags.cmx typing/cmt_format.cmi
 typing/ctype.cmo : typing/types.cmi typing/subst.cmi typing/path.cmi \
     utils/misc.cmi parsing/longident.cmi parsing/location.cmi \
     typing/ident.cmi typing/env.cmi utils/clflags.cmi typing/btype.cmi \
     typing/ident.cmx typing/env.cmx utils/clflags.cmx typing/btype.cmx \
     parsing/asttypes.cmi typing/ctype.cmi
 typing/datarepr.cmo : typing/types.cmi typing/predef.cmi utils/misc.cmi \
-    typing/btype.cmi parsing/asttypes.cmi typing/datarepr.cmi
+    typing/ident.cmi typing/btype.cmi parsing/asttypes.cmi \
+    typing/datarepr.cmi
 typing/datarepr.cmx : typing/types.cmx typing/predef.cmx utils/misc.cmx \
-    typing/btype.cmx parsing/asttypes.cmi typing/datarepr.cmi
+    typing/ident.cmx typing/btype.cmx parsing/asttypes.cmi \
+    typing/datarepr.cmi
 typing/env.cmo : utils/warnings.cmi typing/types.cmi utils/tbl.cmi \
     typing/subst.cmi typing/predef.cmi typing/path.cmi utils/misc.cmi \
     parsing/longident.cmi parsing/location.cmi typing/ident.cmi \
     typing/datarepr.cmi utils/consistbl.cmi utils/config.cmi \
-    utils/clflags.cmi typing/btype.cmi parsing/asttypes.cmi typing/annot.cmi \
-    typing/env.cmi
+    typing/cmi_format.cmi utils/clflags.cmi typing/btype.cmi \
+    parsing/asttypes.cmi typing/annot.cmi typing/env.cmi
 typing/env.cmx : utils/warnings.cmx typing/types.cmx utils/tbl.cmx \
     typing/subst.cmx typing/predef.cmx typing/path.cmx utils/misc.cmx \
     parsing/longident.cmx parsing/location.cmx typing/ident.cmx \
     typing/datarepr.cmx utils/consistbl.cmx utils/config.cmx \
-    utils/clflags.cmx typing/btype.cmx parsing/asttypes.cmi typing/annot.cmi \
-    typing/env.cmi
+    typing/cmi_format.cmx utils/clflags.cmx typing/btype.cmx \
+    parsing/asttypes.cmi typing/annot.cmi typing/env.cmi
 typing/ident.cmo : typing/ident.cmi
 typing/ident.cmx : typing/ident.cmi
 typing/includeclass.cmo : typing/types.cmi typing/printtyp.cmi \
     typing/oprint.cmx utils/misc.cmx parsing/longident.cmx typing/ident.cmx \
     typing/env.cmx typing/ctype.cmx utils/clflags.cmx typing/btype.cmx \
     parsing/asttypes.cmi typing/printtyp.cmi
+typing/printtyped.cmo : typing/typedtree.cmi typing/path.cmi \
+    parsing/longident.cmi parsing/location.cmi typing/ident.cmi \
+    parsing/asttypes.cmi typing/printtyped.cmi
+typing/printtyped.cmx : typing/typedtree.cmx typing/path.cmx \
+    parsing/longident.cmx parsing/location.cmx typing/ident.cmx \
+    parsing/asttypes.cmi typing/printtyped.cmi
 typing/stypes.cmo : typing/typedtree.cmi typing/printtyp.cmi \
     parsing/location.cmi utils/clflags.cmi typing/annot.cmi typing/stypes.cmi
 typing/stypes.cmx : typing/typedtree.cmx typing/printtyp.cmx \
     typing/printtyp.cmi typing/predef.cmi typing/path.cmi \
     parsing/parsetree.cmi typing/parmatch.cmi utils/misc.cmi \
     parsing/longident.cmi parsing/location.cmi typing/includeclass.cmi \
-    typing/ident.cmi typing/env.cmi typing/ctype.cmi utils/clflags.cmi \
-    typing/btype.cmi parsing/asttypes.cmi typing/typeclass.cmi
+    typing/ident.cmi typing/env.cmi typing/ctype.cmi typing/cmt_format.cmi \
+    utils/clflags.cmi typing/btype.cmi parsing/asttypes.cmi \
+    typing/typeclass.cmi
 typing/typeclass.cmx : utils/warnings.cmx typing/typetexp.cmx \
     typing/types.cmx typing/typedtree.cmx typing/typedecl.cmx \
     typing/typecore.cmx typing/subst.cmx typing/stypes.cmx \
     typing/printtyp.cmx typing/predef.cmx typing/path.cmx \
     parsing/parsetree.cmi typing/parmatch.cmx utils/misc.cmx \
     parsing/longident.cmx parsing/location.cmx typing/includeclass.cmx \
-    typing/ident.cmx typing/env.cmx typing/ctype.cmx utils/clflags.cmx \
-    typing/btype.cmx parsing/asttypes.cmi typing/typeclass.cmi
+    typing/ident.cmx typing/env.cmx typing/ctype.cmx typing/cmt_format.cmx \
+    utils/clflags.cmx typing/btype.cmx parsing/asttypes.cmi \
+    typing/typeclass.cmi
 typing/typecore.cmo : utils/warnings.cmi typing/typetexp.cmi \
     typing/types.cmi typing/typedtree.cmi typing/subst.cmi typing/stypes.cmi \
     typing/printtyp.cmi typing/primitive.cmi typing/predef.cmi \
     typing/path.cmi parsing/parsetree.cmi typing/parmatch.cmi \
     typing/oprint.cmi utils/misc.cmi parsing/longident.cmi \
     parsing/location.cmi typing/ident.cmi typing/env.cmi typing/ctype.cmi \
-    utils/clflags.cmi typing/btype.cmi parsing/asttypes.cmi typing/annot.cmi \
-    typing/typecore.cmi
+    typing/cmt_format.cmi utils/clflags.cmi typing/btype.cmi \
+    parsing/asttypes.cmi typing/annot.cmi typing/typecore.cmi
 typing/typecore.cmx : utils/warnings.cmx typing/typetexp.cmx \
     typing/types.cmx typing/typedtree.cmx typing/subst.cmx typing/stypes.cmx \
     typing/printtyp.cmx typing/primitive.cmx typing/predef.cmx \
     typing/path.cmx parsing/parsetree.cmi typing/parmatch.cmx \
     typing/oprint.cmx utils/misc.cmx 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/cmt_format.cmx utils/clflags.cmx typing/btype.cmx \
+    parsing/asttypes.cmi typing/annot.cmi typing/typecore.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 \
     utils/clflags.cmx typing/btype.cmx parsing/asttypes.cmi \
     typing/typedecl.cmi
 typing/typedtree.cmo : typing/types.cmi typing/primitive.cmi typing/path.cmi \
-    utils/misc.cmi parsing/location.cmi typing/ident.cmi typing/env.cmi \
-    parsing/asttypes.cmi typing/typedtree.cmi
+    utils/misc.cmi parsing/longident.cmi parsing/location.cmi \
+    typing/ident.cmi typing/env.cmi parsing/asttypes.cmi typing/typedtree.cmi
 typing/typedtree.cmx : typing/types.cmx typing/primitive.cmx typing/path.cmx \
-    utils/misc.cmx parsing/location.cmx typing/ident.cmx typing/env.cmx \
-    parsing/asttypes.cmi typing/typedtree.cmi
+    utils/misc.cmx parsing/longident.cmx parsing/location.cmx \
+    typing/ident.cmx typing/env.cmx parsing/asttypes.cmi typing/typedtree.cmi
 typing/typemod.cmo : utils/warnings.cmi typing/typetexp.cmi typing/types.cmi \
     typing/typedtree.cmi typing/typedecl.cmi typing/typecore.cmi \
     typing/typeclass.cmi typing/subst.cmi typing/stypes.cmi \
     typing/printtyp.cmi typing/path.cmi parsing/parsetree.cmi \
     typing/mtype.cmi utils/misc.cmi parsing/longident.cmi \
     parsing/location.cmi typing/includemod.cmi typing/ident.cmi \
-    typing/env.cmi typing/ctype.cmi utils/config.cmi utils/clflags.cmi \
-    typing/btype.cmi parsing/asttypes.cmi typing/annot.cmi typing/typemod.cmi
+    typing/env.cmi typing/ctype.cmi utils/config.cmi typing/cmt_format.cmi \
+    utils/clflags.cmi typing/btype.cmi parsing/asttypes.cmi typing/annot.cmi \
+    typing/typemod.cmi
 typing/typemod.cmx : utils/warnings.cmx typing/typetexp.cmx typing/types.cmx \
     typing/typedtree.cmx typing/typedecl.cmx typing/typecore.cmx \
     typing/typeclass.cmx typing/subst.cmx typing/stypes.cmx \
     typing/printtyp.cmx typing/path.cmx parsing/parsetree.cmi \
     typing/mtype.cmx utils/misc.cmx parsing/longident.cmx \
     parsing/location.cmx typing/includemod.cmx typing/ident.cmx \
-    typing/env.cmx typing/ctype.cmx utils/config.cmx utils/clflags.cmx \
-    typing/btype.cmx parsing/asttypes.cmi typing/annot.cmi typing/typemod.cmi
+    typing/env.cmx typing/ctype.cmx utils/config.cmx typing/cmt_format.cmx \
+    utils/clflags.cmx typing/btype.cmx parsing/asttypes.cmi typing/annot.cmi \
+    typing/typemod.cmi
 typing/types.cmo : typing/primitive.cmi typing/path.cmi utils/misc.cmi \
     parsing/longident.cmi parsing/location.cmi typing/ident.cmi \
     parsing/asttypes.cmi typing/types.cmi
 typing/types.cmx : typing/primitive.cmx typing/path.cmx utils/misc.cmx \
     parsing/longident.cmx parsing/location.cmx typing/ident.cmx \
     parsing/asttypes.cmi typing/types.cmi
-typing/typetexp.cmo : utils/warnings.cmi typing/types.cmi utils/tbl.cmi \
-    typing/printtyp.cmi typing/path.cmi parsing/parsetree.cmi utils/misc.cmi \
-    parsing/longident.cmi parsing/location.cmi typing/env.cmi \
-    typing/ctype.cmi utils/clflags.cmi typing/btype.cmi parsing/asttypes.cmi \
-    typing/typetexp.cmi
-typing/typetexp.cmx : utils/warnings.cmx typing/types.cmx utils/tbl.cmx \
-    typing/printtyp.cmx typing/path.cmx parsing/parsetree.cmi utils/misc.cmx \
-    parsing/longident.cmx parsing/location.cmx typing/env.cmx \
-    typing/ctype.cmx utils/clflags.cmx typing/btype.cmx parsing/asttypes.cmi \
-    typing/typetexp.cmi
+typing/typetexp.cmo : utils/warnings.cmi typing/types.cmi \
+    typing/typedtree.cmi utils/tbl.cmi typing/printtyp.cmi typing/path.cmi \
+    parsing/parsetree.cmi utils/misc.cmi parsing/longident.cmi \
+    parsing/location.cmi typing/env.cmi typing/ctype.cmi utils/clflags.cmi \
+    typing/btype.cmi parsing/asttypes.cmi typing/typetexp.cmi
+typing/typetexp.cmx : utils/warnings.cmx typing/types.cmx \
+    typing/typedtree.cmx utils/tbl.cmx typing/printtyp.cmx typing/path.cmx \
+    parsing/parsetree.cmi utils/misc.cmx parsing/longident.cmx \
+    parsing/location.cmx typing/env.cmx typing/ctype.cmx utils/clflags.cmx \
+    typing/btype.cmx parsing/asttypes.cmi typing/typetexp.cmi
 bytecomp/bytegen.cmi : bytecomp/lambda.cmi bytecomp/instruct.cmi
 bytecomp/bytelibrarian.cmi :
 bytecomp/bytelink.cmi : bytecomp/symtable.cmi bytecomp/cmo_format.cmi
     typing/primitive.cmx utils/misc.cmx bytecomp/lambda.cmx \
     bytecomp/instruct.cmx typing/ident.cmx utils/config.cmx \
     parsing/asttypes.cmi bytecomp/bytegen.cmi
-bytecomp/bytelibrarian.cmo : utils/misc.cmi utils/config.cmi \
-    bytecomp/cmo_format.cmi utils/clflags.cmi bytecomp/bytelink.cmi \
-    bytecomp/bytelibrarian.cmi
-bytecomp/bytelibrarian.cmx : utils/misc.cmx utils/config.cmx \
-    bytecomp/cmo_format.cmi utils/clflags.cmx bytecomp/bytelink.cmx \
-    bytecomp/bytelibrarian.cmi
+bytecomp/bytelibrarian.cmo : utils/misc.cmi parsing/location.cmi \
+    utils/config.cmi bytecomp/cmo_format.cmi utils/clflags.cmi \
+    bytecomp/bytelink.cmi bytecomp/bytelibrarian.cmi
+bytecomp/bytelibrarian.cmx : utils/misc.cmx parsing/location.cmx \
+    utils/config.cmx bytecomp/cmo_format.cmi utils/clflags.cmx \
+    bytecomp/bytelink.cmx bytecomp/bytelibrarian.cmi
 bytecomp/bytelink.cmo : utils/warnings.cmi bytecomp/symtable.cmi \
     bytecomp/opcodes.cmo utils/misc.cmi parsing/location.cmi \
     bytecomp/instruct.cmi typing/ident.cmi bytecomp/dll.cmi \
     utils/clflags.cmx utils/ccomp.cmx bytecomp/bytesections.cmx \
     bytecomp/bytelink.cmi
 bytecomp/bytepackager.cmo : typing/typemod.cmi bytecomp/translmod.cmi \
-    typing/subst.cmi typing/path.cmi utils/misc.cmi bytecomp/instruct.cmi \
-    typing/ident.cmi typing/env.cmi bytecomp/emitcode.cmi utils/config.cmi \
-    bytecomp/cmo_format.cmi utils/clflags.cmi bytecomp/bytelink.cmi \
-    bytecomp/bytegen.cmi bytecomp/bytepackager.cmi
+    typing/subst.cmi typing/path.cmi utils/misc.cmi parsing/location.cmi \
+    bytecomp/instruct.cmi typing/ident.cmi typing/env.cmi \
+    bytecomp/emitcode.cmi utils/config.cmi bytecomp/cmo_format.cmi \
+    utils/clflags.cmi bytecomp/bytelink.cmi bytecomp/bytegen.cmi \
+    bytecomp/bytepackager.cmi
 bytecomp/bytepackager.cmx : typing/typemod.cmx bytecomp/translmod.cmx \
-    typing/subst.cmx typing/path.cmx utils/misc.cmx bytecomp/instruct.cmx \
-    typing/ident.cmx typing/env.cmx bytecomp/emitcode.cmx utils/config.cmx \
-    bytecomp/cmo_format.cmi utils/clflags.cmx bytecomp/bytelink.cmx \
-    bytecomp/bytegen.cmx bytecomp/bytepackager.cmi
+    typing/subst.cmx typing/path.cmx utils/misc.cmx parsing/location.cmx \
+    bytecomp/instruct.cmx typing/ident.cmx typing/env.cmx \
+    bytecomp/emitcode.cmx utils/config.cmx bytecomp/cmo_format.cmi \
+    utils/clflags.cmx bytecomp/bytelink.cmx bytecomp/bytegen.cmx \
+    bytecomp/bytepackager.cmi
 bytecomp/bytesections.cmo : utils/misc.cmi utils/config.cmi \
     bytecomp/bytesections.cmi
 bytecomp/bytesections.cmx : utils/misc.cmx utils/config.cmx \
 bytecomp/translcore.cmo : typing/types.cmi bytecomp/typeopt.cmi \
     typing/typedtree.cmi bytecomp/translobj.cmi typing/primitive.cmi \
     typing/predef.cmi typing/path.cmi typing/parmatch.cmi utils/misc.cmi \
-    bytecomp/matching.cmi parsing/location.cmi bytecomp/lambda.cmi \
-    typing/ident.cmi typing/env.cmi utils/config.cmi utils/clflags.cmi \
-    typing/btype.cmi parsing/asttypes.cmi bytecomp/translcore.cmi
+    bytecomp/matching.cmi parsing/longident.cmi parsing/location.cmi \
+    bytecomp/lambda.cmi typing/ident.cmi typing/env.cmi utils/config.cmi \
+    utils/clflags.cmi typing/btype.cmi parsing/asttypes.cmi \
+    bytecomp/translcore.cmi
 bytecomp/translcore.cmx : typing/types.cmx bytecomp/typeopt.cmx \
     typing/typedtree.cmx bytecomp/translobj.cmx typing/primitive.cmx \
     typing/predef.cmx typing/path.cmx typing/parmatch.cmx utils/misc.cmx \
-    bytecomp/matching.cmx parsing/location.cmx bytecomp/lambda.cmx \
-    typing/ident.cmx typing/env.cmx utils/config.cmx utils/clflags.cmx \
-    typing/btype.cmx parsing/asttypes.cmi bytecomp/translcore.cmi
+    bytecomp/matching.cmx parsing/longident.cmx parsing/location.cmx \
+    bytecomp/lambda.cmx typing/ident.cmx typing/env.cmx utils/config.cmx \
+    utils/clflags.cmx typing/btype.cmx parsing/asttypes.cmi \
+    bytecomp/translcore.cmi
 bytecomp/translmod.cmo : typing/types.cmi typing/typedtree.cmi \
     bytecomp/translobj.cmi bytecomp/translcore.cmi bytecomp/translclass.cmi \
     typing/printtyp.cmi typing/primitive.cmi typing/predef.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 :
-asmcomp/arch.cmx :
+asmcomp/arch.cmo : utils/misc.cmi utils/config.cmi
+asmcomp/arch.cmx : utils/misc.cmx utils/config.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/printlinear.cmi asmcomp/printcmm.cmi typing/primitive.cmi \
-    utils/misc.cmi asmcomp/mach.cmi asmcomp/liveness.cmi \
+    utils/misc.cmi asmcomp/mach.cmi parsing/location.cmi asmcomp/liveness.cmi \
     asmcomp/linearize.cmi asmcomp/interf.cmi asmcomp/emitaux.cmi \
     asmcomp/emit.cmi utils/config.cmi asmcomp/compilenv.cmi \
     asmcomp/comballoc.cmi asmcomp/coloring.cmi asmcomp/cmmgen.cmi \
     asmcomp/spill.cmx asmcomp/selection.cmx asmcomp/scheduling.cmx \
     asmcomp/reload.cmx asmcomp/reg.cmx asmcomp/proc.cmx asmcomp/printmach.cmx \
     asmcomp/printlinear.cmx asmcomp/printcmm.cmx typing/primitive.cmx \
-    utils/misc.cmx asmcomp/mach.cmx asmcomp/liveness.cmx \
+    utils/misc.cmx asmcomp/mach.cmx parsing/location.cmx asmcomp/liveness.cmx \
     asmcomp/linearize.cmx asmcomp/interf.cmx asmcomp/emitaux.cmx \
     asmcomp/emit.cmx utils/config.cmx asmcomp/compilenv.cmx \
     asmcomp/comballoc.cmx asmcomp/coloring.cmx asmcomp/cmmgen.cmx \
     asmcomp/arch.cmo asmcomp/comballoc.cmi
 asmcomp/comballoc.cmx : asmcomp/reg.cmx asmcomp/mach.cmx utils/config.cmx \
     asmcomp/arch.cmx asmcomp/comballoc.cmi
-asmcomp/compilenv.cmo : utils/misc.cmi bytecomp/lambda.cmi typing/ident.cmi \
-    typing/env.cmi utils/config.cmi asmcomp/cmx_format.cmi \
-    asmcomp/clambda.cmi asmcomp/compilenv.cmi
-asmcomp/compilenv.cmx : utils/misc.cmx bytecomp/lambda.cmx typing/ident.cmx \
-    typing/env.cmx utils/config.cmx asmcomp/cmx_format.cmi \
-    asmcomp/clambda.cmx asmcomp/compilenv.cmi
+asmcomp/compilenv.cmo : utils/misc.cmi parsing/location.cmi \
+    bytecomp/lambda.cmi typing/ident.cmi typing/env.cmi utils/config.cmi \
+    asmcomp/cmx_format.cmi asmcomp/clambda.cmi asmcomp/compilenv.cmi
+asmcomp/compilenv.cmx : utils/misc.cmx parsing/location.cmx \
+    bytecomp/lambda.cmx typing/ident.cmx typing/env.cmx 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 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 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/emit.cmx : asmcomp/reg.cmx asmcomp/proc.cmx utils/misc.cmx \
-    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/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/emitaux.cmo : asmcomp/reg.cmi asmcomp/linearize.cmi \
     asmcomp/debuginfo.cmi utils/config.cmi asmcomp/cmm.cmi utils/clflags.cmi \
     asmcomp/arch.cmo asmcomp/emitaux.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 utils/clflags.cmi asmcomp/arch.cmo asmcomp/reload.cmi
+    asmcomp/cmm.cmi asmcomp/arch.cmo asmcomp/reload.cmi
 asmcomp/reload.cmx : asmcomp/reloadgen.cmx asmcomp/reg.cmx asmcomp/mach.cmx \
-    asmcomp/cmm.cmx utils/clflags.cmx asmcomp/arch.cmx asmcomp/reload.cmi
+    asmcomp/cmm.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/selectgen.cmi
 asmcomp/selection.cmo : asmcomp/selectgen.cmi asmcomp/reg.cmi \
     asmcomp/proc.cmi utils/misc.cmi asmcomp/mach.cmi asmcomp/cmm.cmi \
-    utils/clflags.cmi asmcomp/arch.cmo asmcomp/selection.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/cmm.cmx \
-    utils/clflags.cmx asmcomp/arch.cmx asmcomp/selection.cmi
+    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 \
     bytecomp/translclass.cmi parsing/syntaxerr.cmi bytecomp/symtable.cmi \
     driver/pparse.cmi parsing/location.cmi parsing/lexer.cmi \
     typing/includemod.cmi typing/env.cmi typing/ctype.cmi \
-    bytecomp/bytepackager.cmi bytecomp/bytelink.cmi \
+    typing/cmi_format.cmi bytecomp/bytepackager.cmi bytecomp/bytelink.cmi \
     bytecomp/bytelibrarian.cmi driver/errors.cmi
 driver/errors.cmx : utils/warnings.cmx typing/typetexp.cmx \
     typing/typemod.cmx typing/typedecl.cmx typing/typecore.cmx \
     bytecomp/translclass.cmx parsing/syntaxerr.cmx bytecomp/symtable.cmx \
     driver/pparse.cmx parsing/location.cmx parsing/lexer.cmx \
     typing/includemod.cmx typing/env.cmx typing/ctype.cmx \
-    bytecomp/bytepackager.cmx bytecomp/bytelink.cmx \
+    typing/cmi_format.cmx bytecomp/bytepackager.cmx bytecomp/bytelink.cmx \
     bytecomp/bytelibrarian.cmx driver/errors.cmi
 driver/main.cmo : utils/warnings.cmi utils/misc.cmi driver/main_args.cmi \
     parsing/location.cmi driver/errors.cmi utils/config.cmi \
     bytecomp/translclass.cmi parsing/syntaxerr.cmi driver/pparse.cmi \
     parsing/location.cmi parsing/lexer.cmi typing/includemod.cmi \
     typing/env.cmi typing/ctype.cmi asmcomp/compilenv.cmi \
-    asmcomp/asmpackager.cmi asmcomp/asmlink.cmi asmcomp/asmlibrarian.cmi \
-    asmcomp/asmgen.cmi driver/opterrors.cmi
+    typing/cmi_format.cmi asmcomp/asmpackager.cmi asmcomp/asmlink.cmi \
+    asmcomp/asmlibrarian.cmi asmcomp/asmgen.cmi driver/opterrors.cmi
 driver/opterrors.cmx : utils/warnings.cmx typing/typetexp.cmx \
     typing/typemod.cmx typing/typedecl.cmx typing/typecore.cmx \
     typing/typeclass.cmx bytecomp/translmod.cmx bytecomp/translcore.cmx \
     bytecomp/translclass.cmx parsing/syntaxerr.cmx driver/pparse.cmx \
     parsing/location.cmx parsing/lexer.cmx typing/includemod.cmx \
     typing/env.cmx typing/ctype.cmx asmcomp/compilenv.cmx \
-    asmcomp/asmpackager.cmx asmcomp/asmlink.cmx asmcomp/asmlibrarian.cmx \
-    asmcomp/asmgen.cmx driver/opterrors.cmi
+    typing/cmi_format.cmx asmcomp/asmpackager.cmx asmcomp/asmlink.cmx \
+    asmcomp/asmlibrarian.cmx asmcomp/asmgen.cmx driver/opterrors.cmi
 driver/optmain.cmo : utils/warnings.cmi asmcomp/printmach.cmi \
     driver/opterrors.cmi driver/optcompile.cmi utils/misc.cmi \
     driver/main_args.cmi parsing/location.cmi utils/config.cmi \
     parsing/printast.cmi typing/predef.cmi typing/path.cmi \
     parsing/parsetree.cmi parsing/parse.cmi typing/outcometree.cmi \
     typing/oprint.cmi utils/misc.cmi bytecomp/meta.cmi parsing/longident.cmi \
-    parsing/location.cmi parsing/lexer.cmi typing/ident.cmi \
-    toplevel/genprintval.cmi driver/errors.cmi typing/env.cmi \
-    bytecomp/emitcode.cmi bytecomp/dll.cmi utils/consistbl.cmi \
+    parsing/location.cmi parsing/lexer.cmi typing/includemod.cmi \
+    typing/ident.cmi toplevel/genprintval.cmi driver/errors.cmi \
+    typing/env.cmi bytecomp/emitcode.cmi bytecomp/dll.cmi utils/consistbl.cmi \
     utils/config.cmi driver/compile.cmi utils/clflags.cmi \
     bytecomp/bytegen.cmi typing/btype.cmi toplevel/toploop.cmi
 toplevel/toploop.cmx : utils/warnings.cmx typing/types.cmx \
     parsing/printast.cmx typing/predef.cmx typing/path.cmx \
     parsing/parsetree.cmi parsing/parse.cmx typing/outcometree.cmi \
     typing/oprint.cmx utils/misc.cmx bytecomp/meta.cmx parsing/longident.cmx \
-    parsing/location.cmx parsing/lexer.cmx typing/ident.cmx \
-    toplevel/genprintval.cmx driver/errors.cmx typing/env.cmx \
-    bytecomp/emitcode.cmx bytecomp/dll.cmx utils/consistbl.cmx \
+    parsing/location.cmx parsing/lexer.cmx typing/includemod.cmx \
+    typing/ident.cmx toplevel/genprintval.cmx driver/errors.cmx \
+    typing/env.cmx bytecomp/emitcode.cmx bytecomp/dll.cmx utils/consistbl.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 \
 utils/config\.ml$
 yacc/ocamlyacc$
 yacc/version\.h$
+
+ocamlbuild-mixed-boot$
+otherlibs/labltk/browser/help\.ml$
+stdlib/camlheaderd$
+tools/ocamloptp$
+tools/read_cmt$
 34e8d4a2bd36612fbe437d550b0d119dc9f6bd1e ocaml-4.01.0+dev2-12410
-ab64f2caa8d108cda6e212f3c863f564faaccf1b ocaml-4.01.0+dev2-12450
+bb92dae96c700ef003251b4068aa6fc93680682f ocaml-4.00.0+beta2-12583

0scripts/0CHECKOUT-SVN

 #!/bin/sh
-# rev 11110
-VERSION=3.12.1
+
+set -e
+
+REV=12583
+VERSION=4.00.0+beta2
+
+# Move to the ocaml-svn-copy head
+hg update -C ocaml-svn-copy
 /bin/rm -rf [A-z]* \#*
-svn co http://caml.inria.fr/svn/ocaml/release/$VERSION/
-(cd $VERSION; tar cf - .) | tar xvf -
+
+# svn co http://caml.inria.fr/svn/ocaml/release/$VERSION/
+tar zxvf ../ocaml-$VERSION.tgz
+(cd $VERSION; tar cf - .) | tar xf -
 /bin/rm -rf $VERSION
+
 hg rm `hg status | grep '^!' | awk '{ print $2 }'`
 hg add [A-z]*
 echo OCaml $VERSION svn source is copied. Now ready to commit.
+
+echo hg commit -m ocaml-$(VERSION)-$(REV)
+echo hg tag ocaml-$(VERSION)-$(REV)
-Next version
-------------
-
-Bug fixes:
-- PR#5551: Avoid repeated lookups for missing cmi files
-
 OCaml 4.00.0:
 -------------
 
 * Warning 28 is now enabled by default.
 - New option -absname to use absolute paths in error messages
 - Optimize away compile-time beta-redexes, e.g. (fun x y -> e) a b.
+- Added option -bin-annot to dump the AST with type annotations.
+- Added lots of new warnings about unused variables, opens, fields,
+  constructors, etc.
+* New meaning for warning 7: it is now triggered when a method is overridden
+  with the "method" keyword.  Use "method!" to avoid the warning.
 
 Native-code compiler:
 - Optimized handling of partially-applied functions (PR#5287)
   number debugging annotations, enabling in particular precise stack
   backtraces with the gdb debugger. Currently supported for x86 32-bits
   and 64-bits only. (PR#5487)
+- New tool: ocamloptp, the equivalent of ocamlcp for the native-code compiler.
+
+OCamldoc:
+- PR#5544: improve HTML output (less formatting in html code)
+- PR#5522: allow refering to record fields and variant constructors
+- fix PR#5419 (error message in french)
+- fix PR#5535 (no cross ref to class after dump+load)
+* Use first class modules for custom generators, to be able to
+  load various plugins incrementally adding features to the current
+  generator
+* PR#5507: Use Location.t structures for locations.
+- fix: do not keep code when not told to keep code.
 
 Standard library:
 - Added float functions "hypot" and "copysign" (PR#3806, PR#4752, PR#5246)
       to turn randomization on by default (PR#5572, CVE-2012-0839)
     . Added new functorial interface "MakeSeeded" to support randomization
       with user-provided seeded hash functions.
+    . Install new header <caml/hash.h> for C code.
 - Filename: on-demand (lazy) initialization of the PRNG used by "temp_file".
 - Marshal: marshalling of function values (flag Marshal.Closures) now
   also works for functions that come from dynamically-loaded modules (PR#5215)
      . More random initialization (Random.self_init()), using /dev/urandom
        when available (e.g. Linux, FreeBSD, MacOS X, Solaris)
      . Faster implementation of Random.float
-- Format strings for formatted input/output revised to correct PR#5380
-    . Consistently treat %@ as a plain @ character
-    . Consistently treat %% as a plain % character
-- Scanf: width and precision for floating point numbers are now handled
 - Scanf: new function "unescaped" (PR#3888)
 - Set and Map: more efficient implementation of "filter" and "partition"
 - String: new function "map" (PR#3888)
 
+Installation procedure:
+- Compiler internals are now installed in `ocamlc -where`/compiler-libs.
+  The files available there include the .cmi interfaces for all compiler
+  modules, plus the following libraries:
+      ocamlcommon.cma/.cmxa     modules common to ocamlc, ocamlopt, ocaml
+      ocamlbytecomp.cma/.cmxa   modules for ocamlc and ocaml
+      ocamloptcomp.cma/.cmxa    modules specific to ocamlopt
+      ocamltoplevel.cma         modules specific to ocaml
+   (PR#1804, PR#4653, frequently-asked feature).
+* Some .cmi for toplevel internals that used to be installed in
+  `ocamlc -where` are now to be found in  `ocamlc -where`/compiler-libs.
+  Add "-I +compiler-libs" where needed.
+* toplevellib.cma is no longer installed because subsumed by
+  ocamlcommon.cma ocamlbytecomp.cma ocamltoplevel.cma
+- Added a configuration option (-with-debug-runtime) to compile and install
+  a debug version of the runtime system, and a compiler option
+  (-runtime-variant) to select the debug runtime.
+
 Bug Fixes:
 - PR#1643: functions of the Lazy module whose named started with 'lazy_' have
   been deprecated, and new ones without the prefix added
 - PR#3571: in Bigarrays, call msync() before unmapping to commit changes
+- PR#4292: various documentation problems
+- PR#4511, PR#4838: local modules remove polymorphism
 - PR#4549: Filename.dirname is not handling multiple / on Unix
 - PR#4688: (Windows) special floating-point values aren't converted to strings
   correctly
 - PR#4892: Array.set could raise "out of bounds" before evaluating 3rd arg
 - PR#4937: camlp4 incorrectly handles optional arguments if 'option' is
   redefined
-- PR#5024: camlp4r now handles underscores in irrefutable pattern matching of
+- PR#5024: camlp4r now handles underscores in irrefutable patern matching of
            records
 - PR#5064, PR#5485: try to ensure that 4K words of stack are available
   before calling into C functions, raising a Stack_overflow exception
   otherwise.  This reduces (but does not eliminate) the risk of
   segmentation faults due to stack overflow in C code
+- PR#5084: sub-sub-module building fails for native code compilation
+- PR#5120: fix the output function of Camlp4.Debug.formatter
+- PR#5159: better documentation of type Lexing.position
+- PR#5171: Map.join does more comparisons than needed
+- PR#5176: emacs mode: stack overflow in regexp matcher
+- PR#5179: port OCaml to mingw-w64
 - PR#5211: updated Genlex documentation to state that camlp4 is mandatory for
   'parser' keyword and associated notation
+- PR#5224: confusing error message in non-regular type definition
+- PR#5231: camlp4: fix parsing of <:str_item< type t = $x$ >>
 - PR#5238, PR#5277: Sys_error when getting error location
+- PR#5261, PR#5497: Ocaml source-code examples are not "copy-paste-able"
+- PR#5290: added hash functions for channels, nats, mutexes, conditions
 - PR#5295: OS threads: problem with caml_c_thread_unregister()
 - PR#5301: camlp4r and exception equal to another one with parameters
+- PR#5305: prevent ocamlbuild from complaining about links to _build/
+- PR#5306: comparing to Thread.self() raises exception at runtime
 - PR#5309: Queue.add is not thread/signal safe
 - PR#5310: Ratio.create_ratio/create_normalized_ratio have misleading names
 - PR#5311: better message for warning 23
 - PR#5313: ocamlopt -g misses optimizations
 - PR#5316: objinfo now shows ccopts/ccobjs/force_link when applicable
 - PR#5318: segfault on stack overflow when reading marshaled data
+- PR#5319: %r11 clobbered by Lswitch in Windows AMD64 native-code compilation
 - PR#5322: type abbreviations expanding to a universal type variable
 - PR#5325: (Windows) blocked Unix.recv in one thread blocks Unix.send in
   another thread
-- PR#5327: (Windows) Unix.select blocks if same socket listed in first and
-  third arguments
 - PR#5328: under Windows, Unix.select leaves sockets in non-blocking mode
 - PR#5330: thread tag with '.top' and '.inferred.mli' targets
 - PR#5331: ocamlmktop is not always a shell script
 - PR#5335: Unix.environment segfaults after a call to clearenv
+- PR#5338: sanitize.sh has windows style end-of-lines (mingw)
 - PR#5343: ocaml -rectypes is unsound wrt module subtyping
 - PR#5344: some predefined exceptions need special printing
+- PR#5349: Hashtbl.replace uses new key instead of reusing old key
 - PR#5356: ocamlbuild handling of 'predicates' for ocamlfind
 - PR#5364: wrong compilation of "((val m : SIG1) : SIG2)"
 - PR#5370: ocamldep omits filename in syntax error message
+- PR#5374: camlp4 creates wrong location for type definitions
 - PR#5380: strange sscanf input segfault
-- PR#5394: Documentation for -dtypes is missing in manpage
+- PR#5382: EOPNOTSUPP and ENOTSUPP different on exotic platforms
+- PR#5383: build failure in Win32/MSVC
+- PR#5387: camlp4: str_item and other syntactic elements with Nils are
+  not very usable
+- PR#5389: compaction sometimes leaves a very large heap
+- PR#5393: fails to build from source on GNU/kFreeBSD because of -R link option
+- PR#5394: documentation for -dtypes is missing in manpage
+- PR#5397: Filename.temp_dir_name should be mutable
+- PR#5410: fix printing of class application with Camlp4
 - PR#5416: (Windows) Unix.(set|clear)_close_on_exec now preserves blocking mode
+- PR#5435: ocamlbuild does not find .opt executables on Windows
 - PR#5436: update object ids on unmarshaling
+- PR#5442: camlp4: quotation issue with strings
 - PR#5453: configure doesn't find X11 under Ubuntu/MultiarchSpec
 - PR#5461: Double linking of bytecode modules
 - PR#5463: Bigarray.*.map_file fail if empty array is requested
+- PR#5465: increase stack size of ocamlopt.opt for windows
 - PR#5469: private record type generated by functor loses abbreviation
 - PR#5475: Wrapper script for interpreted LablTk wrongly handles command line
   parameters
 - PR#5476: bug in native code compilation of let rec on float arrays
+- PR#5477: use pkg-config to configure graphics on linux
+- PR#5481: update camlp4 magic numbers
+- PR#5482: remove bashism in test suite scripts
+- PR#5495: camlp4o dies on infix definition (or)
 - PR#5498: Unification with an empty object only checks the absence of
   the first method
 - PR#5503: error when ocamlbuild is passed an absolute path as build directory
 - PR#5511: in Bigarray.reshape, unwarranted limitation on new array dimensions.
 - PR#5513: Int64.div causes floating point exception (ocamlopt, x86)
 - PR#5516: in Bigarray C stubs, use C99 flexible array types if possible
-- PR#5531: Allow ocamlbuild to add ocamldoc flags through -docflag and -docflags switches
+- PR#5518: segfault with lazy empty array
+- PR#5531: Allow ocamlbuild to add ocamldoc flags through -docflag
+  and -docflags switches
 - PR#5543: in Bigarray.map_file, try to avoid using lseek() when growing file
 - PR#5538: combining -i and -annot in ocamlc
+- PR#5551: repeated calls to find_in_path degrade performance
+- PR#5552: Mac OS X: unrecognized gcc option "-no-cpp-precomp"
+- PR#5555: add Hashtbl.reset to resize the bucket table to its initial size
 - PR#5560: incompatible type for tuple pattern with -principal
+- PR#5575: Random states are not marshallable across architectures
+- PR#5579: camlp4: when a plugin is loaded in the toplevel,
+  Token.Filter.define_filter has no effect before the first syntax error
+- PR#5585: typo: "explicitely"
+- PR#5587: documentation: "allows to" is not correct English
+- PR#5593: remove C file when -output-obj fails
+- PR#5598: add backslash-space support in strings in ocamllex
 - PR#5603: wrong .file debug info generated by ocamlopt -g
+- PR#5604: fix permissions of files created by ocamlbuild itself
 - PR#5610: new unmarshaler (from PR#5318) fails to freshen object identifiers
+- PR#5614: add missing -linkall flag when compiling ocamldoc.opt
+- PR#5616: move ocamlbuild documentation to the reference manual
+- PR#5619: Uncaught CType.Unify exception in the compiler
+- PR#5620: invalid printing of type manifest (camlp4 revised syntax)
 - problem with printing of string literals in camlp4 (reported on caml-list)
 - emacs mode: colorization of comments and strings now works correctly
+- problem with forall and method (reported on caml-list on 2011-07-26)
 
 Feature wishes:
 - PR#352: new option "-stdin" to make ocaml read stdin as a script
-- PR#4444: new String.trim function, removing leading and trailing whitespace
+- PR#1164: better error message when mixing -a and .cmxa
+- PR#1284: documentation: remove restriction on mixed streams
+- PR#1496: allow configuring LIBDIR, BINDIR, and MANDIR relative to $(PREFIX)
+- PR#1835: add Digest.from_hex
+- PR#1898: toplevel: add option to suppress continuation prompts
+- PR#4278: configure: option to disable "graph" library
+- PR#4444: new String.trim function, removing leading and trailing whistespace
+- PR#4549: make Filename.dirname/basename POSIX compliant
+- PR#4830: add option -v to expunge.ml
 - PR#4898: new Sys.big_endian boolean for machine endianness
+- PR#4963, PR#5467: no extern "C" into ocaml C-stub headers
 - PR#5199: tests are run only for bytecode if either native support is missing,
   or a non-empty value is set to "BYTECODE_ONLY" Makefile variable
+- PR#5215: marshalling of dynlinked closure
 - PR#5236: new '%revapply' primitive with the semantics 'revapply x f = f x',
     and '%apply' with semantics 'apply f x = f x'.
+- PR#5295: OS threads: problem with caml_c_thread_unregister()
 - PR#5297: compiler now checks existence of builtin primitives
 - PR#5329: (Windows) more efficient Unix.select if all fd's are sockets
 - PR#5358: first class modules don't allow "with type" declarations for types
   in sub-modules
+- PR#5385: configure: emit a warning when MACOSX_DEPLOYMENT_TARGET is set
+- PR#5396: ocamldep: add options -sort, -all, and -one-line
 - PR#5397: Filename.temp_dir_name should be mutable
+- PR#5403: give better error message when emacs is not found in PATH
 - PR#5411: new directive for the toplevel: #load_rec
 - PR#5420: Unix.openfile share mode (Windows)
+- PR#5421: Unix: do not leak fds in various open_proc* functions
+- PR#5434: implement Unix.times in win32unix (partially)
 - PR#5437: warning for useless open statements
 - PR#5438: new warnings for unused declarations
+- PR#5439: upgrade config.guess and config.sub
+- PR#5445 and others: better printing of types with user-provided names
 - PR#5454: Digest.compare is missing and md5 doc update
-- PR#5467: no extern "C" into ocaml C-stub headers
+- PR#5455: .emacs instructions, add lines to recognize ocaml scripts
+- PR#5456: pa_macro: replace __LOCATION__ after macro expansion; add LOCATION_OF
+- PR#5461: bytecode: emit warning when linking two modules with the same name
 - PR#5478: ocamlopt assumes ar command exists
 - PR#5479: Num.num_of_string may raise an exception, not reflected in the
   documentation.
+- PR#5501: increase IO_BUFFER_SIZE to 64KiB
+- PR#5532: improve error message when bytecode file is wrong
+- PR#5555: add function Hashtbl.reset to resize the bucket table to
+  its initial size.
+- PR#5586: increase UNIX_BUFFER_SIZE to 64KiB
 - PR#5599: Add warn() tag in ocamlbuild to control -w compiler switch
 - ocamldebug: ability to inspect values that contain code pointers
 - ocamldebug: new 'environment' directive to set environment variables
-  for debugee
+  for debuggee
+- configure: add -no-camlp4 option
 
 Shedding weight:
 * Removed the obsolete native-code generators for Alpha, HPPA, IA64 and MIPS.
 #                                                                       #
 #########################################################################
 
-# $Id: Makefile 12389 2012-04-22 16:11:51Z lefessan $
+# $Id: Makefile 12511 2012-05-30 13:29:48Z lefessan $
 
 # The main Makefile
 
 
 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)
+COMPFLAGS= -strict-sequence -warn-error A $(INCLUDES)
 LINKFLAGS=
 
 CAMLYACC=boot/ocamlyacc
   utils/clflags.cmo utils/terminfo.cmo utils/ccomp.cmo utils/warnings.cmo \
   utils/consistbl.cmo
 
-OPTUTILS=$(UTILS)
-
 PARSING=parsing/location.cmo parsing/longident.cmo \
   parsing/syntaxerr.cmo parsing/parser.cmo \
   parsing/lexer.cmo parsing/parse.cmo parsing/printast.cmo
   typing/primitive.cmo typing/types.cmo \
   typing/btype.cmo typing/oprint.cmo \
   typing/subst.cmo typing/predef.cmo \
-  typing/datarepr.cmo typing/env.cmo \
-  typing/typedtree.cmo typing/ctype.cmo \
+  typing/datarepr.cmo typing/cmi_format.cmo typing/env.cmo \
+  typing/typedtree.cmo typing/printtyped.cmo typing/ctype.cmo \
   typing/printtyp.cmo typing/includeclass.cmo \
   typing/mtype.cmo typing/includecore.cmo \
   typing/includemod.cmo typing/typetexp.cmo typing/parmatch.cmo \
-  typing/stypes.cmo typing/typecore.cmo \
+  typing/cmt_format.cmo typing/stypes.cmo typing/typecore.cmo \
   typing/typedecl.cmo typing/typeclass.cmo \
   typing/typemod.cmo
 
   bytecomp/typeopt.cmo bytecomp/switch.cmo bytecomp/matching.cmo \
   bytecomp/translobj.cmo bytecomp/translcore.cmo \
   bytecomp/translclass.cmo bytecomp/translmod.cmo \
-  bytecomp/simplif.cmo bytecomp/runtimedef.cmo
+  bytecomp/simplif.cmo bytecomp/runtimedef.cmo \
+  driver/pparse.cmo driver/main_args.cmo
+
+COMMON=$(UTILS) $(PARSING) $(TYPING) $(COMP)
 
 BYTECOMP=bytecomp/meta.cmo bytecomp/instruct.cmo bytecomp/bytegen.cmo \
   bytecomp/printinstr.cmo bytecomp/opcodes.cmo bytecomp/emitcode.cmo \
   bytecomp/bytesections.cmo bytecomp/dll.cmo bytecomp/symtable.cmo \
-  bytecomp/bytelink.cmo bytecomp/bytelibrarian.cmo bytecomp/bytepackager.cmo
+  bytecomp/bytelink.cmo bytecomp/bytelibrarian.cmo bytecomp/bytepackager.cmo \
+  driver/errors.cmo driver/compile.cmo
 
 ASMCOMP=asmcomp/arch.cmo asmcomp/debuginfo.cmo \
   asmcomp/cmm.cmo asmcomp/printcmm.cmo \
   asmcomp/printlinear.cmo asmcomp/linearize.cmo \
   asmcomp/schedgen.cmo asmcomp/scheduling.cmo \
   asmcomp/emitaux.cmo asmcomp/emit.cmo asmcomp/asmgen.cmo \
-  asmcomp/asmlink.cmo asmcomp/asmlibrarian.cmo asmcomp/asmpackager.cmo
+  asmcomp/asmlink.cmo asmcomp/asmlibrarian.cmo asmcomp/asmpackager.cmo \
+  driver/opterrors.cmo driver/optcompile.cmo
 
-DRIVER=driver/pparse.cmo driver/errors.cmo driver/compile.cmo \
-  driver/main_args.cmo driver/main.cmo
-
-OPTDRIVER= driver/pparse.cmo driver/opterrors.cmo driver/optcompile.cmo \
-  driver/main_args.cmo driver/optmain.cmo
-
-TOPLEVEL=driver/pparse.cmo driver/errors.cmo driver/compile.cmo \
-  driver/main_args.cmo toplevel/genprintval.cmo toplevel/toploop.cmo \
+TOPLEVEL=toplevel/genprintval.cmo toplevel/toploop.cmo \
   toplevel/trace.cmo toplevel/topdirs.cmo toplevel/topmain.cmo
 
-TOPLEVELLIB=toplevel/toplevellib.cma
+BYTESTART=driver/main.cmo
+
+OPTSTART=driver/optmain.cmo
+
 TOPLEVELSTART=toplevel/topstart.cmo
 
-COMPOBJS=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(DRIVER)
-
-TOPLIB=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(TOPLEVEL)
-
-TOPOBJS=$(TOPLEVELLIB) $(TOPLEVELSTART)
-
-NATTOPOBJS=$(OPTUTILS) $(PARSING) $(TYPING) $(COMP) $(ASMCOMP) \
-  driver/pparse.cmo driver/opterrors.cmo driver/optcompile.cmo \
-  driver/main_args.cmo \
+NATTOPOBJS=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(ASMCOMP) \
   toplevel/genprintval.cmo toplevel/opttoploop.cmo toplevel/opttopdirs.cmo \
   toplevel/opttopmain.cmo toplevel/opttopstart.cmo
 
-OPTOBJS=$(OPTUTILS) $(PARSING) $(TYPING) $(COMP) $(ASMCOMP) $(OPTDRIVER)
-
-EXPUNGEOBJS=utils/misc.cmo utils/tbl.cmo \
-  utils/config.cmo utils/clflags.cmo \
-  typing/ident.cmo typing/path.cmo typing/types.cmo typing/btype.cmo \
-  utils/warnings.cmo parsing/location.cmo \
-  typing/predef.cmo bytecomp/runtimedef.cmo bytecomp/bytesections.cmo \
-  bytecomp/dll.cmo bytecomp/meta.cmo bytecomp/symtable.cmo toplevel/expunge.cmo
-
 PERVASIVES=$(STDLIB_MODULES) outcometree topdirs toploop
 
 # For users who don't read the INSTALL file
 world.opt:
 	$(MAKE) coldstart
 	$(MAKE) opt.opt
+	$(MAKE) ocamltoolsopt
 
 # Hard bootstrap how-to:
 # (only necessary in some cases, for example if you remove some primitive)
 	$(MAKE) ocamlopt
 	$(MAKE) libraryopt
 	$(MAKE) otherlibrariesopt
+	$(MAKE) ocamltoolsopt
 	$(MAKE) ocamlbuildlib.native
 
 # Native-code versions of the tools
 	 otherlibrariesopt
 
 # Installation
+
+COMPLIBDIR=$(LIBDIR)/compiler-libs
+
 install:
 	if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi
 	if test -d $(LIBDIR); then : ; else $(MKDIR) $(LIBDIR); fi
 	if test -d $(STUBLIBDIR); then : ; else $(MKDIR) $(STUBLIBDIR); fi
+	if test -d $(COMPLIBDIR); then : ; else $(MKDIR) $(COMPLIBDIR); fi
 	if test -d $(MANDIR)/man$(MANEXT); then : ; \
 	  else $(MKDIR) $(MANDIR)/man$(MANEXT); fi
 	cp VERSION $(LIBDIR)/
 	cd stdlib; $(MAKE) install
 	cp lex/ocamllex $(BINDIR)/ocamllex$(EXE)
 	cp yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
-	cp toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
+	cp utils/*.cmi parsing/*.cmi typing/*.cmi bytecomp/*.cmi driver/*.cmi toplevel/*.cmi $(COMPLIBDIR)
+	cp compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma compilerlibs/ocamltoplevel.cma $(BYTESTART) $(TOPLEVELSTART) $(COMPLIBDIR)
 	cp expunge $(LIBDIR)/expunge$(EXE)
-	cp typing/outcometree.cmi typing/outcometree.mli $(LIBDIR)
-	cp toplevel/topstart.cmo $(LIBDIR)
-	cp toplevel/toploop.cmi toplevel/topdirs.cmi toplevel/topmain.cmi \
-	   $(LIBDIR)
 	cd tools; $(MAKE) install
 	-cd man; $(MAKE) install
 	for i in $(OTHERLIBRARIES); do \
 	cd asmrun; $(MAKE) install
 	cp ocamlopt $(BINDIR)/ocamlopt$(EXE)
 	cd stdlib; $(MAKE) installopt
+	cp asmcomp/*.cmi $(COMPLIBDIR)
+	cp compilerlibs/ocamloptcomp.cma $(OPTSTART) $(COMPLIBDIR)
 	cd ocamldoc; $(MAKE) installopt
 	for i in $(OTHERLIBRARIES); \
 	  do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done
-	if test -f ocamlc.opt; \
-	  then cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE); else :; fi
-	if test -f ocamlopt.opt; \
-	  then cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE); else :; fi
-	if test -f lex/ocamllex.opt; \
-	  then cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE); else :; fi
+	if test -f ocamlopt.opt ; then $(MAKE) installoptopt; fi
+	cd tools; $(MAKE) installopt
+
+installoptopt:
+	cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE)
+	cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE)
+	cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE)
+	cp compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \
+           compilerlibs/ocamlbytecomp.cmxa compilerlibs/ocamlbytecomp.a \
+           compilerlibs/ocamloptcomp.cmxa compilerlibs/ocamloptcomp.a \
+           $(BYTESTART:.cmo=.cmx) $(BYTESTART:.cmo=.o) \
+           $(OPTSTART:.cmo=.cmx) $(OPTSTART:.cmo=.o) \
+           $(COMPLIBDIR)
+	cd $(COMPLIBDIR) && $(RANLIB) ocamlcommon.a ocamlbytecomp.a ocamloptcomp.a
 
 clean:: partialclean
 
-# The compiler
+# Shared parts of the system
 
-ocamlc: $(COMPOBJS)
-	$(CAMLC) $(LINKFLAGS) -o ocamlc $(COMPOBJS)
+compilerlibs/ocamlcommon.cma: $(COMMON)
+	$(CAMLC) -a -o $@ $(COMMON)
+partialclean::
+	rm -f compilerlibs/ocamlcommon.cma
+
+# The bytecode compiler
+
+compilerlibs/ocamlbytecomp.cma: $(BYTECOMP)
+	$(CAMLC) -a -o $@ $(BYTECOMP)
+partialclean::
+	rm -f compilerlibs/ocamlbytecomp.cma
+
+ocamlc: compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma $(BYTESTART)
+	$(CAMLC) $(LINKFLAGS) -o ocamlc \
+           compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma $(BYTESTART)
 	@sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlc|' \
 	  driver/ocamlcomp.sh.in > ocamlcomp.sh
 	@chmod +x ocamlcomp.sh
 
-partialclean::
-	rm -f ocamlc ocamlcomp.sh
-
 # The native-code compiler
 
-ocamlopt: $(OPTOBJS)
-	$(CAMLC) $(LINKFLAGS) -o ocamlopt $(OPTOBJS)
+compilerlibs/ocamloptcomp.cma: $(ASMCOMP)
+	$(CAMLC) -a -o $@ $(ASMCOMP)
+partialclean::
+	rm -f compilerlibs/ocamloptcomp.cma
+
+ocamlopt: compilerlibs/ocamlcommon.cma compilerlibs/ocamloptcomp.cma $(OPTSTART)
+	$(CAMLC) $(LINKFLAGS) -o ocamlopt \
+          compilerlibs/ocamlcommon.cma compilerlibs/ocamloptcomp.cma $(OPTSTART)
 	@sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlopt|' \
 	  driver/ocamlcomp.sh.in > ocamlcompopt.sh
 	@chmod +x ocamlcompopt.sh
 
 # The toplevel
 
-ocaml: $(TOPOBJS) expunge
-	$(CAMLC) $(LINKFLAGS) -linkall -o ocaml.tmp $(TOPOBJS)
+compilerlibs/ocamltoplevel.cma: $(TOPLEVEL)
+	$(CAMLC) -a -o $@ $(TOPLEVEL)
+partialclean::
+	rm -f compilerlibs/ocamltoplevel.cma
+
+ocaml: compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma compilerlibs/ocamltoplevel.cma $(TOPLEVELSTART) expunge
+	$(CAMLC) $(LINKFLAGS) -linkall -o ocaml.tmp \
+          compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma \
+          compilerlibs/ocamltoplevel.cma $(TOPLEVELSTART)
 	- $(CAMLRUN) ./expunge ocaml.tmp ocaml $(PERVASIVES)
 	rm -f ocaml.tmp
 
-toplevel/toplevellib.cma: $(TOPLIB)
-	$(CAMLC) -a -o $@ $(TOPLIB)
-
 partialclean::
-	rm -f ocaml toplevel/toplevellib.cma
+	rm -f ocaml
 
 # The native toplevel
 
 
 beforedepend:: parsing/lexer.ml
 
+# Shared parts of the system compiled with the native-code compiler
+
+compilerlibs/ocamlcommon.cmxa: $(COMMON:.cmo=.cmx)
+	$(CAMLOPT) -a -o $@ $(COMMON:.cmo=.cmx)
+partialclean::
+	rm -f compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a
+
 # The bytecode compiler compiled with the native-code compiler
 
-ocamlc.opt: $(COMPOBJS:.cmo=.cmx)
-	cd asmrun; $(MAKE) meta.o dynlink.o
+compilerlibs/ocamlbytecomp.cmxa: $(BYTECOMP:.cmo=.cmx)
+	$(CAMLOPT) -a -o $@ $(BYTECOMP:.cmo=.cmx)
+partialclean::
+	rm -f compilerlibs/ocamlbytecomp.cmxa compilerlibs/ocamlbytecomp.a
+
+ocamlc.opt: compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlbytecomp.cmxa $(BYTESTART:.cmo=.cmx)
 	$(CAMLOPT) $(LINKFLAGS) -ccopt "$(BYTECCLINKOPTS)" -o ocamlc.opt \
-	  $(COMPOBJS:.cmo=.cmx) \
-	  asmrun/meta.o asmrun/dynlink.o -cclib "$(BYTECCLIBS)"
+          compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlbytecomp.cmxa \
+          $(BYTESTART:.cmo=.cmx) -cclib "$(BYTECCLIBS)"
 	@sed -e 's|@compiler@|$$topdir/ocamlc.opt|' \
 	  driver/ocamlcomp.sh.in > ocamlcomp.sh
 	@chmod +x ocamlcomp.sh
 
 # The native-code compiler compiled with itself
 
-ocamlopt.opt: $(OPTOBJS:.cmo=.cmx)
-	$(CAMLOPT) $(LINKFLAGS) -o ocamlopt.opt $(OPTOBJS:.cmo=.cmx)
+compilerlibs/ocamloptcomp.cmxa: $(ASMCOMP:.cmo=.cmx)
+	$(CAMLOPT) -a -o $@ $(ASMCOMP:.cmo=.cmx)
+partialclean::
+	rm -f compilerlibs/ocamloptcomp.cmxa compilerlibs/ocamloptcomp.a
+
+ocamlopt.opt: compilerlibs/ocamlcommon.cmxa compilerlibs/ocamloptcomp.cmxa $(OPTSTART:.cmo=.cmx)
+	$(CAMLOPT) $(LINKFLAGS) -o ocamlopt.opt \
+           compilerlibs/ocamlcommon.cmxa compilerlibs/ocamloptcomp.cmxa \
+           $(OPTSTART:.cmo=.cmx)
 	@sed -e 's|@compiler@|$$topdir/ocamlopt.opt|' \
 	  driver/ocamlcomp.sh.in > ocamlcompopt.sh
 	@chmod +x ocamlcompopt.sh
 partialclean::
 	rm -f ocamlopt.opt
 
-$(OPTOBJS:.cmo=.cmx): ocamlopt
+$(COMMON:.cmo=.cmx) $(BYTECOMP:.cmo=.cmx) $(ASMCOMP:.cmo=.cmx): ocamlopt
 
 # The numeric opcodes
 
 
 # The "expunge" utility
 
-expunge: $(EXPUNGEOBJS)
-	$(CAMLC) $(LINKFLAGS) -o expunge $(EXPUNGEOBJS)
+expunge: compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma toplevel/expunge.cmo
+	$(CAMLC) $(LINKFLAGS) -o expunge \
+          compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma toplevel/expunge.cmo
 
 partialclean::
 	rm -f expunge
 ocamltools: ocamlc ocamlyacc ocamllex asmcomp/cmx_format.cmi
 	cd tools; $(MAKE) all
 
+ocamltoolsopt: ocamlopt
+	cd tools; $(MAKE) opt
+
 ocamltoolsopt.opt: ocamlc.opt ocamlyacc ocamllex asmcomp/cmx_format.cmi
 	cd tools; $(MAKE) opt.opt
 
 .PHONY: coreboot defaultentry depend distclean install installopt
 .PHONY: library library-cross libraryopt ocamlbuild-mixed-boot
 .PHONY: ocamlbuild.byte ocamlbuild.native ocamldebugger ocamldoc
-.PHONY: ocamldoc.opt ocamllex ocamllex.opt ocamltools ocamltools.opt
-.PHONY: ocamlyacc opt-core opt opt.opt otherlibraries
+.PHONY: ocamldoc.opt ocamllex ocamllex.opt ocamltools ocamltoolsopt
+.PHONY: ocamltoolsopt.opt ocamlyacc opt-core opt opt.opt otherlibraries
 .PHONY: otherlibrariesopt package-macosx promote promote-cross
 .PHONY: restore runtime runtimeopt makeruntimeopt world world.opt
 
 #                                                                       #
 #########################################################################
 
-# $Id: Makefile.nt 12389 2012-04-22 16:11:51Z lefessan $
+# $Id: Makefile.nt 12511 2012-05-30 13:29:48Z lefessan $
 
 # The main Makefile
 
   utils/clflags.cmo utils/terminfo.cmo utils/ccomp.cmo utils/warnings.cmo \
   utils/consistbl.cmo
 
-OPTUTILS=$(UTILS)
-
 PARSING=parsing/location.cmo parsing/longident.cmo \
   parsing/syntaxerr.cmo parsing/parser.cmo \
   parsing/lexer.cmo parsing/parse.cmo parsing/printast.cmo
   typing/primitive.cmo typing/types.cmo \
   typing/btype.cmo typing/oprint.cmo \
   typing/subst.cmo typing/predef.cmo \
-  typing/datarepr.cmo typing/env.cmo \
+  typing/datarepr.cmo typing/cmi_format.cmo typing/env.cmo \
   typing/typedtree.cmo typing/ctype.cmo \
   typing/printtyp.cmo typing/includeclass.cmo \
   typing/mtype.cmo typing/includecore.cmo \
   typing/includemod.cmo typing/parmatch.cmo \
-  typing/typetexp.cmo typing/stypes.cmo typing/typecore.cmo \
+  typing/typetexp.cmo \
+  typing/cmt_format.cmo typing/stypes.cmo typing/typecore.cmo \
   typing/typedecl.cmo typing/typeclass.cmo \
   typing/typemod.cmo
 
   bytecomp/typeopt.cmo bytecomp/switch.cmo bytecomp/matching.cmo \
   bytecomp/translobj.cmo bytecomp/translcore.cmo \
   bytecomp/translclass.cmo bytecomp/translmod.cmo \
-  bytecomp/simplif.cmo bytecomp/runtimedef.cmo
+  bytecomp/simplif.cmo bytecomp/runtimedef.cmo \
+  driver/pparse.cmo driver/main_args.cmo
+
+COMMON=$(UTILS) $(PARSING) $(TYPING) $(COMP)
 
 BYTECOMP=bytecomp/meta.cmo bytecomp/instruct.cmo bytecomp/bytegen.cmo \
   bytecomp/printinstr.cmo bytecomp/opcodes.cmo bytecomp/emitcode.cmo \
   bytecomp/bytesections.cmo bytecomp/dll.cmo bytecomp/symtable.cmo \
-  bytecomp/bytelink.cmo bytecomp/bytelibrarian.cmo bytecomp/bytepackager.cmo
+  bytecomp/bytelink.cmo bytecomp/bytelibrarian.cmo bytecomp/bytepackager.cmo \
+  driver/errors.cmo driver/compile.cmo
 
 ASMCOMP=asmcomp/arch.cmo asmcomp/debuginfo.cmo \
   asmcomp/cmm.cmo asmcomp/printcmm.cmo \
   asmcomp/printlinear.cmo asmcomp/linearize.cmo \
   asmcomp/schedgen.cmo asmcomp/scheduling.cmo \
   asmcomp/emitaux.cmo asmcomp/emit.cmo asmcomp/asmgen.cmo \
-  asmcomp/asmlink.cmo asmcomp/asmlibrarian.cmo asmcomp/asmpackager.cmo
+  asmcomp/asmlink.cmo asmcomp/asmlibrarian.cmo asmcomp/asmpackager.cmo \
+  driver/opterrors.cmo driver/optcompile.cmo
 
-DRIVER=driver/pparse.cmo driver/errors.cmo driver/compile.cmo \
-  driver/main_args.cmo driver/main.cmo
-
-OPTDRIVER=driver/pparse.cmo driver/opterrors.cmo driver/optcompile.cmo \
-  driver/main_args.cmo driver/optmain.cmo
-
-TOPLEVEL=driver/pparse.cmo driver/errors.cmo driver/compile.cmo \
-  driver/main_args.cmo toplevel/genprintval.cmo toplevel/toploop.cmo \
+TOPLEVEL=toplevel/genprintval.cmo toplevel/toploop.cmo \
   toplevel/trace.cmo toplevel/topdirs.cmo toplevel/topmain.cmo
 
-TOPLEVELLIB=toplevel/toplevellib.cma
+BYTESTART=driver/main.cmo
+
+OPTSTART=driver/optmain.cmo
+
 TOPLEVELSTART=toplevel/topstart.cmo
 
-COMPOBJS=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(DRIVER)
-
-TOPLIB=$(UTILS) $(PARSING) $(TYPING) $(COMP) $(BYTECOMP) $(TOPLEVEL)
-
-TOPOBJS=$(TOPLEVELLIB) $(TOPLEVELSTART)
-
-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
-
-OPTOBJS=$(OPTUTILS) $(PARSING) $(TYPING) $(COMP) $(ASMCOMP) $(OPTDRIVER)
-
-EXPUNGEOBJS=utils/misc.cmo utils/tbl.cmo \
-  utils/config.cmo utils/clflags.cmo \
-  typing/ident.cmo typing/path.cmo typing/types.cmo typing/btype.cmo \
-  utils/warnings.cmo parsing/location.cmo \
-  typing/predef.cmo bytecomp/runtimedef.cmo bytecomp/bytesections.cmo \
-  bytecomp/dll.cmo bytecomp/meta.cmo bytecomp/symtable.cmo toplevel/expunge.cmo
-
 PERVASIVES=$(STDLIB_MODULES) topdirs toploop outcometree
 
 # For users who don't read the INSTALL file
 
 # Recompile the system using the bootstrap compiler
 all: runtime ocamlc ocamllex ocamlyacc ocamltools library ocaml \
-  otherlibraries ocamldoc.byte ocamlbuild.byte $(CAMLP4OUT) $(DEBUGGER) 
+  otherlibraries ocamldoc.byte ocamlbuild.byte $(CAMLP4OUT) $(DEBUGGER)
 
 # The compilation of ocaml will fail if the runtime has changed.
 # Never mind, just do make bootstrap to reach fixpoint again.
 world.opt: coldstart opt.opt
 
 # Installation
+
+COMPLIBDIR=$(LIBDIR)/compiler-libs
+
 install: installbyt installopt
 
 installbyt:
 	mkdir -p $(BINDIR)
 	mkdir -p $(LIBDIR)
+	mkdir -p $(COMPLIBDIR)
 	cd byterun ; $(MAKEREC) install
 	cp ocamlc $(BINDIR)/ocamlc.exe
 	cp ocaml $(BINDIR)/ocaml.exe
 	cd stdlib ; $(MAKEREC) install
 	cp lex/ocamllex $(BINDIR)/ocamllex.exe
 	cp yacc/ocamlyacc.exe $(BINDIR)/ocamlyacc.exe
-	cp toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
+	cp utils/*.cmi parsing/*.cmi typing/*.cmi bytecomp/*.cmi driver/*.cmi toplevel/*.cmi $(COMPLIBDIR)
+	cp compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma compilerlibs/ocamltoplevel.cma $(BYTESTART) $(TOPLEVELSTART) $(COMPLIBDIR)
 	cp expunge $(LIBDIR)/expunge.exe
-	cp typing/outcometree.cmi typing/outcometree.mli $(LIBDIR)
-	cp toplevel/topstart.cmo $(LIBDIR)
-	cp toplevel/toploop.cmi toplevel/topdirs.cmi toplevel/topmain.cmi $(LIBDIR)
 	cd tools ; $(MAKEREC) install
 	cd ocamldoc ; $(MAKEREC) install
 	mkdir -p $(STUBLIBDIR)
 	cd asmrun ; $(MAKEREC) install
 	cp ocamlopt $(BINDIR)/ocamlopt.exe
 	cd stdlib ; $(MAKEREC) installopt
+	cp asmcomp/*.cmi driver/*.cmi $(COMPLIBDIR)
+	cp compilerlibs/ocamloptcomp.cma $(OPTSTART) $(COMPLIBDIR)
 	cd ocamldoc ; $(MAKEREC) installopt
 	for i in $(OTHERLIBRARIES); do $(MAKEREC) -C otherlibs/$$i installopt; done
-	if test -f ocamlc.opt; \
-	  then cp ocamlc.opt $(BINDIR)/ocamlc.opt.exe; else :; fi
-	if test -f ocamlopt.opt; \
-	  then cp ocamlopt.opt $(BINDIR)/ocamlopt.opt.exe; else :; fi
-	if test -f lex/ocamllex.opt; \
-	  then cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt.exe; else :; fi
+	if test -f ocamlopt.opt ; then $(MAKEREC) installoptopt; fi
+
+installoptopt:
+	cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE)
+	cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE)
+	cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE)
+	cp compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \
+	 compilerlibs/ocamlbytecomp.cmxa compilerlibs/ocamlbytecomp.a \
+	 compilerlibs/ocamloptcomp.cmxa compilerlibs/ocamloptcomp.a \
+	 $(COMPLIBDIR)
 
 clean:: partialclean
 
 # The compiler
 
-ocamlc: $(COMPOBJS)
-	$(CAMLC) $(LINKFLAGS) -o ocamlc $(COMPOBJS)
+compilerlibs/ocamlcommon.cma: $(COMMON)
+	$(CAMLC) -a -o $@ $(COMMON)
+partialclean::
+	rm -f compilerlibs/ocamlcommon.cma
+
+# The bytecode compiler
+
+compilerlibs/ocamlbytecomp.cma: $(BYTECOMP)
+	$(CAMLC) -a -o $@ $(BYTECOMP)
+partialclean::
+	rm -f compilerlibs/ocamlbytecomp.cma
+
+ocamlc: compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma $(BYTESTART)
+	$(CAMLC) $(LINKFLAGS) -o ocamlc \
+           compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma $(BYTESTART)
 	@sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlc|' \
 	  driver/ocamlcomp.sh.in > ocamlcomp.sh
 	@chmod +x ocamlcomp.sh
 
 partialclean::
-	rm -f ocamlc
+	rm -f ocamlc ocamlcomp.sh
 
 # The native-code compiler
 
-ocamlopt: $(OPTOBJS)
-	$(CAMLC) $(LINKFLAGS) -o ocamlopt $(OPTOBJS)
+compilerlibs/ocamloptcomp.cma: $(ASMCOMP)
+	$(CAMLC) -a -o $@ $(ASMCOMP)
+partialclean::
+	rm -f compilerlibs/ocamloptcomp.cma
+
+ocamlopt: compilerlibs/ocamlcommon.cma compilerlibs/ocamloptcomp.cma $(OPTSTART)
+	$(CAMLC) $(LINKFLAGS) -o ocamlopt \
+          compilerlibs/ocamlcommon.cma compilerlibs/ocamloptcomp.cma $(OPTSTART)
 	@sed -e 's|@compiler@|$$topdir/boot/ocamlrun $$topdir/ocamlopt|' \
 	  driver/ocamlcomp.sh.in > ocamlcompopt.sh
 	@chmod +x ocamlcompopt.sh
 
 partialclean::
-	rm -f ocamlopt
+	rm -f ocamlopt ocamlcompopt.sh
 
 # The toplevel
 
-ocaml: $(TOPOBJS) expunge
-	$(CAMLC) $(LINKFLAGS) -linkall -o ocaml.tmp $(TOPOBJS)
+compilerlibs/ocamltoplevel.cma: $(TOPLEVEL)
+	$(CAMLC) -a -o $@ $(TOPLEVEL)
+partialclean::
+	rm -f compilerlibs/ocamltoplevel.cma
+
+ocaml: compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma compilerlibs/ocamltoplevel.cma $(TOPLEVELSTART) expunge
+	$(CAMLC) $(LINKFLAGS) -linkall -o ocaml.tmp \
+          compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma \
+          compilerlibs/ocamltoplevel.cma $(TOPLEVELSTART)
 	- $(CAMLRUN) ./expunge ocaml.tmp ocaml $(PERVASIVES)
 	rm -f ocaml.tmp
 
-toplevel/toplevellib.cma: $(TOPLIB)
-	$(CAMLC) -a -o $@ $(TOPLIB)
-
 partialclean::
 	rm -f ocaml
 
 
 beforedepend:: parsing/lexer.ml
 
+# Shared parts of the system compiled with the native-code compiler
+
+compilerlibs/ocamlcommon.cmxa: $(COMMON:.cmo=.cmx)
+	$(CAMLOPT) -a -o $@ $(COMMON:.cmo=.cmx)
+partialclean::
+	rm -f compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a
+
 # The bytecode compiler compiled with the native-code compiler
 
-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)
+compilerlibs/ocamlbytecomp.cmxa: $(BYTECOMP:.cmo=.cmx)
+	$(CAMLOPT) -a -o $@ $(BYTECOMP:.cmo=.cmx)
+partialclean::
+	rm -f compilerlibs/ocamlbytecomp.cmxa compilerlibs/ocamlbytecomp.a
+
+ocamlc.opt: compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlbytecomp.cmxa $(BYTESTART:.cmo=.cmx)
+	$(CAMLOPT) $(LINKFLAGS) -ccopt "$(BYTECCLINKOPTS)" -o ocamlc.opt \
+          compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlbytecomp.cmxa \
+          $(BYTESTART:.cmo=.cmx) -cclib "$(BYTECCLIBS)"
 	@sed -e 's|@compiler@|$$topdir/ocamlc.opt|' \
 	  driver/ocamlcomp.sh.in > ocamlcomp.sh
 	@chmod +x ocamlcomp.sh
 
 # The native-code compiler compiled with itself
 
-ocamlopt.opt: $(OPTOBJS:.cmo=.cmx)
-	$(CAMLOPT) $(LINKFLAGS) -o ocamlopt.opt $(OPTOBJS:.cmo=.cmx)
+compilerlibs/ocamloptcomp.cmxa: $(ASMCOMP:.cmo=.cmx)
+	$(CAMLOPT) -a -o $@ $(ASMCOMP:.cmo=.cmx)
+partialclean::
+	rm -f compilerlibs/ocamloptcomp.cmxa compilerlibs/ocamloptcomp.a
+
+ocamlopt.opt: compilerlibs/ocamlcommon.cmxa compilerlibs/ocamloptcomp.cmxa $(OPTSTART:.cmo=.cmx)
+	$(CAMLOPT) $(LINKFLAGS) -o ocamlopt.opt \
+           compilerlibs/ocamlcommon.cmxa compilerlibs/ocamloptcomp.cmxa \
+           $(OPTSTART:.cmo=.cmx)
 	@sed -e 's|@compiler@|$$topdir/ocamlopt.opt|' \
 	  driver/ocamlcomp.sh.in > ocamlcompopt.sh
 	@chmod +x ocamlcompopt.sh
 partialclean::
 	rm -f ocamlopt.opt
 
-$(OPTOBJS:.cmo=.cmx): ocamlopt
+$(COMMON:.cmo=.cmx) $(BYTECOMP:.cmo=.cmx) $(ASMCOMP:.cmo=.cmx): ocamlopt
 
 # The numeric opcodes
 
 
 # The "expunge" utility
 
-expunge: $(EXPUNGEOBJS)
-	$(CAMLC) $(LINKFLAGS) -o expunge $(EXPUNGEOBJS)
+expunge: compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma toplevel/expunge.cmo
+	$(CAMLC) $(LINKFLAGS) -o expunge \
+          compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma toplevel/expunge.cmo
 
 partialclean::
 	rm -f expunge
 
 RECOMPILATION FROM THE SOURCES:
 
-Just follow the instructions for Unix machines given in the file INSTALL.
+You will need to recompile (and install) flexdll from source with
+Cygwin's C compiler because the official binary version of flexdll
+doesn't handle Cygwin's symbolic links and sometimes fails to
+launch the C compiler.
+
+In order to recompile flexdll, you first need to configure, compile,
+and install OCaml without flexdll support (by following the instructions
+in file INSTALL, except the "make opt.opt" part), then modify the
+flexdll Makefile to change line 51 from:
+  LINKFLAGS = -ccopt "-link version_res.o"
+to:
+  LINKFLAGS = -cclib version_res.o
+
+Then "make CHAINS=cygwin" and add the flexdll directory to your PATH.
+Make sure to add it before "/usr/bin" or you will get cygwin's flexlink.
+
+Then, OCaml's source directory, type:
+  make clean
+  make distclean
+and follow the instructions for Unix machines given in the file INSTALL.
 
 
 NOTES:
-4.01.0+dev2_2012-04-17
+4.00.0+beta2
 
 # The version string is the first line of this file.
 # It must be in the format described in stdlib/sys.mli
+
+# $Id: VERSION 12567 2012-06-04 17:01:09Z doligez $
 # Traverse only these directories
 <{bytecomp,driver,stdlib,tools,asmcomp,camlp4,ocamlbuild,toplevel,ocamldoc,typing,otherlibs,utils,debugger,lex,parsing,byterun,asmrun}/**>: traverse
 
-"boot" or "byterun" or "asmrun": not_hygienic
+"boot" or "byterun" or "asmrun" or "compilerlibs": not_hygienic
 
 # These should not be required but it fails on *BSD and Windows...
 "yacc" or "win32caml": not_hygienic

asmcomp/amd64/emit.mlp

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: emit.mlp 12449 2012-05-12 09:51:45Z xleroy $ *)
+(* $Id: emit.mlp 12448 2012-05-12 09:49:40Z xleroy $ *)
 
 (* Emission of x86-64 (AMD 64) assembly code *)
 

asmcomp/arm/emit.mlp

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: emit.mlp 12210 2012-03-08 19:52:03Z doligez $ *)
+(* $Id: emit.mlp 12547 2012-06-02 18:00:43Z bmeurer $ *)
 
 (* Emission of ARM assembly code *)
 
 
 (* Adjust sp (up or down) by the given byte amount *)
 
-let emit_stack_adjustment instr n =
-  if n <= 0 then 0 else
-    decompose_intconst (Int32.of_int n)
-      (fun bits ->
-        `	{emit_string instr}	sp, sp, #{emit_int32 bits}\n`)
+let emit_stack_adjustment n =
+  if n = 0 then 0 else begin
+    let instr = if n < 0 then "sub" else "add" in
+    let ninstr = decompose_intconst (Int32.of_int (abs n))
+                   (fun bits ->
+                     `	{emit_string instr}	sp, sp, #{emit_int32 bits}\n`) in
+    cfi_adjust_cfa_offset (-n);
+    ninstr
+  end
+
+(* Deallocate the stack frame before a return or tail call *)
+
+let output_epilogue f =
+  let n = frame_size() in
+  if n > 0 then begin
+    let ninstr = emit_stack_adjustment n in
+    let ninstr = ninstr + f () in
+    (* reset CFA back cause function body may continue *)
+    cfi_adjust_cfa_offset n;
+    ninstr
+  end else
+    f ()
 
 (* Name of current function *)
 let function_name = ref ""
 (* Output the assembly code for an instruction *)
 
 let emit_instr i =
+    emit_debug_info i.dbg;
     match i.desc with
       Lend -> 0
     | Lop(Imove | Ispill | Ireload) ->
         `	{emit_call s}\n`;
         `{record_frame i.live i.dbg}\n`; 1
     | Lop(Itailcall_ind) ->
-        let n = frame_size() in
-        if !contains_calls then
-          `	ldr	lr, [sp, #{emit_int (n-4)}]\n`;
-        let ninstr = emit_stack_adjustment "add" n in
-        `	bx	{emit_reg i.arg.(0)}\n`;
-        2 + ninstr
+        output_epilogue begin fun () ->
+          if !contains_calls then
+            `	ldr	lr, [sp, #{emit_int (-4)}]\n`;
+          `	bx	{emit_reg i.arg.(0)}\n`; 2
+        end
     | Lop(Itailcall_imm s) ->
         if s = !function_name then begin
           `	b	{emit_label !tailrec_entry_point}\n`; 1
         end else begin
-          let n = frame_size() in
-          if !contains_calls then
-            `	ldr	lr, [sp, #{emit_int (n-4)}]\n`;
-          let ninstr = emit_stack_adjustment "add" n in
-          `	{emit_jump s}\n`;
-          2 + ninstr
+          output_epilogue begin fun () ->
+            if !contains_calls then
+              `	ldr	lr, [sp, #{emit_int (-4)}]\n`;
+            `	{emit_jump s}\n`; 2
+          end
         end
     | Lop(Iextcall(s, false)) ->
         `	{emit_call s}\n`; 1
         1 + ninstr
     | Lop(Istackoffset n) ->
         assert (n mod 8 = 0);
-        let ninstr =
-          if n >= 0
-          then emit_stack_adjustment "sub" n
-          else emit_stack_adjustment "add" (-n) in
+        let ninstr = emit_stack_adjustment (-n) in
         stack_offset := !stack_offset + n;
         ninstr
     | Lop(Iload(Single, addr)) when !fpu >= VFPv3_D16 ->
         let n = frame_size() in
         `	ldr	lr, [sp, #{emit_int(n-4)}]\n`; 1
     | Lreturn ->
-        let ninstr = emit_stack_adjustment "add" (frame_size()) in
-        `	bx	lr\n`;
-        ninstr + 1
+        output_epilogue begin fun () ->
+          `	bx	lr\n`; 1
+        end
     | Llabel lbl ->
         `{emit_label lbl}:\n`; 0
     | Lbranch lbl ->
         4
     | Lswitch jumptbl ->
         if !arch > ARMv6 && !thumb then begin
-          let lbl = new_label() in
-          `	tbh	[pc, {emit_reg i.arg.(0)}]\n`;
-          `{emit_label lbl}:`;
-          for i = 0 to Array.length jumptbl - 1 do
-            `	.short	({emit_label jumptbl.(i)}-{emit_label lbl})/2\n`;
+          (* The Thumb-2 TBH instruction supports only forward branches,
+             so we need to generate appropriate trampolines for all labels
+             that appear before this switch instruction (PR#5623) *)
+          let tramtbl = Array.copy jumptbl in
+          `	tbh	[pc, {emit_reg i.arg.(0)}, lsl #1]\n`;
+          for j = 0 to Array.length tramtbl - 1 do
+            let rec label i =
+              match i.desc with
+                Lend -> new_label()
+              | Llabel lbl when lbl = tramtbl.(j) -> lbl
+              | _ -> label i.next in
+            tramtbl.(j) <- label i.next;
+            `	.short	({emit_label tramtbl.(j)}-.)/2+{emit_int j}\n`
           done;
-          `	.align	1\n`;
-          2 + Array.length jumptbl / 2
+          (* Generate the necessary trampolines *)
+          for j = 0 to Array.length tramtbl - 1 do
+            if tramtbl.(j) <> jumptbl.(j) then
+              `{emit_label tramtbl.(j)}:	b	{emit_label jumptbl.(j)}\n`
+          done
+        end else if not !pic_code then begin
+          `	ldr	pc, [pc, {emit_reg i.arg.(0)}, lsl #2]\n`;
+          `	nop\n`;
+          for j = 0 to Array.length jumptbl - 1 do
+            `	.word	{emit_label jumptbl.(j)}\n`
+          done
         end else begin
-          if not !pic_code then begin
-            `	ldr	pc, [pc, {emit_reg i.arg.(0)}, lsl #2]\n`;
-            `	nop\n`;
-            for i = 0 to Array.length jumptbl - 1 do
-              `	.word	{emit_label jumptbl.(i)}\n`
-            done
-          end else begin
-            (* Slightly slower, but position-independent *)
-            `	add	pc, pc, {emit_reg i.arg.(0)}, lsl #2\n`;
-            `	nop\n`;
-            for i = 0 to Array.length jumptbl - 1 do
-              `	b	{emit_label jumptbl.(i)}\n`
-            done
-          end;
-          2 + Array.length jumptbl
-        end
+          (* Slightly slower, but position-independent *)
+          `	add	pc, pc, {emit_reg i.arg.(0)}, lsl #2\n`;
+          `	nop\n`;
+          for j = 0 to Array.length jumptbl - 1 do
+            `	b	{emit_label jumptbl.(j)}\n`
+          done
+        end;
+        2 + Array.length jumptbl
     | Lsetuptrap lbl ->
         `	bl	{emit_label lbl}\n`; 1
     | Lpushtrap ->
         stack_offset := !stack_offset + 8;
         `	push	\{trap_ptr, lr}\n`;
+        cfi_adjust_cfa_offset 8;
         `	mov	trap_ptr, sp\n`; 2
     | Lpoptrap ->
         `	pop	\{trap_ptr, lr}\n`;
+        cfi_adjust_cfa_offset (-8);
         stack_offset := !stack_offset - 8; 1
     | Lraise ->
         if !Clflags.debug then begin
     `	.arm\n`;
   `	.type	{emit_symbol fundecl.fun_name}, %function\n`;
   `{emit_symbol fundecl.fun_name}:\n`;
+  emit_debug_info fundecl.fun_dbg;
+  cfi_startproc();
   if !Clflags.gprofile then emit_profile();
   let n = frame_size() in
-  ignore(emit_stack_adjustment "sub" n);
-  if !contains_calls then
-    `	str	lr, [sp, #{emit_int(n - 4)}]\n`;
+  if n > 0 then begin
+    ignore(emit_stack_adjustment (-n));
+    if !contains_calls then
+      `	str	lr, [sp, #{emit_int(n - 4)}]\n`
+  end;
   `{emit_label !tailrec_entry_point}:\n`;
   emit_all 0 fundecl.fun_body;
   emit_literals();
   List.iter emit_call_gc !call_gc_sites;
   List.iter emit_call_bound_error !bound_error_sites;
+  cfi_endproc();
   `	.type	{emit_symbol fundecl.fun_name}, %function\n`;
   `	.size	{emit_symbol fundecl.fun_name}, .-{emit_symbol fundecl.fun_name}\n`
 
 (* Beginning / end of an assembly file *)
 
 let begin_assembly() =
+  reset_debug_info();
   `	.syntax	unified\n`;
   begin match !arch with
   | ARMv4   -> `	.arch	armv4t\n`

asmcomp/asmgen.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: asmgen.ml 12389 2012-04-22 16:11:51Z lefessan $ *)
+(* $Id: asmgen.ml 12202 2012-03-07 17:50:17Z frisch $ *)
 
 (* From lambda to assembly code *)
 

asmcomp/asmgen.mli

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: asmgen.mli 12389 2012-04-22 16:11:51Z lefessan $ *)
+(* $Id: asmgen.mli 12058 2012-01-20 14:23:34Z frisch $ *)
 
 (* From lambda to assembly code *)
 

asmcomp/cmmgen.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: cmmgen.ml 12368 2012-04-18 07:12:54Z frisch $ *)
+(* $Id: cmmgen.ml 12237 2012-03-14 09:26:54Z xleroy $ *)
 
 (* Translation from closed lambda to C-- *)
 
           (Nativeint.add (Nativeint.shift_left (Nativeint.of_int n) 1) 1n)
 
 let add_const c n =
-  if n = 0 then c
-  else match c with
-  | Cconst_int x when no_overflow_add x n -> Cconst_int (x + n)
-  | c -> Cop(Caddi, [c; Cconst_int n])
+  if n = 0 then c else Cop(Caddi, [c; Cconst_int n])
 
 let incr_int = function
     Cconst_int n when n < max_int -> Cconst_int(n+1)

asmcomp/emitaux.ml

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: emitaux.ml 12449 2012-05-12 09:51:45Z xleroy $ *)
+(* $Id: emitaux.ml 12448 2012-05-12 09:49:40Z xleroy $ *)
 
 (* Common functions for emitting assembly code *)
 

asmcomp/emitaux.mli

 (*                                                                     *)
 (***********************************************************************)
 
-(* $Id: emitaux.mli 12449 2012-05-12 09:51:45Z xleroy $ *)