diff options
author | Runhang Li <marklrh@gmail.com> | 2017-07-23 09:31:35 +0800 |
---|---|---|
committer | Runhang Li <marklrh@gmail.com> | 2017-07-23 09:31:58 +0800 |
commit | c39b975d435ae0fca8efd90041553234355ed186 (patch) | |
tree | 06a45659c2f4c9f08d4df02ea5684aac8e8eb3d3 | |
parent | bc32e7a52de66f80b75cf2bc9cfb11a12f193527 (diff) | |
parent | d9d7d5b8f19df9f7300c6b2cf1a1b881ab1cb7c1 (diff) | |
download | ocaml-c39b975d435ae0fca8efd90041553234355ed186.tar.gz |
merge trunk and update test
225 files changed, 6170 insertions, 4406 deletions
@@ -6,11 +6,11 @@ utils/ccomp.cmo : utils/misc.cmi utils/config.cmi utils/clflags.cmi \ utils/ccomp.cmx : utils/misc.cmx utils/config.cmx utils/clflags.cmx \ utils/ccomp.cmi utils/ccomp.cmi : -utils/clflags.cmo : utils/numbers.cmi utils/misc.cmi utils/config.cmi \ - utils/arg_helper.cmi utils/clflags.cmi -utils/clflags.cmx : utils/numbers.cmx utils/misc.cmx utils/config.cmx \ - utils/arg_helper.cmx utils/clflags.cmi -utils/clflags.cmi : utils/misc.cmi +utils/clflags.cmo : utils/profile.cmi utils/numbers.cmi utils/misc.cmi \ + utils/config.cmi utils/arg_helper.cmi utils/clflags.cmi +utils/clflags.cmx : utils/profile.cmx utils/numbers.cmx utils/misc.cmx \ + utils/config.cmx utils/arg_helper.cmx utils/clflags.cmi +utils/clflags.cmi : utils/profile.cmi utils/misc.cmi utils/config.cmo : utils/config.cmi utils/config.cmx : utils/config.cmi utils/config.cmi : @@ -40,9 +40,9 @@ utils/tbl.cmi : utils/terminfo.cmo : utils/terminfo.cmi utils/terminfo.cmx : utils/terminfo.cmi utils/terminfo.cmi : -utils/timings.cmo : utils/misc.cmi utils/timings.cmi -utils/timings.cmx : utils/misc.cmx utils/timings.cmi -utils/timings.cmi : +utils/profile.cmo : utils/misc.cmi utils/profile.cmi +utils/profile.cmx : utils/misc.cmx utils/profile.cmi +utils/profile.cmi : utils/warnings.cmo : utils/misc.cmi utils/warnings.cmi utils/warnings.cmx : utils/misc.cmx utils/warnings.cmi utils/warnings.cmi : @@ -715,7 +715,7 @@ asmcomp/afl_instrument.cmi : asmcomp/cmm.cmi asmcomp/arch.cmo : utils/config.cmi utils/clflags.cmi asmcomp/arch.cmx : utils/config.cmx utils/clflags.cmx asmcomp/asmgen.cmo : asmcomp/un_anf.cmi bytecomp/translmod.cmi \ - utils/timings.cmi middle_end/base_types/symbol.cmi asmcomp/split.cmi \ + utils/profile.cmi middle_end/base_types/symbol.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 asmcomp/printclambda.cmi \ @@ -730,7 +730,7 @@ asmcomp/asmgen.cmo : asmcomp/un_anf.cmi bytecomp/translmod.cmi \ asmcomp/closure.cmi utils/clflags.cmi asmcomp/clambda.cmi asmcomp/CSE.cmo \ asmcomp/build_export_info.cmi asmcomp/asmgen.cmi asmcomp/asmgen.cmx : asmcomp/un_anf.cmx bytecomp/translmod.cmx \ - utils/timings.cmx middle_end/base_types/symbol.cmx asmcomp/split.cmx \ + utils/profile.cmx middle_end/base_types/symbol.cmx asmcomp/split.cmx \ 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 asmcomp/printclambda.cmx \ @@ -755,19 +755,19 @@ asmcomp/asmlibrarian.cmx : utils/misc.cmx parsing/location.cmx \ asmcomp/cmx_format.cmi utils/clflags.cmx asmcomp/clambda.cmx \ utils/ccomp.cmx asmcomp/asmlink.cmx asmcomp/asmlibrarian.cmi asmcomp/asmlibrarian.cmi : -asmcomp/asmlink.cmo : utils/timings.cmi bytecomp/runtimedef.cmi \ +asmcomp/asmlink.cmo : utils/profile.cmi bytecomp/runtimedef.cmi \ utils/misc.cmi parsing/location.cmi asmcomp/emitaux.cmi asmcomp/emit.cmi \ utils/consistbl.cmi utils/config.cmi asmcomp/compilenv.cmi \ asmcomp/cmx_format.cmi asmcomp/cmmgen.cmi utils/clflags.cmi \ utils/ccomp.cmi asmcomp/asmgen.cmi asmcomp/asmlink.cmi -asmcomp/asmlink.cmx : utils/timings.cmx bytecomp/runtimedef.cmx \ +asmcomp/asmlink.cmx : utils/profile.cmx bytecomp/runtimedef.cmx \ utils/misc.cmx parsing/location.cmx asmcomp/emitaux.cmx asmcomp/emit.cmx \ utils/consistbl.cmx utils/config.cmx asmcomp/compilenv.cmx \ asmcomp/cmx_format.cmi asmcomp/cmmgen.cmx utils/clflags.cmx \ utils/ccomp.cmx asmcomp/asmgen.cmx asmcomp/asmlink.cmi asmcomp/asmlink.cmi : asmcomp/cmx_format.cmi asmcomp/asmpackager.cmo : typing/typemod.cmi bytecomp/translmod.cmi \ - utils/timings.cmi utils/misc.cmi middle_end/middle_end.cmi \ + utils/profile.cmi utils/misc.cmi middle_end/middle_end.cmi \ parsing/location.cmi bytecomp/lambda.cmi typing/ident.cmi \ asmcomp/export_info_for_pack.cmi asmcomp/export_info.cmi typing/env.cmi \ utils/config.cmi asmcomp/compilenv.cmi \ @@ -775,7 +775,7 @@ asmcomp/asmpackager.cmo : typing/typemod.cmi bytecomp/translmod.cmi \ utils/clflags.cmi utils/ccomp.cmi asmcomp/asmlink.cmi asmcomp/asmgen.cmi \ asmcomp/asmpackager.cmi asmcomp/asmpackager.cmx : typing/typemod.cmx bytecomp/translmod.cmx \ - utils/timings.cmx utils/misc.cmx middle_end/middle_end.cmx \ + utils/profile.cmx utils/misc.cmx middle_end/middle_end.cmx \ parsing/location.cmx bytecomp/lambda.cmx typing/ident.cmx \ asmcomp/export_info_for_pack.cmx asmcomp/export_info.cmx typing/env.cmx \ utils/config.cmx asmcomp/compilenv.cmx \ @@ -1669,7 +1669,7 @@ middle_end/lift_let_to_initialize_symbol.cmx : \ middle_end/lift_let_to_initialize_symbol.cmi : middle_end/flambda.cmi \ middle_end/backend_intf.cmi middle_end/middle_end.cmo : utils/warnings.cmi \ - middle_end/base_types/variable.cmi utils/timings.cmi \ + middle_end/base_types/variable.cmi utils/profile.cmi \ middle_end/base_types/symbol.cmi middle_end/share_constants.cmi \ middle_end/remove_unused_program_constructs.cmi \ middle_end/remove_unused_closure_vars.cmi middle_end/ref_to_variables.cmi \ @@ -1683,7 +1683,7 @@ middle_end/middle_end.cmo : utils/warnings.cmi \ middle_end/base_types/closure_id.cmi middle_end/closure_conversion.cmi \ utils/clflags.cmi middle_end/backend_intf.cmi middle_end/middle_end.cmi middle_end/middle_end.cmx : utils/warnings.cmx \ - middle_end/base_types/variable.cmx utils/timings.cmx \ + middle_end/base_types/variable.cmx utils/profile.cmx \ middle_end/base_types/symbol.cmx middle_end/share_constants.cmx \ middle_end/remove_unused_program_constructs.cmx \ middle_end/remove_unused_closure_vars.cmx middle_end/ref_to_variables.cmx \ @@ -2000,14 +2000,16 @@ middle_end/base_types/variable.cmx : utils/misc.cmx utils/identifiable.cmx \ middle_end/base_types/variable.cmi : utils/identifiable.cmi typing/ident.cmi \ middle_end/base_types/compilation_unit.cmi driver/compdynlink.cmi : -driver/compenv.cmo : utils/warnings.cmi utils/misc.cmi parsing/location.cmi \ - utils/config.cmi utils/clflags.cmi utils/ccomp.cmi driver/compenv.cmi -driver/compenv.cmx : utils/warnings.cmx utils/misc.cmx parsing/location.cmx \ - utils/config.cmx utils/clflags.cmx utils/ccomp.cmx driver/compenv.cmi +driver/compenv.cmo : utils/warnings.cmi utils/profile.cmi utils/misc.cmi \ + parsing/location.cmi utils/config.cmi utils/clflags.cmi utils/ccomp.cmi \ + driver/compenv.cmi +driver/compenv.cmx : utils/warnings.cmx utils/profile.cmx utils/misc.cmx \ + parsing/location.cmx utils/config.cmx utils/clflags.cmx utils/ccomp.cmx \ + driver/compenv.cmi driver/compenv.cmi : driver/compile.cmo : utils/warnings.cmi typing/typemod.cmi \ typing/typedtree.cmi typing/typecore.cmi bytecomp/translmod.cmi \ - utils/timings.cmi typing/stypes.cmi bytecomp/simplif.cmi \ + utils/profile.cmi typing/stypes.cmi bytecomp/simplif.cmi \ typing/printtyped.cmi typing/printtyp.cmi bytecomp/printlambda.cmi \ bytecomp/printinstr.cmi parsing/printast.cmi parsing/pprintast.cmi \ driver/pparse.cmi utils/misc.cmi bytecomp/lambda.cmi \ @@ -2016,7 +2018,7 @@ driver/compile.cmo : utils/warnings.cmi typing/typemod.cmi \ bytecomp/bytegen.cmi parsing/builtin_attributes.cmi driver/compile.cmi driver/compile.cmx : utils/warnings.cmx typing/typemod.cmx \ typing/typedtree.cmx typing/typecore.cmx bytecomp/translmod.cmx \ - utils/timings.cmx typing/stypes.cmx bytecomp/simplif.cmx \ + utils/profile.cmx typing/stypes.cmx bytecomp/simplif.cmx \ typing/printtyped.cmx typing/printtyp.cmx bytecomp/printlambda.cmx \ bytecomp/printinstr.cmx parsing/printast.cmx parsing/pprintast.cmx \ driver/pparse.cmx utils/misc.cmx bytecomp/lambda.cmx \ @@ -2043,25 +2045,25 @@ driver/compplugin.cmi : driver/errors.cmo : parsing/location.cmi driver/errors.cmi driver/errors.cmx : parsing/location.cmx driver/errors.cmi driver/errors.cmi : -driver/main.cmo : utils/warnings.cmi utils/timings.cmi utils/misc.cmi \ +driver/main.cmo : utils/warnings.cmi utils/profile.cmi utils/misc.cmi \ driver/main_args.cmi parsing/location.cmi utils/config.cmi \ driver/compplugin.cmi driver/compmisc.cmi driver/compile.cmi \ driver/compenv.cmi utils/clflags.cmi bytecomp/bytepackager.cmi \ bytecomp/bytelink.cmi bytecomp/bytelibrarian.cmi driver/main.cmi -driver/main.cmx : utils/warnings.cmx utils/timings.cmx utils/misc.cmx \ +driver/main.cmx : utils/warnings.cmx utils/profile.cmx utils/misc.cmx \ driver/main_args.cmx parsing/location.cmx utils/config.cmx \ driver/compplugin.cmx driver/compmisc.cmx driver/compile.cmx \ driver/compenv.cmx utils/clflags.cmx bytecomp/bytepackager.cmx \ bytecomp/bytelink.cmx bytecomp/bytelibrarian.cmx driver/main.cmi driver/main.cmi : -driver/main_args.cmo : utils/warnings.cmi utils/config.cmi utils/clflags.cmi \ - driver/main_args.cmi -driver/main_args.cmx : utils/warnings.cmx utils/config.cmx utils/clflags.cmx \ - driver/main_args.cmi +driver/main_args.cmo : utils/warnings.cmi utils/profile.cmi utils/config.cmi \ + utils/clflags.cmi driver/main_args.cmi +driver/main_args.cmx : utils/warnings.cmx utils/profile.cmx utils/config.cmx \ + utils/clflags.cmx driver/main_args.cmi driver/main_args.cmi : driver/optcompile.cmo : utils/warnings.cmi typing/typemod.cmi \ typing/typedtree.cmi typing/typecore.cmi bytecomp/translmod.cmi \ - utils/timings.cmi typing/stypes.cmi bytecomp/simplif.cmi \ + utils/profile.cmi typing/stypes.cmi bytecomp/simplif.cmi \ typing/printtyped.cmi typing/printtyp.cmi bytecomp/printlambda.cmi \ parsing/printast.cmi parsing/pprintast.cmi driver/pparse.cmi \ utils/misc.cmi middle_end/middle_end.cmi bytecomp/lambda.cmi \ @@ -2070,7 +2072,7 @@ driver/optcompile.cmo : utils/warnings.cmi typing/typemod.cmi \ parsing/builtin_attributes.cmi asmcomp/asmgen.cmi driver/optcompile.cmi driver/optcompile.cmx : utils/warnings.cmx typing/typemod.cmx \ typing/typedtree.cmx typing/typecore.cmx bytecomp/translmod.cmx \ - utils/timings.cmx typing/stypes.cmx bytecomp/simplif.cmx \ + utils/profile.cmx typing/stypes.cmx bytecomp/simplif.cmx \ typing/printtyped.cmx typing/printtyp.cmx bytecomp/printlambda.cmx \ parsing/printast.cmx parsing/pprintast.cmx driver/pparse.cmx \ utils/misc.cmx middle_end/middle_end.cmx bytecomp/lambda.cmx \ @@ -2081,14 +2083,14 @@ driver/optcompile.cmi : middle_end/backend_intf.cmi driver/opterrors.cmo : parsing/location.cmi driver/opterrors.cmi driver/opterrors.cmx : parsing/location.cmx driver/opterrors.cmi driver/opterrors.cmi : -driver/optmain.cmo : utils/warnings.cmi utils/timings.cmi asmcomp/proc.cmi \ +driver/optmain.cmo : utils/warnings.cmi utils/profile.cmi asmcomp/proc.cmi \ asmcomp/printmach.cmi driver/optcompile.cmi utils/misc.cmi \ driver/main_args.cmi parsing/location.cmi asmcomp/import_approx.cmi \ utils/config.cmi driver/compplugin.cmi driver/compmisc.cmi \ asmcomp/compilenv.cmi driver/compenv.cmi utils/clflags.cmi \ middle_end/backend_intf.cmi asmcomp/asmpackager.cmi asmcomp/asmlink.cmi \ asmcomp/asmlibrarian.cmi asmcomp/arch.cmo driver/optmain.cmi -driver/optmain.cmx : utils/warnings.cmx utils/timings.cmx asmcomp/proc.cmx \ +driver/optmain.cmx : utils/warnings.cmx utils/profile.cmx asmcomp/proc.cmx \ asmcomp/printmach.cmx driver/optcompile.cmx utils/misc.cmx \ driver/main_args.cmx parsing/location.cmx asmcomp/import_approx.cmx \ utils/config.cmx driver/compplugin.cmx driver/compmisc.cmx \ @@ -2096,11 +2098,11 @@ driver/optmain.cmx : utils/warnings.cmx utils/timings.cmx asmcomp/proc.cmx \ middle_end/backend_intf.cmi asmcomp/asmpackager.cmx asmcomp/asmlink.cmx \ asmcomp/asmlibrarian.cmx asmcomp/arch.cmx driver/optmain.cmi driver/optmain.cmi : -driver/pparse.cmo : utils/timings.cmi parsing/parsetree.cmi \ +driver/pparse.cmo : utils/profile.cmi parsing/parsetree.cmi \ parsing/parse.cmi utils/misc.cmi parsing/location.cmi utils/config.cmi \ utils/clflags.cmi utils/ccomp.cmi parsing/ast_mapper.cmi \ parsing/ast_invariants.cmi driver/pparse.cmi -driver/pparse.cmx : utils/timings.cmx parsing/parsetree.cmi \ +driver/pparse.cmx : utils/profile.cmx parsing/parsetree.cmi \ parsing/parse.cmx utils/misc.cmx parsing/location.cmx utils/config.cmx \ utils/clflags.cmx utils/ccomp.cmx parsing/ast_mapper.cmx \ parsing/ast_invariants.cmx driver/pparse.cmi @@ -2229,13 +2231,15 @@ toplevel/toploop.cmi : utils/warnings.cmi typing/types.cmi typing/path.cmi \ parsing/parsetree.cmi typing/outcometree.cmi parsing/longident.cmi \ parsing/location.cmi typing/env.cmi toplevel/topmain.cmo : utils/warnings.cmi toplevel/toploop.cmi \ - toplevel/topdirs.cmi utils/misc.cmi driver/main_args.cmi \ - parsing/location.cmi utils/config.cmi driver/compplugin.cmi \ - driver/compenv.cmi utils/clflags.cmi toplevel/topmain.cmi + toplevel/topdirs.cmi utils/profile.cmi utils/misc.cmi \ + driver/main_args.cmi parsing/location.cmi utils/config.cmi \ + driver/compplugin.cmi driver/compenv.cmi utils/clflags.cmi \ + toplevel/topmain.cmi toplevel/topmain.cmx : utils/warnings.cmx toplevel/toploop.cmx \ - toplevel/topdirs.cmx utils/misc.cmx driver/main_args.cmx \ - parsing/location.cmx utils/config.cmx driver/compplugin.cmx \ - driver/compenv.cmx utils/clflags.cmx toplevel/topmain.cmi + toplevel/topdirs.cmx utils/profile.cmx utils/misc.cmx \ + driver/main_args.cmx parsing/location.cmx utils/config.cmx \ + driver/compplugin.cmx driver/compenv.cmx utils/clflags.cmx \ + toplevel/topmain.cmi toplevel/topmain.cmi : toplevel/topstart.cmo : toplevel/topmain.cmi toplevel/topstart.cmx : toplevel/topmain.cmx @@ -2254,3 +2258,18 @@ driver/compdynlink.cmo : bytecomp/symtable.cmi bytecomp/opcodes.cmo \ utils/misc.cmi bytecomp/meta.cmi bytecomp/dll.cmi utils/consistbl.cmi \ utils/config.cmi bytecomp/cmo_format.cmi typing/cmi_format.cmi \ driver/compdynlink.cmi + +driver/makedepend.cmo : driver/pparse.cmi parsing/parsetree.cmi \ + parsing/parser.cmi parsing/parse.cmi utils/misc.cmi parsing/longident.cmi \ + parsing/location.cmi parsing/lexer.cmi parsing/depend.cmi \ + utils/config.cmi driver/compplugin.cmi driver/compenv.cmi \ + utils/clflags.cmi driver/makedepend.cmi +driver/makedepend.cmx : driver/pparse.cmx parsing/parsetree.cmi \ + parsing/parser.cmx parsing/parse.cmx utils/misc.cmx parsing/longident.cmx \ + parsing/location.cmx parsing/lexer.cmx parsing/depend.cmx \ + utils/config.cmx driver/compplugin.cmx driver/compenv.cmx \ + utils/clflags.cmx driver/makedepend.cmi +driver/main.cmo : driver/makedepend.cmi +driver/main.cmx : driver/makedepend.cmx +driver/optmain.cmo : driver/makedepend.cmi +driver/optmain.cmx : driver/makedepend.cmx diff --git a/.gitattributes b/.gitattributes index f78a284521..f4bdc362e6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -157,10 +157,12 @@ testsuite/tests/typing-typeparam/newtype.ml text eol=lf testsuite/tests/typing-unboxed/test.ml text eol=lf testsuite/tests/typing-unboxed-types/test.ml text eol=lf testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml text eol=lf +testsuite/tests/typing-warnings/application.ml text eol=lf testsuite/tests/typing-warnings/coercions.ml text eol=lf testsuite/tests/typing-warnings/exhaustiveness.ml text eol=lf testsuite/tests/typing-warnings/pr6872.ml text eol=lf testsuite/tests/typing-warnings/pr7085.ml text eol=lf testsuite/tests/typing-warnings/pr7115.ml text eol=lf +testsuite/tests/typing-warnings/pr7297.ml text eol=lf testsuite/tests/typing-warnings/records.ml text eol=lf testsuite/tests/typing-warnings/unused_types.ml text eol=lf diff --git a/.gitignore b/.gitignore index 218ab65670..39fc7569f2 100644 --- a/.gitignore +++ b/.gitignore @@ -186,7 +186,6 @@ /otherlibs/win32unix/chmod.c /otherlibs/win32unix/cst2constr.c /otherlibs/win32unix/cstringv.c -/otherlibs/win32unix/envir.c /otherlibs/win32unix/execv.c /otherlibs/win32unix/execve.c /otherlibs/win32unix/execvp.c @@ -315,6 +314,9 @@ /testsuite/tests/typing-multifile/c.ml /testsuite/tests/typing-multifile/d.mli /testsuite/tests/typing-multifile/e.ml +/testsuite/tests/typing-multifile/f.ml +/testsuite/tests/typing-multifile/g.ml +/testsuite/tests/typing-multifile/test /testsuite/tests/unboxed-primitive-args/main.ml /testsuite/tests/unboxed-primitive-args/stubs.c @@ -14,6 +14,7 @@ Alain Frisch <alain@frisch.fr> alainfrisch <alain@frisch.fr> <damien.doligez@inria.fr> <damien.doligez-inria.fr> <damien.doligez@inria.fr> <damien.doligez@gmail.com> +Luc Maranget <luc.maranget@inria.fr> <luc.maranget@inria.fr> <Luc.Maranget@inria.fr> <luc.maranget@inria.fr> <maranget@pl-59086.rocq.inria.fr> <pierre.chambart@ocamlpro.com> <chambart@users.noreply.github.com> @@ -25,6 +26,7 @@ Damien Doligez <damien.doligez@inria.fr> Some Name <some@name.com> Damien Doligez <damien.doligez@inria.fr> doligez <damien.doligez@inria.fr> Mohamed Iguernelala <mohamed.iguernelala@gmail.com> Jérémie Dimino <jdimino@janestreet.com> +Jeremy Yallop <yallop@gmail.com> yallop <yallop@gmail.com> # The aliases below correspond to preference expressed by # contributors on the name under which they credited, for example @@ -60,6 +62,7 @@ Florian Angeletti <octachron> Kenji Tokudome <pocarist> Philippe Veber <pveber> Valentin Gatien-Baron <sliquister> +Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> Stephen Dolan <stedolan> Junsong Li <lijunsong@mantis> Junsong Li <ljs.darkfish@gmail.com> @@ -73,13 +76,21 @@ Thomas Leonard <talex@mantis> Thomas Leonard <talex5@github> Adrien Nader <adrien-n@github> Sébastien Hinderer <shindere@github> +Sébastien Hinderer <Sebastien.Hinderer@inria.fr> Gabriel Scherer <gasche@github> Immanuel Litzroth <sdev@mantis> Jacques Le Normand <rathereasy@github> Konstantin Romanov <const-rs@github> +Arseniy Alekseyev <aalekseyev@janestreet.com> +Dwight Guth <dwight.guth@runtimeverification.com> +Dwight Guth <dwightguth@github> +Andreas Hauptmann <andreashauptmann@t-online.de> fdopen <andreashauptmann@t-online.de> +Andreas Hauptmann <andreashauptmann@t-online.de> <fdopen@users.noreply.github.com> +Hendrik Tews <hendrik@askra.de> +Hugo Heuzard <hugo.heuzard@gmail.com> # These contributors prefer to be referred to pseudonymously -<whitequark@mantis> <whitequark@mantis> +whitequark <whitequark@whitequark.org> <william@mantis> <william@mantis> tkob <ether4@gmail.com> tkob <ether4@gmail.com> ygrek <ygrek@autistici.org> ygrek <ygrek@autistici.org> diff --git a/.travis-ci.sh b/.travis-ci.sh index d15c50ec06..184e5e7736 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -1,3 +1,4 @@ +#!/bin/bash #************************************************************************** #* * #* OCaml * @@ -15,6 +16,30 @@ PREFIX=~/local +MAKE=make SHELL=dash + +# TRAVIS_COMMIT_RANGE has the form <commit1>...<commit2> +# TRAVIS_CUR_HEAD is <commit1> +# TRAVIS_PR_HEAD is <commit2> +# +# The following diagram illustrates the relationship between +# the commits: +# +# (trunk) (pr branch) +# TRAVIS_CUR_HEAD TRAVIS_PR_HEAD +# | / +# … … +# | / +# TRAVIS_MERGE_BASE +# +echo TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE +TRAVIS_CUR_HEAD=${TRAVIS_COMMIT_RANGE%%...*} +TRAVIS_PR_HEAD=${TRAVIS_COMMIT_RANGE##*...} +case $TRAVIS_EVENT_TYPE in + # If this is not a pull request then TRAVIS_COMMIT_RANGE may be empty. + pull_request) TRAVIS_MERGE_BASE=$(git merge-base $TRAVIS_CUR_HEAD $TRAVIS_PR_HEAD);; +esac + BuildAndTest () { case $XARCH in i386) @@ -35,37 +60,37 @@ EOF ./configure --prefix $PREFIX -with-debug-runtime \ -with-instrumented-runtime $CONFIG_ARG export PATH=$PREFIX/bin:$PATH - make world.opt - make ocamlnat - (cd testsuite && make all) - (cd testsuite && make USE_RUNTIME="d" all) - make install + $MAKE world.opt + $MAKE ocamlnat + (cd testsuite && $MAKE all) + (cd testsuite && $MAKE USE_RUNTIME="d" all) + $MAKE install # check_all_arches checks tries to compile all backends in place, # we need to redo (small parts of) world.opt afterwards - make check_all_arches - make world.opt - make manual-pregen + $MAKE check_all_arches + $MAKE world.opt + $MAKE manual-pregen mkdir external-packages cd external-packages git clone git://github.com/ocaml/ocamlbuild mkdir ocamlbuild-install (cd ocamlbuild && - make -f configure.make Makefile.config src/ocamlbuild_config.ml \ + $MAKE -f configure.make Makefile.config src/ocamlbuild_config.ml \ OCAMLBUILD_PREFIX=$PREFIX \ OCAMLBUILD_BINDIR=$PREFIX/bin \ OCAMLBUILD_LIBDIR=$PREFIX/lib \ OCAML_NATIVE=true \ OCAML_NATIVE_TOOLS=true && - make all && - make install) + $MAKE all && + $MAKE install) git clone git://github.com/ocaml/camlp4 (cd camlp4 && ./configure --bindir=$PREFIX/bin --libdir=$PREFIX/lib/ocaml \ --pkgdir=$PREFIX/lib/ocaml && \ - make && make install) + $MAKE && $MAKE install) # git clone git://github.com/ocaml/opam # (cd opam && ./configure --prefix $PREFIX &&\ - # make lib-ext && make && make install) + # $MAKE lib-ext && $MAKE && $MAKE install) # git config --global user.email "some@name.com" # git config --global user.name "Some Name" # opam init -y -a git://github.com/ocaml/opam-repository @@ -96,12 +121,12 @@ on the github pull request. ------------------------------------------------------------------------ EOF # check that Changes has been modified - git diff $TRAVIS_COMMIT_RANGE --name-only --exit-code Changes > /dev/null \ + git diff $TRAVIS_MERGE_BASE..$TRAVIS_PR_HEAD --name-only --exit-code Changes > /dev/null \ && CheckNoChangesMessage || echo pass } CheckNoChangesMessage () { - if test -n "$(git log --grep="[Nn]o [Cc]hange.* needed" --max-count=1 $TRAVIS_COMMIT_RANGE)" + if test -n "$(git log --grep="[Nn]o [Cc]hange.* needed" --max-count=1 ${TRAVIS_MERGE_BASE}..${TRAVIS_PR_HEAD})" then echo pass elif test -n "$(curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/issues/$TRAVIS_PULL_REQUEST/labels \ | grep 'no-change-entry-needed')" @@ -130,7 +155,7 @@ does *not* imply that your change is appropriately tested. ------------------------------------------------------------------------ EOF # check that at least a file in testsuite/ has been modified - git diff $TRAVIS_COMMIT_RANGE --name-only --exit-code testsuite > /dev/null \ + git diff $TRAVIS_MERGE_BASE..$TRAVIS_PR_HEAD --name-only --exit-code testsuite > /dev/null \ && exit 1 || echo pass } diff --git a/.travis.yml b/.travis.yml index 82e76c5f57..2719adcf92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ script: bash -ex .travis-ci.sh matrix: include: - env: CI_KIND=build XARCH=i386 - - env: CI_KIND=build XARCH=i386 CONFIG_ARG=-flambda + - env: CI_KIND=build XARCH=i386 CONFIG_ARG=-flambda OCAMLRUNPARAM=b,v=0 - env: CI_KIND=changes - env: CI_KIND=tests allow_failures: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb6fabb3da..c3c5bcbd7d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -176,12 +176,10 @@ Any user-visible change should have a `Changes` entry: from a commit message, but it should make sense to end-users reading release notes) -- crediting the people that worked on the feature - - The people that wrote the code should be credited of course, - but also substantial code reviews or design advice, and the - reporter of the bug (if applicable) or designer of the - feature request (if novel). +- crediting the people that worked on the feature. The people that + wrote the code should be credited of course, but also substantial + code reviews or design advice, and the reporter of the bug + (if applicable) or designer of the feature request (if novel). - following the format @@ -8,9 +8,23 @@ Working version (Runhang Li, reivew by Jeremy Yallop, Leo White, Jacques Garrigue, and Florian Angeletti) +- GPR#1142: Mark assertions nonexpansive, so that 'assert false' + can be used as a placeholder for a polymorphic function. + (Stephen Dolan) + +* GPR#1232: Support Unicode character escape sequences in string + literals via the \u{X+} syntax. These escapes are substituted by the + UTF-8 encoding of the Unicode character. + (Daniel Bünzli, review by Damien Doligez, Alain Frisch, Xavier + Leroy and Leo White) + +- GPR#1249, MPR#6271, MPR#7529: Support "let open M in ..." + in class expressions and class type expressions. + (Alain Frisch, reviews by Thomas Refis and Jacques Garrigue) + ### Code generation and optimizations: -- PR#5324, GPR#375: An alternative Linear Scan register allocator for +- MPR#5324, GPR#375: An alternative Linear Scan register allocator for ocamlopt, activated with the -linscan command-line flag. This allocator represents a trade-off between worse generated code performance for higher compilation speed (especially interesting in @@ -23,16 +37,19 @@ Working version bundles. (whitequark) -* GPR#659: Remove support for SPARC native code generation - (Mark Shinwell) +- MPR#7447, GPR#995: incorrect code generation for nested recursive bindings + (Leo White and Jeremy Yallop, report by Stephen Dolan) - MPR#7501, GPR#1089: Consider arrays of length zero as constants -- PR#7501, GPR#1089: Consider arrays of length zero as constants +- MPR#7501, GPR#1089: Consider arrays of length zero as constants when using Flambda. (Pierre Chambart, review by Mark Shinwell and Leo White) -- GPR#1150: Fix typo in arm64 assembler directives - (KC Sivaramakrishnan) +- MPR#7531, GPR#1162: Erroneous code transformation at partial applications + (Mark Shinwell) + +* GPR#659: Remove support for SPARC native code generation + (Mark Shinwell) - GPR#1143: tweaked several allocation functions in the runtime by checking for likely conditions before unlikely ones and eliminating @@ -40,16 +57,34 @@ Working version (Markus Mottl, review by Alain Frisch, Xavier Leroy, Gabriel Scherer, Mark Shinwell and Leo White) +- MPR#7531, GPR#1162: Erroneous code transformation at partial applications + (Mark Shinwell) + ### Standard library: +- GPR#1217: Restrict Unix.environment in privileged contexts; add + Unix.unsafe_environment. + (Jeremy Yallop, review by Mark Shinwell, Nicolas Ojeda Bar, + Damien Doligez and Hannes Mehnert) + - GRP#1119: Change Set (private) type to inline records. (Albin Coquereau) -- PR#1771, PR#7309, GPR#1026: Add update to maps. Allows to update a +- MPR#1771, MPR#7309, GPR#1026: Add update to maps. Allows to update a binding in a map or create a new binding if the key had no binding (Sébastien Briais, review by Daniel Buenzli, Alain Frisch and Gabriel Scherer) +- MPR#7515, GPR#1147: Arg.align now optionally uses the tab character '\t' to + separate the "unaligned" and "aligned" parts of the documentation string. If + tab is not present, then space is used as a fallback. Allows to have spaces in + the unaligned part, which is useful for Tuple options. + (Nicolas Ojeda Bar, review by Alain Frisch and Gabriel Scherer) + +- GPR#997, GPR#1077: Deprecate Bigarray.*.map_file and add Unix.map_file as a + first step towards moving Bigarray to the stdlib + (Jérémie Dimino and Xavier Leroy) + - GPR#1034: Add List.init (Richard Degenne, review by David Allsopp, Thomas Braibant, Florian Angeletti, Gabriel Scherer, Nathan Moreau, Alain Frisch) @@ -62,9 +97,26 @@ Working version values. (Daniel Bünzli, review by Damien Doligez, Max Mouratov) +- GPR#1175: bigarray, add a change_layout function to each Array[N] + submodules. + (Florian Angeletti) + - Resurrect tabulation boxes in module Format. Rewrite/extend documentation of tabulation boxes. +* GPR#943: Fixed the divergence of the Pervasives module between the stdlib + and threads implementations. In rare circumstances this can change the + behavior of existing applications: the implementation of Pervasives.close_out + used when compiling with thread support was inconsistent with the manual. + It will now not suppress exceptions escaping Pervasives.flush anymore. + Developers who want the old behavior should use Pervasives.close_out_noerr + instead. The stdlib implementation, used by applications not compiled + with thread support, will now only suppress Sys_error exceptions in + Pervasives.flush_all. This should allow exceedingly unlikely assertion + exceptions to escape, which could help reveal bugs in the standard library. + (Markus Mottl, review by Hezekiah M. Carty, Jeremie Dimino, Damien Doligez, + Alain Frisch, Xavier Leroy, Gabriel Scherer and Mark Shinwell) + ### Compiler user-interface and warnings: - GPR#896: "-compat-32" is now taken into account when building .cmo/.cma @@ -81,33 +133,52 @@ Working version ### Manual and documentation: -- PR#6548: remove obsolete limitation in the description of private +- MPR#6548: remove obsolete limitation in the description of private type abbreviations (Florian Angeletti, suggestion by Leo White) -- PR#6676, GPR#1110: move record notation to tutorial +- MPR#6676, GPR#1110: move record notation to tutorial (Florian Angeletti, review by Gabriel Scherer) -- PR#6676, GPR#1112: move local opens to tutorial +- MPR#6676, GPR#1112: move local opens to tutorial (Florian Angeletti) -- PR#6676, GPR#1153: move overriding class definitions to reference +- MPR#6676, GPR#1153: move overriding class definitions to reference manual and tutorial (Florian Angeletti) -- PR#6709: document the associativity and precedence level of +- MPR#6709: document the associativity and precedence level of pervasive operators (Florian Angeletti, review by David Allsopp) -- PR#7254, GPR#1096: Rudimentary documentation of ocamlnat +- MPR#7254, GPR#1096: Rudimentary documentation of ocamlnat (Mark Shinwell) -- PR#7507: Align the description of the printf conversion +- MPR#7507: Align the description of the printf conversion specification "%g" with the ISO C90 description. (Florian Angeletti) +- MPR#7551, GPR#1194 : make the final ";;" potentially optional in + caml_example + (Florian Angeletti, review and suggestion by Gabriel Scherer) + +- GPR#1187: Minimal documentation for compiler plugins + (Florian Angeletti) + +- GPR#1220: Fix "-keep-docs" option in ocamlopt manpage + (Etienne Millon) + ### Tools: +- MPR#7575, GPR#1219: Switch default from -no-keep-locs to -keep-locs. This + provides better error messages by default. + (Daniel Bünzli) + +- GPR#1078: add a subcommand "-depend" to "ocamlc" and "ocamlopt", + to behave as ocamldep. Should be used mostly to replace "ocamldep" in the + "boot" directory to reduce its size in the future. + (Fabrice Le Fessant) + - GPR#1045: ocamldep, add a "-shared" option to generate dependencies for native plugin files (i.e. .cmxs files) (Florian Angeletti, suggestion by Sébastien Hinderer) @@ -116,22 +187,36 @@ Working version linked names not namespaced with caml_ (Stephen Dolan) -- PR#6928: ocamldoc, do not introduce an empty <h1> in index.html when +- MPR#6928: ocamldoc, do not introduce an empty <h1> in index.html when no -title has been provided (Pierre Boutillier) -* PR#7351: ocamldoc, use semantic tags rather than <br> tags in the html +* MPR#7351: ocamldoc, use semantic tags rather than <br> tags in the html backend (Florian Angeletti, request and review by Daniel Bünzli ) -* PR#7352,PR#7353: ocamldoc, better paragraphs in html output +* MPR#7352,PR#7353: ocamldoc, better paragraphs in html output (Florian Angeletti, request by Daniel Bünzli) -- PR#7521, GPR#1159: ocamldoc, end generated latex file with a new line +- MPR#7521, GPR#1159: ocamldoc, end generated latex file with a new line (Florian Angeletti) +- GPR#1012: ocamlyacc, fix parsing of raw strings and nested comments, as well + as the handling of ' characters in identifiers. + (Demi Obenour) + +- GPR#1036: ocamlcmt (tools/read_cmt) is installed, converts .cmt to .annot + (Fabrice Le Fessant) + +- GPR#1180: Add support for recording numbers of direct and indirect + calls over the lifetime of a program when using Spacetime profiling + (Mark Shinwell) + ### Compiler distribution build system +- MPR#6373, GPR#1093: Suppress trigraph warnings from macOS assembler + (Mark Shinwell) + - GPR#558: enable shared library and natdynlink support on more Linux platforms (Felix Janda, Mark Shinwell) @@ -139,17 +224,31 @@ Working version * GPR#1104: remove support for the NeXTStep platform (Sébastien Hinderer) -- PR#1130: enable detection of IBM XL C compiler (one need to run configure +- GPR#1130: enable detection of IBM XL C compiler (one need to run configure with "-cc <path to xlc compiler>"). Enable shared library support for bytecode executables on AIX/xlc (tested on AIX 7.1, XL C 12). To enable 64-bit, run both "configure" and "make world" with OBJECT_MODE=64. (Konstantin Romanov, Enrique Naudon) +- GPR#1203: speed up the manual build by using ocamldoc.opt + (Gabriel Scherer, review by Florian Angeletti) + +- GPR#1242: disable C plugins loading by default + (Alexey Egorov) + ### Internal/compiler-libs changes: -- PR#6826, GPR#828, GPR#834: improve compilation time for open +- MPR#6826, GPR#828, GPR#834: improve compilation time for open (Alain Frisch, review by Frédéric Bour and Jacques Garrigue) +- MPR#7514, GPR#1152: add -dprofile option, similar to -dtimings but + also displays memory allocation and consumption + (Valentin Gatien-Baron, report by Gabriel Scherer) + +- GPR#406: remove polymorphic comparison for Types.constructor_tag in compiler + (Dwight Guth, review by Gabriel Radanne, Damien Doligez, Gabriel Scherer, + Pierre Chambart, Mark Shinwell) + - GPR#1032: display the output of -dtimings as a hierarchy (Valentin Gatien-Baron, review by Gabriel Scherer) @@ -164,52 +263,84 @@ Working version ### Bug fixes +- PR#248: unique names for weak type variables + (Florian Angeletti, review by Frédéric Bour, Jacques Garrigue, + Gabriel Radanne and Gabriel Scherer) + - PR#5927: Type equality broken for conjunctive polymorphic variant tags +- MPR#5927: Type equality broken for conjunctive polymorphic variant tags (Jacques Garrigue, report by Leo White) -- PR#6587: only elide Pervasives from printed type paths in unambiguous context +- MPR#6587: only elide Pervasives from printed type paths in unambiguous context (Florian Angeletti and Jacques Garrigue) -- PR#6934: nonrec misbehaves with GADTs +- MPR#6934: nonrec misbehaves with GADTs (Jacques Garrigue, report by Markus Mottl) -- PR#7070, GPR#1139: Unexported values can cause non-generalisable variables +- MPR#7070, GPR#1139: Unexported values can cause non-generalisable variables error (Leo White) -- PR#7261: Warn on type constraints in GADT declarations +- MPR#7261: Warn on type constraints in GADT declarations (Jacques Garrigue, report by Fabrice Le Botlan) -- PR#7321: Private type in signature clashes with type definition via +- MPR#7321: Private type in signature clashes with type definition via functor instantiation (Jacques Garrigue, report by Markus Mottl) -- PR#7372, GPR#834: fix type-checker bug with GADT and inline records +- MPR#7372, GPR#834: fix type-checker bug with GADT and inline records (Alain Frisch, review by Frédéric Bour and Jacques Garrigue) -- PR#7344: Inconsistent behavior with type annotations on let +- MPR#7344: Inconsistent behavior with type annotations on let (Jacques Garrigue, report by Leo White) -- PR#7468: possible GC problem in caml_alloc_sprintf +- MPR#7468: possible GC problem in caml_alloc_sprintf (Xavier Leroy, discovery by Olivier Andrieu) -- PR#7496: Fixed conjunctive polymorphic variant tags do not unify +- MPR#7496: Fixed conjunctive polymorphic variant tags do not unify with themselves (Jacques Garrigue, report by Leo White) -- PR#7506: pprintast ignores attributes in tails of a list +- MPR#7506: pprintast ignores attributes in tails of a list (Alain Frisch, report by Kenichi Asai and Gabriel Scherer) +- MPR#7540, GPR#1179: Fixed setting of breakpoints within packed modules + for ocamldebug + (Hugo Herbelin, review by Gabriel Scherer, Damien Doligez) + +- MPR#7543: short-paths printtyp can fail on packed type error messages + (Florian Angeletti) + - GPR#1155: Fix a race condition with WAIT_NOHANG on Windows (Jérémie Dimino and David Allsopp) -- PR#7513: List.compare_length_with mishandles negative numbers / overflow +- MPR#7513: List.compare_length_with mishandles negative numbers / overflow (Fabrice Le Fessant, report by Jeremy Yallop) -- PR#7531a: Default argument is not evaluated even after passing a +- MPR#7531a: Default argument is not evaluated even after passing a non-labeled argument (Jacques Garrigue, report by Stephen Dolan) +- MPR#7563, GPR#1210: code generation bug when a module alias and + an extension constructor have the same name in the same module + (Gabriel Scherer, report by Manuel Fähndrich, + review by Jacques Garrigue and Leo White) + +- GPR#1199: Pretty-printing formatting cleanup in pprintast + (Ethan Aubin, suggestion by Gabriel Scherer, review by David Allsopp, + Florian Angeletti, and Gabriel Scherer) + +- MPR#7564, GPR#1211: Allow forward slashes in the target of symbolic links + created by Unix.symlink under Windows. + (Nicolas Ojeda Bar, review by David Allsopp) + +- GPR#1223: Fix corruption of the environment when using -short-paths + with the toplevel. + (Leo White, review by Alain Frisch) + +- Fix pprintast for #... infix operators + (Alain Frisch, report by Omar Chebib) + ### Runtime system: - GPR#71: The runtime can now be shut down gracefully by means of the new @@ -224,6 +355,15 @@ Working version Next major version (4.05.0): ---------------------------- +OCaml 4.05.0 (TBD): +---------------------------- +OCaml 4.05.0 (13 Jul 2017): +--------------------------- +- GPR#1073: Remove statically allocated compare stack. + (Stephen Dolan) + +OCaml 4.05.0 (13 Jul 2017): +--------------------------- (Changes that can break existing programs are marked with a "*") @@ -234,12 +374,16 @@ Next major version (4.05.0): - MPR#7201, GPR#954: Correct wrong optimisation of "0 / <expr>" and "0 mod <expr>" in the case when <expr> was a non-constant evaluating to zero - (Mark Shinwell) + (Mark Shinwell, review by Gabriel Scherer, Leo White and Xavier Leroy) - MPR#7357, GPR#832: Improve compilation time for toplevel include(struct ... end : sig ... end) (Alain Frisch, report by Hongbo Zhang, review by Jacques Garrigue) +- MPR#7533, GPR#1173: Correctly perform side effects for certain + cases of "/" and "mod" + (Mark Shinwell, report by Jan Mitgaard) + - GPR#504: Instrumentation support for fuzzing with afl-fuzz. (Stephen Dolan, review by Alain Frisch, Pierre Chambart, Mark Shinwell, Gabriel Scherer and Damien Doligez) @@ -252,13 +396,30 @@ Next major version (4.05.0): - PR#7533, GPR#1173: Correctly perform side effects for certain cases of "/" and "mod" (Mark Shinwell, report by Jan Mitgaard) +- GPR#863, GPR#1068, GPR#1069: Optimise matches with constant + results to lookup tables. + (Stephen Dolan, review by Gabriel Scherer, Pierre Chambart, + Mark Shinwell, and bug report by Gabriel Scherer) + +- GPR#1150: Fix typo in arm64 assembler directives + (KC Sivaramakrishnan) + +- PR#7533, GPR#1173: Correctly perform side effects for certain + cases of "/" and "mod" + (Mark Shinwell, report by Jan Mitgaard) +- GPR#1150: Fix typo in arm64 assembler directives + (KC Sivaramakrishnan) ### Runtime system: - MPR#385, GPR#953: Add caml_startup_exn (Mark Shinwell) +- MPR#385, GPR#953: Add caml_startup_exn + (Mark Shinwell) + - PR#7423, GPR#946: expose new exception-raising functions +- MPR#7423, GPR#946: expose new exception-raising functions `void caml_{failwith,invalid_argument}_value(value msg)` in addition to `void caml_{failwith,invalid_argument}(char const *msg)`. @@ -267,27 +428,42 @@ Next major version (4.05.0): passed to the new functions are handled by the garbage collector. (Gabriel Scherer, review by Mark Shinwell, request by Immanuel Litzroth) +- MPR#7557, GPR#1213: More security for getenv + (Damien Doligez, reports by Seth Arnold and Eric Milliken, review by + Xavier Leroy, David Allsopp, Stephen Dolan, Hannes Mehnert) + +- GPR#795: remove 256-character limitation on Sys.executable_name + (Xavier Leroy) + +- PR#7557, GPR#1213: More security for getenv + (Damien Doligez, reports by Seth Arnold and Eric Milliken, review by + Xavier Leroy, David Allsopp, Stephen Dolan, Hannes Mehnert) + - GPR#795: remove 256-character limitation on Sys.executable_name (Xavier Leroy) - GPR#891: Use -fno-builtin-memcmp when building runtime with gcc. (Leo White) -- GPR#1073: Remove statically allocated compare stack. - (Stephen Dolan) - ### Type system: -- PR#6608, GPR#901: unify record types when overriding all fields +- MPR#6608, GPR#901: unify record types when overriding all fields (Tadeu Zagallo and Gabriel Scherer, report by Jeremy Yallop, review by David Allsopp, Jacques Garrigue) -* PR#7414, GPR#929: Soundness bug with non-generalized type variables and functors. +* MPR#7414, GPR#929: Soundness bug with non-generalized type variables and + functors. + (compatibility: some code using module-global mutable state will + fail at compile-time and is fixed by adding extra annotations; + see the Mantis and Github discussions.) + (Jacques Garrigue, report by Leo White) +* PR#7414, GPR#929: Soundness bug with non-generalized type variables and + functors. (Jacques Garrigue, report by Leo White) ### Compiler user-interface and warnings: -- PR#7050, GPR#748 GPR#843 GPR#864: new `-args/-args0 <file>` parameters to +- MPR#7050, GPR#748 GPR#843 GPR#864: new `-args/-args0 <file>` parameters to provide extra command-line arguments in a file -- see documentation. User programs may implement similar options using the new `Expand` constructor of the `Arg` module. @@ -295,21 +471,22 @@ Next major version (4.05.0): and Damien Doligez, discussion with Alain Frisch and Xavier Leroy, feature request from the Coq team) -- PR#7137, GPR#960: "-open" command line flag now accepts a module path - (not a module name) (Arseniy Alekseyev and Leo White) +- MPR#7137, GPR#960: "-open" command line flag now accepts + a module path (not a module name) + (Arseniy Alekseyev and Leo White) -- PR#7172, GPR#970: add extra (ocamlc -config) options +- MPR#7172, GPR#970: add extra (ocamlc -config) options int_size, word_size, ext_exe (Gabriel Scherer, request by Daniel Bünzli) -- PR#7315, GPR#736: refine some error locations +- MPR#7315, GPR#736: refine some error locations (Gabriel Scherer and Alain Frisch, report by Matej KoÅ¡Ãk) -- PR#7473, GPR#1025: perform proper globbing for command-line arguments on +- MPR#7473, GPR#1025: perform proper globbing for command-line arguments on Windows (Jonathan Protzenko) -- PR#7479: make sure "ocamlc -pack" is only given .cmo and .cmi files, +- MPR#7479: make sure "ocamlc -pack" is only given .cmo and .cmi files, and that "ocamlopt -pack" is only given .cmx and .cmi files. (Xavier Leroy) @@ -321,7 +498,7 @@ Next major version (4.05.0): - GPR#911: ocamlc/ocamlopt do not pass warnings-related options to C compiler when called to compile third-party C source files - (Sébastien Hinderer) + (Sébastien Hinderer, review by Adrien Nader and David Allsopp) - GPR#915: fix -dsource (pprintast.ml) bugs (Runhang Li, review by Alain Frisch) @@ -339,6 +516,10 @@ Next major version (4.05.0): (Xavier Leroy) - GPR#1015: add option "-plugin PLUGIN" to ocamldep too. Use compilerlibs + to build ocamldep. Add option "-depend" to ocamlc/ocamlopt to behave + as ocamldep. Remove any use of ocamldep to build the distribution. +- GPR#1015: add option "-plugin PLUGIN" to ocamldep too. Use compilerlibs + to build ocamldep. to build ocamldep. (Fabrice Le Fessant) @@ -355,10 +536,19 @@ Next major version (4.05.0): ### Standard library: -- PR#6975, GPR#902: Truncate function added to stdlib Buffer module +- MPR#6975, GPR#902: Truncate function added to stdlib Buffer module (Dhruv Makwana, review by Alain Frisch and Gabriel Scherer) -- PR#7279 GPR#710: `Weak.get_copy` `Ephemeron.*_copy` doesn't copy anymore custom blocks +- MPR#7279, GPR#710: `Weak.get_copy` `Ephemeron.*_copy` doesn't copy + custom blocks anymore + (François Bobot, Alain Frisch, bug reported by Martin R. Neuhäußer, + review by Thomas Braibant and Damien Doligez) + +* MPR#7500, GPR#1081: Remove Uchar.dump + (Daniel Bünzli) + +- PR#7279 GPR#710: `Weak.get_copy` `Ephemeron.*_copy` doesn't copy + custom blocks anymore (François Bobot, Alain Frisch, bug reported by Martin R. Neuhäußer, review by Thomas Braibant and Damien Doligez) @@ -367,13 +557,13 @@ Next major version (4.05.0): - GPR#760: Add a functions List.compare_lengths and List.compare_length_with to avoid full list length computations - (Fabrice Le Fessant) + (Fabrice Le Fessant, review by Leo White, Josh Berdine and Gabriel Scherer) - GPR#778: Arg: added option Expand that allows to expand a string argument to a string array of new arguments - (Bernhard Schommer) + (Bernhard Schommer, review by Gabriel Scherer and Jérémie Dimino) -- GPR#849: Exposed Spacetime.enabled value +- GPR#849: Expose a Spacetime.enabled value (Leo White) - GPR#885: Option-returning variants of stdlib functions @@ -387,10 +577,13 @@ Next major version (4.05.0): - GPR#875: Add missing functions to ArrayLabels, BytesLabels, ListLabels, MoreLabels, StringLabels so they are compatible with - non-labeled counterparts. - (Roma Sokolov) + non-labeled counterparts. Also add missing @@ocaml.deprecated attributes + in StringLabels and BytesLabels. + (Roma Sokolov, review by Gabriel Scherer, Jacques Garrigue, + Gabriel Radanne, Alain Frisch) -- GPR#999: Arg, do not repeat thrice usage_msg when reporting an error +- GPR#999: Arg, do not repeat the usage message thrice when reporting an error + (this was a regression in 4.03) (Florian Angeletti, review by Gabriel Scherer) - GPR#1042: Fix escaping of command-line arguments in @@ -400,7 +593,7 @@ Next major version (4.05.0): ### Debugging and profiling: -- PR#7258: ocamldebug's "install_printer" command had problems with +- MPR#7258: ocamldebug's "install_printer" command had problems with module aliases (Xavier Leroy) @@ -411,13 +604,36 @@ Next major version (4.05.0): ### Manual and documentation: -- PR#6597, GPR#1030: add forward references to language extensions +- MPR#6597, GPR#1030: add forward references to language extensions that extend non-terminal symbols in the language reference section. (Florian Angeletti, review by Gabriel Scherer) +- MPR#7497, GPR#1095: manual, enable numbering for table of contents + (Florian Angeletti, request by Daniel Bünzli) + +- MPR#7539, GPR#1181: manual, update dead links in ocamldoc chapter + (Florian Angeletti) + +- GPR#633: manpage and manual documentation for the `-opaque` option + (Konstantin Romanov, Gabriel Scherer, review by Mark Shinwell) + +- GPR#751, GPR#925: add a HACKING.adoc file to contain various + tips and tricks for people hacking on the repository. See also + CONTRIBUTING.md for advice on sending contributions upstream. + (Gabriel Scherer and Gabriel Radanne, review by David Allsopp, + inspired by John Whitington) + +- GPR#916: new tool lintapidiff, use it to update the manual with + @since annotations for API changes introduced between 4.00-4.05. + (Edwin Török, review by Gabriel Scherer, discussion with Alain Frisch, + David Allsopp, Sébastien Hinderer, Damien Doligez and Xavier Leroy) + - PR#7497, GPR#1095: manual, enable numbering for table of contents (Florian Angeletti, request by Daniel Bünzli) +- PR#7539, GPR#1181: manual, update dead links in ocamldoc chapter + (Florian Angeletti) + - GPR#633: manpage and manual documentation for the `-opaque` option (Konstantin Romanov, Gabriel Scherer, review by Mark Shinwell) @@ -437,20 +653,14 @@ Next major version (4.05.0): (Gabriel Scherer, request by Matthew Wahab in GPR#1066, review by Florian Angeletti) -- add a HACKING.adoc file to contain various tips and tricks for - people hacking on the repository. See also CONTRIBUTING.md for - advice on sending contributions upstream. - (Gabriel Scherer and Gabriel Radanne, review by David Allsopp, - inspired by John Whitington) - ### Other libraries: -- PR#7158: Event.sync, Mutex.create, Condition.create cause too many GCs. +- MPR#7158: Event.sync, Mutex.create, Condition.create cause too many GCs. The fix is to no longer consider mutexes and condition variables as rare kernel resources. (Xavier Leroy) -- PR#7264: document the different behaviors of Unix.lockf under POSIX +- MPR#7264: document the different behaviors of Unix.lockf under POSIX and under Win32. (Xavier Leroy, report by David Allsopp) @@ -459,9 +669,9 @@ Next major version (4.05.0): (Laurent Mazare, review by Gabriel Scherer, Alain Frisch and Hezekiah M. Carty) -* PR#7342, GPR#797: fix Unix.read on pipes with no data left on Windows +* MPR#7342, GPR#797: fix Unix.read on pipes with no data left on Windows it previously raised an EPIPE error, it now returns 0 like other OSes - (Jonathan Protzenko) + (Jonathan Protzenko, review by Andreas Hauptmann and Damien Doligez) - GPR#650: in the Unix library, add `?cloexec:bool` optional arguments to functions that create file descriptors (`dup`, `dup2`, `pipe`, `socket`, @@ -471,7 +681,8 @@ Next major version (4.05.0): reducing the risk of race conditions with `exec` or `create_process` calls running in other threads, and improving security. Also: add a `O_KEEPEXEC` flag for `openfile` by symmetry with `O_CLOEXEC`. - (Xavier Leroy) + (Xavier Leroy, review by Mark Shinwell, David Allsopp and Alain Frisch, + request by Romain Beauxis) - GPR#996: correctly update caml_top_of_stack in systhreads (Fabrice Le Fessant) @@ -479,18 +690,21 @@ Next major version (4.05.0): - GPR#997, GPR#1077: Deprecate Bigarray.*.map_file and add Unix.map_file as a first step towards moving Bigarray to the stdlib (Jérémie Dimino and Xavier Leroy) +### Toplevel: ### Toplevel: +- MPR#7060, GPR#1035: Print exceptions in installed custom printers + (Tadeu Zagallo, review by David Allsopp) - PR#7060, GPR#1035: Print exceptions in installed custom printers (Tadeu Zagallo, review by David Allsopp) ### Tools: -- PR#5163: ocamlobjinfo, dump globals defined by bytecode executables +- MPR#5163: ocamlobjinfo, dump globals defined by bytecode executables (Stéphane Glondu) -- PR#7333: ocamldoc, use the first sentence of text file as +- MPR#7333: ocamldoc, use the first sentence of text file as a short description in overviews. (Florian Angeletti) @@ -502,10 +716,6 @@ Next major version (4.05.0): to solve ocamlbuild+doc usability issue (ocaml/ocamlbuild#79) (Gabriel Scherer, review by Florian Angeletti, discussion with Daniel Bünzli) -* GPR#1012: ocamlyacc, fix parsing of raw strings and nested comments, as well - as the handling of ' characters in identifiers. - (Demi Obenour) - - GPR#1017: ocamldoc, add an option to detect code fragments that could be transformed into a cross-reference to a known element. (Florian Angeletti, review and suggestion by David Allsopp) @@ -513,14 +723,22 @@ Next major version (4.05.0): - clarify ocamldoc text parsing error messages (Gabriel Scherer) -- GPR#1036: ocamlcmt (tools/read_cmt) is installed, converts .cmt to .annot - (Fabrice Le Fessant) +### Compiler distribution build system: ### Compiler distribution build system: - PR#7377: remove -std=gnu99 for newer gcc versions +- MPR#7377: remove -std=gnu99 for newer gcc versions (Damien Doligez, report by ygrek) +- PR#7452, GPR#1228: tweak GCC options to try to avoid the + Skylake/Kaby lake bug + (Damien Doligez, review by David Allsopp, Xavier Leroy and Mark Shinwell) + +- MPR#7452, GPR#1228: tweak GCC options to try to avoid the + Skylake/Kaby lake bug + (Damien Doligez, review by David Allsopp, Xavier Leroy and Mark Shinwell) + - GPR#693: fail on unexpected errors or warnings within caml_example environment. (Florian Angeletti) @@ -554,7 +772,7 @@ Next major version (4.05.0): - GPR#932: install ocaml{c,lex}->ocaml{c,lex}.byte symlink correctly when the opt target is built but opt.opt target is not. - (whitequark) + (whitequark, review by Gabriel Scherer) - GPR#935: allow build in Android's termux (ygrek, review by Gabriel Scherer) @@ -661,23 +879,34 @@ The complete list of changes is listed below. - GPR#881: change `Outcometree.out_variant` to be more general. `Ovar_name of out_ident * out_type list` becomes `Ovar_type of out_type`. - (Valentin Gatien-Baron) + (Valentin Gatien-Baron, review by Leo White) - GPR#908: refactor PIC-handling in the s390x backend - (Gabriel Scherer) + (Gabriel Scherer, review by Xavier Leroy and Mark Shinwell) ### Bug fixes -- PR#5115: protect all byterun/fail.c functions against +- MPR#5115: protect all byterun/fail.c functions against uninitialized caml_global_data (only changes the bytecode behavior) (Gabriel Scherer, review by Xavier Leroy) +- MPR#6136, GPR#967: Fix Closure so that overapplication evaluation order + matches the bytecode compiler and Flambda. + (Mark Shinwell, report by Jeremy Yallop, review by Frédéric Bour) + +- MPR#6550, GPR#1094: Allow creation of empty .cmxa files on macOS + (Mark Shinwell) + +- MPR#6594, GPR#955: Remove "Istore_symbol" specific operation on x86-64. + This is more robust and in particular avoids assembly failures on Win64. + (Mark Shinwell, review by Xavier Leroy, testing by David Allsopp and + Olivier Andrieu) + - PR#6136, GPR#967: Fix Closure so that overapplication evaluation order matches the bytecode compiler and Flambda. (Mark Shinwell, report by Jeremy Yallop, review by Frédéric Bour) - PR#6550, GPR#1094: Allow creation of empty .cmxa files on macOS -- PR#6373, GPR#1093: Suppress trigraph warnings from macOS assembler (Mark Shinwell) - PR#6594, GPR#955: Remove "Istore_symbol" specific operation on x86-64. @@ -687,90 +916,93 @@ The complete list of changes is listed below. - PR#6903: Unix.execvpe doesn't change environment on Cygwin (Xavier Leroy) +- MPR#6903: Unix.execvpe doesn't change environment on Cygwin + (Xavier Leroy, report by Adrien Nader) -- PR#6987: Strange error message probably caused by universal variable escape - (with polymorphic variants) - (report by Leo White) +- MPR#6987: Strange error message probably caused by + universal variable escape (with polymorphic variants) + (Jacques Garrigue, report by Mikhail Mandrykin and Leo White) -- PR#7216, GPR#949: don't require double parens in Functor((val x)) +- MPR#7216, GPR#949: don't require double parens in Functor((val x)) (Jacques Garrigue, review by Valentin Gatien-Baron) -- PR#7331: ocamldoc, avoid infinite loop in presence of self alias, +- MPR#7331: ocamldoc, avoid infinite loop in presence of self alias, i.e. module rec M:sig end = M (Florian Angeletti, review Gabriel Scherer) -- PR#7346, GPR#966: Fix evaluation order problem whereby expressions could +- MPR#7346, GPR#966: Fix evaluation order problem whereby expressions could be incorrectly re-ordered when compiling with Flambda. This also fixes one example of evaluation order in the native code compiler not matching the bytecode compiler (even when not using Flambda) (Mark Shinwell, Leo White, code review by Pierre Chambart) -- PR#7407: Two not-quite-standard C idioms rejected by SUNWSPro compilers +- MPR#7348: Private row variables can escape their scope + (Jacques Garrigue, report by Leo White) + +- MPR#7407: Two not-quite-standard C idioms rejected by SUNWSPro compilers (Xavier Leroy) -- PR#7421: Soundness bug with GADTs and lazy +- MPR#7421: Soundness bug with GADTs and lazy (Jacques Garrigue, report by Leo White) -- PR#7424: Typechecker diverges on unboxed type declaration +- MPR#7424: Typechecker diverges on unboxed type declaration (Jacques Garrigue, report by Stephen Dolan) -- PR#7426, GPR#965: Fix fatal error during object compilation (also +- MPR#7426, GPR#965: Fix fatal error during object compilation (also introduces new [Pfield_computed] and [Psetfield_computed] primitives) - (Mark Shinwell) + (Mark Shinwell, report by Ulrich Singer) -- PR#7427, GPR#959: Don't delete let bodies in Cmmgen - (Mark Shinwell) +- MPR#7427, GPR#959: Don't delete let bodies in Cmmgen + (Mark Shinwell, report by Valentin Gatien-Baron) -- PR#7432: Linking modules compiled with -labels and -nolabels is not safe +- MPR#7432: Linking modules compiled with -labels and -nolabels is not safe (Jacques Garrigue, report by Jeremy Yallop) -- PR#7437: typing assert failure with nonrec priv +- MPR#7437: typing assert failure with nonrec priv (Jacques Garrigue, report by Anil Madhavapeddy) -- PR#7438: warning +34 exposes #row with private types +- MPR#7438: warning +34 exposes #row with private types (Alain Frisch, report by Anil Madhavapeddy) -- PR#7443, GPR#990: spurious unused open warning with local open in patterns +- MPR#7443, GPR#990: spurious unused open warning with local open in patterns (Florian Angeletti, report by Gabriel Scherer) -- GPR#406: remove polymorphic comparison for Types.constructor_tag in compiler - (Dwight Guth, review by Gabriel Radanne, Damien Doligez, Gabriel Scherer, - Pierre Chambart, Mark Shinwell) +- MPR#7456, GPR#1092: fix slow compilation on source files containing a lot + of similar debugging information location entries + (Mark Shinwell) -- GPR#795: remove 256-character limitation on Sys.executable_name - (Xavier Leroy) +- MPR#7504: fix warning 8 with unconstrained records + (Florian Angeletti, report by John Whitington) + +- PR#7456, GPR#1092: fix slow compilation on source files containing a lot + of similar debugging information location entries + (Mark Shinwell) - PR#7504: fix warning 8 with unconstrained records (Florian Angeletti, report by John Whitington) - PR#7456, GPR#1092: fix slow compilation on source files containing a lot of similar debugging information location entries (Mark Shinwell) +- PR#7511, GPR#1133: Unboxed type with unboxed argument should not be accepted +- MPR#7511, GPR#1133: Unboxed type with unboxed argument should not be accepted + (Damien Doligez, review by Jeremy Yallop and Leo White) - GPR#805, GPR#815, GPR#833: check for integer overflow in String.concat (Jeremy Yallop, review by Damien Doligez, Alain Frisch, Daniel Bünzli, Fabrice Le Fessant) -- PR#7447, GPR#995: incorrect code generation for nested recursive bindings - (Leo White and Jeremy Yallop, report by Stephen Dolan) - -- GPR#810: check for integer overflow in Array.concat - (Jeremy Yallop) - -- GPR#814: fix the Buffer.add_substring bounds check to handle overflow - (Jeremy Yallop) - - GPR#881: short-paths did not apply to some polymorphic variants (Valentin Gatien-Baron, review by Leo White) - GPR#886: Fix Ctype.moregeneral's handling of row_name - (Leo White) + (Leo White, review by Jacques Garrigue) - GPR#934: check for integer overflow in Bytes.extend (Jeremy Yallop, review by Gabriel Scherer) - GPR#956: Keep possibly-effectful expressions when optimizing multiplication by zero. - (Jeremy Yallop) + (Jeremy Yallop, review by Nicolás Ojeda Bär, Xavier Leroy and Mark Shinwell) - GPR#977: Catch Out_of_range in ocamldebug's "list" command (Yunxing Dai) @@ -784,20 +1016,31 @@ The complete list of changes is listed below. (Anton Bachin) - GPR#998: Do not delete unused closures in un_anf.ml. - (Leo White) + (Leo White, review by Mark Shinwell and Pierre Chambart) - GPR#1019: Fix fatal error in Flambda mode "[functions] does not map set of closures ID" (Pierre Chambart, code review by Mark Shinwell and Leo White) - GPR#1075: Ensure that zero-sized float arrays have zero tags. - (Mark Shinwell, Leo White) + (Mark Shinwell, Leo White, review by Xavier Leroy) * GPR#1088: Gc.minor_words now returns accurate numbers. - (Stephen Dolan) + (compatibility: the .mli declaration of `Gc.minor_words` + and `Gc.get_minor_free` changed, which may break libraries + re-exporting these values.) + (Stephen Dolan, review by Pierre Chambart and Xavier Leroy) -Next minor version (4.04.1): ----------------------------- +OCaml 4.04.2 (23 Jun 2017): +--------------------------- + +### Security fix: + +- PR#7557: Local privilege escalation issue with ocaml binaries. + (Damien Doligez, report by Eric Milliken, review by Xavier Leroy) + +OCaml 4.04.1 (14 Apr 2017): +--------------------------- ### Standard library: diff --git a/HACKING.adoc b/HACKING.adoc index 44557b02da..b0216abb4e 100644 --- a/HACKING.adoc +++ b/HACKING.adoc @@ -132,6 +132,17 @@ independent and should not need further knowledge. link:otherlibs/[]:: External libraries such as `unix`, `threads`, `dynlink`, `str` and `bigarray`. +Instructions for building the full reference manual are provided in +link:manual/README.md[]. However, if you only modify the documentation +comments in `.mli` files in the compiler codebase, you can observe the +result by running + +---- +make html_doc +---- + +and then opening link:./ocamldoc/stdlib_html/index.html[] in a web browser. + === Tools link:lex/[]:: The `ocamllex` lexer generator. @@ -153,7 +164,6 @@ has excellent documentation. LICENSE:: license and copyright notice Makefile:: main Makefile Makefile.nt:: Windows Makefile (deprecated) - Makefile.shared:: common Makefile Makefile.tools:: used by manual/ and testsuite/ Makefiles README.adoc:: general information on the compiler distribution README.win32.adoc:: general information on the Windows ports of OCaml @@ -224,6 +234,32 @@ found in link:INSTALL.adoc#bootstrap[INSTALL.adoc]. ==== Github's CI: Travis and AppVeyor +The script that is run on Travis continuous integration servers is +link:.travis-ci.sh[]; its configuration can be found as +a Travis configuration file in link:.travis.yml[]. + +For example, if you want to reproduce the default build on your +machine, you can use the configuration values and run command taken from +link:.travis.yml[]: + +---- +CI_KIND=build XARCH=i386 bash -ex .travis-ci.sh +---- + +The scripts support two other kinds of tests (values of the +`CI_KIND` variable) which both inspect the patch submitted as part of +a pull request. `tests` checks that the testsuite has been modified +(hopefully, improved) by the patch, and `changes` checks that the +link:Changes[] file has been modified (hopefully to add a new entry). + +These tests rely on the `$TRAVIS_COMMIT_RANGE` variable which you can +set explicitly to reproduce them locally. + +The `changes` check can be disabled by including "(no change +entry needed)" in one of your commit messages -- but in general all +patches submitted should come with a Changes entry; see the guidelines +in link:CONTRIBUTING.md[]. + ==== INRIA's Continuous Integration (CI) INRIA provides a Jenkins continuous integration service that OCaml @@ -257,4 +293,4 @@ Just checkout the commit/branch you want to test, then run git push --force git@github.com:ocaml/precheck.git HEAD:trunk (This is the syntax to push the current `HEAD` state into the `trunk` -reference on the specified remote.)
\ No newline at end of file +reference on the specified remote.) @@ -84,7 +84,7 @@ OCAMLDOC_OPT=$(WITH_OCAMLDOC:=.opt) UTILS=utils/config.cmo utils/misc.cmo \ utils/identifiable.cmo utils/numbers.cmo utils/arg_helper.cmo \ - utils/clflags.cmo utils/tbl.cmo utils/timings.cmo \ + utils/clflags.cmo utils/tbl.cmo utils/profile.cmo \ utils/terminfo.cmo utils/ccomp.cmo utils/warnings.cmo \ utils/consistbl.cmo \ utils/strongly_connected_components.cmo \ @@ -131,7 +131,7 @@ BYTECOMP=bytecomp/meta.cmo bytecomp/instruct.cmo bytecomp/bytegen.cmo \ bytecomp/bytesections.cmo bytecomp/dll.cmo bytecomp/symtable.cmo \ bytecomp/bytelink.cmo bytecomp/bytelibrarian.cmo bytecomp/bytepackager.cmo \ driver/compdynlink.cmo driver/compplugin.cmo \ - driver/errors.cmo driver/compile.cmo + driver/errors.cmo driver/compile.cmo driver/makedepend.cmo ARCH_SPECIFIC =\ asmcomp/arch.ml asmcomp/proc.ml asmcomp/CSE.ml asmcomp/selection.ml \ @@ -347,6 +347,7 @@ utils/config.ml: utils/config.mlp config/Makefile -e 's|%%WITH_FRAME_POINTERS%%|$(WITH_FRAME_POINTERS)|' \ -e 's|%%WITH_PROFINFO%%|$(WITH_PROFINFO)|' \ -e 's|%%WITH_SPACETIME%%|$(WITH_SPACETIME)|' \ + -e 's|%%WITH_SPACETIME_CALL_COUNTS%%|$(WITH_SPACETIME_CALL_COUNTS)|' \ $< > $@ ifeq "$(UNIX_OR_WIN32)" "unix" diff --git a/README.adoc b/README.adoc index 751f1fff36..34ca38a06b 100644 --- a/README.adoc +++ b/README.adoc @@ -1,3 +1,15 @@ +|===== +| Branch `trunk` | Branch `4.05` | Branch `4.04` + +| image:https://travis-ci.org/ocaml/ocaml.svg?branch=trunk["TravisCI Build Status (trunk branch)",link="https://travis-ci.org/ocaml/ocaml"] + image:https://ci.appveyor.com/api/projects/status/github/ocaml/ocaml?branch=trunk&svg=true["AppVeyor Build Status (trunk branch)",link="https://ci.appveyor.com/project/avsm/ocaml"] +| image:https://travis-ci.org/ocaml/ocaml.svg?branch=4.05["TravisCI Build Status (4.05 branch)",link="https://travis-ci.org/ocaml/ocaml"] + image:https://ci.appveyor.com/api/projects/status/github/ocaml/ocaml?branch=4.05&svg=true["AppVeyor Build Status (4.05 branch)",link="https://ci.appveyor.com/project/avsm/ocaml"] +| image:https://travis-ci.org/ocaml/ocaml.svg?branch=4.04["TravisCI Build Status (4.04 branch)",link="https://travis-ci.org/ocaml/ocaml"] + image:https://ci.appveyor.com/api/projects/status/github/ocaml/ocaml?branch=4.04&svg=true["AppVeyor Build Status (4.04 branch)",link="https://ci.appveyor.com/project/avsm/ocaml"] + +|===== + = README = == Overview @@ -1,4 +1,4 @@ -4.06.0+dev0-2017-02-15 +4.06.0+dev1-2017-06-23 # The version string is the first line of this file. # It must be in the format described in stdlib/sys.mli diff --git a/appveyor.yml b/appveyor.yml index ee7871776c..fbdb79ad7b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,6 +21,7 @@ image: Visual Studio 2015 branches: only: - trunk + - 4.05 # Do a shallow clone of the repo to speed up the build clone_depth: 1 @@ -30,6 +31,7 @@ environment: CYG_ROOT: C:/cygwin64 CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/ CYG_CACHE: C:/cygwin64/var/cache/setup + OCAMLRUNPARAM: v=0,b OCAMLROOT: "%PROGRAMFILES%/OCaml" OCAMLROOT2: "%PROGRAMFILES%/OCaml-mingw32" diff --git a/appveyor_build.sh b/appveyor_build.sh index f20f8f2733..e6272bdda1 100644 --- a/appveyor_build.sh +++ b/appveyor_build.sh @@ -29,6 +29,8 @@ function run { PREFIX="C:/Program Files/OCaml" +wmic cpu get name + if [[ $1 = "msvc32-only" ]] ; then cd $APPVEYOR_BUILD_FOLDER/flexdll-0.35 make MSVC_DETECT=0 CHAINS=msvc MSVC_FLAGS="-nologo -MD -D_CRT_NO_DEPRECATE -GS- -WX" support diff --git a/asmcomp/asmgen.ml b/asmcomp/asmgen.ml index 7a074d156d..bbae4595ee 100644 --- a/asmcomp/asmgen.ml +++ b/asmcomp/asmgen.ml @@ -105,27 +105,27 @@ let compile_fundecl (ppf : formatter) fd_cmm = Proc.init (); Reg.reset(); fd_cmm - ++ Timings.time ~accumulate:true "selection" Selection.fundecl + ++ Profile.record ~accumulate:true "selection" Selection.fundecl ++ pass_dump_if ppf dump_selection "After instruction selection" - ++ Timings.time ~accumulate:true "comballoc" Comballoc.fundecl + ++ Profile.record ~accumulate:true "comballoc" Comballoc.fundecl ++ pass_dump_if ppf dump_combine "After allocation combining" - ++ Timings.time ~accumulate:true "cse" CSE.fundecl + ++ Profile.record ~accumulate:true "cse" CSE.fundecl ++ pass_dump_if ppf dump_cse "After CSE" - ++ Timings.time ~accumulate:true "liveness" (liveness ppf) - ++ Timings.time ~accumulate:true "deadcode" Deadcode.fundecl + ++ Profile.record ~accumulate:true "liveness" (liveness ppf) + ++ Profile.record ~accumulate:true "deadcode" Deadcode.fundecl ++ pass_dump_if ppf dump_live "Liveness analysis" - ++ Timings.time ~accumulate:true "spill" Spill.fundecl - ++ Timings.time ~accumulate:true "liveness" (liveness ppf) + ++ Profile.record ~accumulate:true "spill" Spill.fundecl + ++ Profile.record ~accumulate:true "liveness" (liveness ppf) ++ pass_dump_if ppf dump_spill "After spilling" - ++ Timings.time ~accumulate:true "split" Split.fundecl + ++ Profile.record ~accumulate:true "split" Split.fundecl ++ pass_dump_if ppf dump_split "After live range splitting" - ++ Timings.time ~accumulate:true "liveness" (liveness ppf) - ++ Timings.time ~accumulate:true "regalloc" (regalloc ppf 1) - ++ Timings.time ~accumulate:true "linearize" Linearize.fundecl + ++ Profile.record ~accumulate:true "liveness" (liveness ppf) + ++ Profile.record ~accumulate:true "regalloc" (regalloc ppf 1) + ++ Profile.record ~accumulate:true "linearize" Linearize.fundecl ++ pass_dump_linear_if ppf dump_linear "Linearized code" - ++ Timings.time ~accumulate:true "scheduling" Scheduling.fundecl + ++ Profile.record ~accumulate:true "scheduling" Scheduling.fundecl ++ pass_dump_linear_if ppf dump_scheduling "After instruction scheduling" - ++ Timings.time ~accumulate:true "emit" Emit.fundecl + ++ Profile.record ~accumulate:true "emit" Emit.fundecl let compile_phrase ppf p = if !dump_cmm then fprintf ppf "%a@." Printcmm.phrase p; @@ -159,7 +159,7 @@ let compile_unit _output_prefix asm_filename keep_asm raise exn end; let assemble_result = - Timings.time "assemble" + Profile.record "assemble" (Proc.assemble_file asm_filename) obj_filename in if assemble_result <> 0 @@ -177,8 +177,8 @@ let end_gen_implementation ?toplevel ppf (clambda:clambda_and_constants) = Emit.begin_assembly (); clambda - ++ Timings.time "cmm" Cmmgen.compunit - ++ Timings.time "compile_phrases" (List.iter (compile_phrase ppf)) + ++ Profile.record "cmm" Cmmgen.compunit + ++ Profile.record "compile_phrases" (List.iter (compile_phrase ppf)) ++ (fun () -> ()); (match toplevel with None -> () | Some f -> compile_genfuns ppf f); @@ -199,7 +199,7 @@ let flambda_gen_implementation ?toplevel ~backend ppf (program:Flambda.program) = let export = Build_export_info.build_export_info ~backend program in let (clambda, preallocated, constants) = - Timings.time_call "backend" (fun () -> + Profile.record_call "backend" (fun () -> (program, export) ++ Flambda_to_clambda.convert ++ flambda_raw_clambda_dump_if ppf diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml index 54a3d95881..fe93e5e14b 100644 --- a/asmcomp/asmlink.ml +++ b/asmcomp/asmlink.ml @@ -260,7 +260,7 @@ let call_linker_shared file_list output_name = then raise(Error Linking_error) let link_shared ppf objfiles output_name = - Timings.time_call output_name (fun () -> + Profile.record_call output_name (fun () -> let units_tolink = List.fold_right scan_file objfiles [] in List.iter (fun (info, file_name, crc) -> check_consistency file_name info crc) @@ -315,7 +315,7 @@ let call_linker file_list startup_file output_name = (* Main entry point *) let link ppf objfiles output_name = - Timings.time_call output_name (fun () -> + Profile.record_call output_name (fun () -> let stdlib = if !Clflags.gprofile then "stdlib.p.cmxa" else "stdlib.cmxa" in let stdexit = diff --git a/asmcomp/asmpackager.ml b/asmcomp/asmpackager.ml index 0656eb6fa4..5a8c27944b 100644 --- a/asmcomp/asmpackager.ml +++ b/asmcomp/asmpackager.ml @@ -81,7 +81,7 @@ let check_units members = let make_package_object ppf members targetobj targetname coercion ~backend = - Timings.time_call (Printf.sprintf "pack(%s)" targetname) (fun () -> + Profile.record_call (Printf.sprintf "pack(%s)" targetname) (fun () -> let objtemp = if !Clflags.keep_asm_file then Filename.remove_extension targetobj ^ ".pack" ^ Config.ext_obj diff --git a/asmcomp/closure.ml b/asmcomp/closure.ml index be2df054d5..1154778834 100644 --- a/asmcomp/closure.ml +++ b/asmcomp/closure.ml @@ -825,7 +825,7 @@ let rec close fenv cenv = function | Lfunction _ as funct -> close_one_function fenv cenv (Ident.create "fun") funct - (* We convert [f a] to [let a' = a in fun b c -> f a' b c] + (* We convert [f a] to [let a' = a in let f' = f in fun b c -> f' a' b c] when fun_arity > nargs *) | Lapply{ap_func = funct; ap_args = args; ap_loc = loc; ap_inlined = attribute} -> @@ -843,7 +843,7 @@ let rec close fenv cenv = function direct_apply ~loc ~attribute fundesc funct ufunct uargs in (app, strengthen_approx app approx_res) - | ((_ufunct, Value_closure(fundesc, _approx_res)), uargs) + | ((ufunct, (Value_closure(fundesc, _) as fapprox)), uargs) when nargs < fundesc.fun_arity -> let first_args = List.map (fun arg -> (Ident.create "arg", arg) ) uargs in @@ -861,20 +861,25 @@ let rec close fenv cenv = function (List.map (fun (arg1, _arg2) -> Lvar arg1) first_args) @ (List.map (fun arg -> Lvar arg ) final_args) in + let funct_var = Ident.create "funct" in + let fenv = Tbl.add funct_var fapprox fenv in let (new_fun, approx) = close fenv cenv (Lfunction{ kind = Curried; params = final_args; body = Lapply{ap_should_be_tailcall=false; ap_loc=loc; - ap_func=funct; + ap_func=(Lvar funct_var); ap_args=internal_args; ap_inlined=Default_inline; ap_specialised=Default_specialise}; loc; attr = default_function_attribute}) in - let new_fun = iter first_args new_fun in + let new_fun = + iter first_args + (Ulet (Immutable, Pgenval, funct_var, ufunct, new_fun)) + in warning_if_forced_inline ~loc ~attribute "Partial application"; (new_fun, approx) diff --git a/asmcomp/spacetime_profiling.ml b/asmcomp/spacetime_profiling.ml index b6786c1dc2..a92471507e 100644 --- a/asmcomp/spacetime_profiling.ml +++ b/asmcomp/spacetime_profiling.ml @@ -4,7 +4,7 @@ (* *) (* Mark Shinwell and Leo White, Jane Street Europe *) (* *) -(* Copyright 2015--2016 Jane Street Group LLC *) +(* Copyright 2015--2017 Jane Street Group LLC *) (* *) (* All rights reserved. This file is distributed under the terms of *) (* the GNU Lesser General Public License version 2.1, with the *) @@ -31,7 +31,12 @@ let something_was_instrumented () = let next_index_within_node ~part_of_shape ~label = let index = !index_within_node in begin match part_of_shape with - | Mach.Direct_call_point _ | Mach.Indirect_call_point -> + | Mach.Direct_call_point _ -> + incr index_within_node; + if Config.spacetime_call_counts then begin + incr index_within_node + end + | Mach.Indirect_call_point -> incr index_within_node | Mach.Allocation_point -> incr index_within_node; @@ -220,7 +225,24 @@ let code_for_call ~node ~callee ~is_tail ~label = (hard) node hole pointer register immediately before the call. (That move is inserted in [Selectgen].) *) match callee with - | Direct _callee -> Cvar place_within_node + | Direct _callee -> + if Config.spacetime_call_counts then begin + let count_addr = Ident.create "call_count_addr" in + let count = Ident.create "call_count" in + Clet (count_addr, + Cop (Caddi, [Cvar place_within_node; Cconst_int Arch.size_addr], dbg), + Clet (count, + Cop (Cload (Word_int, Asttypes.Mutable), [Cvar count_addr], dbg), + Csequence ( + Cop (Cstore (Word_int, Lambda.Assignment), + (* Adding 2 really means adding 1; the count is encoded + as an OCaml integer. *) + [Cvar count_addr; Cop (Caddi, [Cvar count; Cconst_int 2], dbg)], + dbg), + Cvar place_within_node))) + end else begin + Cvar place_within_node + end | Indirect callee -> let caller_node = if is_tail then node diff --git a/asmrun/.depend b/asmrun/.depend index 9a058ba2d2..75f87890ef 100644 --- a/asmrun/.depend +++ b/asmrun/.depend @@ -1,1724 +1,1476 @@ startup_aux.$(O): startup_aux.c ../byterun/caml/backtrace.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/exec.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/callback.h \ - ../byterun/caml/major_gc.h ../byterun/caml/startup_aux.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/exec.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/callback.h ../byterun/caml/osdeps.h \ + ../byterun/caml/startup_aux.h startup.$(O): startup.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/custom.h \ - ../byterun/caml/debugger.h ../byterun/caml/fail.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/printexc.h \ - ../byterun/caml/stack.h ../byterun/caml/startup_aux.h \ - ../byterun/caml/sys.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/custom.h ../byterun/caml/debugger.h \ + ../byterun/caml/fail.h ../byterun/caml/freelist.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/printexc.h ../byterun/caml/stack.h \ + ../byterun/caml/startup_aux.h ../byterun/caml/sys.h main.$(O): main.c ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/sys.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/sys.h fail.$(O): fail.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h \ - ../byterun/caml/gc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/printexc.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/callback.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h \ + ../byterun/caml/gc.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/printexc.h ../byterun/caml/signals.h \ + ../byterun/caml/stack.h ../byterun/caml/roots.h \ + ../byterun/caml/callback.h roots.$(O): roots.c ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/globroots.h \ - ../byterun/caml/memory.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stack.h \ - ../byterun/caml/roots.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/globroots.h \ + ../byterun/caml/stack.h signals.$(O): signals.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h \ - ../byterun/caml/signals_machdep.h ../byterun/caml/sys.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/roots.h ../byterun/caml/signals.h \ + ../byterun/caml/signals_machdep.h ../byterun/caml/sys.h signals_asm.$(O): signals_asm.c ../byterun/caml/fail.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h \ - ../byterun/caml/signals_machdep.h signals_osdep.h \ - ../byterun/caml/stack.h ../byterun/caml/spacetime.h ../byterun/caml/io.h \ - ../byterun/caml/misc.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/signals.h \ + ../byterun/caml/signals_machdep.h signals_osdep.h \ + ../byterun/caml/stack.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h misc.$(O): misc.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/version.h + ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/version.h freelist.$(O): freelist.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/freelist.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/major_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/s.h ../byterun/caml/freelist.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h major_gc.$(O): major_gc.c ../byterun/caml/compact.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h \ - ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/freelist.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/signals.h ../byterun/caml/weak.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/finalise.h \ + ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/weak.h minor_gc.$(O): minor_gc.c ../byterun/caml/custom.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/memory.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/signals.h ../byterun/caml/weak.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/fail.h ../byterun/caml/finalise.h \ + ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/weak.h memory.$(O): memory.c ../byterun/caml/address_class.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/signals.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/fail.h ../byterun/caml/freelist.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/signals.h alloc.$(O): alloc.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stacks.h \ - ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/stacks.h compare.$(O): compare.c ../byterun/caml/custom.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ints.$(O): ints.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h floats.$(O): floats.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/reverse.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/reverse.h ../byterun/caml/stacks.h str.$(O): str.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h array.$(O): array.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/signals.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h ../byterun/caml/stack.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h ../byterun/caml/stack.h io.$(O): io.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h ../byterun/caml/sys.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/signals.h ../byterun/caml/sys.h extern.$(O): extern.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/io.h \ - ../byterun/caml/md5.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/md5.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/reverse.h intern.$(O): intern.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ - ../byterun/caml/config.h ../byterun/caml/custom.h ../byterun/caml/fail.h \ - ../byterun/caml/gc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/io.h ../byterun/caml/md5.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/md5.h \ + ../byterun/caml/memory.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/reverse.h hash.$(O): hash.c ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ - ../byterun/caml/custom.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/hash.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/custom.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/hash.h sys.$(O): sys.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/debugger.h ../byterun/caml/fail.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/instruct.h \ - ../byterun/caml/io.h ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/signals.h ../byterun/caml/stacks.h ../byterun/caml/sys.h \ - ../byterun/caml/version.h ../byterun/caml/callback.h \ - ../byterun/caml/startup_aux.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/debugger.h \ + ../byterun/caml/fail.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/instruct.h ../byterun/caml/io.h \ + ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h ../byterun/caml/stacks.h \ + ../byterun/caml/sys.h ../byterun/caml/version.h \ + ../byterun/caml/callback.h ../byterun/caml/startup_aux.h parsing.$(O): parsing.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/misc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/alloc.h + ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/alloc.h gc_ctrl.$(O): gc_ctrl.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/compact.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h \ - ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/freelist.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/memory.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/signals.h \ - ../byterun/caml/stack.h ../byterun/caml/startup_aux.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/compact.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/stack.h ../byterun/caml/startup_aux.h terminfo.$(O): terminfo.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/fail.h ../byterun/caml/io.h ../byterun/caml/mlvalues.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h md5.$(O): md5.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/md5.h \ - ../byterun/caml/io.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/io.h \ - ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/md5.h ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/reverse.h obj.$(O): obj.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/interp.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/prims.h ../byterun/caml/spacetime.h ../byterun/caml/io.h \ - ../byterun/caml/stack.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ + ../byterun/caml/interp.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/memory.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/prims.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h ../byterun/caml/stack.h lexing.$(O): lexing.c ../byterun/caml/fail.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/stacks.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h unix.$(O): unix.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/fail.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/io.h + ../byterun/caml/s.h ../byterun/caml/fail.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/io.h printexc.$(O): printexc.c ../byterun/caml/backtrace.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/exec.h \ - ../byterun/caml/callback.h ../byterun/caml/debugger.h \ - ../byterun/caml/fail.h ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/printexc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/exec.h ../byterun/caml/callback.h \ + ../byterun/caml/debugger.h ../byterun/caml/fail.h \ + ../byterun/caml/printexc.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h callback.$(O): callback.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h weak.$(O): weak.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/weak.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/weak.h compact.$(O): compact.c ../byterun/caml/address_class.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ - ../byterun/caml/memory.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/weak.h ../byterun/caml/compact.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/weak.h ../byterun/caml/compact.h finalise.$(O): finalise.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/compact.h \ - ../byterun/caml/fail.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/signals.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/compact.h ../byterun/caml/fail.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h custom.$(O): custom.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h globroots.$(O): globroots.c ../byterun/caml/memory.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/gc.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/globroots.h ../byterun/caml/roots.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/gc.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/roots.h ../byterun/caml/globroots.h backtrace_prim.$(O): backtrace_prim.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stack.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/backtrace_prim.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/stack.h backtrace.$(O): backtrace.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/fail.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/backtrace_prim.h \ + ../byterun/caml/fail.h natdynlink.$(O): natdynlink.c ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/stack.h ../byterun/caml/callback.h \ - ../byterun/caml/alloc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/fail.h \ - ../byterun/caml/signals.h ../byterun/caml/hooks.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/stack.h \ + ../byterun/caml/callback.h ../byterun/caml/alloc.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/osdeps.h \ + ../byterun/caml/fail.h ../byterun/caml/signals.h \ + ../byterun/caml/hooks.h debugger.$(O): debugger.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/debugger.h ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/debugger.h \ + ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h meta.$(O): meta.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/fix_code.h \ - ../byterun/caml/interp.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/prims.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/fix_code.h ../byterun/caml/interp.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/prims.h ../byterun/caml/stacks.h dynlink.$(O): dynlink.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/dynlink.h ../byterun/caml/fail.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/prims.h ../byterun/caml/signals.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/dynlink.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/prims.h \ + ../byterun/caml/signals.h clambda_checks.$(O): clambda_checks.c ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h spacetime.$(O): spacetime.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/backtrace_prim.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/memory.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h spacetime_snapshot.$(O): spacetime_snapshot.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/config.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h spacetime_offline.$(O): spacetime_offline.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ - ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h ../byterun/caml/s.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/gc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h afl.$(O): afl.c ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h bigarray.$(O): bigarray.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/bigarray.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/intext.h \ - ../byterun/caml/io.h ../byterun/caml/hash.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h -win32.$(O): ../byterun/win32.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/address_class.h ../byterun/caml/fail.h \ - ../byterun/caml/io.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/config.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/bigarray.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/hash.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h startup_aux.p.$(O): startup_aux.c ../byterun/caml/backtrace.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/exec.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/callback.h \ - ../byterun/caml/major_gc.h ../byterun/caml/startup_aux.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/exec.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/callback.h ../byterun/caml/osdeps.h \ + ../byterun/caml/startup_aux.h startup.p.$(O): startup.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/custom.h \ - ../byterun/caml/debugger.h ../byterun/caml/fail.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/printexc.h \ - ../byterun/caml/stack.h ../byterun/caml/startup_aux.h \ - ../byterun/caml/sys.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/custom.h ../byterun/caml/debugger.h \ + ../byterun/caml/fail.h ../byterun/caml/freelist.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/printexc.h ../byterun/caml/stack.h \ + ../byterun/caml/startup_aux.h ../byterun/caml/sys.h main.p.$(O): main.c ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/sys.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/sys.h fail.p.$(O): fail.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h \ - ../byterun/caml/gc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/printexc.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/callback.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h \ + ../byterun/caml/gc.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/printexc.h ../byterun/caml/signals.h \ + ../byterun/caml/stack.h ../byterun/caml/roots.h \ + ../byterun/caml/callback.h roots.p.$(O): roots.c ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/globroots.h \ - ../byterun/caml/memory.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stack.h \ - ../byterun/caml/roots.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/globroots.h \ + ../byterun/caml/stack.h signals.p.$(O): signals.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h \ - ../byterun/caml/signals_machdep.h ../byterun/caml/sys.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/roots.h ../byterun/caml/signals.h \ + ../byterun/caml/signals_machdep.h ../byterun/caml/sys.h signals_asm.p.$(O): signals_asm.c ../byterun/caml/fail.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h \ - ../byterun/caml/signals_machdep.h signals_osdep.h \ - ../byterun/caml/stack.h ../byterun/caml/spacetime.h ../byterun/caml/io.h \ - ../byterun/caml/misc.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/signals.h \ + ../byterun/caml/signals_machdep.h signals_osdep.h \ + ../byterun/caml/stack.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h misc.p.$(O): misc.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/version.h + ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/version.h freelist.p.$(O): freelist.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/freelist.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/major_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/s.h ../byterun/caml/freelist.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h major_gc.p.$(O): major_gc.c ../byterun/caml/compact.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h \ - ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/freelist.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/signals.h ../byterun/caml/weak.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/finalise.h \ + ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/weak.h minor_gc.p.$(O): minor_gc.c ../byterun/caml/custom.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/memory.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/signals.h ../byterun/caml/weak.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/fail.h ../byterun/caml/finalise.h \ + ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/weak.h memory.p.$(O): memory.c ../byterun/caml/address_class.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/signals.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/fail.h ../byterun/caml/freelist.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/signals.h alloc.p.$(O): alloc.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stacks.h \ - ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/stacks.h compare.p.$(O): compare.c ../byterun/caml/custom.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ints.p.$(O): ints.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h floats.p.$(O): floats.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/reverse.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/reverse.h ../byterun/caml/stacks.h str.p.$(O): str.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h array.p.$(O): array.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/signals.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h ../byterun/caml/stack.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h ../byterun/caml/stack.h io.p.$(O): io.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h ../byterun/caml/sys.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/signals.h ../byterun/caml/sys.h extern.p.$(O): extern.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/io.h \ - ../byterun/caml/md5.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/md5.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/reverse.h intern.p.$(O): intern.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ - ../byterun/caml/config.h ../byterun/caml/custom.h ../byterun/caml/fail.h \ - ../byterun/caml/gc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/io.h ../byterun/caml/md5.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/md5.h \ + ../byterun/caml/memory.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/reverse.h hash.p.$(O): hash.c ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ - ../byterun/caml/custom.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/hash.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/custom.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/hash.h sys.p.$(O): sys.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/debugger.h ../byterun/caml/fail.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/instruct.h \ - ../byterun/caml/io.h ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/signals.h ../byterun/caml/stacks.h ../byterun/caml/sys.h \ - ../byterun/caml/version.h ../byterun/caml/callback.h \ - ../byterun/caml/startup_aux.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/debugger.h \ + ../byterun/caml/fail.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/instruct.h ../byterun/caml/io.h \ + ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h ../byterun/caml/stacks.h \ + ../byterun/caml/sys.h ../byterun/caml/version.h \ + ../byterun/caml/callback.h ../byterun/caml/startup_aux.h parsing.p.$(O): parsing.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/misc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/alloc.h + ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/alloc.h gc_ctrl.p.$(O): gc_ctrl.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/compact.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h \ - ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/freelist.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/memory.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/signals.h \ - ../byterun/caml/stack.h ../byterun/caml/startup_aux.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/compact.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/stack.h ../byterun/caml/startup_aux.h terminfo.p.$(O): terminfo.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/fail.h ../byterun/caml/io.h ../byterun/caml/mlvalues.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h md5.p.$(O): md5.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/md5.h \ - ../byterun/caml/io.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/io.h \ - ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/md5.h ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/reverse.h obj.p.$(O): obj.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/interp.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/prims.h ../byterun/caml/spacetime.h ../byterun/caml/io.h \ - ../byterun/caml/stack.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ + ../byterun/caml/interp.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/memory.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/prims.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h ../byterun/caml/stack.h lexing.p.$(O): lexing.c ../byterun/caml/fail.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/stacks.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h unix.p.$(O): unix.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/fail.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/io.h + ../byterun/caml/s.h ../byterun/caml/fail.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/io.h printexc.p.$(O): printexc.c ../byterun/caml/backtrace.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/exec.h \ - ../byterun/caml/callback.h ../byterun/caml/debugger.h \ - ../byterun/caml/fail.h ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/printexc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/exec.h ../byterun/caml/callback.h \ + ../byterun/caml/debugger.h ../byterun/caml/fail.h \ + ../byterun/caml/printexc.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h callback.p.$(O): callback.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h weak.p.$(O): weak.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/weak.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/weak.h compact.p.$(O): compact.c ../byterun/caml/address_class.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ - ../byterun/caml/memory.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/weak.h ../byterun/caml/compact.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/weak.h ../byterun/caml/compact.h finalise.p.$(O): finalise.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/compact.h \ - ../byterun/caml/fail.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/signals.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/compact.h ../byterun/caml/fail.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h custom.p.$(O): custom.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h globroots.p.$(O): globroots.c ../byterun/caml/memory.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/gc.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/globroots.h ../byterun/caml/roots.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/gc.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/roots.h ../byterun/caml/globroots.h backtrace_prim.p.$(O): backtrace_prim.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stack.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/backtrace_prim.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/stack.h backtrace.p.$(O): backtrace.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/fail.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/backtrace_prim.h \ + ../byterun/caml/fail.h natdynlink.p.$(O): natdynlink.c ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/stack.h ../byterun/caml/callback.h \ - ../byterun/caml/alloc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/fail.h \ - ../byterun/caml/signals.h ../byterun/caml/hooks.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/stack.h \ + ../byterun/caml/callback.h ../byterun/caml/alloc.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/osdeps.h \ + ../byterun/caml/fail.h ../byterun/caml/signals.h \ + ../byterun/caml/hooks.h debugger.p.$(O): debugger.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/debugger.h ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/debugger.h \ + ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h meta.p.$(O): meta.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/fix_code.h \ - ../byterun/caml/interp.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/prims.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/fix_code.h ../byterun/caml/interp.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/prims.h ../byterun/caml/stacks.h dynlink.p.$(O): dynlink.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/dynlink.h ../byterun/caml/fail.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/prims.h ../byterun/caml/signals.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/dynlink.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/prims.h \ + ../byterun/caml/signals.h clambda_checks.p.$(O): clambda_checks.c ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h spacetime.p.$(O): spacetime.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/backtrace_prim.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/memory.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h spacetime_snapshot.p.$(O): spacetime_snapshot.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/config.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h spacetime_offline.p.$(O): spacetime_offline.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ - ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h ../byterun/caml/s.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/gc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h afl.p.$(O): afl.c ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h bigarray.p.$(O): bigarray.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/bigarray.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/intext.h \ - ../byterun/caml/io.h ../byterun/caml/hash.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h -win32.p.$(O): ../byterun/win32.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/address_class.h ../byterun/caml/fail.h \ - ../byterun/caml/io.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/config.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/bigarray.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/hash.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h startup_aux.d.$(O): startup_aux.c ../byterun/caml/backtrace.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/exec.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/callback.h \ - ../byterun/caml/major_gc.h ../byterun/caml/startup_aux.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/exec.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/callback.h ../byterun/caml/osdeps.h \ + ../byterun/caml/startup_aux.h startup.d.$(O): startup.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/custom.h \ - ../byterun/caml/debugger.h ../byterun/caml/fail.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/printexc.h \ - ../byterun/caml/stack.h ../byterun/caml/startup_aux.h \ - ../byterun/caml/sys.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/custom.h ../byterun/caml/debugger.h \ + ../byterun/caml/fail.h ../byterun/caml/freelist.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/printexc.h ../byterun/caml/stack.h \ + ../byterun/caml/startup_aux.h ../byterun/caml/sys.h main.d.$(O): main.c ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/sys.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/sys.h fail.d.$(O): fail.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h \ - ../byterun/caml/gc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/printexc.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/callback.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h \ + ../byterun/caml/gc.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/printexc.h ../byterun/caml/signals.h \ + ../byterun/caml/stack.h ../byterun/caml/roots.h \ + ../byterun/caml/callback.h roots.d.$(O): roots.c ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/globroots.h \ - ../byterun/caml/memory.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stack.h \ - ../byterun/caml/roots.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/globroots.h \ + ../byterun/caml/stack.h signals.d.$(O): signals.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h \ - ../byterun/caml/signals_machdep.h ../byterun/caml/sys.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/roots.h ../byterun/caml/signals.h \ + ../byterun/caml/signals_machdep.h ../byterun/caml/sys.h signals_asm.d.$(O): signals_asm.c ../byterun/caml/fail.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h \ - ../byterun/caml/signals_machdep.h signals_osdep.h \ - ../byterun/caml/stack.h ../byterun/caml/spacetime.h ../byterun/caml/io.h \ - ../byterun/caml/misc.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/signals.h \ + ../byterun/caml/signals_machdep.h signals_osdep.h \ + ../byterun/caml/stack.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h misc.d.$(O): misc.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/version.h + ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/version.h freelist.d.$(O): freelist.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/freelist.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/major_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/s.h ../byterun/caml/freelist.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h major_gc.d.$(O): major_gc.c ../byterun/caml/compact.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h \ - ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/freelist.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/signals.h ../byterun/caml/weak.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/finalise.h \ + ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/weak.h minor_gc.d.$(O): minor_gc.c ../byterun/caml/custom.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/memory.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/signals.h ../byterun/caml/weak.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/fail.h ../byterun/caml/finalise.h \ + ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/weak.h memory.d.$(O): memory.c ../byterun/caml/address_class.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/signals.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/fail.h ../byterun/caml/freelist.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/signals.h alloc.d.$(O): alloc.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stacks.h \ - ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/stacks.h compare.d.$(O): compare.c ../byterun/caml/custom.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ints.d.$(O): ints.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h floats.d.$(O): floats.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/reverse.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/reverse.h ../byterun/caml/stacks.h str.d.$(O): str.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h array.d.$(O): array.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/signals.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h ../byterun/caml/stack.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h ../byterun/caml/stack.h io.d.$(O): io.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h ../byterun/caml/sys.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/signals.h ../byterun/caml/sys.h extern.d.$(O): extern.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/io.h \ - ../byterun/caml/md5.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/md5.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/reverse.h intern.d.$(O): intern.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ - ../byterun/caml/config.h ../byterun/caml/custom.h ../byterun/caml/fail.h \ - ../byterun/caml/gc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/io.h ../byterun/caml/md5.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/md5.h \ + ../byterun/caml/memory.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/reverse.h hash.d.$(O): hash.c ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ - ../byterun/caml/custom.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/hash.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/custom.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/hash.h sys.d.$(O): sys.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/debugger.h ../byterun/caml/fail.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/instruct.h \ - ../byterun/caml/io.h ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/signals.h ../byterun/caml/stacks.h ../byterun/caml/sys.h \ - ../byterun/caml/version.h ../byterun/caml/callback.h \ - ../byterun/caml/startup_aux.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/debugger.h \ + ../byterun/caml/fail.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/instruct.h ../byterun/caml/io.h \ + ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h ../byterun/caml/stacks.h \ + ../byterun/caml/sys.h ../byterun/caml/version.h \ + ../byterun/caml/callback.h ../byterun/caml/startup_aux.h parsing.d.$(O): parsing.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/misc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/alloc.h + ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/alloc.h gc_ctrl.d.$(O): gc_ctrl.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/compact.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h \ - ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/freelist.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/memory.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/signals.h \ - ../byterun/caml/stack.h ../byterun/caml/startup_aux.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/compact.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/stack.h ../byterun/caml/startup_aux.h terminfo.d.$(O): terminfo.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/fail.h ../byterun/caml/io.h ../byterun/caml/mlvalues.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h md5.d.$(O): md5.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/md5.h \ - ../byterun/caml/io.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/io.h \ - ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/md5.h ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/reverse.h obj.d.$(O): obj.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/interp.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/prims.h ../byterun/caml/spacetime.h ../byterun/caml/io.h \ - ../byterun/caml/stack.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ + ../byterun/caml/interp.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/memory.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/prims.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h ../byterun/caml/stack.h lexing.d.$(O): lexing.c ../byterun/caml/fail.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/stacks.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h unix.d.$(O): unix.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/fail.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/io.h + ../byterun/caml/s.h ../byterun/caml/fail.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/io.h printexc.d.$(O): printexc.c ../byterun/caml/backtrace.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/exec.h \ - ../byterun/caml/callback.h ../byterun/caml/debugger.h \ - ../byterun/caml/fail.h ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/printexc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/exec.h ../byterun/caml/callback.h \ + ../byterun/caml/debugger.h ../byterun/caml/fail.h \ + ../byterun/caml/printexc.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h callback.d.$(O): callback.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h weak.d.$(O): weak.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/weak.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/weak.h compact.d.$(O): compact.c ../byterun/caml/address_class.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ - ../byterun/caml/memory.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/weak.h ../byterun/caml/compact.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/weak.h ../byterun/caml/compact.h finalise.d.$(O): finalise.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/compact.h \ - ../byterun/caml/fail.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/signals.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/compact.h ../byterun/caml/fail.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h custom.d.$(O): custom.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h globroots.d.$(O): globroots.c ../byterun/caml/memory.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/gc.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/globroots.h ../byterun/caml/roots.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/gc.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/roots.h ../byterun/caml/globroots.h backtrace_prim.d.$(O): backtrace_prim.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stack.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/backtrace_prim.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/stack.h backtrace.d.$(O): backtrace.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/fail.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/backtrace_prim.h \ + ../byterun/caml/fail.h natdynlink.d.$(O): natdynlink.c ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/stack.h ../byterun/caml/callback.h \ - ../byterun/caml/alloc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/fail.h \ - ../byterun/caml/signals.h ../byterun/caml/hooks.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/stack.h \ + ../byterun/caml/callback.h ../byterun/caml/alloc.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/osdeps.h \ + ../byterun/caml/fail.h ../byterun/caml/signals.h \ + ../byterun/caml/hooks.h debugger.d.$(O): debugger.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/debugger.h ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/debugger.h \ + ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h meta.d.$(O): meta.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/fix_code.h \ - ../byterun/caml/interp.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/prims.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/fix_code.h ../byterun/caml/interp.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/prims.h ../byterun/caml/stacks.h dynlink.d.$(O): dynlink.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/dynlink.h ../byterun/caml/fail.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/prims.h ../byterun/caml/signals.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/dynlink.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/prims.h \ + ../byterun/caml/signals.h clambda_checks.d.$(O): clambda_checks.c ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h spacetime.d.$(O): spacetime.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/backtrace_prim.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/memory.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h spacetime_snapshot.d.$(O): spacetime_snapshot.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/config.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h spacetime_offline.d.$(O): spacetime_offline.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ - ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h ../byterun/caml/s.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/gc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h afl.d.$(O): afl.c ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h bigarray.d.$(O): bigarray.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/bigarray.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/intext.h \ - ../byterun/caml/io.h ../byterun/caml/hash.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h -win32.d.$(O): ../byterun/win32.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/address_class.h ../byterun/caml/fail.h \ - ../byterun/caml/io.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/config.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/bigarray.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/hash.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h startup_aux.i.$(O): startup_aux.c ../byterun/caml/backtrace.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/exec.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/callback.h \ - ../byterun/caml/major_gc.h ../byterun/caml/startup_aux.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/exec.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/callback.h ../byterun/caml/osdeps.h \ + ../byterun/caml/startup_aux.h startup.i.$(O): startup.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/custom.h \ - ../byterun/caml/debugger.h ../byterun/caml/fail.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/printexc.h \ - ../byterun/caml/stack.h ../byterun/caml/startup_aux.h \ - ../byterun/caml/sys.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/custom.h ../byterun/caml/debugger.h \ + ../byterun/caml/fail.h ../byterun/caml/freelist.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/printexc.h ../byterun/caml/stack.h \ + ../byterun/caml/startup_aux.h ../byterun/caml/sys.h main.i.$(O): main.c ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/sys.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/sys.h fail.i.$(O): fail.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h \ - ../byterun/caml/gc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/printexc.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/callback.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h \ + ../byterun/caml/gc.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/printexc.h ../byterun/caml/signals.h \ + ../byterun/caml/stack.h ../byterun/caml/roots.h \ + ../byterun/caml/callback.h roots.i.$(O): roots.c ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/globroots.h \ - ../byterun/caml/memory.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stack.h \ - ../byterun/caml/roots.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/globroots.h \ + ../byterun/caml/stack.h signals.i.$(O): signals.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h \ - ../byterun/caml/signals_machdep.h ../byterun/caml/sys.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/roots.h ../byterun/caml/signals.h \ + ../byterun/caml/signals_machdep.h ../byterun/caml/sys.h signals_asm.i.$(O): signals_asm.c ../byterun/caml/fail.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h \ - ../byterun/caml/signals_machdep.h signals_osdep.h \ - ../byterun/caml/stack.h ../byterun/caml/spacetime.h ../byterun/caml/io.h \ - ../byterun/caml/misc.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/signals.h \ + ../byterun/caml/signals_machdep.h signals_osdep.h \ + ../byterun/caml/stack.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h misc.i.$(O): misc.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/version.h + ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/version.h freelist.i.$(O): freelist.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/freelist.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/major_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/s.h ../byterun/caml/freelist.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h major_gc.i.$(O): major_gc.c ../byterun/caml/compact.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h \ - ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/freelist.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/signals.h ../byterun/caml/weak.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/finalise.h \ + ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/weak.h minor_gc.i.$(O): minor_gc.c ../byterun/caml/custom.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/memory.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/roots.h \ - ../byterun/caml/signals.h ../byterun/caml/weak.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/fail.h ../byterun/caml/finalise.h \ + ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/weak.h memory.i.$(O): memory.c ../byterun/caml/address_class.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/fail.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/signals.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/fail.h ../byterun/caml/freelist.h ../byterun/caml/gc.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/signals.h alloc.i.$(O): alloc.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stacks.h \ - ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/stacks.h compare.i.$(O): compare.c ../byterun/caml/custom.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/fail.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ints.i.$(O): ints.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h floats.i.$(O): floats.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/reverse.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/reverse.h ../byterun/caml/stacks.h str.i.$(O): str.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h array.i.$(O): array.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/signals.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h ../byterun/caml/stack.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h ../byterun/caml/stack.h io.i.$(O): io.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/io.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/osdeps.h \ - ../byterun/caml/memory.h ../byterun/caml/signals.h ../byterun/caml/sys.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/signals.h ../byterun/caml/sys.h extern.i.$(O): extern.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/io.h \ - ../byterun/caml/md5.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/md5.h ../byterun/caml/memory.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/reverse.h intern.i.$(O): intern.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ - ../byterun/caml/config.h ../byterun/caml/custom.h ../byterun/caml/fail.h \ - ../byterun/caml/gc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/io.h ../byterun/caml/md5.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/callback.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/md5.h \ + ../byterun/caml/memory.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/reverse.h hash.i.$(O): hash.c ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ - ../byterun/caml/custom.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/hash.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/custom.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/hash.h sys.i.$(O): sys.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/debugger.h ../byterun/caml/fail.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/instruct.h \ - ../byterun/caml/io.h ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/signals.h ../byterun/caml/stacks.h ../byterun/caml/sys.h \ - ../byterun/caml/version.h ../byterun/caml/callback.h \ - ../byterun/caml/startup_aux.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/debugger.h \ + ../byterun/caml/fail.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/instruct.h ../byterun/caml/io.h \ + ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h ../byterun/caml/stacks.h \ + ../byterun/caml/sys.h ../byterun/caml/version.h \ + ../byterun/caml/callback.h ../byterun/caml/startup_aux.h parsing.i.$(O): parsing.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/misc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/alloc.h + ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/alloc.h gc_ctrl.i.$(O): gc_ctrl.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/compact.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h \ - ../byterun/caml/finalise.h ../byterun/caml/roots.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/freelist.h \ - ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/major_gc.h ../byterun/caml/memory.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/signals.h \ - ../byterun/caml/stack.h ../byterun/caml/startup_aux.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/compact.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/gc_ctrl.h ../byterun/caml/signals.h \ + ../byterun/caml/stack.h ../byterun/caml/startup_aux.h terminfo.i.$(O): terminfo.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/fail.h ../byterun/caml/io.h ../byterun/caml/mlvalues.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/io.h md5.i.$(O): md5.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/md5.h \ - ../byterun/caml/io.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/io.h \ - ../byterun/caml/reverse.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/md5.h ../byterun/caml/io.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/reverse.h obj.i.$(O): obj.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/interp.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/prims.h ../byterun/caml/spacetime.h ../byterun/caml/io.h \ - ../byterun/caml/stack.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ + ../byterun/caml/interp.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/memory.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/prims.h ../byterun/caml/spacetime.h \ + ../byterun/caml/io.h ../byterun/caml/stack.h lexing.i.$(O): lexing.c ../byterun/caml/fail.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/stacks.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h unix.i.$(O): unix.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/fail.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/io.h + ../byterun/caml/s.h ../byterun/caml/fail.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/osdeps.h \ + ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/io.h printexc.i.$(O): printexc.c ../byterun/caml/backtrace.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/exec.h \ - ../byterun/caml/callback.h ../byterun/caml/debugger.h \ - ../byterun/caml/fail.h ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/printexc.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/exec.h ../byterun/caml/callback.h \ + ../byterun/caml/debugger.h ../byterun/caml/fail.h \ + ../byterun/caml/printexc.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h callback.i.$(O): callback.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/fail.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h weak.i.$(O): weak.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/weak.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/weak.h compact.i.$(O): compact.c ../byterun/caml/address_class.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/freelist.h ../byterun/caml/gc.h \ - ../byterun/caml/gc_ctrl.h ../byterun/caml/major_gc.h \ - ../byterun/caml/memory.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/weak.h ../byterun/caml/compact.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/weak.h ../byterun/caml/compact.h finalise.i.$(O): finalise.c ../byterun/caml/callback.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/misc.h ../byterun/caml/compact.h \ - ../byterun/caml/fail.h ../byterun/caml/finalise.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/signals.h + ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/misc.h \ + ../byterun/caml/compact.h ../byterun/caml/fail.h \ + ../byterun/caml/finalise.h ../byterun/caml/roots.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/signals.h custom.i.$(O): custom.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/mlvalues.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/custom.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h globroots.i.$(O): globroots.c ../byterun/caml/memory.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/gc.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/globroots.h ../byterun/caml/roots.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/gc.h ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/roots.h ../byterun/caml/globroots.h backtrace_prim.i.$(O): backtrace_prim.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/stack.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/backtrace_prim.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/stack.h backtrace.i.$(O): backtrace.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/fail.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/backtrace_prim.h \ + ../byterun/caml/fail.h natdynlink.i.$(O): natdynlink.c ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/misc.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/stack.h ../byterun/caml/callback.h \ - ../byterun/caml/alloc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/fail.h \ - ../byterun/caml/signals.h ../byterun/caml/hooks.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/memory.h \ + ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/stack.h \ + ../byterun/caml/callback.h ../byterun/caml/alloc.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/osdeps.h \ + ../byterun/caml/fail.h ../byterun/caml/signals.h \ + ../byterun/caml/hooks.h debugger.i.$(O): debugger.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/debugger.h ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/debugger.h \ + ../byterun/caml/osdeps.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h meta.i.$(O): meta.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/fix_code.h \ - ../byterun/caml/interp.h ../byterun/caml/intext.h ../byterun/caml/io.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/memory.h ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/misc.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/prims.h \ - ../byterun/caml/stacks.h ../byterun/caml/memory.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/fix_code.h ../byterun/caml/interp.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/prims.h ../byterun/caml/stacks.h dynlink.i.$(O): dynlink.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/dynlink.h ../byterun/caml/fail.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/prims.h ../byterun/caml/signals.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/dynlink.h \ + ../byterun/caml/fail.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/prims.h \ + ../byterun/caml/signals.h clambda_checks.i.$(O): clambda_checks.c ../byterun/caml/mlvalues.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/misc.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/misc.h spacetime.i.$(O): spacetime.c ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/fail.h ../byterun/caml/gc.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h + ../byterun/caml/s.h ../byterun/caml/alloc.h ../byterun/caml/misc.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/backtrace_prim.h \ + ../byterun/caml/backtrace.h ../byterun/caml/exec.h \ + ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ + ../byterun/caml/io.h ../byterun/caml/major_gc.h \ + ../byterun/caml/freelist.h ../byterun/caml/memory.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ + ../byterun/caml/osdeps.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h spacetime_snapshot.i.$(O): spacetime_snapshot.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ - ../byterun/caml/exec.h ../byterun/caml/config.h ../byterun/caml/custom.h \ - ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ - ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ + ../byterun/caml/backtrace_prim.h ../byterun/caml/backtrace.h \ + ../byterun/caml/exec.h ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/gc.h ../byterun/caml/gc_ctrl.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h spacetime_offline.i.$(O): spacetime_offline.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/config.h \ - ../byterun/caml/fail.h ../byterun/caml/gc.h ../byterun/caml/intext.h \ - ../byterun/caml/io.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/misc.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/roots.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/stack.h ../byterun/caml/sys.h \ - ../byterun/caml/spacetime.h ../byterun/caml/io.h ../byterun/caml/s.h + ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ + ../byterun/caml/s.h ../byterun/caml/mlvalues.h ../byterun/caml/fail.h \ + ../byterun/caml/gc.h ../byterun/caml/intext.h ../byterun/caml/io.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/memory.h ../byterun/caml/minor_gc.h \ + ../byterun/caml/address_class.h ../byterun/caml/roots.h \ + ../byterun/caml/signals.h ../byterun/caml/stack.h \ + ../byterun/caml/sys.h ../byterun/caml/spacetime.h afl.i.$(O): afl.c ../byterun/caml/misc.h ../byterun/caml/config.h \ - ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/misc.h + ../byterun/caml/m.h ../byterun/caml/s.h ../byterun/caml/mlvalues.h bigarray.i.$(O): bigarray.c ../byterun/caml/alloc.h ../byterun/caml/misc.h \ - ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ - ../byterun/caml/mlvalues.h ../byterun/caml/bigarray.h \ - ../byterun/caml/custom.h ../byterun/caml/fail.h ../byterun/caml/intext.h \ - ../byterun/caml/io.h ../byterun/caml/hash.h ../byterun/caml/memory.h \ - ../byterun/caml/gc.h ../byterun/caml/major_gc.h \ - ../byterun/caml/freelist.h ../byterun/caml/minor_gc.h \ - ../byterun/caml/address_class.h ../byterun/caml/mlvalues.h -win32.i.$(O): ../byterun/win32.c ../byterun/caml/alloc.h \ - ../byterun/caml/misc.h ../byterun/caml/config.h ../byterun/caml/m.h \ - ../byterun/caml/s.h ../byterun/caml/mlvalues.h \ - ../byterun/caml/address_class.h ../byterun/caml/fail.h \ - ../byterun/caml/io.h ../byterun/caml/memory.h ../byterun/caml/gc.h \ - ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ - ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h \ - ../byterun/caml/misc.h ../byterun/caml/osdeps.h ../byterun/caml/memory.h \ - ../byterun/caml/signals.h ../byterun/caml/sys.h ../byterun/caml/config.h + ../byterun/caml/config.h ../byterun/caml/m.h ../byterun/caml/s.h \ + ../byterun/caml/mlvalues.h ../byterun/caml/bigarray.h \ + ../byterun/caml/custom.h ../byterun/caml/fail.h \ + ../byterun/caml/intext.h ../byterun/caml/io.h ../byterun/caml/hash.h \ + ../byterun/caml/memory.h ../byterun/caml/gc.h \ + ../byterun/caml/major_gc.h ../byterun/caml/freelist.h \ + ../byterun/caml/minor_gc.h ../byterun/caml/address_class.h diff --git a/asmrun/spacetime.c b/asmrun/spacetime.c index aaf7f6af8e..bdcdd9f4f8 100644 --- a/asmrun/spacetime.c +++ b/asmrun/spacetime.c @@ -38,6 +38,7 @@ #include "caml/minor_gc.h" #include "caml/misc.h" #include "caml/mlvalues.h" +#include "caml/osdeps.h" #include "caml/roots.h" #include "caml/signals.h" #include "caml/stack.h" @@ -118,14 +119,26 @@ static void reinitialise_free_node_block(void) extern value val_process_id; #endif -static uint32_t version_number = 0; +enum { + FEATURE_CALL_COUNTS = 1, +} features; + +static uint16_t version_number = 0; static uint32_t magic_number_base = 0xace00ace; static void caml_spacetime_write_magic_number_internal(struct channel* chan) { - value magic_number = + value magic_number; + uint16_t features = 0; + +#ifdef WITH_SPACETIME_CALL_COUNTS + features |= FEATURE_CALL_COUNTS; +#endif + + magic_number = Val_long(((uint64_t) magic_number_base) - | (((uint64_t) version_number) << 32)); + | (((uint64_t) version_number) << 32) + | (((uint64_t) features) << 48)); Lock(chan); caml_output_val(chan, magic_number, Val_long(0)); @@ -198,7 +211,7 @@ void caml_spacetime_initialize(void) caml_spacetime_static_shape_tables = &caml_spacetime_shapes; - ap_interval = getenv ("OCAML_SPACETIME_INTERVAL"); + ap_interval = caml_secure_getenv ("OCAML_SPACETIME_INTERVAL"); if (ap_interval != NULL) { unsigned int interval = 0; sscanf(ap_interval, "%u", &interval); @@ -209,7 +222,7 @@ void caml_spacetime_initialize(void) int dir_ok = 1; user_specified_automatic_snapshot_dir = - getenv("OCAML_SPACETIME_SNAPSHOT_DIR"); + caml_secure_getenv("OCAML_SPACETIME_SNAPSHOT_DIR"); if (user_specified_automatic_snapshot_dir == NULL) { #ifdef HAS_GETCWD @@ -568,7 +581,8 @@ static c_node* allocate_c_node(void) node->gc_header = Make_header(sizeof(c_node)/sizeof(uintnat) - 1, C_node_tag, Caml_black); - node->data.callee_node = Val_unit; + node->data.call.callee_node = Val_unit; + node->data.call.call_count = Val_long(0); node->next = Val_unit; return node; @@ -582,7 +596,7 @@ static c_node* allocate_c_node(void) call (e.g. [List.map] when not inlined). */ static void* last_indirect_node_hole_ptr_callee; static value* last_indirect_node_hole_ptr_node_hole; -static value* last_indirect_node_hole_ptr_result; +static call_point* last_indirect_node_hole_ptr_result; CAMLprim value* caml_spacetime_indirect_node_hole_ptr (void* callee, value* node_hole, value caller_node) @@ -596,7 +610,11 @@ CAMLprim value* caml_spacetime_indirect_node_hole_ptr if (callee == last_indirect_node_hole_ptr_callee && node_hole == last_indirect_node_hole_ptr_node_hole) { - return last_indirect_node_hole_ptr_result; +#ifdef WITH_SPACETIME_CALL_COUNTS + last_indirect_node_hole_ptr_result->call_count = + Val_long (Long_val (last_indirect_node_hole_ptr_result->call_count) + 1); +#endif + return &(last_indirect_node_hole_ptr_result->callee_node); } last_indirect_node_hole_ptr_callee = callee; @@ -613,8 +631,12 @@ CAMLprim value* caml_spacetime_indirect_node_hole_ptr CAMLassert(caml_spacetime_classify_c_node(c_node) == CALL); if (c_node->pc == encoded_callee) { - last_indirect_node_hole_ptr_result = &(c_node->data.callee_node); - return last_indirect_node_hole_ptr_result; +#ifdef WITH_SPACETIME_CALL_COUNTS + c_node->data.call.call_count = + Val_long (Long_val(c_node->data.call.call_count) + 1); +#endif + last_indirect_node_hole_ptr_result = &(c_node->data.call); + return &(last_indirect_node_hole_ptr_result->callee_node); } else { node_hole = &c_node->next; @@ -629,7 +651,7 @@ CAMLprim value* caml_spacetime_indirect_node_hole_ptr Perform the initialization equivalent to that emitted by [Spacetime.code_for_function_prologue] for direct tail call sites. */ - c_node->data.callee_node = Encode_tail_caller_node(caller_node); + c_node->data.call.callee_node = Encode_tail_caller_node(caller_node); } *node_hole = caml_spacetime_stored_pointer_of_c_node(c_node); @@ -637,9 +659,13 @@ CAMLprim value* caml_spacetime_indirect_node_hole_ptr CAMLassert(((uintnat) *node_hole) % sizeof(value) == 0); CAMLassert(*node_hole != Val_unit); - last_indirect_node_hole_ptr_result = &(c_node->data.callee_node); +#ifdef WITH_SPACETIME_CALL_COUNTS + c_node->data.call.call_count = + Val_long (Long_val(c_node->data.call.call_count) + 1); +#endif + last_indirect_node_hole_ptr_result = &(c_node->data.call); - return last_indirect_node_hole_ptr_result; + return &(last_indirect_node_hole_ptr_result->callee_node); } /* Some notes on why caml_call_gc doesn't need a distinguished node. @@ -846,7 +872,7 @@ static NOINLINE void* find_trie_node_from_libunwind(int for_allocation, CAMLassert(caml_spacetime_classify_c_node(node) == expected_type); CAMLassert(pc_inside_c_node_matches(node, pc)); - node_hole = &node->data.callee_node; + node_hole = &node->data.call.callee_node; } if (must_initialise_node_for_allocation) { diff --git a/asmrun/spacetime_offline.c b/asmrun/spacetime_offline.c index 6f79e49fa3..d8e815cefa 100644 --- a/asmrun/spacetime_offline.c +++ b/asmrun/spacetime_offline.c @@ -144,6 +144,12 @@ CAMLprim value caml_spacetime_ocaml_direct_call_point_callee_node return Direct_callee_node(node, Long_val(offset)); } +CAMLprim value caml_spacetime_ocaml_direct_call_point_call_count +(value node, value offset) +{ + return Direct_call_count(node, Long_val(offset)); +} + CAMLprim value caml_spacetime_ocaml_indirect_call_point_callees (value node, value offset) { @@ -197,10 +203,23 @@ CAMLprim value caml_spacetime_c_node_callee_node(value node) /* This might be an uninitialised tail call point: for example if an OCaml callee was indirectly called but the callee wasn't instrumented (e.g. a leaf function that doesn't allocate). */ - if (Is_tail_caller_node_encoded(c_node->data.callee_node)) { + if (Is_tail_caller_node_encoded(c_node->data.call.callee_node)) { return Val_unit; } - return c_node->data.callee_node; + return c_node->data.call.callee_node; +} + +CAMLprim value caml_spacetime_c_node_call_count(value node) +{ + c_node* c_node; + CAMLassert(node != (value) NULL); + CAMLassert(Is_c_node(node)); + c_node = caml_spacetime_offline_c_node_of_stored_pointer_not_null(node); + CAMLassert(caml_spacetime_offline_classify_c_node(c_node) == CALL); + if (Is_tail_caller_node_encoded(c_node->data.call.callee_node)) { + return Val_long(0); + } + return c_node->data.call.call_count; } CAMLprim value caml_spacetime_c_node_profinfo(value node) diff --git a/boot/ocamlc b/boot/ocamlc Binary files differindex bdd71b62ca..46f260ee46 100755 --- a/boot/ocamlc +++ b/boot/ocamlc diff --git a/boot/ocamldep b/boot/ocamldep Binary files differindex b72a6c5474..0815a6c016 100755 --- a/boot/ocamldep +++ b/boot/ocamldep diff --git a/boot/ocamllex b/boot/ocamllex Binary files differindex 29a9b31981..215e6f4687 100755 --- a/boot/ocamllex +++ b/boot/ocamllex diff --git a/bytecomp/bytegen.ml b/bytecomp/bytegen.ml index e12449d4c2..ec02835256 100644 --- a/bytecomp/bytegen.ml +++ b/bytecomp/bytegen.ml @@ -868,6 +868,8 @@ let rec comp_expr env exp sz cont = let ev = event (Event_after ty) info in let cont1 = add_event ev cont in comp_expr env lam sz cont1 + | Lev_module_definition _ -> + comp_expr env lam sz cont end | Lifused (_, exp) -> comp_expr env exp sz cont diff --git a/bytecomp/lambda.ml b/bytecomp/lambda.ml index 3d126257ca..bb78bf9c29 100644 --- a/bytecomp/lambda.ml +++ b/bytecomp/lambda.ml @@ -275,6 +275,7 @@ and lambda_event_kind = | Lev_after of Types.type_expr | Lev_function | Lev_pseudo + | Lev_module_definition of Ident.t type program = { module_ident : Ident.t; @@ -531,11 +532,20 @@ let rec transl_normal_path = function | Papply _ -> fatal_error "Lambda.transl_path" -(* Translation of value identifiers *) +(* Translation of identifiers *) -let transl_path ?(loc=Location.none) env path = +let transl_module_path ?(loc=Location.none) env path = transl_normal_path (Env.normalize_path (Some loc) env path) +let transl_value_path ?(loc=Location.none) env path = + transl_normal_path (Env.normalize_path_prefix (Some loc) env path) + +let transl_class_path = transl_value_path +let transl_extension_path = transl_value_path + +(* compatibility alias, deprecated in the .mli *) +let transl_path = transl_value_path + (* Compile a sequence of expressions *) let rec make_sequence fn = function diff --git a/bytecomp/lambda.mli b/bytecomp/lambda.mli index 192ce76cbe..84f86bd371 100644 --- a/bytecomp/lambda.mli +++ b/bytecomp/lambda.mli @@ -294,6 +294,7 @@ and lambda_event_kind = | Lev_after of Types.type_expr | Lev_function | Lev_pseudo + | Lev_module_definition of Ident.t type program = { module_ident : Ident.t; @@ -328,6 +329,13 @@ val free_methods: lambda -> IdentSet.t val transl_normal_path: Path.t -> lambda (* Path.t is already normal *) val transl_path: ?loc:Location.t -> Env.t -> Path.t -> lambda +[@@ocaml.deprecated "use transl_{module,value,extension,class}_path instead"] + +val transl_module_path: ?loc:Location.t -> Env.t -> Path.t -> lambda +val transl_value_path: ?loc:Location.t -> Env.t -> Path.t -> lambda +val transl_extension_path: ?loc:Location.t -> Env.t -> Path.t -> lambda +val transl_class_path: ?loc:Location.t -> Env.t -> Path.t -> lambda + val make_sequence: ('a -> lambda) -> 'a list -> lambda val subst_lambda: lambda Ident.tbl -> lambda -> lambda diff --git a/bytecomp/matching.ml b/bytecomp/matching.ml index 5b96c13def..d559549592 100644 --- a/bytecomp/matching.ml +++ b/bytecomp/matching.ml @@ -2335,9 +2335,8 @@ let combine_constructor loc arg ex_pat cstr partial ctx def let tests = List.fold_right (fun (path, act) rem -> - Lifthenelse(Lprim(Pintcomp Ceq, - [Lvar tag; - transl_path ex_pat.pat_env path], loc), + let ext = transl_extension_path ex_pat.pat_env path in + Lifthenelse(Lprim(Pintcomp Ceq, [Lvar tag; ext], loc), act, rem)) nonconsts default @@ -2346,8 +2345,8 @@ let combine_constructor loc arg ex_pat cstr partial ctx def in List.fold_right (fun (path, act) rem -> - Lifthenelse(Lprim(Pintcomp Ceq, - [arg; transl_path ex_pat.pat_env path], loc), + let ext = transl_extension_path ex_pat.pat_env path in + Lifthenelse(Lprim(Pintcomp Ceq, [arg; ext], loc), act, rem)) consts nonconst_lambda diff --git a/bytecomp/printlambda.ml b/bytecomp/printlambda.ml index c619207115..54a64bee2f 100644 --- a/bytecomp/printlambda.ml +++ b/bytecomp/printlambda.ml @@ -601,6 +601,8 @@ let rec lam ppf = function | Lev_after _ -> "after" | Lev_function -> "funct-body" | Lev_pseudo -> "pseudo" + | Lev_module_definition ident -> + Format.asprintf "module-defn(%a)" Ident.print ident in fprintf ppf "@[<2>(%s %s(%i)%s:%i-%i@ %a)@]" kind ev.lev_loc.Location.loc_start.Lexing.pos_fname diff --git a/bytecomp/simplif.mli b/bytecomp/simplif.mli index 4b0a3032f4..a1e74b970e 100644 --- a/bytecomp/simplif.mli +++ b/bytecomp/simplif.mli @@ -13,6 +13,8 @@ (* *) (**************************************************************************) +(** Lambda simplification and lambda plugin hooks *) + (* Elimination of useless Llet(Alias) bindings. Transformation of let-bound references into variables. Simplification over staticraise/staticcatch constructs. diff --git a/bytecomp/translclass.ml b/bytecomp/translclass.ml index 2504a8703a..e71e77fa7c 100644 --- a/bytecomp/translclass.ml +++ b/bytecomp/translclass.ml @@ -195,7 +195,8 @@ let rec build_object_init cl_table obj params inh_init obj_init cl = build_object_init cl_table obj (vals @ params) inh_init obj_init cl in (inh_init, Translcore.transl_let rec_flag defs obj_init) - | Tcl_constraint (cl, _, _vals, _pub_meths, _concr_meths) -> + | Tcl_open (_, _, _, _, cl) + | Tcl_constraint (cl, _, _, _, _) -> build_object_init cl_table obj params inh_init obj_init cl let rec build_object_init_0 cl_table params cl copy_env subst_env top ids = @@ -268,7 +269,7 @@ let rec build_class_init cla cstr super inh_init cl_init msubst top cl = Tcl_ident ( path, _, _) -> begin match inh_init with (obj_init, _path')::inh_init -> - let lpath = transl_path ~loc:cl.cl_loc cl.cl_env path in + let lpath = transl_class_path ~loc:cl.cl_loc cl.cl_env path in (inh_init, Llet (Strict, Pgenval, obj_init, mkappl(Lprim(Pfield 1, [lpath], Location.none), Lvar cla :: @@ -386,6 +387,8 @@ let rec build_class_init cla cstr super inh_init cl_init msubst top cl = Lsequence(mkappl (oo_prim "narrow", narrow_args), cl_init)) end + | Tcl_open (_, _, _, _, cl) -> + build_class_init cla cstr super inh_init cl_init msubst top cl let rec build_class_lets cl ids = match cl.cl_desc with @@ -407,6 +410,7 @@ let rec get_class_meths cl = | Tcl_fun (_, _, _, cl, _) | Tcl_let (_, _, _, cl) | Tcl_apply (cl, _) + | Tcl_open (_, _, _, _, cl) | Tcl_constraint (cl, _, _, _, _) -> get_class_meths cl (* @@ -452,6 +456,8 @@ let rec transl_class_rebind obj_init cl vf = in check_constraint cl.cl_type; (path, obj_init) + | Tcl_open (_, _, _, _, cl) -> + transl_class_rebind obj_init cl vf let rec transl_class_rebind_0 self obj_init cl vf = match cl.cl_desc with diff --git a/bytecomp/translcore.ml b/bytecomp/translcore.ml index 4c43cc535c..7871c1136c 100644 --- a/bytecomp/translcore.ml +++ b/bytecomp/translcore.ml @@ -64,7 +64,7 @@ let transl_extension_constructor env path ext = Lprim (prim_fresh_oo_id, [Lconst (Const_base (Const_int 0))], loc)], loc) | Text_rebind(path, _lid) -> - transl_path ~loc env path + transl_extension_path ~loc env path (* Translation of primitives *) @@ -733,7 +733,7 @@ and transl_exp0 e = | Texp_ident(_, _, {val_kind = Val_anc _}) -> raise(Error(e.exp_loc, Free_super_var)) | Texp_ident(path, _, {val_kind = Val_reg | Val_self _}) -> - transl_path ~loc:e.exp_loc e.exp_env path + transl_value_path ~loc:e.exp_loc e.exp_env path | Texp_ident _ -> fatal_error "Translcore.transl_exp: bad Texp_ident" | Texp_constant cst -> Lconst(Const_base cst) @@ -888,13 +888,13 @@ and transl_exp0 e = end | Cstr_extension(path, is_const) -> if is_const then - transl_path e.exp_env path + transl_extension_path e.exp_env path else Lprim(Pmakeblock(0, Immutable, Some (Pgenval :: shape)), - transl_path e.exp_env path :: ll, e.exp_loc) + transl_extension_path e.exp_env path :: ll, e.exp_loc) end | Texp_extension_constructor (_, path) -> - transl_path e.exp_env path + transl_extension_path e.exp_env path | Texp_variant(l, arg) -> let tag = Btype.hash_variant l in begin match arg with @@ -1008,7 +1008,7 @@ and transl_exp0 e = | Texp_new (cl, {Location.loc=loc}, _) -> Lapply{ap_should_be_tailcall=false; ap_loc=loc; - ap_func=Lprim(Pfield 0, [transl_path ~loc e.exp_env cl], loc); + ap_func=Lprim(Pfield 0, [transl_class_path ~loc e.exp_env cl], loc); ap_args=[lambda_unit]; ap_inlined=Default_inline; ap_specialised=Default_specialise} @@ -1032,10 +1032,16 @@ and transl_exp0 e = (Lvar cpy) path expr, rem)) modifs (Lvar cpy)) - | Texp_letmodule(id, _, modl, body) -> - Llet(Strict, Pgenval, id, - !transl_module Tcoerce_none None modl, - transl_exp body) + | Texp_letmodule(id, loc, modl, body) -> + let defining_expr = + Levent (!transl_module Tcoerce_none None modl, { + lev_loc = loc.loc; + lev_kind = Lev_module_definition id; + lev_repr = None; + lev_env = Env.summary Env.empty; + }) + in + Llet(Strict, Pgenval, id, defining_expr, transl_exp body) | Texp_letexception(cd, body) -> Llet(Strict, Pgenval, cd.ext_id, transl_extension_constructor e.exp_env None cd, @@ -1347,7 +1353,7 @@ and transl_record loc env fields repres opt_init_expr = | Tconstr(p, _, _) -> p | _ -> assert false in - let slot = transl_path env path in + let slot = transl_extension_path env path in Lprim(Pmakeblock(0, mut, Some (Pgenval :: shape)), slot :: ll, loc) in begin match opt_init_expr with diff --git a/bytecomp/translmod.ml b/bytecomp/translmod.ml index c7ce0a9ff1..ba7e64c81f 100644 --- a/bytecomp/translmod.ml +++ b/bytecomp/translmod.ml @@ -312,8 +312,8 @@ let compile_recmodule compile_rhs bindings cont = eval_rec_bindings (reorder_rec_bindings (List.map - (fun {mb_id=id; mb_expr=modl; _} -> - (id, modl.mod_loc, init_shape modl, compile_rhs id modl)) + (fun {mb_id=id; mb_expr=modl; mb_loc=loc; _} -> + (id, modl.mod_loc, init_shape modl, compile_rhs id modl loc)) bindings)) cont @@ -354,7 +354,7 @@ let rec transl_module cc rootpath mexp = match mexp.mod_desc with Tmod_ident (path,_) -> apply_coercion loc Strict cc - (transl_path ~loc mexp.mod_env path) + (transl_module_path ~loc mexp.mod_env path) | Tmod_structure str -> fst (transl_struct loc [] cc rootpath str) | Tmod_functor(param, _, _, body) -> @@ -501,6 +501,14 @@ and transl_structure loc fields cc rootpath final_env = function Translattribute.add_inline_attribute module_body mb.mb_loc mb.mb_attributes in + let module_body = + Levent (module_body, { + lev_loc = mb.mb_loc; + lev_kind = Lev_module_definition id; + lev_repr = None; + lev_env = Env.summary Env.empty; + }) + in Llet(pure_module mb.mb_expr, Pgenval, id, module_body, body), size @@ -513,8 +521,16 @@ and transl_structure loc fields cc rootpath final_env = function in let lam = compile_recmodule - (fun id modl -> - transl_module Tcoerce_none (field_path rootpath id) modl) + (fun id modl loc -> + let module_body = + transl_module Tcoerce_none (field_path rootpath id) modl + in + Levent (module_body, { + lev_loc = loc; + lev_kind = Lev_module_definition id; + lev_repr = None; + lev_env = Env.summary Env.empty; + })) bindings body in @@ -851,7 +867,7 @@ let transl_store_structure glob map prims str = | Tstr_recmodule bindings -> let ids = List.map (fun mb -> mb.mb_id) bindings in compile_recmodule - (fun id modl -> + (fun id modl _loc -> subst_lambda subst (transl_module Tcoerce_none (field_path rootpath id) modl)) @@ -1118,7 +1134,7 @@ let transl_toplevel_item item = | Tstr_recmodule bindings -> let idents = List.map (fun mb -> mb.mb_id) bindings in compile_recmodule - (fun id modl -> transl_module Tcoerce_none (Some(Pident id)) modl) + (fun id modl _loc -> transl_module Tcoerce_none (Some(Pident id)) modl) bindings (make_sequence toploop_setvalue_id idents) | Tstr_class cl_list -> diff --git a/byterun/.depend b/byterun/.depend index 1e9f182cfe..daa37a0391 100644 --- a/byterun/.depend +++ b/byterun/.depend @@ -1,943 +1,799 @@ -afl.$(O): afl.c caml/misc.h caml/config.h caml/m.h caml/s.h caml/mlvalues.h \ - caml/misc.h +afl.$(O): afl.c caml/misc.h caml/config.h caml/m.h caml/s.h caml/mlvalues.h alloc.$(O): alloc.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/custom.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/stacks.h caml/memory.h + caml/mlvalues.h caml/custom.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/stacks.h array.$(O): array.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/mlvalues.h caml/signals.h caml/spacetime.h + caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/signals.h \ + caml/spacetime.h backtrace.$(O): backtrace.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/backtrace.h \ - caml/exec.h caml/backtrace_prim.h caml/backtrace.h caml/fail.h + caml/s.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/backtrace.h \ + caml/exec.h caml/backtrace_prim.h caml/fail.h backtrace_prim.$(O): backtrace_prim.c caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/config.h caml/misc.h caml/alloc.h caml/mlvalues.h \ - caml/custom.h caml/io.h caml/instruct.h caml/intext.h caml/io.h \ - caml/exec.h caml/fix_code.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/startup.h \ - caml/exec.h caml/stacks.h caml/memory.h caml/sys.h caml/backtrace.h \ - caml/fail.h caml/backtrace_prim.h caml/backtrace.h + caml/mlvalues.h caml/misc.h caml/alloc.h caml/custom.h caml/io.h \ + caml/instruct.h caml/intext.h caml/exec.h caml/fix_code.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/startup.h caml/stacks.h \ + caml/sys.h caml/backtrace.h caml/fail.h caml/backtrace_prim.h bigarray.$(O): bigarray.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/bigarray.h caml/custom.h caml/fail.h \ - caml/intext.h caml/io.h caml/hash.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h + caml/s.h caml/mlvalues.h caml/bigarray.h caml/custom.h caml/fail.h \ + caml/intext.h caml/io.h caml/hash.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h callback.$(O): callback.c caml/callback.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/interp.h caml/instruct.h caml/fix_code.h \ - caml/stacks.h caml/memory.h + caml/m.h caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/interp.h caml/instruct.h caml/fix_code.h caml/stacks.h compact.$(O): compact.c caml/address_class.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/config.h caml/finalise.h caml/roots.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/freelist.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/mlvalues.h caml/roots.h caml/weak.h \ - caml/compact.h + caml/misc.h caml/mlvalues.h caml/finalise.h caml/roots.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/gc_ctrl.h caml/weak.h caml/compact.h compare.$(O): compare.c caml/custom.h caml/mlvalues.h caml/config.h caml/m.h \ - caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/mlvalues.h + caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h custom.$(O): custom.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h + caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h debugger.$(O): debugger.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/config.h caml/debugger.h caml/misc.h \ - caml/fail.h caml/fix_code.h caml/instruct.h caml/intext.h caml/io.h \ - caml/io.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/sys.h + caml/s.h caml/mlvalues.h caml/debugger.h caml/osdeps.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/fail.h caml/fix_code.h caml/instruct.h \ + caml/intext.h caml/io.h caml/stacks.h caml/sys.h dynlink.$(O): dynlink.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/dynlink.h caml/fail.h \ - caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/misc.h caml/osdeps.h \ - caml/memory.h caml/prims.h caml/signals.h + caml/misc.h caml/mlvalues.h caml/dynlink.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/osdeps.h caml/prims.h caml/signals.h extern.$(O): extern.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/config.h caml/custom.h caml/fail.h \ - caml/gc.h caml/intext.h caml/io.h caml/io.h caml/md5.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/reverse.h + caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/gc.h \ + caml/intext.h caml/io.h caml/md5.h caml/memory.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/reverse.h fail.$(O): fail.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/io.h caml/gc.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/misc.h caml/mlvalues.h caml/printexc.h caml/signals.h caml/stacks.h \ - caml/memory.h + caml/mlvalues.h caml/fail.h caml/io.h caml/gc.h caml/memory.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/printexc.h caml/signals.h caml/stacks.h finalise.$(O): finalise.c caml/callback.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/compact.h caml/fail.h caml/finalise.h \ - caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/minor_gc.h caml/mlvalues.h \ - caml/roots.h caml/signals.h + caml/m.h caml/s.h caml/misc.h caml/compact.h caml/fail.h \ + caml/finalise.h caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/signals.h fix_code.$(O): fix_code.c caml/config.h caml/m.h caml/s.h caml/debugger.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/fix_code.h \ - caml/instruct.h caml/intext.h caml/io.h caml/md5.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/reverse.h + caml/misc.h caml/mlvalues.h caml/fix_code.h caml/instruct.h \ + caml/intext.h caml/io.h caml/md5.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h floats.$(O): floats.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/misc.h caml/reverse.h caml/stacks.h caml/memory.h + caml/s.h caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h caml/stacks.h freelist.$(O): freelist.c caml/config.h caml/m.h caml/s.h caml/freelist.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/gc.h caml/gc_ctrl.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/major_gc.h caml/misc.h caml/mlvalues.h + caml/misc.h caml/mlvalues.h caml/gc.h caml/gc_ctrl.h caml/memory.h \ + caml/major_gc.h caml/minor_gc.h caml/address_class.h gc_ctrl.$(O): gc_ctrl.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/compact.h \ - caml/custom.h caml/fail.h caml/finalise.h caml/roots.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/freelist.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/minor_gc.h caml/misc.h \ - caml/mlvalues.h caml/signals.h caml/stacks.h caml/startup_aux.h + caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/compact.h \ + caml/custom.h caml/fail.h caml/finalise.h caml/roots.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/gc_ctrl.h caml/signals.h caml/stacks.h \ + caml/startup_aux.h globroots.$(O): globroots.c caml/memory.h caml/config.h caml/m.h caml/s.h \ - caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/misc.h caml/mlvalues.h \ - caml/roots.h caml/memory.h caml/globroots.h caml/roots.h + caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/roots.h caml/globroots.h hash.$(O): hash.c caml/mlvalues.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/custom.h caml/mlvalues.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/hash.h + caml/misc.h caml/custom.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/hash.h instrtrace.$(O): instrtrace.c intern.$(O): intern.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/callback.h caml/config.h caml/custom.h \ - caml/fail.h caml/gc.h caml/intext.h caml/io.h caml/io.h caml/md5.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/misc.h caml/reverse.h + caml/s.h caml/mlvalues.h caml/callback.h caml/custom.h caml/fail.h \ + caml/gc.h caml/intext.h caml/io.h caml/md5.h caml/memory.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h interp.$(O): interp.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/callback.h \ - caml/debugger.h caml/fail.h caml/fix_code.h caml/instrtrace.h \ - caml/instruct.h caml/interp.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/prims.h \ - caml/signals.h caml/stacks.h caml/memory.h caml/startup_aux.h \ - caml/jumptbl.h + caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/callback.h \ + caml/debugger.h caml/fail.h caml/fix_code.h caml/instrtrace.h \ + caml/instruct.h caml/interp.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/prims.h caml/signals.h caml/stacks.h caml/startup_aux.h \ + caml/jumptbl.h ints.$(O): ints.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/custom.h caml/fail.h caml/intext.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h + caml/mlvalues.h caml/custom.h caml/fail.h caml/intext.h caml/io.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h io.$(O): io.c caml/config.h caml/m.h caml/s.h caml/alloc.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/custom.h caml/fail.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/osdeps.h \ - caml/memory.h caml/signals.h caml/sys.h + caml/mlvalues.h caml/custom.h caml/fail.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/osdeps.h caml/signals.h caml/sys.h lexing.$(O): lexing.c caml/fail.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/mlvalues.h caml/stacks.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h + caml/s.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h main.$(O): main.c caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/misc.h caml/sys.h + caml/mlvalues.h caml/sys.h major_gc.$(O): major_gc.c caml/compact.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/custom.h caml/config.h caml/fail.h \ - caml/finalise.h caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/freelist.h \ - caml/gc.h caml/gc_ctrl.h caml/major_gc.h caml/misc.h caml/mlvalues.h \ - caml/roots.h caml/signals.h caml/weak.h + caml/misc.h caml/mlvalues.h caml/custom.h caml/fail.h caml/finalise.h \ + caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/gc_ctrl.h caml/signals.h \ + caml/weak.h md5.$(O): md5.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/md5.h caml/io.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/io.h caml/reverse.h + caml/mlvalues.h caml/fail.h caml/md5.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/reverse.h memory.$(O): memory.c caml/address_class.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/config.h caml/fail.h caml/freelist.h \ - caml/gc.h caml/gc_ctrl.h caml/major_gc.h caml/freelist.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ - caml/minor_gc.h caml/misc.h caml/mlvalues.h caml/signals.h + caml/misc.h caml/mlvalues.h caml/fail.h caml/freelist.h caml/gc.h \ + caml/gc_ctrl.h caml/major_gc.h caml/memory.h caml/minor_gc.h \ + caml/signals.h meta.$(O): meta.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/config.h caml/fail.h caml/fix_code.h caml/interp.h \ - caml/intext.h caml/io.h caml/major_gc.h caml/freelist.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ - caml/minor_gc.h caml/misc.h caml/mlvalues.h caml/prims.h caml/stacks.h \ - caml/memory.h + caml/mlvalues.h caml/fail.h caml/fix_code.h caml/interp.h \ + caml/intext.h caml/io.h caml/major_gc.h caml/freelist.h caml/memory.h \ + caml/gc.h caml/minor_gc.h caml/address_class.h caml/prims.h \ + caml/stacks.h minor_gc.$(O): minor_gc.c caml/custom.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/config.h caml/fail.h caml/finalise.h \ - caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/minor_gc.h caml/misc.h \ - caml/mlvalues.h caml/roots.h caml/signals.h caml/weak.h -misc.$(O): misc.c caml/config.h caml/m.h caml/s.h caml/misc.h caml/config.h \ - caml/memory.h caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/version.h + caml/m.h caml/s.h caml/misc.h caml/fail.h caml/finalise.h caml/roots.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/gc_ctrl.h caml/signals.h \ + caml/weak.h +misc.$(O): misc.c caml/config.h caml/m.h caml/s.h caml/misc.h caml/memory.h \ + caml/gc.h caml/mlvalues.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/osdeps.h caml/version.h obj.$(O): obj.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h \ - caml/freelist.h caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/minor_gc.h caml/misc.h caml/mlvalues.h \ - caml/prims.h caml/spacetime.h + caml/mlvalues.h caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h \ + caml/freelist.h caml/memory.h caml/minor_gc.h caml/address_class.h \ + caml/prims.h caml/spacetime.h parsing.$(O): parsing.c caml/config.h caml/m.h caml/s.h caml/mlvalues.h \ - caml/config.h caml/misc.h caml/memory.h caml/gc.h caml/mlvalues.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/alloc.h + caml/misc.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/alloc.h prims.$(O): prims.c caml/mlvalues.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/prims.h + caml/misc.h caml/prims.h printexc.$(O): printexc.c caml/backtrace.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/exec.h caml/callback.h \ - caml/debugger.h caml/fail.h caml/misc.h caml/mlvalues.h caml/printexc.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h + caml/m.h caml/s.h caml/misc.h caml/exec.h caml/callback.h \ + caml/debugger.h caml/fail.h caml/printexc.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h roots.$(O): roots.c caml/finalise.h caml/roots.h caml/misc.h caml/config.h \ - caml/m.h caml/s.h caml/memory.h caml/gc.h caml/mlvalues.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/globroots.h caml/major_gc.h caml/memory.h caml/minor_gc.h \ - caml/misc.h caml/mlvalues.h caml/roots.h caml/stacks.h + caml/m.h caml/s.h caml/memory.h caml/gc.h caml/mlvalues.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/globroots.h caml/stacks.h signals.$(O): signals.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/callback.h caml/config.h caml/fail.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/roots.h \ - caml/memory.h caml/signals.h caml/signals_machdep.h caml/sys.h + caml/s.h caml/mlvalues.h caml/callback.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/roots.h caml/signals.h \ + caml/signals_machdep.h caml/sys.h signals_byt.$(O): signals_byt.c caml/config.h caml/m.h caml/s.h \ - caml/memory.h caml/config.h caml/gc.h caml/mlvalues.h caml/misc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/osdeps.h caml/memory.h caml/signals.h caml/signals_machdep.h + caml/memory.h caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/osdeps.h \ + caml/signals.h caml/signals_machdep.h spacetime.$(O): spacetime.c caml/fail.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/mlvalues.h + caml/s.h caml/mlvalues.h stacks.$(O): stacks.c caml/config.h caml/m.h caml/s.h caml/fail.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/misc.h caml/mlvalues.h \ - caml/stacks.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h + caml/misc.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h startup.$(O): startup.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/backtrace.h caml/exec.h \ - caml/callback.h caml/custom.h caml/debugger.h caml/dynlink.h caml/exec.h \ - caml/fail.h caml/fix_code.h caml/freelist.h caml/gc_ctrl.h \ - caml/instrtrace.h caml/interp.h caml/intext.h caml/io.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/minor_gc.h caml/misc.h caml/mlvalues.h \ - caml/osdeps.h caml/memory.h caml/prims.h caml/printexc.h caml/reverse.h \ - caml/signals.h caml/stacks.h caml/sys.h caml/startup.h \ - caml/startup_aux.h caml/version.h + caml/misc.h caml/mlvalues.h caml/backtrace.h caml/exec.h \ + caml/callback.h caml/custom.h caml/debugger.h caml/dynlink.h \ + caml/fail.h caml/fix_code.h caml/freelist.h caml/gc_ctrl.h \ + caml/instrtrace.h caml/interp.h caml/intext.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ + caml/osdeps.h caml/prims.h caml/printexc.h caml/reverse.h \ + caml/signals.h caml/stacks.h caml/sys.h caml/startup.h \ + caml/startup_aux.h caml/version.h startup_aux.$(O): startup_aux.c caml/backtrace.h caml/mlvalues.h \ - caml/config.h caml/m.h caml/s.h caml/misc.h caml/exec.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/callback.h caml/major_gc.h caml/dynlink.h \ - caml/startup_aux.h + caml/config.h caml/m.h caml/s.h caml/misc.h caml/exec.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/callback.h caml/dynlink.h caml/osdeps.h \ + caml/startup_aux.h str.$(O): str.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/mlvalues.h \ - caml/misc.h + caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h sys.$(O): sys.c caml/config.h caml/m.h caml/s.h caml/alloc.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/debugger.h caml/fail.h caml/gc_ctrl.h \ - caml/instruct.h caml/io.h caml/misc.h caml/mlvalues.h caml/osdeps.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/signals.h caml/stacks.h caml/sys.h \ - caml/version.h caml/callback.h caml/startup_aux.h + caml/mlvalues.h caml/debugger.h caml/fail.h caml/gc_ctrl.h \ + caml/instruct.h caml/io.h caml/osdeps.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/signals.h caml/stacks.h caml/sys.h caml/version.h caml/callback.h \ + caml/startup_aux.h terminfo.$(O): terminfo.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/fail.h caml/io.h \ - caml/mlvalues.h + caml/misc.h caml/mlvalues.h caml/fail.h caml/io.h unix.$(O): unix.c caml/config.h caml/m.h caml/s.h caml/fail.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/osdeps.h caml/memory.h caml/signals.h caml/sys.h caml/io.h + caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/osdeps.h \ + caml/signals.h caml/sys.h caml/io.h weak.$(O): weak.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/weak.h -win32.$(O): win32.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/address_class.h caml/fail.h caml/io.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/osdeps.h caml/memory.h \ - caml/signals.h caml/sys.h caml/config.h -afl.d.$(O): afl.c caml/misc.h caml/config.h caml/m.h caml/s.h caml/mlvalues.h \ - caml/misc.h + caml/mlvalues.h caml/fail.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/weak.h +afl.d.$(O): afl.c caml/misc.h caml/config.h caml/m.h caml/s.h caml/mlvalues.h alloc.d.$(O): alloc.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/custom.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/stacks.h caml/memory.h + caml/mlvalues.h caml/custom.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/stacks.h array.d.$(O): array.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/mlvalues.h caml/signals.h caml/spacetime.h + caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/signals.h \ + caml/spacetime.h backtrace.d.$(O): backtrace.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/backtrace.h \ - caml/exec.h caml/backtrace_prim.h caml/backtrace.h caml/fail.h + caml/s.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/backtrace.h \ + caml/exec.h caml/backtrace_prim.h caml/fail.h backtrace_prim.d.$(O): backtrace_prim.c caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/config.h caml/misc.h caml/alloc.h caml/mlvalues.h \ - caml/custom.h caml/io.h caml/instruct.h caml/intext.h caml/io.h \ - caml/exec.h caml/fix_code.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/startup.h \ - caml/exec.h caml/stacks.h caml/memory.h caml/sys.h caml/backtrace.h \ - caml/fail.h caml/backtrace_prim.h caml/backtrace.h + caml/mlvalues.h caml/misc.h caml/alloc.h caml/custom.h caml/io.h \ + caml/instruct.h caml/intext.h caml/exec.h caml/fix_code.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/startup.h caml/stacks.h \ + caml/sys.h caml/backtrace.h caml/fail.h caml/backtrace_prim.h bigarray.d.$(O): bigarray.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/bigarray.h caml/custom.h caml/fail.h \ - caml/intext.h caml/io.h caml/hash.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h + caml/s.h caml/mlvalues.h caml/bigarray.h caml/custom.h caml/fail.h \ + caml/intext.h caml/io.h caml/hash.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h callback.d.$(O): callback.c caml/callback.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/interp.h caml/instruct.h caml/fix_code.h \ - caml/stacks.h caml/memory.h + caml/m.h caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/interp.h caml/instruct.h caml/fix_code.h caml/stacks.h compact.d.$(O): compact.c caml/address_class.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/config.h caml/finalise.h caml/roots.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/freelist.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/mlvalues.h caml/roots.h caml/weak.h \ - caml/compact.h + caml/misc.h caml/mlvalues.h caml/finalise.h caml/roots.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/gc_ctrl.h caml/weak.h caml/compact.h compare.d.$(O): compare.c caml/custom.h caml/mlvalues.h caml/config.h caml/m.h \ - caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/mlvalues.h + caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h custom.d.$(O): custom.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h + caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h debugger.d.$(O): debugger.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/config.h caml/debugger.h caml/misc.h \ - caml/fail.h caml/fix_code.h caml/instruct.h caml/intext.h caml/io.h \ - caml/io.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/sys.h + caml/s.h caml/mlvalues.h caml/debugger.h caml/osdeps.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/fail.h caml/fix_code.h caml/instruct.h \ + caml/intext.h caml/io.h caml/stacks.h caml/sys.h dynlink.d.$(O): dynlink.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/dynlink.h caml/fail.h \ - caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/misc.h caml/osdeps.h \ - caml/memory.h caml/prims.h caml/signals.h + caml/misc.h caml/mlvalues.h caml/dynlink.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/osdeps.h caml/prims.h caml/signals.h extern.d.$(O): extern.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/config.h caml/custom.h caml/fail.h \ - caml/gc.h caml/intext.h caml/io.h caml/io.h caml/md5.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/reverse.h + caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/gc.h \ + caml/intext.h caml/io.h caml/md5.h caml/memory.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/reverse.h fail.d.$(O): fail.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/io.h caml/gc.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/misc.h caml/mlvalues.h caml/printexc.h caml/signals.h caml/stacks.h \ - caml/memory.h + caml/mlvalues.h caml/fail.h caml/io.h caml/gc.h caml/memory.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/printexc.h caml/signals.h caml/stacks.h finalise.d.$(O): finalise.c caml/callback.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/compact.h caml/fail.h caml/finalise.h \ - caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/minor_gc.h caml/mlvalues.h \ - caml/roots.h caml/signals.h + caml/m.h caml/s.h caml/misc.h caml/compact.h caml/fail.h \ + caml/finalise.h caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/signals.h fix_code.d.$(O): fix_code.c caml/config.h caml/m.h caml/s.h caml/debugger.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/fix_code.h \ - caml/instruct.h caml/intext.h caml/io.h caml/md5.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/reverse.h + caml/misc.h caml/mlvalues.h caml/fix_code.h caml/instruct.h \ + caml/intext.h caml/io.h caml/md5.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h floats.d.$(O): floats.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/misc.h caml/reverse.h caml/stacks.h caml/memory.h + caml/s.h caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h caml/stacks.h freelist.d.$(O): freelist.c caml/config.h caml/m.h caml/s.h caml/freelist.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/gc.h caml/gc_ctrl.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/major_gc.h caml/misc.h caml/mlvalues.h + caml/misc.h caml/mlvalues.h caml/gc.h caml/gc_ctrl.h caml/memory.h \ + caml/major_gc.h caml/minor_gc.h caml/address_class.h gc_ctrl.d.$(O): gc_ctrl.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/compact.h \ - caml/custom.h caml/fail.h caml/finalise.h caml/roots.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/freelist.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/minor_gc.h caml/misc.h \ - caml/mlvalues.h caml/signals.h caml/stacks.h caml/startup_aux.h + caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/compact.h \ + caml/custom.h caml/fail.h caml/finalise.h caml/roots.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/gc_ctrl.h caml/signals.h caml/stacks.h \ + caml/startup_aux.h globroots.d.$(O): globroots.c caml/memory.h caml/config.h caml/m.h caml/s.h \ - caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/misc.h caml/mlvalues.h \ - caml/roots.h caml/memory.h caml/globroots.h caml/roots.h + caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/roots.h caml/globroots.h hash.d.$(O): hash.c caml/mlvalues.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/custom.h caml/mlvalues.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/hash.h + caml/misc.h caml/custom.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/hash.h instrtrace.d.$(O): instrtrace.c caml/instrtrace.h caml/mlvalues.h \ - caml/config.h caml/m.h caml/s.h caml/misc.h caml/instruct.h caml/misc.h \ - caml/mlvalues.h caml/opnames.h caml/prims.h caml/stacks.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/startup_aux.h + caml/config.h caml/m.h caml/s.h caml/misc.h caml/instruct.h \ + caml/opnames.h caml/prims.h caml/stacks.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/startup_aux.h intern.d.$(O): intern.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/callback.h caml/config.h caml/custom.h \ - caml/fail.h caml/gc.h caml/intext.h caml/io.h caml/io.h caml/md5.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/misc.h caml/reverse.h + caml/s.h caml/mlvalues.h caml/callback.h caml/custom.h caml/fail.h \ + caml/gc.h caml/intext.h caml/io.h caml/md5.h caml/memory.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h interp.d.$(O): interp.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/callback.h \ - caml/debugger.h caml/fail.h caml/fix_code.h caml/instrtrace.h \ - caml/instruct.h caml/interp.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/prims.h \ - caml/signals.h caml/stacks.h caml/memory.h caml/startup_aux.h + caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/callback.h \ + caml/debugger.h caml/fail.h caml/fix_code.h caml/instrtrace.h \ + caml/instruct.h caml/interp.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/prims.h caml/signals.h caml/stacks.h caml/startup_aux.h ints.d.$(O): ints.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/custom.h caml/fail.h caml/intext.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h + caml/mlvalues.h caml/custom.h caml/fail.h caml/intext.h caml/io.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h io.d.$(O): io.c caml/config.h caml/m.h caml/s.h caml/alloc.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/custom.h caml/fail.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/osdeps.h \ - caml/memory.h caml/signals.h caml/sys.h + caml/mlvalues.h caml/custom.h caml/fail.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/osdeps.h caml/signals.h caml/sys.h lexing.d.$(O): lexing.c caml/fail.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/mlvalues.h caml/stacks.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h + caml/s.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h main.d.$(O): main.c caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/misc.h caml/sys.h + caml/mlvalues.h caml/sys.h major_gc.d.$(O): major_gc.c caml/compact.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/custom.h caml/config.h caml/fail.h \ - caml/finalise.h caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/freelist.h \ - caml/gc.h caml/gc_ctrl.h caml/major_gc.h caml/misc.h caml/mlvalues.h \ - caml/roots.h caml/signals.h caml/weak.h + caml/misc.h caml/mlvalues.h caml/custom.h caml/fail.h caml/finalise.h \ + caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/gc_ctrl.h caml/signals.h \ + caml/weak.h md5.d.$(O): md5.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/md5.h caml/io.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/io.h caml/reverse.h + caml/mlvalues.h caml/fail.h caml/md5.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/reverse.h memory.d.$(O): memory.c caml/address_class.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/config.h caml/fail.h caml/freelist.h \ - caml/gc.h caml/gc_ctrl.h caml/major_gc.h caml/freelist.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ - caml/minor_gc.h caml/misc.h caml/mlvalues.h caml/signals.h + caml/misc.h caml/mlvalues.h caml/fail.h caml/freelist.h caml/gc.h \ + caml/gc_ctrl.h caml/major_gc.h caml/memory.h caml/minor_gc.h \ + caml/signals.h meta.d.$(O): meta.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/config.h caml/fail.h caml/fix_code.h caml/interp.h \ - caml/intext.h caml/io.h caml/major_gc.h caml/freelist.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ - caml/minor_gc.h caml/misc.h caml/mlvalues.h caml/prims.h caml/stacks.h \ - caml/memory.h + caml/mlvalues.h caml/fail.h caml/fix_code.h caml/interp.h \ + caml/intext.h caml/io.h caml/major_gc.h caml/freelist.h caml/memory.h \ + caml/gc.h caml/minor_gc.h caml/address_class.h caml/prims.h \ + caml/stacks.h minor_gc.d.$(O): minor_gc.c caml/custom.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/config.h caml/fail.h caml/finalise.h \ - caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/minor_gc.h caml/misc.h \ - caml/mlvalues.h caml/roots.h caml/signals.h caml/weak.h -misc.d.$(O): misc.c caml/config.h caml/m.h caml/s.h caml/misc.h caml/config.h \ - caml/memory.h caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/version.h + caml/m.h caml/s.h caml/misc.h caml/fail.h caml/finalise.h caml/roots.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/gc_ctrl.h caml/signals.h \ + caml/weak.h +misc.d.$(O): misc.c caml/config.h caml/m.h caml/s.h caml/misc.h caml/memory.h \ + caml/gc.h caml/mlvalues.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/osdeps.h caml/version.h obj.d.$(O): obj.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h \ - caml/freelist.h caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/minor_gc.h caml/misc.h caml/mlvalues.h \ - caml/prims.h caml/spacetime.h + caml/mlvalues.h caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h \ + caml/freelist.h caml/memory.h caml/minor_gc.h caml/address_class.h \ + caml/prims.h caml/spacetime.h parsing.d.$(O): parsing.c caml/config.h caml/m.h caml/s.h caml/mlvalues.h \ - caml/config.h caml/misc.h caml/memory.h caml/gc.h caml/mlvalues.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/alloc.h + caml/misc.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/alloc.h prims.d.$(O): prims.c caml/mlvalues.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/prims.h + caml/misc.h caml/prims.h printexc.d.$(O): printexc.c caml/backtrace.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/exec.h caml/callback.h \ - caml/debugger.h caml/fail.h caml/misc.h caml/mlvalues.h caml/printexc.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h + caml/m.h caml/s.h caml/misc.h caml/exec.h caml/callback.h \ + caml/debugger.h caml/fail.h caml/printexc.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h roots.d.$(O): roots.c caml/finalise.h caml/roots.h caml/misc.h caml/config.h \ - caml/m.h caml/s.h caml/memory.h caml/gc.h caml/mlvalues.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/globroots.h caml/major_gc.h caml/memory.h caml/minor_gc.h \ - caml/misc.h caml/mlvalues.h caml/roots.h caml/stacks.h + caml/m.h caml/s.h caml/memory.h caml/gc.h caml/mlvalues.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/globroots.h caml/stacks.h signals.d.$(O): signals.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/callback.h caml/config.h caml/fail.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/roots.h \ - caml/memory.h caml/signals.h caml/signals_machdep.h caml/sys.h + caml/s.h caml/mlvalues.h caml/callback.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/roots.h caml/signals.h \ + caml/signals_machdep.h caml/sys.h signals_byt.d.$(O): signals_byt.c caml/config.h caml/m.h caml/s.h \ - caml/memory.h caml/config.h caml/gc.h caml/mlvalues.h caml/misc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/osdeps.h caml/memory.h caml/signals.h caml/signals_machdep.h + caml/memory.h caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/osdeps.h \ + caml/signals.h caml/signals_machdep.h spacetime.d.$(O): spacetime.c caml/fail.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/mlvalues.h + caml/s.h caml/mlvalues.h stacks.d.$(O): stacks.c caml/config.h caml/m.h caml/s.h caml/fail.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/misc.h caml/mlvalues.h \ - caml/stacks.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h + caml/misc.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h startup.d.$(O): startup.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/backtrace.h caml/exec.h \ - caml/callback.h caml/custom.h caml/debugger.h caml/dynlink.h caml/exec.h \ - caml/fail.h caml/fix_code.h caml/freelist.h caml/gc_ctrl.h \ - caml/instrtrace.h caml/interp.h caml/intext.h caml/io.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/minor_gc.h caml/misc.h caml/mlvalues.h \ - caml/osdeps.h caml/memory.h caml/prims.h caml/printexc.h caml/reverse.h \ - caml/signals.h caml/stacks.h caml/sys.h caml/startup.h \ - caml/startup_aux.h caml/version.h + caml/misc.h caml/mlvalues.h caml/backtrace.h caml/exec.h \ + caml/callback.h caml/custom.h caml/debugger.h caml/dynlink.h \ + caml/fail.h caml/fix_code.h caml/freelist.h caml/gc_ctrl.h \ + caml/instrtrace.h caml/interp.h caml/intext.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ + caml/osdeps.h caml/prims.h caml/printexc.h caml/reverse.h \ + caml/signals.h caml/stacks.h caml/sys.h caml/startup.h \ + caml/startup_aux.h caml/version.h startup_aux.d.$(O): startup_aux.c caml/backtrace.h caml/mlvalues.h \ - caml/config.h caml/m.h caml/s.h caml/misc.h caml/exec.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/callback.h caml/major_gc.h caml/dynlink.h \ - caml/startup_aux.h + caml/config.h caml/m.h caml/s.h caml/misc.h caml/exec.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/callback.h caml/dynlink.h caml/osdeps.h \ + caml/startup_aux.h str.d.$(O): str.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/mlvalues.h \ - caml/misc.h + caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h sys.d.$(O): sys.c caml/config.h caml/m.h caml/s.h caml/alloc.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/debugger.h caml/fail.h caml/gc_ctrl.h \ - caml/instruct.h caml/io.h caml/misc.h caml/mlvalues.h caml/osdeps.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/signals.h caml/stacks.h caml/sys.h \ - caml/version.h caml/callback.h caml/startup_aux.h + caml/mlvalues.h caml/debugger.h caml/fail.h caml/gc_ctrl.h \ + caml/instruct.h caml/io.h caml/osdeps.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/signals.h caml/stacks.h caml/sys.h caml/version.h caml/callback.h \ + caml/startup_aux.h terminfo.d.$(O): terminfo.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/fail.h caml/io.h \ - caml/mlvalues.h + caml/misc.h caml/mlvalues.h caml/fail.h caml/io.h unix.d.$(O): unix.c caml/config.h caml/m.h caml/s.h caml/fail.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/osdeps.h caml/memory.h caml/signals.h caml/sys.h caml/io.h + caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/osdeps.h \ + caml/signals.h caml/sys.h caml/io.h weak.d.$(O): weak.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/weak.h -win32.d.$(O): win32.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/address_class.h caml/fail.h caml/io.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/osdeps.h caml/memory.h \ - caml/signals.h caml/sys.h caml/config.h -afl.i.$(O): afl.c caml/misc.h caml/config.h caml/m.h caml/s.h caml/mlvalues.h \ - caml/misc.h + caml/mlvalues.h caml/fail.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/weak.h +afl.i.$(O): afl.c caml/misc.h caml/config.h caml/m.h caml/s.h caml/mlvalues.h alloc.i.$(O): alloc.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/custom.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/stacks.h caml/memory.h + caml/mlvalues.h caml/custom.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/stacks.h array.i.$(O): array.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/mlvalues.h caml/signals.h caml/spacetime.h + caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/signals.h \ + caml/spacetime.h backtrace.i.$(O): backtrace.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/backtrace.h \ - caml/exec.h caml/backtrace_prim.h caml/backtrace.h caml/fail.h + caml/s.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/backtrace.h \ + caml/exec.h caml/backtrace_prim.h caml/fail.h backtrace_prim.i.$(O): backtrace_prim.c caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/config.h caml/misc.h caml/alloc.h caml/mlvalues.h \ - caml/custom.h caml/io.h caml/instruct.h caml/intext.h caml/io.h \ - caml/exec.h caml/fix_code.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/startup.h \ - caml/exec.h caml/stacks.h caml/memory.h caml/sys.h caml/backtrace.h \ - caml/fail.h caml/backtrace_prim.h caml/backtrace.h + caml/mlvalues.h caml/misc.h caml/alloc.h caml/custom.h caml/io.h \ + caml/instruct.h caml/intext.h caml/exec.h caml/fix_code.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/startup.h caml/stacks.h \ + caml/sys.h caml/backtrace.h caml/fail.h caml/backtrace_prim.h bigarray.i.$(O): bigarray.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/bigarray.h caml/custom.h caml/fail.h \ - caml/intext.h caml/io.h caml/hash.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h + caml/s.h caml/mlvalues.h caml/bigarray.h caml/custom.h caml/fail.h \ + caml/intext.h caml/io.h caml/hash.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h callback.i.$(O): callback.c caml/callback.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/interp.h caml/instruct.h caml/fix_code.h \ - caml/stacks.h caml/memory.h + caml/m.h caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/interp.h caml/instruct.h caml/fix_code.h caml/stacks.h compact.i.$(O): compact.c caml/address_class.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/config.h caml/finalise.h caml/roots.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/freelist.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/mlvalues.h caml/roots.h caml/weak.h \ - caml/compact.h + caml/misc.h caml/mlvalues.h caml/finalise.h caml/roots.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/gc_ctrl.h caml/weak.h caml/compact.h compare.i.$(O): compare.c caml/custom.h caml/mlvalues.h caml/config.h caml/m.h \ - caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/mlvalues.h + caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h custom.i.$(O): custom.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h + caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h debugger.i.$(O): debugger.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/config.h caml/debugger.h caml/misc.h \ - caml/fail.h caml/fix_code.h caml/instruct.h caml/intext.h caml/io.h \ - caml/io.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/sys.h + caml/s.h caml/mlvalues.h caml/debugger.h caml/osdeps.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/fail.h caml/fix_code.h caml/instruct.h \ + caml/intext.h caml/io.h caml/stacks.h caml/sys.h dynlink.i.$(O): dynlink.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/dynlink.h caml/fail.h \ - caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/misc.h caml/osdeps.h \ - caml/memory.h caml/prims.h caml/signals.h + caml/misc.h caml/mlvalues.h caml/dynlink.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/osdeps.h caml/prims.h caml/signals.h extern.i.$(O): extern.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/config.h caml/custom.h caml/fail.h \ - caml/gc.h caml/intext.h caml/io.h caml/io.h caml/md5.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/reverse.h + caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/gc.h \ + caml/intext.h caml/io.h caml/md5.h caml/memory.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/reverse.h fail.i.$(O): fail.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/io.h caml/gc.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/misc.h caml/mlvalues.h caml/printexc.h caml/signals.h caml/stacks.h \ - caml/memory.h + caml/mlvalues.h caml/fail.h caml/io.h caml/gc.h caml/memory.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/printexc.h caml/signals.h caml/stacks.h finalise.i.$(O): finalise.c caml/callback.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/compact.h caml/fail.h caml/finalise.h \ - caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/minor_gc.h caml/mlvalues.h \ - caml/roots.h caml/signals.h + caml/m.h caml/s.h caml/misc.h caml/compact.h caml/fail.h \ + caml/finalise.h caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/signals.h fix_code.i.$(O): fix_code.c caml/config.h caml/m.h caml/s.h caml/debugger.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/fix_code.h \ - caml/instruct.h caml/intext.h caml/io.h caml/md5.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/reverse.h + caml/misc.h caml/mlvalues.h caml/fix_code.h caml/instruct.h \ + caml/intext.h caml/io.h caml/md5.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h floats.i.$(O): floats.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/misc.h caml/reverse.h caml/stacks.h caml/memory.h + caml/s.h caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h caml/stacks.h freelist.i.$(O): freelist.c caml/config.h caml/m.h caml/s.h caml/freelist.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/gc.h caml/gc_ctrl.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/major_gc.h caml/misc.h caml/mlvalues.h + caml/misc.h caml/mlvalues.h caml/gc.h caml/gc_ctrl.h caml/memory.h \ + caml/major_gc.h caml/minor_gc.h caml/address_class.h gc_ctrl.i.$(O): gc_ctrl.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/compact.h \ - caml/custom.h caml/fail.h caml/finalise.h caml/roots.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/freelist.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/minor_gc.h caml/misc.h \ - caml/mlvalues.h caml/signals.h caml/stacks.h caml/startup_aux.h + caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/compact.h \ + caml/custom.h caml/fail.h caml/finalise.h caml/roots.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/gc_ctrl.h caml/signals.h caml/stacks.h \ + caml/startup_aux.h globroots.i.$(O): globroots.c caml/memory.h caml/config.h caml/m.h caml/s.h \ - caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/misc.h caml/mlvalues.h \ - caml/roots.h caml/memory.h caml/globroots.h caml/roots.h + caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/roots.h caml/globroots.h hash.i.$(O): hash.c caml/mlvalues.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/custom.h caml/mlvalues.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/hash.h + caml/misc.h caml/custom.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/hash.h instrtrace.i.$(O): instrtrace.c intern.i.$(O): intern.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/callback.h caml/config.h caml/custom.h \ - caml/fail.h caml/gc.h caml/intext.h caml/io.h caml/io.h caml/md5.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/misc.h caml/reverse.h + caml/s.h caml/mlvalues.h caml/callback.h caml/custom.h caml/fail.h \ + caml/gc.h caml/intext.h caml/io.h caml/md5.h caml/memory.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h interp.i.$(O): interp.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/callback.h \ - caml/debugger.h caml/fail.h caml/fix_code.h caml/instrtrace.h \ - caml/instruct.h caml/interp.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/prims.h \ - caml/signals.h caml/stacks.h caml/memory.h caml/startup_aux.h \ - caml/jumptbl.h + caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/callback.h \ + caml/debugger.h caml/fail.h caml/fix_code.h caml/instrtrace.h \ + caml/instruct.h caml/interp.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/prims.h caml/signals.h caml/stacks.h caml/startup_aux.h \ + caml/jumptbl.h ints.i.$(O): ints.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/custom.h caml/fail.h caml/intext.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h + caml/mlvalues.h caml/custom.h caml/fail.h caml/intext.h caml/io.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h io.i.$(O): io.c caml/config.h caml/m.h caml/s.h caml/alloc.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/custom.h caml/fail.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/osdeps.h \ - caml/memory.h caml/signals.h caml/sys.h + caml/mlvalues.h caml/custom.h caml/fail.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/osdeps.h caml/signals.h caml/sys.h lexing.i.$(O): lexing.c caml/fail.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/mlvalues.h caml/stacks.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h + caml/s.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h main.i.$(O): main.c caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/misc.h caml/sys.h + caml/mlvalues.h caml/sys.h major_gc.i.$(O): major_gc.c caml/compact.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/custom.h caml/config.h caml/fail.h \ - caml/finalise.h caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/freelist.h \ - caml/gc.h caml/gc_ctrl.h caml/major_gc.h caml/misc.h caml/mlvalues.h \ - caml/roots.h caml/signals.h caml/weak.h + caml/misc.h caml/mlvalues.h caml/custom.h caml/fail.h caml/finalise.h \ + caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/gc_ctrl.h caml/signals.h \ + caml/weak.h md5.i.$(O): md5.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/md5.h caml/io.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/io.h caml/reverse.h + caml/mlvalues.h caml/fail.h caml/md5.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/reverse.h memory.i.$(O): memory.c caml/address_class.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/config.h caml/fail.h caml/freelist.h \ - caml/gc.h caml/gc_ctrl.h caml/major_gc.h caml/freelist.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ - caml/minor_gc.h caml/misc.h caml/mlvalues.h caml/signals.h + caml/misc.h caml/mlvalues.h caml/fail.h caml/freelist.h caml/gc.h \ + caml/gc_ctrl.h caml/major_gc.h caml/memory.h caml/minor_gc.h \ + caml/signals.h meta.i.$(O): meta.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/config.h caml/fail.h caml/fix_code.h caml/interp.h \ - caml/intext.h caml/io.h caml/major_gc.h caml/freelist.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ - caml/minor_gc.h caml/misc.h caml/mlvalues.h caml/prims.h caml/stacks.h \ - caml/memory.h + caml/mlvalues.h caml/fail.h caml/fix_code.h caml/interp.h \ + caml/intext.h caml/io.h caml/major_gc.h caml/freelist.h caml/memory.h \ + caml/gc.h caml/minor_gc.h caml/address_class.h caml/prims.h \ + caml/stacks.h minor_gc.i.$(O): minor_gc.c caml/custom.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/config.h caml/fail.h caml/finalise.h \ - caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/minor_gc.h caml/misc.h \ - caml/mlvalues.h caml/roots.h caml/signals.h caml/weak.h -misc.i.$(O): misc.c caml/config.h caml/m.h caml/s.h caml/misc.h caml/config.h \ - caml/memory.h caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/version.h + caml/m.h caml/s.h caml/misc.h caml/fail.h caml/finalise.h caml/roots.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/gc_ctrl.h caml/signals.h \ + caml/weak.h +misc.i.$(O): misc.c caml/config.h caml/m.h caml/s.h caml/misc.h caml/memory.h \ + caml/gc.h caml/mlvalues.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/osdeps.h caml/version.h obj.i.$(O): obj.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h \ - caml/freelist.h caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/minor_gc.h caml/misc.h caml/mlvalues.h \ - caml/prims.h caml/spacetime.h + caml/mlvalues.h caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h \ + caml/freelist.h caml/memory.h caml/minor_gc.h caml/address_class.h \ + caml/prims.h caml/spacetime.h parsing.i.$(O): parsing.c caml/config.h caml/m.h caml/s.h caml/mlvalues.h \ - caml/config.h caml/misc.h caml/memory.h caml/gc.h caml/mlvalues.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/alloc.h + caml/misc.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/alloc.h prims.i.$(O): prims.c caml/mlvalues.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/prims.h + caml/misc.h caml/prims.h printexc.i.$(O): printexc.c caml/backtrace.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/exec.h caml/callback.h \ - caml/debugger.h caml/fail.h caml/misc.h caml/mlvalues.h caml/printexc.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h + caml/m.h caml/s.h caml/misc.h caml/exec.h caml/callback.h \ + caml/debugger.h caml/fail.h caml/printexc.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h roots.i.$(O): roots.c caml/finalise.h caml/roots.h caml/misc.h caml/config.h \ - caml/m.h caml/s.h caml/memory.h caml/gc.h caml/mlvalues.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/globroots.h caml/major_gc.h caml/memory.h caml/minor_gc.h \ - caml/misc.h caml/mlvalues.h caml/roots.h caml/stacks.h + caml/m.h caml/s.h caml/memory.h caml/gc.h caml/mlvalues.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/globroots.h caml/stacks.h signals.i.$(O): signals.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/callback.h caml/config.h caml/fail.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/roots.h \ - caml/memory.h caml/signals.h caml/signals_machdep.h caml/sys.h + caml/s.h caml/mlvalues.h caml/callback.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/roots.h caml/signals.h \ + caml/signals_machdep.h caml/sys.h signals_byt.i.$(O): signals_byt.c caml/config.h caml/m.h caml/s.h \ - caml/memory.h caml/config.h caml/gc.h caml/mlvalues.h caml/misc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/osdeps.h caml/memory.h caml/signals.h caml/signals_machdep.h + caml/memory.h caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/osdeps.h \ + caml/signals.h caml/signals_machdep.h spacetime.i.$(O): spacetime.c caml/fail.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/mlvalues.h + caml/s.h caml/mlvalues.h stacks.i.$(O): stacks.c caml/config.h caml/m.h caml/s.h caml/fail.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/misc.h caml/mlvalues.h \ - caml/stacks.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h + caml/misc.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h startup.i.$(O): startup.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/backtrace.h caml/exec.h \ - caml/callback.h caml/custom.h caml/debugger.h caml/dynlink.h caml/exec.h \ - caml/fail.h caml/fix_code.h caml/freelist.h caml/gc_ctrl.h \ - caml/instrtrace.h caml/interp.h caml/intext.h caml/io.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/minor_gc.h caml/misc.h caml/mlvalues.h \ - caml/osdeps.h caml/memory.h caml/prims.h caml/printexc.h caml/reverse.h \ - caml/signals.h caml/stacks.h caml/sys.h caml/startup.h \ - caml/startup_aux.h caml/version.h + caml/misc.h caml/mlvalues.h caml/backtrace.h caml/exec.h \ + caml/callback.h caml/custom.h caml/debugger.h caml/dynlink.h \ + caml/fail.h caml/fix_code.h caml/freelist.h caml/gc_ctrl.h \ + caml/instrtrace.h caml/interp.h caml/intext.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ + caml/osdeps.h caml/prims.h caml/printexc.h caml/reverse.h \ + caml/signals.h caml/stacks.h caml/sys.h caml/startup.h \ + caml/startup_aux.h caml/version.h startup_aux.i.$(O): startup_aux.c caml/backtrace.h caml/mlvalues.h \ - caml/config.h caml/m.h caml/s.h caml/misc.h caml/exec.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/callback.h caml/major_gc.h caml/dynlink.h \ - caml/startup_aux.h + caml/config.h caml/m.h caml/s.h caml/misc.h caml/exec.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/callback.h caml/dynlink.h caml/osdeps.h \ + caml/startup_aux.h str.i.$(O): str.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/mlvalues.h \ - caml/misc.h + caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h sys.i.$(O): sys.c caml/config.h caml/m.h caml/s.h caml/alloc.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/debugger.h caml/fail.h caml/gc_ctrl.h \ - caml/instruct.h caml/io.h caml/misc.h caml/mlvalues.h caml/osdeps.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/signals.h caml/stacks.h caml/sys.h \ - caml/version.h caml/callback.h caml/startup_aux.h + caml/mlvalues.h caml/debugger.h caml/fail.h caml/gc_ctrl.h \ + caml/instruct.h caml/io.h caml/osdeps.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/signals.h caml/stacks.h caml/sys.h caml/version.h caml/callback.h \ + caml/startup_aux.h terminfo.i.$(O): terminfo.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/fail.h caml/io.h \ - caml/mlvalues.h + caml/misc.h caml/mlvalues.h caml/fail.h caml/io.h unix.i.$(O): unix.c caml/config.h caml/m.h caml/s.h caml/fail.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/osdeps.h caml/memory.h caml/signals.h caml/sys.h caml/io.h + caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/osdeps.h \ + caml/signals.h caml/sys.h caml/io.h weak.i.$(O): weak.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/weak.h -win32.i.$(O): win32.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/address_class.h caml/fail.h caml/io.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/osdeps.h caml/memory.h \ - caml/signals.h caml/sys.h caml/config.h -afl.pic.$(O): afl.c caml/misc.h caml/config.h caml/m.h caml/s.h caml/mlvalues.h \ - caml/misc.h + caml/mlvalues.h caml/fail.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/weak.h +afl.pic.$(O): afl.c caml/misc.h caml/config.h caml/m.h caml/s.h caml/mlvalues.h alloc.pic.$(O): alloc.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/custom.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/stacks.h caml/memory.h + caml/mlvalues.h caml/custom.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/stacks.h array.pic.$(O): array.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/mlvalues.h caml/signals.h caml/spacetime.h + caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/signals.h \ + caml/spacetime.h backtrace.pic.$(O): backtrace.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/backtrace.h \ - caml/exec.h caml/backtrace_prim.h caml/backtrace.h caml/fail.h + caml/s.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/backtrace.h \ + caml/exec.h caml/backtrace_prim.h caml/fail.h backtrace_prim.pic.$(O): backtrace_prim.c caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/config.h caml/misc.h caml/alloc.h caml/mlvalues.h \ - caml/custom.h caml/io.h caml/instruct.h caml/intext.h caml/io.h \ - caml/exec.h caml/fix_code.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/startup.h \ - caml/exec.h caml/stacks.h caml/memory.h caml/sys.h caml/backtrace.h \ - caml/fail.h caml/backtrace_prim.h caml/backtrace.h + caml/mlvalues.h caml/misc.h caml/alloc.h caml/custom.h caml/io.h \ + caml/instruct.h caml/intext.h caml/exec.h caml/fix_code.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/startup.h caml/stacks.h \ + caml/sys.h caml/backtrace.h caml/fail.h caml/backtrace_prim.h bigarray.pic.$(O): bigarray.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/bigarray.h caml/custom.h caml/fail.h \ - caml/intext.h caml/io.h caml/hash.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h + caml/s.h caml/mlvalues.h caml/bigarray.h caml/custom.h caml/fail.h \ + caml/intext.h caml/io.h caml/hash.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h callback.pic.$(O): callback.c caml/callback.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/interp.h caml/instruct.h caml/fix_code.h \ - caml/stacks.h caml/memory.h + caml/m.h caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/interp.h caml/instruct.h caml/fix_code.h caml/stacks.h compact.pic.$(O): compact.c caml/address_class.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/config.h caml/finalise.h caml/roots.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/freelist.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/mlvalues.h caml/roots.h caml/weak.h \ - caml/compact.h + caml/misc.h caml/mlvalues.h caml/finalise.h caml/roots.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/gc_ctrl.h caml/weak.h caml/compact.h compare.pic.$(O): compare.c caml/custom.h caml/mlvalues.h caml/config.h caml/m.h \ - caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/mlvalues.h + caml/s.h caml/misc.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h custom.pic.$(O): custom.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h + caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h debugger.pic.$(O): debugger.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/config.h caml/debugger.h caml/misc.h \ - caml/fail.h caml/fix_code.h caml/instruct.h caml/intext.h caml/io.h \ - caml/io.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/sys.h + caml/s.h caml/mlvalues.h caml/debugger.h caml/osdeps.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/fail.h caml/fix_code.h caml/instruct.h \ + caml/intext.h caml/io.h caml/stacks.h caml/sys.h dynlink.pic.$(O): dynlink.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/dynlink.h caml/fail.h \ - caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/misc.h caml/osdeps.h \ - caml/memory.h caml/prims.h caml/signals.h + caml/misc.h caml/mlvalues.h caml/dynlink.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/osdeps.h caml/prims.h caml/signals.h extern.pic.$(O): extern.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/config.h caml/custom.h caml/fail.h \ - caml/gc.h caml/intext.h caml/io.h caml/io.h caml/md5.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/reverse.h + caml/s.h caml/mlvalues.h caml/custom.h caml/fail.h caml/gc.h \ + caml/intext.h caml/io.h caml/md5.h caml/memory.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/reverse.h fail.pic.$(O): fail.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/io.h caml/gc.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/misc.h caml/mlvalues.h caml/printexc.h caml/signals.h caml/stacks.h \ - caml/memory.h + caml/mlvalues.h caml/fail.h caml/io.h caml/gc.h caml/memory.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/printexc.h caml/signals.h caml/stacks.h finalise.pic.$(O): finalise.c caml/callback.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/compact.h caml/fail.h caml/finalise.h \ - caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/minor_gc.h caml/mlvalues.h \ - caml/roots.h caml/signals.h + caml/m.h caml/s.h caml/misc.h caml/compact.h caml/fail.h \ + caml/finalise.h caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/signals.h fix_code.pic.$(O): fix_code.c caml/config.h caml/m.h caml/s.h caml/debugger.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/fix_code.h \ - caml/instruct.h caml/intext.h caml/io.h caml/md5.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/reverse.h + caml/misc.h caml/mlvalues.h caml/fix_code.h caml/instruct.h \ + caml/intext.h caml/io.h caml/md5.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h floats.pic.$(O): floats.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/misc.h caml/reverse.h caml/stacks.h caml/memory.h + caml/s.h caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h caml/stacks.h freelist.pic.$(O): freelist.c caml/config.h caml/m.h caml/s.h caml/freelist.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/gc.h caml/gc_ctrl.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/major_gc.h caml/misc.h caml/mlvalues.h + caml/misc.h caml/mlvalues.h caml/gc.h caml/gc_ctrl.h caml/memory.h \ + caml/major_gc.h caml/minor_gc.h caml/address_class.h gc_ctrl.pic.$(O): gc_ctrl.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/compact.h \ - caml/custom.h caml/fail.h caml/finalise.h caml/roots.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/freelist.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/minor_gc.h caml/misc.h \ - caml/mlvalues.h caml/signals.h caml/stacks.h caml/startup_aux.h + caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/compact.h \ + caml/custom.h caml/fail.h caml/finalise.h caml/roots.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/gc_ctrl.h caml/signals.h caml/stacks.h \ + caml/startup_aux.h globroots.pic.$(O): globroots.c caml/memory.h caml/config.h caml/m.h caml/s.h \ - caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/misc.h caml/mlvalues.h \ - caml/roots.h caml/memory.h caml/globroots.h caml/roots.h + caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/roots.h caml/globroots.h hash.pic.$(O): hash.c caml/mlvalues.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/custom.h caml/mlvalues.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/hash.h + caml/misc.h caml/custom.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/hash.h instrtrace.pic.$(O): instrtrace.c intern.pic.$(O): intern.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/callback.h caml/config.h caml/custom.h \ - caml/fail.h caml/gc.h caml/intext.h caml/io.h caml/io.h caml/md5.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/misc.h caml/reverse.h + caml/s.h caml/mlvalues.h caml/callback.h caml/custom.h caml/fail.h \ + caml/gc.h caml/intext.h caml/io.h caml/md5.h caml/memory.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/reverse.h interp.pic.$(O): interp.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/callback.h \ - caml/debugger.h caml/fail.h caml/fix_code.h caml/instrtrace.h \ - caml/instruct.h caml/interp.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/prims.h \ - caml/signals.h caml/stacks.h caml/memory.h caml/startup_aux.h \ - caml/jumptbl.h + caml/s.h caml/mlvalues.h caml/backtrace.h caml/exec.h caml/callback.h \ + caml/debugger.h caml/fail.h caml/fix_code.h caml/instrtrace.h \ + caml/instruct.h caml/interp.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/prims.h caml/signals.h caml/stacks.h caml/startup_aux.h \ + caml/jumptbl.h ints.pic.$(O): ints.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/custom.h caml/fail.h caml/intext.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h + caml/mlvalues.h caml/custom.h caml/fail.h caml/intext.h caml/io.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h io.pic.$(O): io.c caml/config.h caml/m.h caml/s.h caml/alloc.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/custom.h caml/fail.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/osdeps.h \ - caml/memory.h caml/signals.h caml/sys.h + caml/mlvalues.h caml/custom.h caml/fail.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/osdeps.h caml/signals.h caml/sys.h lexing.pic.$(O): lexing.c caml/fail.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/mlvalues.h caml/stacks.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h + caml/s.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h main.pic.$(O): main.c caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/misc.h caml/sys.h + caml/mlvalues.h caml/sys.h major_gc.pic.$(O): major_gc.c caml/compact.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/custom.h caml/config.h caml/fail.h \ - caml/finalise.h caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/freelist.h \ - caml/gc.h caml/gc_ctrl.h caml/major_gc.h caml/misc.h caml/mlvalues.h \ - caml/roots.h caml/signals.h caml/weak.h + caml/misc.h caml/mlvalues.h caml/custom.h caml/fail.h caml/finalise.h \ + caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/gc_ctrl.h caml/signals.h \ + caml/weak.h md5.pic.$(O): md5.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/md5.h caml/io.h caml/memory.h caml/gc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/mlvalues.h caml/io.h caml/reverse.h + caml/mlvalues.h caml/fail.h caml/md5.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/reverse.h memory.pic.$(O): memory.c caml/address_class.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/mlvalues.h caml/config.h caml/fail.h caml/freelist.h \ - caml/gc.h caml/gc_ctrl.h caml/major_gc.h caml/freelist.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ - caml/minor_gc.h caml/misc.h caml/mlvalues.h caml/signals.h + caml/misc.h caml/mlvalues.h caml/fail.h caml/freelist.h caml/gc.h \ + caml/gc_ctrl.h caml/major_gc.h caml/memory.h caml/minor_gc.h \ + caml/signals.h meta.pic.$(O): meta.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/config.h caml/fail.h caml/fix_code.h caml/interp.h \ - caml/intext.h caml/io.h caml/major_gc.h caml/freelist.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ - caml/minor_gc.h caml/misc.h caml/mlvalues.h caml/prims.h caml/stacks.h \ - caml/memory.h + caml/mlvalues.h caml/fail.h caml/fix_code.h caml/interp.h \ + caml/intext.h caml/io.h caml/major_gc.h caml/freelist.h caml/memory.h \ + caml/gc.h caml/minor_gc.h caml/address_class.h caml/prims.h \ + caml/stacks.h minor_gc.pic.$(O): minor_gc.c caml/custom.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/config.h caml/fail.h caml/finalise.h \ - caml/roots.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h caml/gc.h caml/gc_ctrl.h \ - caml/major_gc.h caml/memory.h caml/minor_gc.h caml/misc.h \ - caml/mlvalues.h caml/roots.h caml/signals.h caml/weak.h -misc.pic.$(O): misc.c caml/config.h caml/m.h caml/s.h caml/misc.h caml/config.h \ - caml/memory.h caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/version.h + caml/m.h caml/s.h caml/misc.h caml/fail.h caml/finalise.h caml/roots.h \ + caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/gc_ctrl.h caml/signals.h \ + caml/weak.h +misc.pic.$(O): misc.c caml/config.h caml/m.h caml/s.h caml/misc.h caml/memory.h \ + caml/gc.h caml/mlvalues.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/osdeps.h caml/version.h obj.pic.$(O): obj.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h \ - caml/freelist.h caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/minor_gc.h caml/misc.h caml/mlvalues.h \ - caml/prims.h caml/spacetime.h + caml/mlvalues.h caml/fail.h caml/gc.h caml/interp.h caml/major_gc.h \ + caml/freelist.h caml/memory.h caml/minor_gc.h caml/address_class.h \ + caml/prims.h caml/spacetime.h parsing.pic.$(O): parsing.c caml/config.h caml/m.h caml/s.h caml/mlvalues.h \ - caml/config.h caml/misc.h caml/memory.h caml/gc.h caml/mlvalues.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/alloc.h + caml/misc.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ + caml/minor_gc.h caml/address_class.h caml/alloc.h prims.pic.$(O): prims.c caml/mlvalues.h caml/config.h caml/m.h caml/s.h \ - caml/misc.h caml/prims.h + caml/misc.h caml/prims.h printexc.pic.$(O): printexc.c caml/backtrace.h caml/mlvalues.h caml/config.h \ - caml/m.h caml/s.h caml/misc.h caml/exec.h caml/callback.h \ - caml/debugger.h caml/fail.h caml/misc.h caml/mlvalues.h caml/printexc.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h + caml/m.h caml/s.h caml/misc.h caml/exec.h caml/callback.h \ + caml/debugger.h caml/fail.h caml/printexc.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h roots.pic.$(O): roots.c caml/finalise.h caml/roots.h caml/misc.h caml/config.h \ - caml/m.h caml/s.h caml/memory.h caml/gc.h caml/mlvalues.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/globroots.h caml/major_gc.h caml/memory.h caml/minor_gc.h \ - caml/misc.h caml/mlvalues.h caml/roots.h caml/stacks.h + caml/m.h caml/s.h caml/memory.h caml/gc.h caml/mlvalues.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/globroots.h caml/stacks.h signals.pic.$(O): signals.c caml/alloc.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/callback.h caml/config.h caml/fail.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/mlvalues.h caml/roots.h \ - caml/memory.h caml/signals.h caml/signals_machdep.h caml/sys.h + caml/s.h caml/mlvalues.h caml/callback.h caml/fail.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/roots.h caml/signals.h \ + caml/signals_machdep.h caml/sys.h signals_byt.pic.$(O): signals_byt.c caml/config.h caml/m.h caml/s.h \ - caml/memory.h caml/config.h caml/gc.h caml/mlvalues.h caml/misc.h \ - caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ - caml/osdeps.h caml/memory.h caml/signals.h caml/signals_machdep.h + caml/memory.h caml/gc.h caml/mlvalues.h caml/misc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/osdeps.h \ + caml/signals.h caml/signals_machdep.h spacetime.pic.$(O): spacetime.c caml/fail.h caml/misc.h caml/config.h caml/m.h \ - caml/s.h caml/mlvalues.h caml/mlvalues.h + caml/s.h caml/mlvalues.h stacks.pic.$(O): stacks.c caml/config.h caml/m.h caml/s.h caml/fail.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/misc.h caml/mlvalues.h \ - caml/stacks.h caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h \ - caml/minor_gc.h caml/address_class.h + caml/misc.h caml/mlvalues.h caml/stacks.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h startup.pic.$(O): startup.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/backtrace.h caml/exec.h \ - caml/callback.h caml/custom.h caml/debugger.h caml/dynlink.h caml/exec.h \ - caml/fail.h caml/fix_code.h caml/freelist.h caml/gc_ctrl.h \ - caml/instrtrace.h caml/interp.h caml/intext.h caml/io.h caml/io.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/minor_gc.h caml/misc.h caml/mlvalues.h \ - caml/osdeps.h caml/memory.h caml/prims.h caml/printexc.h caml/reverse.h \ - caml/signals.h caml/stacks.h caml/sys.h caml/startup.h \ - caml/startup_aux.h caml/version.h + caml/misc.h caml/mlvalues.h caml/backtrace.h caml/exec.h \ + caml/callback.h caml/custom.h caml/debugger.h caml/dynlink.h \ + caml/fail.h caml/fix_code.h caml/freelist.h caml/gc_ctrl.h \ + caml/instrtrace.h caml/interp.h caml/intext.h caml/io.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/minor_gc.h caml/address_class.h \ + caml/osdeps.h caml/prims.h caml/printexc.h caml/reverse.h \ + caml/signals.h caml/stacks.h caml/sys.h caml/startup.h \ + caml/startup_aux.h caml/version.h startup_aux.pic.$(O): startup_aux.c caml/backtrace.h caml/mlvalues.h \ - caml/config.h caml/m.h caml/s.h caml/misc.h caml/exec.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/callback.h caml/major_gc.h caml/dynlink.h \ - caml/startup_aux.h + caml/config.h caml/m.h caml/s.h caml/misc.h caml/exec.h caml/memory.h \ + caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ + caml/address_class.h caml/callback.h caml/dynlink.h caml/osdeps.h \ + caml/startup_aux.h str.pic.$(O): str.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/mlvalues.h \ - caml/misc.h + caml/mlvalues.h caml/fail.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h sys.pic.$(O): sys.c caml/config.h caml/m.h caml/s.h caml/alloc.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/debugger.h caml/fail.h caml/gc_ctrl.h \ - caml/instruct.h caml/io.h caml/misc.h caml/mlvalues.h caml/osdeps.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/signals.h caml/stacks.h caml/sys.h \ - caml/version.h caml/callback.h caml/startup_aux.h + caml/mlvalues.h caml/debugger.h caml/fail.h caml/gc_ctrl.h \ + caml/instruct.h caml/io.h caml/osdeps.h caml/memory.h caml/gc.h \ + caml/major_gc.h caml/freelist.h caml/minor_gc.h caml/address_class.h \ + caml/signals.h caml/stacks.h caml/sys.h caml/version.h caml/callback.h \ + caml/startup_aux.h terminfo.pic.$(O): terminfo.c caml/config.h caml/m.h caml/s.h caml/alloc.h \ - caml/misc.h caml/config.h caml/mlvalues.h caml/fail.h caml/io.h \ - caml/mlvalues.h + caml/misc.h caml/mlvalues.h caml/fail.h caml/io.h unix.pic.$(O): unix.c caml/config.h caml/m.h caml/s.h caml/fail.h caml/misc.h \ - caml/config.h caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ - caml/freelist.h caml/minor_gc.h caml/address_class.h caml/misc.h \ - caml/osdeps.h caml/memory.h caml/signals.h caml/sys.h caml/io.h + caml/mlvalues.h caml/memory.h caml/gc.h caml/major_gc.h \ + caml/freelist.h caml/minor_gc.h caml/address_class.h caml/osdeps.h \ + caml/signals.h caml/sys.h caml/io.h weak.pic.$(O): weak.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/fail.h caml/major_gc.h caml/freelist.h \ - caml/memory.h caml/gc.h caml/major_gc.h caml/minor_gc.h \ - caml/address_class.h caml/mlvalues.h caml/weak.h -win32.pic.$(O): win32.c caml/alloc.h caml/misc.h caml/config.h caml/m.h caml/s.h \ - caml/mlvalues.h caml/address_class.h caml/fail.h caml/io.h caml/memory.h \ - caml/gc.h caml/major_gc.h caml/freelist.h caml/minor_gc.h \ - caml/address_class.h caml/misc.h caml/osdeps.h caml/memory.h \ - caml/signals.h caml/sys.h caml/config.h + caml/mlvalues.h caml/fail.h caml/major_gc.h caml/freelist.h \ + caml/memory.h caml/gc.h caml/minor_gc.h caml/address_class.h \ + caml/weak.h diff --git a/byterun/afl.c b/byterun/afl.c index ef405bc66a..bd87ce8d8a 100644 --- a/byterun/afl.c +++ b/byterun/afl.c @@ -38,8 +38,11 @@ CAMLprim value caml_reset_afl_instrumentation(value unused) #include <sys/wait.h> #include <stdio.h> #include <string.h> + +#define CAML_INTERNALS #include "caml/misc.h" #include "caml/mlvalues.h" +#include "caml/osdeps.h" static int afl_initialised = 0; @@ -75,7 +78,7 @@ CAMLprim value caml_setup_afl(value unit) if (afl_initialised) return Val_unit; afl_initialised = 1; - char* shm_id_str = getenv("__AFL_SHM_ID"); + char* shm_id_str = caml_secure_getenv("__AFL_SHM_ID"); if (shm_id_str == NULL) { /* Not running under afl-fuzz, continue as normal */ return Val_unit; diff --git a/byterun/caml/osdeps.h b/byterun/caml/osdeps.h index 78929e96e9..75ed76c69b 100644 --- a/byterun/caml/osdeps.h +++ b/byterun/caml/osdeps.h @@ -86,6 +86,11 @@ extern int caml_read_directory(char * dirname, struct ext_table * contents); string allocated with [caml_stat_alloc] on success. */ extern char * caml_executable_name(void); +/* Secure version of [getenv]: returns NULL if the process has special + privileges (setuid bit, setgid bit, capabilities). +*/ +extern char *caml_secure_getenv(char const *var); + #endif /* CAML_INTERNALS */ #endif /* CAML_OSDEPS_H */ diff --git a/byterun/caml/spacetime.h b/byterun/caml/spacetime.h index 68bf1d20e0..df1193e262 100644 --- a/byterun/caml/spacetime.h +++ b/byterun/caml/spacetime.h @@ -100,9 +100,11 @@ typedef enum { #define Alloc_point_next_ptr(node, offset) (Field(node, offset + 2)) /* Direct call points (tail or non-tail) within OCaml nodes. - They just hold a pointer to the child node. The call site and callee are - both recorded in the shape. */ + They hold a pointer to the child node and (if the compiler was so + configured) a call count. + The call site and callee are both recorded in the shape. */ #define Direct_callee_node(node,offset) (Field(node, offset)) +#define Direct_call_count(node,offset) (Field(node, offset + 1)) #define Encode_call_point_pc(pc) (((value) pc) | 1) #define Decode_call_point_pc(pc) ((void*) (((value) pc) & ~((uintnat) 1))) @@ -131,12 +133,17 @@ typedef struct { } allocation_point; typedef struct { + value callee_node; + value call_count; +} call_point; + +typedef struct { /* CR-soon mshinwell: delete [gc_header], all the offset arithmetic will then go away */ uintnat gc_header; uintnat pc; /* see above for encodings */ union { - value callee_node; /* for CALL */ + call_point call; /* for CALL */ allocation_point allocation; /* for ALLOCATION */ } data; value next; /* [Val_unit] for the end of the list */ diff --git a/byterun/debugger.c b/byterun/debugger.c index ff1da956ce..8cf3025855 100644 --- a/byterun/debugger.c +++ b/byterun/debugger.c @@ -27,6 +27,7 @@ #include "caml/config.h" #include "caml/debugger.h" #include "caml/misc.h" +#include "caml/osdeps.h" int caml_debugger_in_use = 0; uintnat caml_event_count; @@ -172,7 +173,7 @@ void caml_debugger_init(void) Store_field(marshal_flags, 0, Val_int(1)); /* Marshal.Closures */ Store_field(marshal_flags, 1, Val_emptylist); - address = getenv("CAML_DEBUG_SOCKET"); + address = caml_secure_getenv("CAML_DEBUG_SOCKET"); if (address == NULL) return; dbg_addr = address; diff --git a/byterun/dynlink.c b/byterun/dynlink.c index 0ecbf884c4..a7dd5f53b4 100644 --- a/byterun/dynlink.c +++ b/byterun/dynlink.c @@ -81,8 +81,8 @@ static char * parse_ld_conf(void) struct stat st; int ldconf, nread; - stdlib = getenv("OCAMLLIB"); - if (stdlib == NULL) stdlib = getenv("CAMLLIB"); + stdlib = caml_secure_getenv("OCAMLLIB"); + if (stdlib == NULL) stdlib = caml_secure_getenv("CAMLLIB"); if (stdlib == NULL) stdlib = OCAML_STDLIB_DIR; ldconfname = caml_stat_strconcat(3, stdlib, "/", LD_CONF_NAME); if (stat(ldconfname, &st) == -1) { @@ -150,7 +150,7 @@ void caml_build_primitive_table(char * lib_path, - directories specified in the executable - directories specified in the file <stdlib>/ld.conf */ tofree1 = caml_decompose_path(&caml_shared_libs_path, - getenv("CAML_LD_LIBRARY_PATH")); + caml_secure_getenv("CAML_LD_LIBRARY_PATH")); if (lib_path != NULL) for (p = lib_path; *p != 0; p += strlen(p) + 1) caml_ext_table_add(&caml_shared_libs_path, p); diff --git a/byterun/misc.c b/byterun/misc.c index 65773c3488..59d4f7fc63 100644 --- a/byterun/misc.c +++ b/byterun/misc.c @@ -20,6 +20,7 @@ #include "caml/config.h" #include "caml/misc.h" #include "caml/memory.h" +#include "caml/osdeps.h" #include "caml/version.h" caml_timing_hook caml_major_slice_begin_hook = NULL; @@ -209,10 +210,10 @@ void CAML_INSTR_INIT (void) char *s; CAML_INSTR_STARTTIME = 0; - s = getenv ("OCAML_INSTR_START"); + s = caml_secure_getenv ("OCAML_INSTR_START"); if (s != NULL) CAML_INSTR_STARTTIME = atol (s); CAML_INSTR_STOPTIME = LONG_MAX; - s = getenv ("OCAML_INSTR_STOP"); + s = caml_secure_getenv ("OCAML_INSTR_STOP"); if (s != NULL) CAML_INSTR_STOPTIME = atol (s); } @@ -223,7 +224,7 @@ void CAML_INSTR_ATEXIT (void) FILE *f = NULL; char *fname; - fname = getenv ("OCAML_INSTR_FILE"); + fname = caml_secure_getenv ("OCAML_INSTR_FILE"); if (fname != NULL){ char *mode = "a"; char buf [1000]; diff --git a/byterun/startup.c b/byterun/startup.c index fae9c49b22..136ad77fc7 100644 --- a/byterun/startup.c +++ b/byterun/startup.c @@ -381,7 +381,7 @@ CAMLexport void caml_main(char **argv) caml_sys_init(exe_name, argv + pos); #ifdef _WIN32 /* Start a thread to handle signals */ - if (getenv("CAMLSIGPIPE")) + if (caml_secure_getenv("CAMLSIGPIPE")) _beginthread(caml_signal_thread, 4096, NULL); #endif /* Execute the program */ @@ -428,7 +428,7 @@ CAMLexport value caml_startup_code_exn( caml_install_invalid_parameter_handler(); #endif caml_init_custom_operations(); - cds_file = getenv("CAML_DEBUG_FILE"); + cds_file = caml_secure_getenv("CAML_DEBUG_FILE"); if (cds_file != NULL) { caml_cds_file = caml_stat_strdup(cds_file); } diff --git a/byterun/startup_aux.c b/byterun/startup_aux.c index 5162880698..7cf6c6dac2 100644 --- a/byterun/startup_aux.c +++ b/byterun/startup_aux.c @@ -26,6 +26,7 @@ #ifndef NATIVE_CODE #include "caml/dynlink.h" #endif +#include "caml/osdeps.h" #include "caml/startup_aux.h" @@ -79,10 +80,10 @@ static void scanmult (char *opt, uintnat *var) void caml_parse_ocamlrunparam(void) { - char *opt = getenv ("OCAMLRUNPARAM"); + char *opt = caml_secure_getenv ("OCAMLRUNPARAM"); uintnat p; - if (opt == NULL) opt = getenv ("CAMLRUNPARAM"); + if (opt == NULL) opt = caml_secure_getenv ("CAMLRUNPARAM"); if (opt != NULL){ while (*opt != '\0'){ diff --git a/byterun/sys.c b/byterun/sys.c index 63f239d009..1df9f961b5 100644 --- a/byterun/sys.c +++ b/byterun/sys.c @@ -26,7 +26,7 @@ #include <time.h> #include <sys/types.h> #include <sys/stat.h> -#if _WIN32 +#ifdef _WIN32 #include <io.h> /* for isatty */ #else #include <sys/wait.h> @@ -318,7 +318,7 @@ CAMLprim value caml_sys_getcwd(value unit) return caml_copy_string(buff); } -CAMLprim value caml_sys_getenv(value var) +CAMLprim value caml_sys_unsafe_getenv(value var) { char * res; @@ -328,6 +328,16 @@ CAMLprim value caml_sys_getenv(value var) return caml_copy_string(res); } +CAMLprim value caml_sys_getenv(value var) +{ + char * res; + + if (! caml_string_is_c_safe(var)) caml_raise_not_found(); + res = caml_secure_getenv(String_val(var)); + if (res == 0) caml_raise_not_found(); + return caml_copy_string(res); +} + char * caml_exe_name; char ** caml_main_argv; @@ -630,7 +640,7 @@ void caml_load_plugin(char *plugin) void caml_cplugins_load(char *env_variable) { - char *plugins = getenv(env_variable); + char *plugins = caml_secure_getenv(env_variable); if(plugins != NULL){ char* curs = plugins; while(*curs != 0){ diff --git a/byterun/unix.c b/byterun/unix.c index 1f9cc3fd38..5f90f1af9d 100644 --- a/byterun/unix.c +++ b/byterun/unix.c @@ -19,6 +19,7 @@ #define _GNU_SOURCE /* Helps finding RTLD_DEFAULT in glibc */ + /* also secure_getenv */ #include <stddef.h> #include <stdlib.h> @@ -402,3 +403,22 @@ char * caml_executable_name(void) #endif } + +char *caml_secure_getenv (char const *var) +{ +#ifdef HAS_SECURE_GETENV + return secure_getenv (var); +#elif defined (HAS___SECURE_GETENV) + return __secure_getenv (var); +#elif defined(HAS_ISSETUGID) + if (!issetugid ()) + return CAML_SYS_GETENV (var); + else + return NULL; +#else + if (geteuid () == getuid () && getegid () == getgid ()) + return CAML_SYS_GETENV (var); + else + return NULL; +#endif +} diff --git a/byterun/win32.c b/byterun/win32.c index 812f215247..ba646dc372 100644 --- a/byterun/win32.c +++ b/byterun/win32.c @@ -442,7 +442,8 @@ void caml_signal_thread(void * lpParam) char *endptr; HANDLE h; /* Get an hexa-code raw handle through the environment */ - h = (HANDLE) (uintptr_t) strtol(getenv("CAMLSIGPIPE"), &endptr, 16); + h = (HANDLE) (uintptr_t) + strtol(caml_secure_getenv("CAMLSIGPIPE"), &endptr, 16); while (1) { DWORD numread; BOOL ret; @@ -713,3 +714,9 @@ int caml_snprintf(char * buf, size_t size, const char * format, ...) return len; } #endif + +char *caml_secure_getenv (char const *var) +{ + /* Win32 doesn't have a notion of setuid bit, so getenv is safe. */ + return CAML_SYS_GETENV (var); +} diff --git a/config/Makefile.mingw b/config/Makefile.mingw index a62d1aac30..7ee6c352b6 100644 --- a/config/Makefile.mingw +++ b/config/Makefile.mingw @@ -97,6 +97,7 @@ UNIXLIB=win32unix GRAPHLIB=win32graph FLAMBDA=false WITH_SPACETIME=false +WITH_SPACETIME_CALL_COUNTS=false WITH_PROFINFO=false LIBUNWIND_AVAILABLE=false LIBUNWIND_LINK_FLAGS= @@ -108,9 +109,12 @@ AFL_INSTRUMENT=false ### Which C compiler to use for the bytecode interpreter. CC = $(TOOLPREF)gcc -CFLAGS = -O -mms-bitfields -Wall -Wno-unused +CFLAGS = -O -mms-bitfields -Wall -Wno-unused -fno-tree-vrp +# -fno-tree-vrp is here to try to work around the Skylake/Kaby lake bug, +# and only works on GCC 4.2 and later. CPPFLAGS = -DCAML_NAME_SPACE OCAMLC_CFLAGS = -O -mms-bitfields + BYTECCDBGCOMPOPTS=-g LDFLAGS= diff --git a/config/Makefile.mingw64 b/config/Makefile.mingw64 index 54de4ec5ef..bed9a88338 100644 --- a/config/Makefile.mingw64 +++ b/config/Makefile.mingw64 @@ -98,6 +98,7 @@ GRAPHLIB=win32graph FLAMBDA=false WITH_PROFINFO=false WITH_SPACETIME=false +WITH_SPACETIME_CALL_COUNTS=false LIBUNWIND_AVAILABLE=false LIBUNWIND_LINK_FLAGS= PROFINFO_WIDTH=26 @@ -108,7 +109,9 @@ AFL_INSTRUMENT=false ### Which C compiler to use for the bytecode interpreter. CC = $(TOOLPREF)gcc -CFLAGS = -O -mms-bitfields -Wall -Wno-unused +CFLAGS = -O -mms-bitfields -Wall -Wno-unused -fno-tree-vrp +# -fno-tree-vrp is here to try to work around the Skylake/Kaby lake bug, +# and only works on GCC 4.2 and later. CPPFLAGS = -DCAML_NAME_SPACE OCAMLC_CFLAGS = -O -mms-bitfields diff --git a/config/Makefile.msvc b/config/Makefile.msvc index 626b40e1cd..daf6f96278 100644 --- a/config/Makefile.msvc +++ b/config/Makefile.msvc @@ -91,6 +91,7 @@ GRAPHLIB=win32graph FLAMBDA=false WITH_PROFINFO=false WITH_SPACETIME=false +WITH_SPACETIME_CALL_COUNTS=false LIBUNWIND_AVAILABLE=false LIBUNWIND_LINK_FLAGS= PROFINFO_WIDTH=26 diff --git a/config/Makefile.msvc64 b/config/Makefile.msvc64 index a23c1b080b..d49c33f1ec 100644 --- a/config/Makefile.msvc64 +++ b/config/Makefile.msvc64 @@ -90,6 +90,7 @@ GRAPHLIB=win32graph FLAMBDA=false WITH_PROFINFO=false WITH_SPACETIME=false +WITH_SPACETIME_CALL_COUNTS=false LIBUNWIND_AVAILABLE=false LIBUNWIND_LINK_FLAGS= PROFINFO_WIDTH=26 @@ -54,6 +54,7 @@ with_debugger=ocamldebugger with_ocamldoc=ocamldoc with_frame_pointers=false with_spacetime=false +with_spacetime_call_counts=false with_profinfo=false profinfo_width=0 no_naked_pointers=false @@ -64,7 +65,7 @@ flambda=false safe_string=false afl_instrument=false max_testsuite_dir_retries=0 -with_cplugins=true +with_cplugins=false with_fpic=false # Try to turn internationalization off, can cause config.guess to malfunction! @@ -184,6 +185,11 @@ while : ; do no_naked_pointers=true;; -spacetime|--spacetime) with_spacetime=true; with_profinfo=true; profinfo_width=26;; + -spacetime-call-counts|--spacetime-call-counts) + with_spacetime=true + with_profinfo=true + profinfo_width=26 + with_spacetime_call_counts=true;; -reserved-header-bits|--reserved-header-bits) with_spacetime=false; with_profinfo=true; profinfo_width=$2;shift case $profinfo_width in @@ -200,8 +206,10 @@ while : ; do native_compiler=false;; -flambda|--flambda) flambda=true;; + -with-cplugins|--with-cplugins) + with_cplugins=true;; -no-cplugins|--no-cplugins) - with_cplugins=false;; + ;; # Ignored for backward compatibility -fPIC|--fPIC) with_fpic=true;; -safe-string|--safe-string) @@ -871,6 +879,16 @@ else fi +# Try to work around the Skylake/Kaby Lake processor bug. +case "$cc,$target" in + *gcc*,x86_64-*|*gcc*,i686-*) + if sh ./hasgot -Werror -fno-tree-vrp; then + internal_cflags="$internal_cflags -fno-tree-vrp" + inf "Adding -fno-tree-vrp option to work around PR#7452" + fi;; +esac + + # Configure the native-code compiler arch=none @@ -1106,6 +1124,19 @@ if sh ./hasgot times; then echo "#define HAS_TIMES" >> s.h fi +if sh ./hasgot2 -D_GNU_SOURCE -i stdlib.h secure_getenv; then + inf "secure_getenv() found." + echo "#define HAS_SECURE_GETENV" >> s.h +elif sh ./hasgot2 -D_GNU_SOURCE -i stdlib.h __secure_getenv; then + inf "__secure_getenv() found." + echo "#define HAS___SECURE_GETENV" >> s.h +fi + +if sh ./hasgot -i unistd.h issetugid; then + inf "issetugid() found." + echo "#define HAS_ISSETUGID" >> s.h +fi + # For the terminfo module if test "$with_curses" = "yes"; then @@ -1484,6 +1515,12 @@ if sh ./hasgot accept4; then echo "#define HAS_ACCEPT4" >> s.h fi +if sh ./hasgot getauxval; then + inf "getauxval() found." + echo "#define HAS_GETAUXVAL" >> s.h +fi + + # Determine if the debugger is supported if test -n "$with_debugger"; then @@ -1864,6 +1901,9 @@ if $with_spacetime; then if $spacetime_supported; then echo "Spacetime profiling will be available." echo "#define WITH_SPACETIME" >> m.h + if $with_spacetime_call_counts; then + echo "#define WITH_SPACETIME_CALL_COUNTS" >> m.h + fi if $disable_libunwind; then has_libunwind=no libunwind_available=false @@ -2027,6 +2067,7 @@ echo "WITH_OCAMLDOC=${with_ocamldoc}" >>Makefile echo "ASM_CFI_SUPPORTED=$asm_cfi_supported" >> Makefile echo "WITH_FRAME_POINTERS=$with_frame_pointers" >> Makefile echo "WITH_SPACETIME=$with_spacetime" >> Makefile +echo "WITH_SPACETIME_CALL_COUNTS=$with_spacetime_call_counts" >> Makefile echo "WITH_PROFINFO=$with_profinfo" >> Makefile echo "LIBUNWIND_AVAILABLE=$libunwind_available" >> Makefile echo "LIBUNWIND_INCLUDE_FLAGS=$libunwind_include" >> Makefile @@ -2108,6 +2149,11 @@ else fi if $with_spacetime; then inf " spacetime profiling....... yes" + if test "$with_spacetime_call_counts" = "true"; then + inf " ... with call counts.... yes" + else + inf " ... with call counts.... no" + fi inf " ... with libunwind...... $has_libunwind" else inf " spacetime profiling....... no" diff --git a/debugger/symbols.ml b/debugger/symbols.ml index dd20d8f913..3112497401 100644 --- a/debugger/symbols.ml +++ b/debugger/symbols.ml @@ -37,6 +37,18 @@ let events_by_module = let all_events_by_module = (Hashtbl.create 17 : (string, debug_event list) Hashtbl.t) +let partition_modules evl = + let rec partition_modules' ev evl = + match evl with + [] -> [ev],[] + | ev'::evl -> + let evl,evll = partition_modules' ev' evl in + if ev.ev_module = ev'.ev_module then ev::evl,evll else [ev],evl::evll + in + match evl with + [] -> [] + | ev::evl -> let evl,evll = partition_modules' ev evl in evl::evll + let relocate_event orig ev = ev.ev_pos <- orig + ev.ev_pos; match ev.ev_repr with @@ -67,7 +79,8 @@ let read_symbols' bytecode_file = let evl = (input_value ic : debug_event list) in (* Relocate events in event list *) List.iter (relocate_event orig) evl; - eventlists := evl :: !eventlists; + let evll = partition_modules evl in + eventlists := evll @ !eventlists; dirs := List.fold_left (fun s e -> StringSet.add e s) !dirs (input_value ic) done; diff --git a/driver/compenv.ml b/driver/compenv.ml index f037328d5c..194fa617c8 100644 --- a/driver/compenv.ml +++ b/driver/compenv.ml @@ -404,7 +404,9 @@ let read_one_param ppf position name v = | "can-discard" -> can_discard := v ::!can_discard - | "timings" -> set "timings" [ print_timings ] v + | "timings" | "profile" -> + let if_on = if name = "timings" then [ `Time ] else Profile.all_columns in + profile_columns := if check_bool ppf name v then if_on else [] | "plugin" -> !load_plugin v diff --git a/driver/compile.ml b/driver/compile.ml index 6a84925d53..98ac5be470 100644 --- a/driver/compile.ml +++ b/driver/compile.ml @@ -27,7 +27,7 @@ open Compenv let tool_name = "ocamlc" let interface ppf sourcefile outputprefix = - Timings.time_call sourcefile (fun () -> + Profile.record_call sourcefile (fun () -> Compmisc.init_path false; let modulename = module_of_filename ppf sourcefile outputprefix in Env.set_unit_name modulename; @@ -36,7 +36,7 @@ let interface ppf sourcefile outputprefix = if !Clflags.dump_parsetree then fprintf ppf "%a@." Printast.interface ast; if !Clflags.dump_source then fprintf ppf "%a@." Pprintast.signature ast; - Timings.(time_call typing) (fun () -> + Profile.(record_call typing) (fun () -> let tsg = Typemod.type_interface sourcefile initial_env ast in if !Clflags.dump_typedtree then fprintf ppf "%a@." Printtyped.interface tsg; let sg = tsg.sig_type in @@ -67,7 +67,7 @@ let print_if ppf flag printer arg = let (++) x f = f x let implementation ppf sourcefile outputprefix = - Timings.time_call sourcefile (fun () -> + Profile.record_call sourcefile (fun () -> Compmisc.init_path false; let modulename = module_of_filename ppf sourcefile outputprefix in Env.set_unit_name modulename; @@ -77,7 +77,7 @@ let implementation ppf sourcefile outputprefix = Pparse.parse_implementation ~tool_name ppf sourcefile ++ print_if ppf Clflags.dump_parsetree Printast.implementation ++ print_if ppf Clflags.dump_source Pprintast.structure - ++ Timings.(time typing) + ++ Profile.(record typing) (Typemod.type_implementation sourcefile outputprefix modulename env) ++ print_if ppf Clflags.dump_typedtree Printtyped.implementation_with_coercion @@ -88,9 +88,9 @@ let implementation ppf sourcefile outputprefix = end else begin let bytecode, required_globals = (typedtree, coercion) - ++ Timings.(time transl) + ++ Profile.(record transl) (Translmod.transl_implementation modulename) - ++ Timings.(time ~accumulate:true generate) + ++ Profile.(record ~accumulate:true generate) (fun { Lambda.code = lambda; required_globals } -> print_if ppf Clflags.dump_rawlambda Printlambda.lambda lambda ++ Simplif.simplify_lambda sourcefile @@ -103,7 +103,7 @@ let implementation ppf sourcefile outputprefix = let oc = open_out_bin objfile in try bytecode - ++ Timings.(time ~accumulate:true generate) + ++ Profile.(record ~accumulate:true generate) (Emitcode.to_file oc modulename objfile ~required_globals); Warnings.check_fatal (); close_out oc; diff --git a/driver/main.ml b/driver/main.ml index 64dd6e7ebc..110ea3cf3e 100644 --- a/driver/main.ml +++ b/driver/main.ml @@ -117,7 +117,8 @@ module Options = Main_args.Make_bytecomp_options (struct let _drawlambda = set dump_rawlambda let _dlambda = set dump_lambda let _dinstr = set dump_instr - let _dtimings = set print_timings + let _dtimings () = profile_columns := [ `Time ] + let _dprofile () = profile_columns := Profile.all_columns let _args = Arg.read_arg let _args0 = Arg.read_arg0 @@ -127,6 +128,9 @@ end) let main () = Clflags.add_arguments __LOC__ Options.list; + Clflags.add_arguments __LOC__ + ["-depend", Arg.Unit Makedepend.main_from_option, + "<options> Compute dependencies (use 'ocamlc -depend -help' for details)"]; try readenv ppf Before_args; Clflags.parse_arguments anonymous usage; @@ -198,5 +202,5 @@ let main () = let () = main (); - if !Clflags.print_timings then Timings.print Format.std_formatter; + Profile.print Format.std_formatter !Clflags.profile_columns; exit 0 diff --git a/driver/main_args.ml b/driver/main_args.ml index 38ce1836c5..68fd29324f 100644 --- a/driver/main_args.ml +++ b/driver/main_args.ml @@ -233,11 +233,11 @@ let mk_no_keep_docs f = ;; let mk_keep_locs f = - "-keep-locs", Arg.Unit f, " Keep locations in .cmi files" + "-keep-locs", Arg.Unit f, " Keep locations in .cmi files (default)" ;; let mk_no_keep_locs f = - "-no-keep-locs", Arg.Unit f, " Do not keep locations in .cmi files (default)" + "-no-keep-locs", Arg.Unit f, " Do not keep locations in .cmi files" ;; let mk_labels f = @@ -460,7 +460,11 @@ let mk_thread f = ;; let mk_dtimings f = - "-dtimings", Arg.Unit f, " Print timings" + "-dtimings", Arg.Unit f, " Print timings information for each pass"; +;; + +let mk_dprofile f = + "-dprofile", Arg.Unit f, Profile.options_doc ;; let mk_unbox_closures f = @@ -843,6 +847,7 @@ module type Compiler_options = sig val _nopervasives : unit -> unit val _dtimings : unit -> unit + val _dprofile : unit -> unit val _args: string -> string array val _args0: string -> string array @@ -1070,6 +1075,7 @@ struct mk_dlambda F._dlambda; mk_dinstr F._dinstr; mk_dtimings F._dtimings; + mk_dprofile F._dprofile; mk_args F._args; mk_args0 F._args0; @@ -1263,6 +1269,7 @@ struct mk_dinterval F._dinterval; mk_dstartup F._dstartup; mk_dtimings F._dtimings; + mk_dprofile F._dprofile; mk_dump_pass F._dump_pass; mk_args F._args; diff --git a/driver/main_args.mli b/driver/main_args.mli index 046275dfa3..f7d200123e 100644 --- a/driver/main_args.mli +++ b/driver/main_args.mli @@ -100,6 +100,7 @@ module type Compiler_options = sig val _nopervasives : unit -> unit val _dtimings : unit -> unit + val _dprofile : unit -> unit val _args: string -> string array val _args0: string -> string array diff --git a/driver/makedepend.ml b/driver/makedepend.ml new file mode 100644 index 0000000000..6b888a0ca6 --- /dev/null +++ b/driver/makedepend.ml @@ -0,0 +1,626 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +open Compenv +open Parsetree +module StringMap = Depend.StringMap + +let ppf = Format.err_formatter +(* Print the dependencies *) + +type file_kind = ML | MLI;; + +let load_path = ref ([] : (string * string array) list) +let ml_synonyms = ref [".ml"] +let mli_synonyms = ref [".mli"] +let shared = ref false +let native_only = ref false +let bytecode_only = ref false +let error_occurred = ref false +let raw_dependencies = ref false +let sort_files = ref false +let all_dependencies = ref false +let one_line = ref false +let files = + ref ([] : (string * file_kind * Depend.StringSet.t * string list) list) +let allow_approximation = ref false +let map_files = ref [] +let module_map = ref StringMap.empty +let debug = ref false + +(* Fix path to use '/' as directory separator instead of '\'. + Only under Windows. *) + +let fix_slash s = + if Sys.os_type = "Unix" then s else begin + String.map (function '\\' -> '/' | c -> c) s + end + +(* Since we reinitialize load_path after reading OCAMLCOMP, + we must use a cache instead of calling Sys.readdir too often. *) +let dirs = ref StringMap.empty +let readdir dir = + try + StringMap.find dir !dirs + with Not_found -> + let contents = + try + Sys.readdir dir + with Sys_error msg -> + Format.fprintf Format.err_formatter "@[Bad -I option: %s@]@." msg; + error_occurred := true; + [||] + in + dirs := StringMap.add dir contents !dirs; + contents + +let add_to_list li s = + li := s :: !li + +let add_to_load_path dir = + try + let dir = Misc.expand_directory Config.standard_library dir in + let contents = readdir dir in + add_to_list load_path (dir, contents) + with Sys_error msg -> + Format.fprintf Format.err_formatter "@[Bad -I option: %s@]@." msg; + error_occurred := true + +let add_to_synonym_list synonyms suffix = + if (String.length suffix) > 1 && suffix.[0] = '.' then + add_to_list synonyms suffix + else begin + Format.fprintf Format.err_formatter "@[Bad suffix: '%s'@]@." suffix; + error_occurred := true + end + +(* Find file 'name' (capitalized) in search path *) +let find_file name = + let uname = String.uncapitalize_ascii name in + let rec find_in_array a pos = + if pos >= Array.length a then None else begin + let s = a.(pos) in + if s = name || s = uname then Some s else find_in_array a (pos + 1) + end in + let rec find_in_path = function + [] -> raise Not_found + | (dir, contents) :: rem -> + match find_in_array contents 0 with + Some truename -> + if dir = "." then truename else Filename.concat dir truename + | None -> find_in_path rem in + find_in_path !load_path + +let rec find_file_in_list = function + [] -> raise Not_found +| x :: rem -> try find_file x with Not_found -> find_file_in_list rem + + +let find_dependency target_kind modname (byt_deps, opt_deps) = + try + let candidates = List.map ((^) modname) !mli_synonyms in + let filename = find_file_in_list candidates in + let basename = Filename.chop_extension filename in + let cmi_file = basename ^ ".cmi" in + let cmx_file = basename ^ ".cmx" in + let ml_exists = + List.exists (fun ext -> Sys.file_exists (basename ^ ext)) !ml_synonyms in + let new_opt_dep = + if !all_dependencies then + match target_kind with + | MLI -> [ cmi_file ] + | ML -> + cmi_file :: (if ml_exists then [ cmx_file ] else []) + else + (* this is a make-specific hack that makes .cmx to be a 'proxy' + target that would force the dependency on .cmi via transitivity *) + if ml_exists + then [ cmx_file ] + else [ cmi_file ] + in + ( cmi_file :: byt_deps, new_opt_dep @ opt_deps) + with Not_found -> + try + (* "just .ml" case *) + let candidates = List.map ((^) modname) !ml_synonyms in + let filename = find_file_in_list candidates in + let basename = Filename.chop_extension filename in + let cmi_file = basename ^ ".cmi" in + let cmx_file = basename ^ ".cmx" in + let bytenames = + if !all_dependencies then + match target_kind with + | MLI -> [ cmi_file ] + | ML -> [ cmi_file ] + else + (* again, make-specific hack *) + [basename ^ (if !native_only then ".cmx" else ".cmo")] in + let optnames = + if !all_dependencies + then match target_kind with + | MLI -> [ cmi_file ] + | ML -> [ cmi_file; cmx_file ] + else [ cmx_file ] + in + (bytenames @ byt_deps, optnames @ opt_deps) + with Not_found -> + (byt_deps, opt_deps) + +let (depends_on, escaped_eol) = (":", " \\\n ") + +let print_filename s = + let s = if !Clflags.force_slash then fix_slash s else s in + if not (String.contains s ' ') then begin + print_string s; + end else begin + let rec count n i = + if i >= String.length s then n + else if s.[i] = ' ' then count (n+1) (i+1) + else count n (i+1) + in + let spaces = count 0 0 in + let result = Bytes.create (String.length s + spaces) in + let rec loop i j = + if i >= String.length s then () + else if s.[i] = ' ' then begin + Bytes.set result j '\\'; + Bytes.set result (j+1) ' '; + loop (i+1) (j+2); + end else begin + Bytes.set result j s.[i]; + loop (i+1) (j+1); + end + in + loop 0 0; + print_bytes result; + end +;; + +let print_dependencies target_files deps = + let rec print_items pos = function + [] -> print_string "\n" + | dep :: rem -> + if !one_line || (pos + 1 + String.length dep <= 77) then begin + if pos <> 0 then print_string " "; print_filename dep; + print_items (pos + String.length dep + 1) rem + end else begin + print_string escaped_eol; print_filename dep; + print_items (String.length dep + 4) rem + end in + print_items 0 (target_files @ [depends_on] @ deps) + +let print_raw_dependencies source_file deps = + print_filename source_file; print_string depends_on; + Depend.StringSet.iter + (fun dep -> + (* filter out "*predef*" *) + if (String.length dep > 0) + && (match dep.[0] with + | 'A'..'Z' | '\128'..'\255' -> true + | _ -> false) then + begin + print_char ' '; + print_string dep + end) + deps; + print_char '\n' + + +(* Process one file *) + +let report_err exn = + error_occurred := true; + Location.report_exception Format.err_formatter exn + +let tool_name = "ocamldep" + +let rec lexical_approximation lexbuf = + (* Approximation when a file can't be parsed. + Heuristic: + - first component of any path starting with an uppercase character is a + dependency. + - always skip the token after a dot, unless dot is preceded by a + lower-case identifier + - always skip the token after a backquote + *) + try + let rec process after_lident lexbuf = + match Lexer.token lexbuf with + | Parser.UIDENT name -> + Depend.free_structure_names := + Depend.StringSet.add name !Depend.free_structure_names; + process false lexbuf + | Parser.LIDENT _ -> process true lexbuf + | Parser.DOT when after_lident -> process false lexbuf + | Parser.DOT | Parser.BACKQUOTE -> skip_one lexbuf + | Parser.EOF -> () + | _ -> process false lexbuf + and skip_one lexbuf = + match Lexer.token lexbuf with + | Parser.DOT | Parser.BACKQUOTE -> skip_one lexbuf + | Parser.EOF -> () + | _ -> process false lexbuf + + in + process false lexbuf + with Lexer.Error _ -> lexical_approximation lexbuf + +let read_and_approximate inputfile = + error_occurred := false; + Depend.free_structure_names := Depend.StringSet.empty; + let ic = open_in_bin inputfile in + try + seek_in ic 0; + Location.input_name := inputfile; + let lexbuf = Lexing.from_channel ic in + Location.init lexbuf inputfile; + lexical_approximation lexbuf; + close_in ic; + !Depend.free_structure_names + with exn -> + close_in ic; + report_err exn; + !Depend.free_structure_names + +let read_parse_and_extract parse_function extract_function def ast_kind + source_file = + Depend.pp_deps := []; + Depend.free_structure_names := Depend.StringSet.empty; + try + let input_file = Pparse.preprocess source_file in + begin try + let ast = + Pparse.file ~tool_name Format.err_formatter + input_file parse_function ast_kind + in + let bound_vars = + List.fold_left + (fun bv modname -> + Depend.open_module bv (Longident.parse modname)) + !module_map ((* PR#7248 *) List.rev !Clflags.open_modules) + in + let r = extract_function bound_vars ast in + Pparse.remove_preprocessed input_file; + (!Depend.free_structure_names, r) + with x -> + Pparse.remove_preprocessed input_file; + raise x + end + with x -> begin + report_err x; + if not !allow_approximation + then (Depend.StringSet.empty, def) + else (read_and_approximate source_file, def) + end + +let print_ml_dependencies source_file extracted_deps pp_deps = + let basename = Filename.chop_extension source_file in + let byte_targets = [ basename ^ ".cmo" ] in + let native_targets = + if !all_dependencies + then [ basename ^ ".cmx"; basename ^ ".o" ] + else [ basename ^ ".cmx" ] in + let shared_targets = [ basename ^ ".cmxs" ] in + let init_deps = if !all_dependencies then [source_file] else [] in + let cmi_name = basename ^ ".cmi" in + let init_deps, extra_targets = + if List.exists (fun ext -> Sys.file_exists (basename ^ ext)) + !mli_synonyms + then (cmi_name :: init_deps, cmi_name :: init_deps), [] + else (init_deps, init_deps), + (if !all_dependencies then [cmi_name] else []) + in + let (byt_deps, native_deps) = + Depend.StringSet.fold (find_dependency ML) + extracted_deps init_deps in + if not !native_only then + print_dependencies (byte_targets @ extra_targets) (byt_deps @ pp_deps); + if not !bytecode_only then + begin + print_dependencies (native_targets @ extra_targets) + (native_deps @ pp_deps); + if !shared then + print_dependencies (shared_targets @ extra_targets) + (native_deps @ pp_deps) + end + +let print_mli_dependencies source_file extracted_deps pp_deps = + let basename = Filename.chop_extension source_file in + let (byt_deps, _opt_deps) = + Depend.StringSet.fold (find_dependency MLI) + extracted_deps ([], []) in + print_dependencies [basename ^ ".cmi"] (byt_deps @ pp_deps) + +let print_file_dependencies (source_file, kind, extracted_deps, pp_deps) = + if !raw_dependencies then begin + print_raw_dependencies source_file extracted_deps + end else + match kind with + | ML -> print_ml_dependencies source_file extracted_deps pp_deps + | MLI -> print_mli_dependencies source_file extracted_deps pp_deps + + +let ml_file_dependencies source_file = + let parse_use_file_as_impl lexbuf = + let f x = + match x with + | Ptop_def s -> s + | Ptop_dir _ -> [] + in + List.flatten (List.map f (Parse.use_file lexbuf)) + in + let (extracted_deps, ()) = + read_parse_and_extract parse_use_file_as_impl Depend.add_implementation () + Pparse.Structure source_file + in + files := (source_file, ML, extracted_deps, !Depend.pp_deps) :: !files + +let mli_file_dependencies source_file = + let (extracted_deps, ()) = + read_parse_and_extract Parse.interface Depend.add_signature () + Pparse.Signature source_file + in + files := (source_file, MLI, extracted_deps, !Depend.pp_deps) :: !files + +let process_file_as process_fun def source_file = + Compenv.readenv ppf (Before_compile source_file); + load_path := []; + List.iter add_to_load_path ( + (!Compenv.last_include_dirs @ + !Clflags.include_dirs @ + !Compenv.first_include_dirs + )); + Location.input_name := source_file; + try + if Sys.file_exists source_file then process_fun source_file else def + with x -> report_err x; def + +let process_file source_file ~ml_file ~mli_file ~def = + if List.exists (Filename.check_suffix source_file) !ml_synonyms then + process_file_as ml_file def source_file + else if List.exists (Filename.check_suffix source_file) !mli_synonyms then + process_file_as mli_file def source_file + else def + +let file_dependencies source_file = + process_file source_file ~def:() + ~ml_file:ml_file_dependencies + ~mli_file:mli_file_dependencies + +let file_dependencies_as kind = + match kind with + | ML -> process_file_as ml_file_dependencies () + | MLI -> process_file_as mli_file_dependencies () + +let sort_files_by_dependencies files = + let h = Hashtbl.create 31 in + let worklist = ref [] in + +(* Init Hashtbl with all defined modules *) + let files = List.map (fun (file, file_kind, deps, pp_deps) -> + let modname = + String.capitalize_ascii (Filename.chop_extension (Filename.basename file)) + in + let key = (modname, file_kind) in + let new_deps = ref [] in + Hashtbl.add h key (file, new_deps); + worklist := key :: !worklist; + (modname, file_kind, deps, new_deps, pp_deps) + ) files in + +(* Keep only dependencies to defined modules *) + List.iter (fun (modname, file_kind, deps, new_deps, _pp_deps) -> + let add_dep modname kind = + new_deps := (modname, kind) :: !new_deps; + in + Depend.StringSet.iter (fun modname -> + match file_kind with + ML -> (* ML depends both on ML and MLI *) + if Hashtbl.mem h (modname, MLI) then add_dep modname MLI; + if Hashtbl.mem h (modname, ML) then add_dep modname ML + | MLI -> (* MLI depends on MLI if exists, or ML otherwise *) + if Hashtbl.mem h (modname, MLI) then add_dep modname MLI + else if Hashtbl.mem h (modname, ML) then add_dep modname ML + ) deps; + if file_kind = ML then (* add dep from .ml to .mli *) + if Hashtbl.mem h (modname, MLI) then add_dep modname MLI + ) files; + +(* Print and remove all files with no remaining dependency. Iterate + until all files have been removed (worklist is empty) or + no file was removed during a turn (cycle). *) + let printed = ref true in + while !printed && !worklist <> [] do + let files = !worklist in + worklist := []; + printed := false; + List.iter (fun key -> + let (file, deps) = Hashtbl.find h key in + let set = !deps in + deps := []; + List.iter (fun key -> + if Hashtbl.mem h key then deps := key :: !deps + ) set; + if !deps = [] then begin + printed := true; + Printf.printf "%s " file; + Hashtbl.remove h key; + end else + worklist := key :: !worklist + ) files + done; + + if !worklist <> [] then begin + Format.fprintf Format.err_formatter + "@[Warning: cycle in dependencies. End of list is not sorted.@]@."; + let sorted_deps = + let li = ref [] in + Hashtbl.iter (fun _ file_deps -> li := file_deps :: !li) h; + List.sort (fun (file1, _) (file2, _) -> String.compare file1 file2) !li + in + List.iter (fun (file, deps) -> + Format.fprintf Format.err_formatter "\t@[%s: " file; + List.iter (fun (modname, kind) -> + Format.fprintf Format.err_formatter "%s.%s " modname + (if kind=ML then "ml" else "mli"); + ) !deps; + Format.fprintf Format.err_formatter "@]@."; + Printf.printf "%s " file) sorted_deps; + end; + Printf.printf "\n%!"; + () + +(* Map *) + +let rec dump_map s0 ppf m = + let open Depend in + StringMap.iter + (fun key (Node(s1,m')) -> + let s = StringSet.diff s1 s0 in + if StringSet.is_empty s then + Format.fprintf ppf "@ @[<hv2>module %s : sig%a@;<1 -2>end@]" + key (dump_map (StringSet.union s1 s0)) m' + else + Format.fprintf ppf "@ module %s = %s" key (StringSet.choose s)) + m + +let process_ml_map = + read_parse_and_extract Parse.implementation Depend.add_implementation_binding + StringMap.empty Pparse.Structure + +let process_mli_map = + read_parse_and_extract Parse.interface Depend.add_signature_binding + StringMap.empty Pparse.Signature + +let parse_map fname = + map_files := fname :: !map_files ; + let old_transp = !Clflags.transparent_modules in + Clflags.transparent_modules := true; + let (deps, m) = + process_file fname ~def:(Depend.StringSet.empty, StringMap.empty) + ~ml_file:process_ml_map + ~mli_file:process_mli_map + in + Clflags.transparent_modules := old_transp; + let modname = + String.capitalize_ascii + (Filename.basename (Filename.chop_extension fname)) in + if StringMap.is_empty m then + report_err (Failure (fname ^ " : empty map file or parse error")); + let mm = Depend.make_node m in + if !debug then begin + Format.printf "@[<v>%s:%t%a@]@." fname + (fun ppf -> Depend.StringSet.iter (Format.fprintf ppf " %s") deps) + (dump_map deps) (StringMap.add modname mm StringMap.empty) + end; + let mm = Depend.(weaken_map (StringSet.singleton modname) mm) in + module_map := StringMap.add modname mm !module_map +;; + + +(* Entry point *) + +let print_version () = + Format.printf "ocamldep, version %s@." Sys.ocaml_version; + exit 0; +;; + +let print_version_num () = + Format.printf "%s@." Sys.ocaml_version; + exit 0; +;; + +let main () = + Clflags.classic := false; + add_to_list first_include_dirs Filename.current_dir_name; + Compenv.readenv ppf Before_args; + Clflags.reset_arguments (); (* reset arguments from ocamlc/ocamlopt *) + Clflags.add_arguments __LOC__ [ + "-absname", Arg.Set Location.absname, + " Show absolute filenames in error messages"; + "-all", Arg.Set all_dependencies, + " Generate dependencies on all files"; + "-allow-approx", Arg.Set allow_approximation, + " Fallback to a lexer-based approximation on unparseable files"; + "-as-map", Arg.Set Clflags.transparent_modules, + " Omit delayed dependencies for module aliases (-no-alias-deps -w -49)"; + (* "compiler uses -no-alias-deps, and no module is coerced"; *) + "-debug-map", Arg.Set debug, + " Dump the delayed dependency map for each map file"; + "-I", Arg.String (add_to_list Clflags.include_dirs), + "<dir> Add <dir> to the list of include directories"; + "-impl", Arg.String (file_dependencies_as ML), + "<f> Process <f> as a .ml file"; + "-intf", Arg.String (file_dependencies_as MLI), + "<f> Process <f> as a .mli file"; + "-map", Arg.String parse_map, + "<f> Read <f> and propagate delayed dependencies to following files"; + "-ml-synonym", Arg.String(add_to_synonym_list ml_synonyms), + "<e> Consider <e> as a synonym of the .ml extension"; + "-mli-synonym", Arg.String(add_to_synonym_list mli_synonyms), + "<e> Consider <e> as a synonym of the .mli extension"; + "-modules", Arg.Set raw_dependencies, + " Print module dependencies in raw form (not suitable for make)"; + "-native", Arg.Set native_only, + " Generate dependencies for native-code only (no .cmo files)"; + "-bytecode", Arg.Set bytecode_only, + " Generate dependencies for bytecode-code only (no .cmx files)"; + "-one-line", Arg.Set one_line, + " Output one line per file, regardless of the length"; + "-open", Arg.String (add_to_list Clflags.open_modules), + "<module> Opens the module <module> before typing"; + "-plugin", Arg.String Compplugin.load, + "<plugin> Load dynamic plugin <plugin>"; + "-pp", Arg.String(fun s -> Clflags.preprocessor := Some s), + "<cmd> Pipe sources through preprocessor <cmd>"; + "-ppx", Arg.String (add_to_list first_ppx), + "<cmd> Pipe abstract syntax trees through preprocessor <cmd>"; + "-shared", Arg.Set shared, + " Generate dependencies for native plugin files (.cmxs targets)"; + "-slash", Arg.Set Clflags.force_slash, + " (Windows) Use forward slash / instead of backslash \\ in file paths"; + "-sort", Arg.Set sort_files, + " Sort files according to their dependencies"; + "-version", Arg.Unit print_version, + " Print version and exit"; + "-vnum", Arg.Unit print_version_num, + " Print version number and exit"; + "-args", Arg.Expand Arg.read_arg, + "<file> Read additional newline separated command line arguments \n\ + \ from <file>"; + "-args0", Arg.Expand Arg.read_arg0, + "<file> Read additional NUL separated command line arguments from \n\ + \ <file>" + ]; + let usage = + Printf.sprintf "Usage: %s [options] <source files>\nOptions are:" + (Filename.basename Sys.argv.(0)) + in + Clflags.parse_arguments file_dependencies usage; + Compenv.readenv ppf Before_link; + if !sort_files then sort_files_by_dependencies !files + else List.iter print_file_dependencies (List.sort compare !files); + exit (if !error_occurred then 2 else 0) + +let main_from_option () = + if Sys.argv.(1) <> "-depend" then begin + Printf.eprintf + "Fatal error: argument -depend must be used as first argument.\n%!"; + exit 2; + end; + incr Arg.current; + Sys.argv.(0) <- Sys.argv.(0) ^ " -depend"; + Sys.argv.(!Arg.current) <- Sys.argv.(0); + main () diff --git a/driver/makedepend.mli b/driver/makedepend.mli new file mode 100644 index 0000000000..5a0a8f17de --- /dev/null +++ b/driver/makedepend.mli @@ -0,0 +1,19 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) +(* *) +(* Copyright 1999 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +val main : unit -> unit + +(* entry point when called from the -depend option of ocamlc/ocamlopt *) +val main_from_option : unit -> unit diff --git a/driver/optcompile.ml b/driver/optcompile.ml index 59e872fd12..c450b5f67b 100644 --- a/driver/optcompile.ml +++ b/driver/optcompile.ml @@ -28,7 +28,7 @@ open Compenv let tool_name = "ocamlopt" let interface ppf sourcefile outputprefix = - Timings.time_call sourcefile (fun () -> + Profile.record_call sourcefile (fun () -> Compmisc.init_path false; let modulename = module_of_filename ppf sourcefile outputprefix in Env.set_unit_name modulename; @@ -36,7 +36,7 @@ let interface ppf sourcefile outputprefix = let ast = Pparse.parse_interface ~tool_name ppf sourcefile in if !Clflags.dump_parsetree then fprintf ppf "%a@." Printast.interface ast; if !Clflags.dump_source then fprintf ppf "%a@." Pprintast.signature ast; - Timings.(time_call typing) (fun () -> + Profile.(record_call typing) (fun () -> let tsg = Typemod.type_interface sourcefile initial_env ast in if !Clflags.dump_typedtree then fprintf ppf "%a@." Printtyped.interface tsg; let sg = tsg.sig_type in @@ -68,7 +68,7 @@ let (++) x f = f x let (+++) (x, y) f = (x, f y) let implementation ~backend ppf sourcefile outputprefix = - Timings.time_call sourcefile (fun () -> + Profile.record_call sourcefile (fun () -> Compmisc.init_path true; let modulename = module_of_filename ppf sourcefile outputprefix in Env.set_unit_name modulename; @@ -81,7 +81,7 @@ let implementation ~backend ppf sourcefile outputprefix = ast ++ print_if ppf Clflags.dump_parsetree Printast.implementation ++ print_if ppf Clflags.dump_source Pprintast.structure - ++ Timings.(time typing) + ++ Profile.(record typing) (Typemod.type_implementation sourcefile outputprefix modulename env) ++ print_if ppf Clflags.dump_typedtree Printtyped.implementation_with_coercion @@ -95,9 +95,9 @@ let implementation ~backend ppf sourcefile outputprefix = Clflags.unbox_specialised_args := false end; (typedtree, coercion) - ++ Timings.(time transl) + ++ Profile.(record transl) (Translmod.transl_implementation_flambda modulename) - ++ Timings.(time generate) + ++ Profile.(record generate) (fun { Lambda.module_ident; main_module_block_size; required_globals; code } -> ((module_ident, main_module_block_size), code) @@ -119,10 +119,10 @@ let implementation ~backend ppf sourcefile outputprefix = else begin Clflags.use_inlining_arguments_set Clflags.classic_arguments; (typedtree, coercion) - ++ Timings.(time transl) + ++ Profile.(record transl) (Translmod.transl_store_implementation modulename) ++ print_if ppf Clflags.dump_rawlambda Printlambda.program - ++ Timings.(time generate) + ++ Profile.(record generate) (fun program -> { program with Lambda.code = Simplif.simplify_lambda sourcefile diff --git a/driver/optmain.ml b/driver/optmain.ml index 35fe8454dd..c28991a3ef 100644 --- a/driver/optmain.ml +++ b/driver/optmain.ml @@ -224,7 +224,8 @@ module Options = Main_args.Make_optcomp_options (struct let _dlinear = set dump_linear let _dinterval = set dump_interval let _dstartup = set keep_startup_file - let _dtimings = set print_timings + let _dtimings () = profile_columns := [ `Time ] + let _dprofile () = profile_columns := Profile.all_columns let _opaque = set opaque let _args = Arg.read_arg @@ -239,6 +240,9 @@ let main () = try readenv ppf Before_args; Clflags.add_arguments __LOC__ (Arch.command_line_options @ Options.list); + Clflags.add_arguments __LOC__ + ["-depend", Arg.Unit Makedepend.main_from_option, + "<options> Compute dependencies (use 'ocamlopt -depend -help' for details)"]; Clflags.parse_arguments anonymous usage; Compmisc.read_color_env ppf; if !gprofile && not Config.profiling then @@ -309,5 +313,5 @@ let main () = let () = main (); - if !Clflags.print_timings then Timings.print Format.std_formatter; + Profile.print Format.std_formatter !Clflags.profile_columns; exit 0 diff --git a/driver/pparse.ml b/driver/pparse.ml index 18b2473ac0..cb78d848b4 100644 --- a/driver/pparse.ml +++ b/driver/pparse.ml @@ -38,7 +38,7 @@ let preprocess sourcefile = match !Clflags.preprocessor with None -> sourcefile | Some pp -> - Timings.time "-pp" + Profile.record "-pp" (call_external_preprocessor sourcefile) pp @@ -180,13 +180,13 @@ let file_aux ppf ~tool_name inputfile (type a) parse_fun invariant_fun seek_in ic 0; let lexbuf = Lexing.from_channel ic in Location.init lexbuf inputfile; - Timings.time_call "parser" (fun () -> parse_fun lexbuf) + Profile.record_call "parser" (fun () -> parse_fun lexbuf) end with x -> close_in ic; raise x in close_in ic; let ast = - Timings.time_call "-ppx" (fun () -> + Profile.record_call "-ppx" (fun () -> apply_rewriters ~restore:false ~tool_name kind ast) in if is_ast_file || !Clflags.all_ppx <> [] then invariant_fun ast; ast @@ -230,10 +230,10 @@ module InterfaceHooks = Misc.MakeHooks(struct end) let parse_implementation ppf ~tool_name sourcefile = - Timings.time_call "parsing" (fun () -> + Profile.record_call "parsing" (fun () -> parse_file ~tool_name Ast_invariants.structure ImplementationHooks.apply_hooks Structure ppf sourcefile) let parse_interface ppf ~tool_name sourcefile = - Timings.time_call "parsing" (fun () -> + Profile.record_call "parsing" (fun () -> parse_file ~tool_name Ast_invariants.signature InterfaceHooks.apply_hooks Signature ppf sourcefile) diff --git a/driver/pparse.mli b/driver/pparse.mli index 86d805b8a8..4c5fc0f6ab 100644 --- a/driver/pparse.mli +++ b/driver/pparse.mli @@ -13,6 +13,8 @@ (* *) (**************************************************************************) +(** Driver for the parser, external preprocessors and ast plugin hooks *) + open Format type error = diff --git a/man/Makefile b/man/Makefile index 06e6fa832a..2b678d837a 100644 --- a/man/Makefile +++ b/man/Makefile @@ -20,9 +20,9 @@ INSTALL_DIR=$(DESTDIR)$(MANDIR)/man$(PROGRAMS_MAN_SECTION) install: for i in *.m; do cp \ $$i $(INSTALL_DIR)/`basename $$i .m`.$(PROGRAMS_MAN_SECTION); done - echo '.so man$(PROGRAMS_MAN_SECTION)/ocamlc.$(MANEXT)' \ + echo '.so man$(PROGRAMS_MAN_SECTION)/ocamlc.$(PROGRAMS_MAN_SECTION)' \ > $(INSTALL_DIR)/ocamlc.opt.$(PROGRAMS_MAN_SECTION) - echo '.so man$(PROGRAMS_MAN_SECTION)/ocamlopt.$(MANEXT)' \ + echo '.so man$(PROGRAMS_MAN_SECTION)/ocamlopt.$(PROGRAMS_MAN_SECTION)' \ > $(INSTALL_DIR)/ocamlopt.opt.$(PROGRAMS_MAN_SECTION) - echo '.so man$(PROGRAMS_MAN_SECTION)/ocamlcp.$(MANEXT)' \ + echo '.so man$(PROGRAMS_MAN_SECTION)/ocamlcp.$(PROGRAMS_MAN_SECTION)' \ > $(INSTALL_DIR)/ocamloptp.$(PROGRAMS_MAN_SECTION) diff --git a/man/ocamlc.m b/man/ocamlc.m index 596b225c8e..4078b8328e 100644 --- a/man/ocamlc.m +++ b/man/ocamlc.m @@ -315,6 +315,14 @@ Never use the command on executables produced by .BR ocamlc\ \-custom , this would remove the bytecode part of the executable. + +Security warning: never set the "setuid" or "setgid" bits on +executables produced by +.BR ocamlc\ \-custom , +this would make them vulnerable to attacks. +.TP +.BI \-depend\ ocamldep-args +Compute dependencies, as ocamldep would do. .TP .BI \-dllib\ \-l libname Arrange for the C shared library @@ -832,7 +840,7 @@ clause. \ \ Bad module name: the source file name is not a valid OCaml module name. 25 -\ \ Pattern-matching with all clauses guarded. +\ \ Deprecated: now part of warning 8. 26 \ \ Suspicious unused variable: unused variable that is bound with diff --git a/man/ocamlopt.m b/man/ocamlopt.m index b79afe5a07..f2a2b208a0 100644 --- a/man/ocamlopt.m +++ b/man/ocamlopt.m @@ -252,6 +252,9 @@ Print the version number of .BR ocamlopt (1) and a detailed summary of its configuration, then exit. .TP +.BI \-depend\ ocamldep-args +Compute dependencies, as ocamldep would do. +.TP .BI \-for\-pack \ module\-path Generate an object file (.cmx and .o files) that can later be included as a sub-module (with the given access path) of a compilation unit @@ -330,7 +333,7 @@ Recognize file names ending with .I string as interface files (instead of the default .mli). .TP -.B \-keep-locs +.B \-keep-docs Keep documentation strings in generated .cmi files. .TP .B \-keep-locs diff --git a/manual/README.md b/manual/README.md index 2b28dca840..0a55ea9fd6 100644 --- a/manual/README.md +++ b/manual/README.md @@ -125,23 +125,33 @@ The pseudo-environment `caml_example` evaluates its contents using an ocaml interpreter and then translates both the input code and the interpreter output to latex code, e.g. ```latex -\begin{caml_example} +\begin{caml_example}{toplevel} let f x = x;; \end{caml_example} ``` Note that the toplevel output can be suppressed by using a `*` suffix: ```latex -\begin{caml_example*} -let f x = x;; +\begin{caml_example*}{verbatim} +let f x = x \end{caml_example*} ``` + +The `{verbatim}` or `{toplevel}` argument of the environment corresponds +to the the mode of the example, two modes are available `toplevel` and +`verbatim`. +The `toplevel` mode mimics the appearance and behavior of the toplevel. +In particular, toplevel examples must end with a double semi-colon `;;`, +otherwise an error would be raised. +The `verbatim` does not require a final `;;` and is intended to be +a lighter mode for code examples. + By default, `caml_tex2` raises an error and stops if the output of one the `caml_example` environment contains an unexpected error or warning. If such an error or warning is, in fact, expected, it is necessary to indicate the expected output status to `caml_tex2` by adding either an option to the `caml_example` environment: ```latex -\begin{caml_example}[error] +\begin{caml_example}{toplevel}[error] 1 + 2. ;; \end{caml_example} or for warning @@ -152,7 +162,7 @@ let f None = None;; or an annotation to the concerned phrase: ```latex -\begin{caml_example} +\begin{caml_example}{toplevel} 1 + 2. [@@expect error] ;; let f None = None [@@expect warning 8];; 3 + 4 [@@expect ok];; @@ -164,10 +174,10 @@ and can be used to evaluate OCaml expressions in the toplevel without printing anything: ```latex \begin{caml_eval} -let pi = 4. *. atan 1. +let pi = 4. *. atan 1.;; \end{caml_eval} -\begin{caml_example} -let f x = x +. pi +\begin{caml_example}{toplevel} +let f x = x +. pi;; \end{caml_example} ``` Beware that the detection code for these pseudo-environments is quite brittle diff --git a/manual/manual/Makefile b/manual/manual/Makefile index 61f9852732..3bc6c5ff32 100644 --- a/manual/manual/Makefile +++ b/manual/manual/Makefile @@ -14,10 +14,17 @@ SRC = $(abspath ../../) export LD_LIBRARY_PATH ?= $(SRC)/otherlibs/unix/:$(SRC)/otherlibs/str/ export DYLD_LIBRARY_PATH ?= $(SRC)/otherlibs/unix/:$(SRC)/otherlibs/str/ -OCAMLDOC=$(SRC)/byterun/ocamlrun $(SRC)/ocamldoc/ocamldoc -hide Pervasives +OCAMLDOC=$(if $(wildcard $(SRC)/ocamldoc/ocamldoc.opt),\ + $(SRC)/ocamldoc/ocamldoc.opt,\ + $(SRC)/byterun/ocamlrun $(SRC)/ocamldoc/ocamldoc)\ + -hide Pervasives + MLIS=$(SRC)/stdlib/*.mli \ $(SRC)/utils/*.mli \ $(SRC)/parsing/*.mli \ + $(SRC)/driver/pparse.mli \ + $(SRC)/typing/typemod.mli \ + $(SRC)/bytecomp/simplif.mli \ $(SRC)/otherlibs/bigarray/bigarray.mli \ $(SRC)/otherlibs/dynlink/dynlink.mli \ $(SRC)/otherlibs/graph/graphics.mli \ @@ -34,11 +41,6 @@ manual: files cd texstuff; \ TEXINPUTS=$(TEXINPUTS) latex manual.tex -labltk: cmds/browser.tex library/liblabltk.tex library/tk.mli - cd library; $(MAKE) Tk.tex RELEASEDIR=$(SRC) - cd texstuff; \ - TEXINPUTS=$(TEXINPUTS) latex labltk.tex - index:: cd texstuff && \ sh ../../tools/fix_index.sh manual.idx && \ @@ -63,6 +65,9 @@ html: files -I $(SRC)/stdlib \ -I $(SRC)/utils \ -I $(SRC)/parsing \ + -I $(SRC)/driver \ + -I $(SRC)/typing \ + -I $(SRC)/bytecomp \ -I $(SRC)/otherlibs/bigarray \ -I $(SRC)/otherlibs/dynlink \ -I $(SRC)/otherlibs/graph \ diff --git a/manual/manual/allfiles.etex b/manual/manual/allfiles.etex index 67f392f71c..72d1a53f32 100644 --- a/manual/manual/allfiles.etex +++ b/manual/manual/allfiles.etex @@ -75,6 +75,7 @@ and as a \input{flambda.tex} \input{spacetime.tex} \input{afl-fuzz.tex} +\input{plugins} \part{The OCaml library} \label{p:library} diff --git a/manual/manual/cmds/Makefile b/manual/manual/cmds/Makefile index adcb043101..80e2e803dc 100644 --- a/manual/manual/cmds/Makefile +++ b/manual/manual/cmds/Makefile @@ -1,7 +1,7 @@ FILES=comp.tex top.tex runtime.tex native.tex lexyacc.tex intf-c.tex \ depend.tex profil.tex debugger.tex browser.tex ocamldoc.tex \ warnings-help.tex ocamlbuild.tex flambda.tex spacetime.tex \ - afl-fuzz.tex unified-options.tex + afl-fuzz.tex plugins.tex unified-options.tex TOPDIR=../../.. include $(TOPDIR)/Makefile.tools diff --git a/manual/manual/cmds/lexyacc.etex b/manual/manual/cmds/lexyacc.etex index 294767e418..6053de89ba 100644 --- a/manual/manual/cmds/lexyacc.etex +++ b/manual/manual/cmds/lexyacc.etex @@ -187,7 +187,7 @@ Match any single character not belonging to the given character set. \item[@regexp_1 '#' regexp_2@] (difference of character sets) Regular expressions @regexp_1@ and @regexp_2@ must be character sets -defined with @'['\ldots ']'@ (or a a single character expression or +defined with @'['\ldots ']'@ (or a single character expression or underscore "_"). Match the difference of the two specified character sets. diff --git a/manual/manual/cmds/ocamldoc.etex b/manual/manual/cmds/ocamldoc.etex index d1ab0f6364..e2fc527f71 100644 --- a/manual/manual/cmds/ocamldoc.etex +++ b/manual/manual/cmds/ocamldoc.etex @@ -111,9 +111,6 @@ with the comments in implementation files. \item["-keep-code"] Always keep the source code for values, methods and instance variables, when available. -The source code is always kept when a ".ml" -file is given, but is by default discarded when a ".mli" is given. -This option keeps the source code in all cases. \item["-load" \var{file}] Load information from \var{file}, which has been produced by @@ -1030,12 +1027,13 @@ let _ = Odoc_args.extend_html_generator (module Generator : Odoc_gen.Html_functo To know which methods to override and/or which methods are available, have a look at the different base implementations, depending on the kind of generator you are extending~: +\newcommand\ocamldocsrc[2]{\href{https://github.com/ocaml/ocaml/blob/{\ocamlversion}/ocamldoc/odoc_#1.ml}{#2}} \begin{itemize} -\item for HTML~: \href{http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/version/\ocamlversion/ocamldoc/odoc_html.ml?view=markup}{"odoc_html.ml"}, -\item for \LaTeX~: \href{http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/version/\ocamlversion/ocamldoc/odoc_latex.ml?view=markup}{"odoc_latex.ml"}, -\item for TeXinfo~: \href{http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/version/\ocamlversion/ocamldoc/odoc_texi.ml?view=markup}{"odoc_texi.ml"}, -\item for man pages~: \href{http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/version/\ocamlversion/ocamldoc/odoc_man.ml?view=markup}{"odoc_man.ml"}, -\item for graphviz (dot)~: \href{http://caml.inria.fr/cgi-bin/viewvc.cgi/ocaml/version/\ocamlversion/ocamldoc/odoc_dot.ml?view=markup}{"odoc_dot.ml"}. +\item for HTML~: \ocamldocsrc{html}{"odoc_html.ml"}, +\item for \LaTeX~: \ocamldocsrc{latex}{"odoc_latex.ml"}, +\item for TeXinfo~: \ocamldocsrc{texi}{"odoc_texi.ml"}, +\item for man pages~: \ocamldocsrc{man}{"odoc_man.ml"}, +\item for graphviz (dot)~: \ocamldocsrc{dot}{"odoc_dot.ml"}. \end{itemize} %%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/manual/manual/cmds/plugins.etex b/manual/manual/cmds/plugins.etex new file mode 100644 index 0000000000..7fd02e4fd9 --- /dev/null +++ b/manual/manual/cmds/plugins.etex @@ -0,0 +1,88 @@ +\chapter{Compiler plugins\label{c:plugins}} +\pdfchapterfold{-9}{Compiler plugind} +%HEVEA\cutname{plugins.html} + +\section{Overview} + +Starting from OCaml 4.03, it is possible to extend the native and bytecode compilers +with plugins using the "-plugin" command line option of both tools. +This possibility is also available for "ocamldep" for OCaml version ulterior to 4.05. +Beware however that plugins are an advanced feature of which the design +is still in flux and breaking changes may happen in the future. Plugins features +are based on the compiler library API. In complement, new hooks have been added to +the compiler to increase its flexibility. + +In particular, hooks are available in the +\ifouthtml\ahref{libref/Pparse.html}{\texttt{Pparse} module} +\else\texttt{Pparse} module (see section~\ref{Pparse})\fi +to transform the parsed abstract syntax tree, providing similar functionality +to extension point based preprocessors. +Other hooks are available to analyze the typed tree in the +\ifouthtml\ahref{libref/Typemod.html}{\texttt{Typemod} module} +\else\texttt{Typemod} module (see section~\ref{Typemod})\fi +after the type-checking phase of the compiler. Since the typed tree relies +on numerous invariants that play a vital part in ulterior phases of the +compiler, it is not possible however to transform the typed tree. +Similarly, the intermediary lambda representation can be modified by using the +hooks provided in the +\ifouthtml\ahref{libref/Simplif.html}{\texttt{Simplif} module} +\else\texttt{Simplif} module (see section~\ref{Simplif})\fi. +A plugin can also add new options to a tool through the +"Clflags.add_arguments" function (see +\ifouthtml\ahref{libref/Clflags.html}{\texttt{Clflags} module} +\else\texttt{Clflags} module (see section~\ref{Clflags})\fi). + +Plugins are dynamically loaded and need to be compiled in the same mode (i.e. +native or bytecode) that the tool they extend. + +\section{Basic example} + +As an illustration, we shall build a simple "Hello world" plugin that adds +a simple statement "print_endline \"Hello from:$sourcefile\"" to a compiled file. + +The simplest way to implement this feature is to modify the abstract syntax +tree. We will therefore add an hooks to the "Pparse.ImplementationHooks". +Since the proposed modification is very basic, we could implement the hook +directly. However, for the sake of this illustration, we use the "Ast_mapper" +structure that provides a better path to build more interesting plugins. + +The first step is to build the AST fragment corresponding to the +evaluation of "print_endline": +\begin{verbatim} + let print_endline name = + let open Ast_helper in + let print_endline = Exp.ident + @@ Location.mknoloc @@Longident.Lident "print_endline" in + let hello = Exp.constant @@ Const.string @@ "Hello from: " ^ name in + Str.eval @@ Exp.apply print_endline [Asttypes.Nolabel, hello] +\end{verbatim}% +Then, we can construct an ast mapper that adds this fragment to the parsed +ast tree. +\begin{verbatim} +let add_hello name (mapper:Ast_mapper.mapper) structure = + let default = Ast_mapper.default_mapper in + (print_endline name) :: (default.structure default structure) + +let ast_mapper name = + { Ast_mapper.default_mapper with structure = add_hello name } +\end{verbatim}% +% +Once this AST mapper is constructed, we need to convert it to a hook and adds this +hook to the "Pparse.ImplementationsHooks". +\begin{verbatim} +let transform hook_info structure = + let astm = ast_mapper hook_info.Misc.sourcefile in + astm.structure astm structure + +let () = Pparse.ImplementationHooks.add_hook "Hello world hook" transform +\end{verbatim} +% +The resulting simplistic plugin can then be compiled with +\begin{verbatim} +$ ocamlopt -I +compiler-libs -shared plugin.ml -o plugin.cmxs +\end{verbatim} +% +Compiling other files with this plugin enabled is then as simple as +\begin{verbatim} +$ ocamlopt -plugin plugin.cmxs test.ml -o test +\end{verbatim} diff --git a/manual/manual/cmds/unified-options.etex b/manual/manual/cmds/unified-options.etex index 331ef2d7d9..12498d6716 100644 --- a/manual/manual/cmds/unified-options.etex +++ b/manual/manual/cmds/unified-options.etex @@ -83,10 +83,12 @@ Read additional newline-terminated command line arguments from \var{filename}. \notop{\item["-bin-annot"] Dump detailed information about the compilation (types, bindings, tail-calls, etc) in binary format. The information for file \var{src}".ml" -is put into file \var{src}".cmt". In case of a type error, dump +(resp. \var{src}".mli") is put into file \var{src}".cmt" +(resp. \var{src}".cmti"). In case of a type error, dump all the information inferred by the type-checker before the error. -The "*.cmt" files produced by "-bin-annot" contain more information -and are much more compact than the files produced by "-annot". +The "*.cmt" and "*.cmti" files produced by "-bin-annot" contain +more information and are much more compact than the files produced by +"-annot". }%notop \notop{\item["-c"] @@ -169,8 +171,18 @@ chapter~\ref{c:intf-c}. Never use the "strip" command on executables produced by "ocamlc -custom", this would remove the bytecode part of the executable. \end{unix} +\begin{unix} +Security warning: never set the ``setuid'' or ``setgid'' bits on executables +produced by "ocamlc -custom", this would make them vulnerable to attacks. +\end{unix} }%comp +\notop{% +\item["-depend" \var{ocamldep-args}] +Compute dependencies, as the "ocamldep" command would do. The remaining +arguments are interpreted as if they were given to the "ocamldep" command. +}%notop + \comp{ \item["-dllib" "-l"\var{libname}] Arrange for the C shared library "dll"\var{libname}".so" @@ -235,8 +247,8 @@ current directory, in the order in which they were given on the command line, but before the standard library directory. See also option "-nostdlib". If the given directory starts with "+", it is taken relative to the -standard library directory. For instance, "-I +labltk" adds the -subdirectory "labltk" of the standard library to the search path. +standard library directory. For instance, "-I +unix" adds the +subdirectory "unix" of the standard library to the search path. \top{% Directories can also be added to the list once @@ -535,8 +547,10 @@ errors, the intermediate file is deleted afterwards. \item["-ppx" \var{command}] After parsing, pipe the abstract syntax tree through the preprocessor \var{command}. The module "Ast_mapper", described in -chapter~\ref{Ast-underscoremapper}, implements the external interface -of a preprocessor. +\ifouthtml +chapter~\ref{c:parsinglib}: \ahref{libref/Ast\_mapper.html}{ \texttt{Ast_mapper} } +\else section~\ref{Ast-underscoremapper}\fi, +implements the external interface of a preprocessor. \item["-principal"] Check information path during type-checking, to make sure that all diff --git a/manual/manual/labltk.tex b/manual/manual/labltk.tex deleted file mode 100644 index 944acb3daf..0000000000 --- a/manual/manual/labltk.tex +++ /dev/null @@ -1,42 +0,0 @@ -\documentclass[11pt]{book} -\usepackage[latin1]{inputenc} -%HEVEA\@def@charset{US-ASCII}% -\usepackage{alltt} -\usepackage{fullpage} -\usepackage{syntaxdef} -\usepackage{multind} -\usepackage{html} -\usepackage{textcomp} -\usepackage{caml-sl} -\usepackage{ocamldoc} -\usepackage{xspace} -\newif\ifplaintext -\plaintextfalse -%\newif\ifpdf -%\pdffalse -\input{macros.tex} - -\usepackage{hyperref} -%\makeatletter \def\@wrindex#1#2{\xdef \@indexfile{\csname #1@idxfile\endcsname}\@@wrindex#2||\\}\makeatother -\def\th{^{\hbox{\scriptsize th}}} - -\raggedbottom -\input{version.tex} - -\begin{document} -\thispagestyle{empty} -\begin{center} -~\vfill -\Huge The LablTk library - release 8.06.0 \\ - and \\ - The OCamlBrowser library explorer \\[1cm] -\large Jacques Garrigue, Jun Furuse \\ - \today \\ -\vfill -\end{center} -\setcounter{page}{1} - -\input{library/liblabltk.tex} -\input{cmds/browser.tex} -\end{document} diff --git a/manual/manual/library/Makefile b/manual/manual/library/Makefile index b07a07ee95..c1c4f122c6 100644 --- a/manual/manual/library/Makefile +++ b/manual/manual/library/Makefile @@ -10,8 +10,11 @@ STDLIB_INTF=Arg.tex Array.tex ArrayLabels.tex Char.tex Complex.tex \ Weak.tex Callback.tex Buffer.tex StdLabels.tex \ Bytes.tex BytesLabels.tex Spacetime.tex +COMPILER_LIBS_PLUGIN_HOOKS=Pparse.tex Typemod.tex + COMPILER_LIBS_INTF=Asthelper.tex Astmapper.tex Asttypes.tex \ - Lexer.tex Location.tex Longident.tex Parse.tex Pprintast.tex Printast.tex + Lexer.tex Location.tex Longident.tex Parse.tex Pprintast.tex Printast.tex \ + $(COMPILER_LIBS_PLUGIN_HOOKS) OTHERLIB_INTF=Unix.tex UnixLabels.tex Str.tex \ Num.tex Arithstatus.tex Bigint.tex \ @@ -25,6 +28,9 @@ INTF=$(CORE_INTF) $(STDLIB_INTF) $(COMPILER_LIBS_INTF) $(OTHERLIB_INTF) MLIS=$(CSLDIR)/stdlib/*.mli \ $(CSLDIR)/utils/*.mli \ $(CSLDIR)/parsing/*.mli \ + $(CSLDIR)/driver/pparse.mli \ + $(CSLDIR)/typing/typemod.mli \ + $(CSLDIR)/bytecomp/simplif.mli \ $(CSLDIR)/otherlibs/bigarray/bigarray.mli \ $(CSLDIR)/otherlibs/dynlink/dynlink.mli \ $(CSLDIR)/otherlibs/graph/graphics.mli \ @@ -55,11 +61,19 @@ all: libs libs: $(FILES) -$(INTF): $(MLIS) - $(CSLDIR)/byterun/ocamlrun $(CSLDIR)/ocamldoc/ocamldoc -latex \ +OCAMLDOC=$(if $(wildcard $(CSLDIR)/ocamldoc/ocamldoc.opt),\ + $(CSLDIR)/ocamldoc/ocamldoc.opt,\ + $(CSLDIR)/byterun/ocamlrun $(CSLDIR)/ocamldoc/ocamldoc) + +$(INTF): interfaces +interfaces: $(MLIS) + $(OCAMLDOC) -latex \ -I $(CSLDIR)/utils \ -I $(CSLDIR)/stdlib \ -I $(CSLDIR)/parsing \ + -I $(CSLDIR)/typing \ + -I $(CSLDIR)/driver \ + -I $(CSLDIR)/bytecomp \ -I $(CSLDIR)/otherlibs/bigarray \ -I $(CSLDIR)/otherlibs/dynlink \ -I $(CSLDIR)/otherlibs/graph \ @@ -80,17 +94,6 @@ $(INTF): $(MLIS) mv -f Ast_helper.tex Asthelper.tex mv -f Ast_mapper.tex Astmapper.tex -Tk.tex: tk.mli - $(CSLDIR)/byterun/ocamlrun $(CSLDIR)/ocamldoc/ocamldoc -latex \ - -I +labltk tk.mli \ - -sepfiles \ - -latextitle "6,subsection*" \ - -latextitle "7,subsubsection*" \ - -latex-type-prefix "TYP" \ - -latex-module-prefix "" \ - -latex-module-type-prefix "" \ - -latex-value-prefix "" - clean: rm -f $(FILES) diff --git a/manual/manual/library/compilerlibs.etex b/manual/manual/library/compilerlibs.etex index 0666f18dbc..db924cc584 100644 --- a/manual/manual/library/compilerlibs.etex +++ b/manual/manual/library/compilerlibs.etex @@ -5,7 +5,8 @@ This chapter describes the OCaml front-end, which declares the abstract syntax tree used by the compiler, provides a way to parse, print and pretty-print OCaml code, and ultimately allows to write abstract syntax tree preprocessors invoked via the {\tt -ppx} flag (see chapters~\ref{c:camlc} -and~\ref{c:nativecomp}). +and~\ref{c:nativecomp}) and plugins invoked via the {\tt -plugin} flag +(see chapter~\ref{c:plugins}). It is important to note that the exported front-end interface follows the evolution of the OCaml language and implementation, and thus does not provide {\bf any} backwards compatibility guarantees. @@ -56,3 +57,18 @@ type\\*"#load \"compiler-libs/ocamlcommon.cma\";;". % \input{Printast.tex} \fi +\ifouthtml +The following modules provides hooks for compiler plugins: +\begin{links} +\item \ahref{libref/Pparse.html}{Module \texttt{Pparse}: OCaml parser driver} +\item \ahref{libref/Typemod.html}{Module \texttt{Typemod}: +OCaml module type checking} +\item \ahref{libref/Simplif.html}{Module \texttt{Simplif}: Lambda simplification} +\item \ahref{libref/Clflags.html}{Module \texttt{Clflags}: command line flags} +\end{links} +\else +\input{Pparse.tex} +\input{Typemod.tex} +\input{Simplif.tex} +\input{Clflags.tex} +\fi diff --git a/manual/manual/library/liblabltk.etex b/manual/manual/library/liblabltk.etex deleted file mode 100644 index dcfaa6e8be..0000000000 --- a/manual/manual/library/liblabltk.etex +++ /dev/null @@ -1,96 +0,0 @@ -\chapter{The LablTk library: Tcl/Tk GUI interface} -\pdfchapterfold{-1}{The LablTk library: Tcl/Tk GUI interface} -%HEVEA\cutname{liblabltk.html} - -The "labltk" library provides access to the Tcl/Tk GUI from -OCaml programs. This interface is generated in an automated way, and -you should refer to Tcl/Tk books and man pages for detailed -information on the behavior of the numerous functions. We also suggest -to use "ocamlbrowser" to see the types of the various functions, that -are the best documentation for the library itself. - -\smallskip\noindent -Programs that use the "labltk" library must be linked as follows: -\begin{alltt} - ocamlc \var{other options} -I +labltk labltk.cma \var{other files} - ocamlopt \var{other options} -I +labltk labltk.cmxa \var{other files} -\end{alltt} - -\begin{unix} -The "labltk" library is available for any system with Tcl/Tk installed, -starting from Tcl/Tk 8.0 up to Tcl/Tk 8.6. Beware that some beta -versions may have compatibility problems. - -If the library was not compiled correctly, try to run again the -"configure" script with the option "-tkdefs" \var{switches}, -where \var{switches} is a list of C-style inclusion paths leading to -the right "tcl.h" and "tk.h", for instance -"\"-I/usr/local/include/tcl8.4 -I/usr/local/include/tk8.4\"". - -A script is installed, to make easier the use of the "labltk" -library as toplevel. -\begin{options} -\item["labltk"] -This is a toplevel including the "labltk" library, and the path is -already set as to allow the use of the various modules. It also -includes code for the Unix and Str libraries. You can use it -in place of "ocaml". -\end{options} -\end{unix} - -\begin{windows} -The "labltk" library has been precompiled for use with Tcl/Tk 8.5. -You must first have it installed on your system. -It can be downloaded from \\ -"http://www.activestate.com/products/ActiveTcl/". -After installing it, you must put the dynamically loaded libraries -"tcl85.dll" and "tk85.dll" (from the "bin" directory of the Tcl -installation) in a directory included in you path. - -No toplevel is available, but you can load the library from the -standard toplevel with the following commands. -\begin{quote} -\begin{verbatim} -# #directory "+labltk";; -# #load "labltk.cma";; -\end{verbatim} -\end{quote} -You can also load it directly from the command line. -\begin{quote} -\begin{verbatim} -C:\ocaml\bin> ocaml -I +labltk labltk.cma -\end{verbatim} -\end{quote} -\end{windows} - -The "labltk" library is composed of a large number of modules. -\begin{quote} -\begin{verbatim} -Bell Imagebitmap Place -Button Imagephoto Radiobutton -Canvas Label Scale -Checkbutton Listbox Scrollbar -Clipboard Menu Selection -Dialog Menubutton Text -Entry Message Tk -Focus Option Tkwait -Frame Optionmenu Toplevel -Grab Pack Winfo -Grid Palette Wm -\end{verbatim} -\end{quote} - -Giving a detailed account of each of these module would be impractical -here. We will just present some of the basic functions in the module -"Tk". Note that for most other modules information can be found in the -Tcl "man" page of their name. - -\ifouthtml -\begin{links} -\item \ahref{libref/Tk.html}{The \texttt{Tk} library: Basic functions and types for LablTk} -\end{links} - -\else -\input{Tk.tex} -\fi - diff --git a/manual/manual/library/stdlib.etex b/manual/manual/library/stdlib.etex index d8c4074470..f159cf99cc 100644 --- a/manual/manual/library/stdlib.etex +++ b/manual/manual/library/stdlib.etex @@ -103,6 +103,7 @@ be called from C \\ \item \ahref{libref/ArrayLabels.html}{Module \texttt{ArrayLabels}: array operations (with labels)} \item \ahref{libref/Buffer.html}{Module \texttt{Buffer}: extensible buffers} \item \ahref{libref/Bytes.html}{Module \texttt{Bytes}: byte sequences} +\item \ahref{libref/BytesLabels.html}{Module \texttt{BytesLabels}: byte sequences (with labels)} \item \ahref{libref/Callback.html}{Module \texttt{Callback}: registering OCaml values with the C runtime} \item \ahref{libref/Char.html}{Module \texttt{Char}: character operations} \item \ahref{libref/Complex.html}{Module \texttt{Complex}: Complex numbers} @@ -145,8 +146,10 @@ be called from C \\ \else \input{Arg.tex} \input{Array.tex} +\input{ArrayLabels.tex} \input{Buffer.tex} \input{Bytes.tex} +\input{BytesLabels.tex} \input{Callback.tex} \input{Char.tex} \input{Complex.tex} @@ -162,6 +165,7 @@ be called from C \\ \input{Lazy.tex} \input{Lexing.tex} \input{List.tex} +\input{ListLabels.tex} \input{Map.tex} \input{Marshal.tex} \input{MoreLabels.tex} @@ -180,6 +184,7 @@ be called from C \\ \input{StdLabels.tex} \input{Stream.tex} \input{String.tex} +\input{StringLabels.tex} \input{Sys.tex} \input{Uchar.tex} \input{Weak.tex} diff --git a/manual/manual/library/tk.mli b/manual/manual/library/tk.mli deleted file mode 100644 index d3c8d199fa..0000000000 --- a/manual/manual/library/tk.mli +++ /dev/null @@ -1,192 +0,0 @@ -(* $Id$ *) - -(** Basic functions and types for LablTk *) - -open Widget - -(** {6 Initialization and termination} *) - -val openTk : ?display:string -> ?clas:string -> unit -> toplevel widget - (** Initialize LablTk and open a toplevel window. - [display] is described according to the X11 conventions. - [clas] is used for the X11 resource mechanism. *) -val mainLoop : unit -> unit - (** Start the main event loop *) -val closeTk : unit -> unit - (** Quit the main loop and close all open windows. *) -val destroy : 'a Widget.widget -> unit - (** Destroy an individual widget. *) - -(** {6 Application wide commands} *) - -val update : unit -> unit - (** Synchronize display with internal state. *) - -val appname_get : unit -> string -val appname_set : string -> unit - (** Get or set the application name. *) - -(** {6 Dimensions} *) - -type units = [`Pix of int | `Cm of float | `In of float | `Mm of float | `Pt of float] -val pixels : units -> int - (** Converts various on-screen units to pixels, - respective to the default display. Available units are - pixels, centimeters, inches, millimeters and points *) - -(** {6 Widget layout commands} *) - -type anchor = [`Center|`E|`N|`Ne|`Nw|`S|`Se|`Sw|`W] -type fillMode = [`Both|`None|`X|`Y] -type side = [`Bottom|`Left|`Right|`Top] -val pack : - ?after:'a Widget.widget -> - ?anchor:anchor -> - ?before:'b Widget.widget -> - ?expand:bool -> - ?fill:fillMode -> - ?inside:'c Widget.widget -> - ?ipadx:int -> - ?ipady:int -> - ?padx:int -> - ?pady:int -> - ?side:side -> - 'd Widget.widget list -> unit - (** Pack a widget inside its parent, - using the standard layout engine. *) -val grid : - ?column:int -> - ?columnspan:int -> - ?inside:'a Widget.widget -> - ?ipadx:int -> - ?ipady:int -> - ?padx:int -> - ?pady:int -> - ?row:int -> - ?rowspan:int -> - ?sticky:string -> 'b Widget.widget list -> unit - (** Pack a widget inside its parent, using the grid layout engine. *) - -type borderMode = [`Ignore|`Inside|`Outside] -val place : - ?anchor:anchor -> - ?bordermode:borderMode -> - ?height:int -> - ?inside:'a Widget.widget -> - ?relheight:float -> - ?relwidth:float -> - ?relx:float -> - ?rely:float -> - ?width:int -> - ?x:int -> ?y:int -> 'b Widget.widget -> unit - (** Pack a widget inside its parent, at absolute coordinates. *) - -val raise_window : - ?above:'a Widget.widget -> 'b Widget.widget -> unit -val lower_window : - ?below:'a Widget.widget -> 'b Widget.widget -> unit - (** Raise or lower the window associated to a widget. *) - -(** {6 Event handling} *) - -type modifier = - [ `Control | `Shift | `Lock - | `Button1 | `Button2 | `Button3 | `Button4 | `Button5 - | `Double | `Triple - | `Mod1 | `Mod2 | `Mod3 | `Mod4 | `Mod5 | `Meta | `Alt ] - -type event = - [ `ButtonPress | `ButtonPressDetail of int - | `ButtonRelease | `ButtonReleaseDetail of int - | `Circulate | `ColorMap | `Configure | `Destroy - | `Enter | `Expose | `FocusIn | `FocusOut | `Gravity - | `KeyPress | `KeyPressDetail of string - | `KeyRelease | `KeyReleaseDetail of string - | `Leave | `Map | `Motion | `Property - | `Reparent | `Unmap | `Visibility - | `Modified of modifier list * event ] - -(** An event can be either a basic X event, or modified by a - key or mouse modifier. *) - -type eventInfo = - { mutable ev_Above: int; - mutable ev_ButtonNumber: int; - mutable ev_Count: int; - mutable ev_Detail: string; - mutable ev_Focus: bool; - mutable ev_Height: int; - mutable ev_KeyCode: int; - mutable ev_Mode: string; - mutable ev_OverrideRedirect: bool; - mutable ev_Place: string; - mutable ev_State: string; - mutable ev_Time: int; - mutable ev_Width: int; - mutable ev_MouseX: int; - mutable ev_MouseY: int; - mutable ev_Char: string; - mutable ev_BorderWidth: int; - mutable ev_SendEvent: bool; - mutable ev_KeySymString: string; - mutable ev_KeySymInt: int; - mutable ev_RootWindow: int; - mutable ev_SubWindow: int; - mutable ev_Type: int; - mutable ev_Widget: Widget.any Widget.widget; - mutable ev_RootX: int; - mutable ev_RootY: int } - -(** Event related information accessible in callbacks. *) - -type eventField = - [ `Above | `ButtonNumber | `Count | `Detail | `Focus | `Height - | `KeyCode | `Mode | `OverrideRedirect | `Place | `State - | `Time | `Width | `MouseX | `MouseY | `Char | `BorderWidth - | `SendEvent | `KeySymString | `KeySymInt | `RootWindow - | `SubWindow | `Type | `Widget | `RootX | `RootY ] - -(** In order to access the above event information, one has to pass - a list of required event fields to the [bind] function. *) - -val bind : - events:event list -> - ?extend:bool -> - ?breakable:bool -> - ?fields:eventField list -> - ?action:(eventInfo -> unit) -> - 'a Widget.widget -> unit - (** Bind a succession of [events] on a widget to an [action]. - If [extend] is true then then binding is added after existing - ones, otherwise it replaces them. - [breakable] should be true when [break] is to be called inside - the action. - [action] is called with the [fields] required set in - an [eventInfo] structure. Other fields should not be accessed. - If [action] is omitted then existing bindings are removed. *) - -val bind_class : - events:event list -> - ?extend:bool -> - ?breakable:bool -> - ?fields:eventField list -> - ?action:(eventInfo -> unit) -> - ?on:'a Widget.widget -> - string -> unit - (** Same thing for all widgets of a given class. If a widget - is given with label [~on:], the binding will be removed as - soon as it is destroyed. *) -val bind_tag : - events:event list -> - ?extend:bool -> - ?breakable:bool -> - ?fields:eventField list -> - ?action:(eventInfo -> unit) -> - ?on:'a Widget.widget -> - string -> unit - (** Same thing for all widgets having a given tag *) - -val break : unit -> unit - (** Used inside a bound action, do not call other actions - after this one. This is only possible if this action - was bound with [~breakable:true]. *) diff --git a/manual/manual/refman/Makefile b/manual/manual/refman/Makefile index 8273ed60ba..2332c82206 100644 --- a/manual/manual/refman/Makefile +++ b/manual/manual/refman/Makefile @@ -6,7 +6,8 @@ TOPDIR=../../.. include $(TOPDIR)/Makefile.tools -CAMLLATEX= $(OCAMLRUN) ../../tools/caml-tex2 +CAMLLATEX= $(OCAMLRUN) ../../tools/caml-tex2 -caml "TERM=norepeat $(OCAML)" \ +-n 80 -v false TRANSF=../../tools/transf TEXQUOTE=../../tools/texquote2 @@ -22,8 +23,7 @@ clean: .SUFFIXES: .etex .tex exten.tex:exten.etex - @$(CAMLLATEX) -caml "TERM=norepeat $(OCAML)" -n 80 -v false \ - -o $*.caml_tex_error.tex $*.etex \ + @$(CAMLLATEX) -o $*.caml_tex_error.tex $*.etex \ && mv $*.caml_tex_error.tex $*.gen.tex \ && $(OCAMLRUN) $(TRANSF) < $*.gen.tex > $*.transf_error.tex \ && mv $*.transf_error.tex $*.gen.tex\ diff --git a/manual/manual/refman/classes.etex b/manual/manual/refman/classes.etex index d9f27d7402..2480357c9f 100644 --- a/manual/manual/refman/classes.etex +++ b/manual/manual/refman/classes.etex @@ -27,6 +27,7 @@ class-type: class-body-type: 'object' ['(' typexpr ')'] {class-field-spec} 'end' | ['[' typexpr {',' typexpr} ']'] classtype-path + | 'let' 'open' module-path 'in' class-body-type ; %\end{syntax} \begin{syntax} class-field-spec: @@ -75,6 +76,10 @@ virtual method will match a concrete method, which makes it possible to forget its implementation. An immutable instance variable will match a mutable instance variable. +\subsubsection*{Local opens} + +Local opens are supported in class types since OCaml 4.06. + \subsubsection*{Inheritance} \ikwd{inherit\@\texttt{inherit}} @@ -173,6 +178,7 @@ class-expr: | 'fun' {{parameter}} '->' class-expr | 'let' ['rec'] let-binding {'and' let-binding} 'in' class-expr | 'object' class-body 'end' + | 'let' 'open' module-path 'in' class-expr ; %BEGIN LATEX \end{syntax} \begin{syntax} @@ -258,6 +264,9 @@ definition, it will be evaluated when the class is created (just as if the definition was outside of the class). Otherwise, it will be evaluated when the object constructor is called. +\subsubsection*{Local opens} + +Local opens are supported in class expressions since OCaml 4.06. \subsubsection*{Class\label{ss:class-body} body} \begin{syntax} diff --git a/manual/manual/refman/exten.etex b/manual/manual/refman/exten.etex index 47fe70b542..cf14143821 100644 --- a/manual/manual/refman/exten.etex +++ b/manual/manual/refman/exten.etex @@ -458,8 +458,8 @@ actually be unified with "int". The other application is to ensure that some definition is sufficiently polymorphic: -\begin{caml_example}[error] -let id: 'a. 'a -> 'a = fun x -> x + 1;; +\begin{caml_example}{verbatim}[error] +let id: 'a. 'a -> 'a = fun x -> x + 1 \end{caml_example} \section{Locally abstract types} @@ -863,7 +863,7 @@ parameters. A natural application of destructive substitution is merging two signatures sharing a type name. -\begin{caml_example*} +\begin{caml_example*}{verbatim} module type Printable = sig type t val print : Format.formatter -> t -> unit @@ -875,26 +875,26 @@ signatures sharing a type name. module type PrintableComparable = sig include Printable include Comparable with type t := t - end;; + end \end{caml_example*} One can also use this to completely remove a field: -\begin{caml_example} -module type S = Comparable with type t := int;; +\begin{caml_example}{verbatim} +module type S = Comparable with type t := int \end{caml_example} or to rename one: -\begin{caml_example} +\begin{caml_example}{verbatim} module type S = sig type u include Comparable with type t := u -end;; +end \end{caml_example} Note that you can also remove manifest types, by substituting with the same type. -\begin{caml_example} +\begin{caml_example}{verbatim} module type ComparableInt = Comparable with type t = int ;; -module type CompareInt = ComparableInt with type t := int ;; +module type CompareInt = ComparableInt with type t := int \end{caml_example} \section{Type-level module aliases} @@ -929,8 +929,8 @@ satisfying the above constraints, \begin{caml_eval} module P = struct end \end{caml_eval} -\begin{caml_example*} -module N = P;; +\begin{caml_example*}{verbatim} +module N = P \end{caml_example*} has type \caml @@ -1020,6 +1020,15 @@ specification: expr: ... | 'let' 'open!' module-path 'in' expr +; +class-body-type: + ... + | 'let' 'open!' module-path 'in' class-body-type +; +class-expr: + ... + | 'let' 'open!' module-path 'in' class-expr +; \end{syntax} Since OCaml 4.01, @"open"@ statements shadowing an existing identifier @@ -1027,6 +1036,8 @@ Since OCaml 4.01, @"open"@ statements shadowing an existing identifier character after the @"open"@ keyword indicates that such a shadowing is intentional and should not trigger the warning. +This is also available (since OCaml 4.06) for local opens in class +expressions and class type expressions. \section{Generalized algebraic datatypes} \ikwd{type\@\texttt{type}} \ikwd{match\@\texttt{match}} \label{s:gadts} @@ -1287,27 +1298,26 @@ compiler generates these names according to the following nomenclature: \item First, types whose name starts with a "$" are existentials. \item "$Constr_'a" denotes an existential type introduced for the type variable "'a" of the GADT constructor "Constr": -\begin{caml_example}[error] +\begin{caml_example}{verbatim}[error] type any = Any : 'name -> any -let escape (Any x) = x;; +let escape (Any x) = x \end{caml_example} \item "$Constr" denotes an existential type introduced for an anonymous %$ type variable in the GADT constructor "Constr": -\begin{caml_example}[error] +\begin{caml_example}{verbatim}[error] type any = Any : _ -> any -let escape (Any x) = x;; +let escape (Any x) = x \end{caml_example} \item "$'a" if the existential variable was unified with the type %$ variable "'a" during typing: -\begin{caml_example}[error] +\begin{caml_example}{verbatim}[error] type ('arg,'result,'aux) fn = | Fun: ('a ->'b) -> ('a,'b,unit) fn | Mem1: ('a ->'b) * 'a * 'b -> ('a, 'b, 'a * 'b) fn - let apply: ('arg,'result, _ ) fn -> 'arg -> 'result = fun f x -> match f with | Fun f -> f x - | Mem1 (f,y,fy) -> if x = y then fy else f x;; + | Mem1 (f,y,fy) -> if x = y then fy else f x \end{caml_example} \item "$n" (n a number) is an internally generated existential %$ which could not be named using one of the previous schemes. @@ -1769,7 +1779,7 @@ specification: ... class-field-spec: ... | item-extension ; -class-field: +class-field: ... | item-extension ; \end{syntax} @@ -1808,13 +1818,13 @@ Some extension nodes are understood by the compiler itself: constructor slot. \end{itemize} -\begin{caml_example*} +\begin{caml_example*}{verbatim} type t = .. type t += X of int | Y of string let x = [%extension_constructor X] -let y = [%extension_constructor Y];; +let y = [%extension_constructor Y] \end{caml_example*} -\begin{caml_example} +\begin{caml_example}{toplevel} x <> y;; \end{caml_example} @@ -2033,7 +2043,7 @@ float-literal: | ["-"] ("0x"||"0X") ("0"\ldots"9"||"A"\ldots"F"||"a"\ldots"f") { "0"\ldots"9"||"A"\ldots"F"||"a"\ldots"f"||"_" }\\ - ["." { "0"\ldots"9"||"A"\ldots"F"||"a"\ldots"f"||"_" } + ["." { "0"\ldots"9"||"A"\ldots"F"||"a"\ldots"f"||"_" }] [("p"||"P") ["+"||"-"] ("0"\ldots"9") { "0"\ldots"9"||"_" }] ["g"\ldots"z"||"G"\ldots"Z"] ; diff --git a/manual/manual/refman/lex.etex b/manual/manual/refman/lex.etex index 9ddce69b4d..1630bd5877 100644 --- a/manual/manual/refman/lex.etex +++ b/manual/manual/refman/lex.etex @@ -80,8 +80,8 @@ float-literal: [("e"||"E") ["+"||"-"] ("0"\ldots"9") { "0"\ldots"9"||"_" }] | ["-"] ("0x"||"0X") ("0"\ldots"9"||"A"\ldots"F"||"a"\ldots"f") - { "0"\ldots"9"||"A"\ldots"F"||"a"\ldots"f"||"_" }\\ - ["." { "0"\ldots"9"||"A"\ldots"F"||"a"\ldots"f"||"_" } + { "0"\ldots"9"||"A"\ldots"F"||"a"\ldots"f"||"_" } + ["." { "0"\ldots"9"||"A"\ldots"F"||"a"\ldots"f"||"_" }] [("p"||"P") ["+"||"-"] ("0"\ldots"9") { "0"\ldots"9"||"_" }] \end{syntax} @@ -151,13 +151,20 @@ string-literal: string-character: regular-string-char | escape-sequence + | "\u{" {{ "0"\ldots"9"||"A"\ldots"F"||"a"\ldots"f" }} "}" | '\' newline { space || tab } \end{syntax} String literals are delimited by @'"'@ (double quote) characters. The two double quotes enclose a sequence of either characters different from @'"'@ and @'\'@, or escape sequences from the -table given above for character literals. +table given above for character literals, or a Unicode character +escape sequence. + +A Unicode character escape sequence is substituted by the UTF-8 +encoding of the specified Unicode scalar value. The Unicode scalar +value, an integer in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF, +is defined using 1 to 6 hexadecimal digits; leading zeros are allowed. To allow splitting long string literals across lines, the sequence "\\"\var{newline}~\var{spaces-or-tabs} (a backslash at the end of a line diff --git a/manual/manual/tutorials/advexamples.etex b/manual/manual/tutorials/advexamples.etex index cbe2bc7dcf..2be639d5bc 100644 --- a/manual/manual/tutorials/advexamples.etex +++ b/manual/manual/tutorials/advexamples.etex @@ -52,7 +52,7 @@ module Euro : MONEY = end end;; \end{caml_eval} -\begin{caml_example} +\begin{caml_example}{toplevel} let euro = new Euro.c;; let zero = euro 0.;; let neg x = x#times (-1.);; @@ -67,7 +67,7 @@ class account = let c = new account in c # deposit (euro 100.); c # withdraw (euro 50.);; \end{caml_example} We now refine this definition with a method to compute interest. -\begin{caml_example} +\begin{caml_example}{toplevel} class account_with_interests = object (self) inherit account @@ -81,7 +81,7 @@ that will manage monthly or yearly updates of the account. We should soon fix a bug in the current definition: the deposit method can be used for withdrawing money by depositing negative amounts. We can fix this directly: -\begin{caml_example} +\begin{caml_example}{toplevel} class safe_account = object inherit account @@ -89,7 +89,7 @@ class safe_account = end;; \end{caml_example} However, the bug might be fixed more safely by the following definition: -\begin{caml_example} +\begin{caml_example}{toplevel} class safe_account = object inherit account as unsafe @@ -104,7 +104,7 @@ the method "deposit". To keep track of operations, we extend the class with a mutable field "history" and a private method "trace" to add an operation in the log. Then each method to be traced is redefined. -\begin{caml_example} +\begin{caml_example}{toplevel} type 'a operation = Deposit of 'a | Retrieval of 'a;; class account_with_history = object (self) @@ -120,7 +120,7 @@ class account_with_history = One may wish to open an account and simultaneously deposit some initial amount. Although the initial implementation did not address this requirement, it can be achieved by using an initializer. -\begin{caml_example} +\begin{caml_example}{toplevel} class account_with_deposit x = object inherit account_with_history @@ -128,7 +128,7 @@ class account_with_deposit x = end;; \end{caml_example} A better alternative is: -\begin{caml_example} +\begin{caml_example}{toplevel} class account_with_deposit x = object (self) inherit account_with_history @@ -138,20 +138,20 @@ class account_with_deposit x = Indeed, the latter is safer since the call to "deposit" will automatically benefit from safety checks and from the trace. Let's test it: -\begin{caml_example} +\begin{caml_example}{toplevel} let ccp = new account_with_deposit (euro 100.) in let _balance = ccp#withdraw (euro 50.) in ccp#history;; \end{caml_example} Closing an account can be done with the following polymorphic function: -\begin{caml_example} +\begin{caml_example}{toplevel} let close c = c#withdraw c#balance;; \end{caml_example} Of course, this applies to all sorts of accounts. Finally, we gather several versions of the account into a module "Account" abstracted over some currency. -\begin{caml_example*} +\begin{caml_example*}{toplevel} let today () = (01,01,2000) (* an approximation *) module Account (M:MONEY) = struct @@ -215,7 +215,7 @@ the same code can be used to provide accounts in different currencies. The class "bank" is the {\em real} implementation of the bank account (it could have been inlined). This is the one that will be used for further extensions, refinements, etc. Conversely, the client will only be given the client view. -\begin{caml_example*} +\begin{caml_example*}{toplevel} module Euro_account = Account(Euro);; module Client = Euro_account.Client (Euro_account);; new Client.account (new Euro.c 100.);; @@ -236,7 +236,7 @@ It is important to provide the client's view as a functor specialization of the "bank". The functor "Client" may remain unchanged and be passed the new definition to initialize a client's view of the extended account. -\begin{caml_example*} +\begin{caml_example*}{toplevel} module Investment_account (M : MONEY) = struct type m = M.c @@ -261,7 +261,7 @@ new Client.account (new Euro.c 100.);; \end{caml_eval} The functor "Client" may also be redefined when some new features of the account can be given to the client. -\begin{caml_example*} +\begin{caml_example*}{toplevel} module Internet_account (M : MONEY) = struct type m = M.c @@ -313,7 +313,7 @@ We show here how to do it for strings. \label{module:string} A naive definition of strings as objects could be: -\begin{caml_example} +\begin{caml_example}{toplevel} class ostring s = object method get n = String.get s n @@ -325,7 +325,7 @@ However, the method "escaped" returns an object of the class "ostring", and not an object of the current class. Hence, if the class is further extended, the method "escaped" will only return an object of the parent class. -\begin{caml_example} +\begin{caml_example}{toplevel} class sub_string s = object inherit ostring s @@ -335,7 +335,7 @@ class sub_string s = As seen in section \ref{ss:binary-methods}, the solution is to use functional update instead. We need to create an instance variable containing the representation "s" of the string. -\begin{caml_example} +\begin{caml_example}{toplevel} class better_string s = object val repr = s @@ -353,7 +353,7 @@ In order to concatenate a string with another string of the same class, one must be able to access the instance variable externally. Thus, a method "repr" returning s must be defined. Here is the correct definition of strings: -\begin{caml_example} +\begin{caml_example}{toplevel} class ostring s = object (self : 'mytype) val repr = s @@ -367,7 +367,7 @@ class ostring s = \end{caml_example} Another constructor of the class string can be defined to return a new string of a given length: -\begin{caml_example} +\begin{caml_example}{toplevel} class cstring n = ostring (String.make n ' ');; \end{caml_example} Here, exposing the representation of strings is probably harmless. We do @@ -381,7 +381,7 @@ There is sometimes an alternative between using modules or classes for parametric data types. Indeed, there are situations when the two approaches are quite similar. For instance, a stack can be straightforwardly implemented as a class: -\begin{caml_example} +\begin{caml_example}{toplevel} exception Empty;; class ['a] stack = object @@ -400,7 +400,7 @@ argument that will be passed to the method "fold". %The intuition is that method "fold" should be polymorphic, i.e. of type %"All ('a) ('b -> 'a -> 'b) -> 'b -> 'b". A naive approach is to make "'b" an extra parameter of class "stack": -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a, 'b] stack2 = object inherit ['a] stack @@ -409,7 +409,7 @@ class ['a, 'b] stack2 = \end{caml_example} However, the method "fold" of a given object can only be applied to functions that all have the same type: -\begin{caml_example} +\begin{caml_example}{toplevel} let s = new stack2;; s#fold ( + ) 0;; s;; @@ -421,7 +421,7 @@ universally quantified, giving "fold" the polymorphic type "Forall 'b. ('b -> 'a -> 'b) -> 'b -> 'b". An explicit type declaration on the method "fold" is required, since the type checker cannot infer the polymorphic type by itself. -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a] stack3 = object inherit ['a] stack @@ -440,7 +440,7 @@ class ['a] stack3 = A simplified version of object-oriented hash tables should have the following class type. -\begin{caml_example} +\begin{caml_example}{toplevel} class type ['a, 'b] hash_table = object method find : 'a -> 'b @@ -449,7 +449,7 @@ class type ['a, 'b] hash_table = \end{caml_example} A simple implementation, which is quite reasonable for small hash tables is to use an association list: -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a, 'b] small_hashtbl : ['a, 'b] hash_table = object val mutable table = [] @@ -459,7 +459,7 @@ class ['a, 'b] small_hashtbl : ['a, 'b] hash_table = \end{caml_example} A better implementation, and one that scales up better, is to use a true hash table\ldots\ whose elements are small hash tables! -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a, 'b] hashtbl size : ['a, 'b] hash_table = object (self) val table = Array.init size (fun i -> new small_hashtbl) @@ -492,7 +492,7 @@ parametric in the type of elements, the method "tag" has a parametric type the module definition but abstract in its signature. From outside, it will then be guaranteed that two objects with a method "tag" of the same type will share the same representation. -\begin{caml_example*} +\begin{caml_example*}{toplevel} module type SET = sig type 'a tag @@ -544,7 +544,7 @@ classes that recursively interact with one another. The class "observer" has a distinguished method "notify" that requires two arguments, a subject and an event to execute an action. -\begin{caml_example} +\begin{caml_example}{toplevel} class virtual ['subject, 'event] observer = object method virtual notify : 'subject -> 'event -> unit @@ -553,7 +553,7 @@ class virtual ['subject, 'event] observer = The class "subject" remembers a list of observers in an instance variable, and has a distinguished method "notify_observers" to broadcast the message "notify" to all observers with a particular event "e". -\begin{caml_example} +\begin{caml_example}{toplevel} class ['observer, 'event] subject = object (self) val mutable observers = ([]:'observer list) @@ -565,7 +565,7 @@ class ['observer, 'event] subject = The difficulty usually lies in defining instances of the pattern above by inheritance. This can be done in a natural and obvious manner in OCaml, as shown on the following example manipulating windows. -\begin{caml_example} +\begin{caml_example}{toplevel} type event = Raise | Resize | Move;; let string_of_event = function Raise -> "Raise" | Resize -> "Resize" | Move -> "Move";; @@ -586,12 +586,12 @@ class ['subject] window_observer = end;; \end{caml_example} As can be expected, the type of "window" is recursive. -\begin{caml_example} +\begin{caml_example}{toplevel} let window = new window_subject;; \end{caml_example} However, the two classes of "window_subject" and "window_observer" are not mutually recursive. -\begin{caml_example} +\begin{caml_example}{toplevel} let window_observer = new window_observer;; window#add_observer window_observer;; window#move 1;; @@ -600,7 +600,7 @@ window#move 1;; Classes "window_observer" and "window_subject" can still be extended by inheritance. For instance, one may enrich the "subject" with new behaviors and refine the behavior of the observer. -\begin{caml_example} +\begin{caml_example}{toplevel} class ['observer] richer_window_subject = object (self) inherit ['observer] window_subject @@ -617,7 +617,7 @@ class ['subject] richer_window_observer = end;; \end{caml_example} We can also create a different kind of observer: -\begin{caml_example} +\begin{caml_example}{toplevel} class ['subject] trace_observer = object inherit ['subject, event] observer @@ -627,7 +627,7 @@ class ['subject] trace_observer = end;; \end{caml_example} and attach several observers to the same object: -\begin{caml_example} +\begin{caml_example}{toplevel} let window = new richer_window_subject;; window#add_observer (new richer_window_observer);; window#add_observer (new trace_observer);; diff --git a/manual/manual/tutorials/coreexamples.etex b/manual/manual/tutorials/coreexamples.etex index a1871c62fa..b0fa28bdfa 100644 --- a/manual/manual/tutorials/coreexamples.etex +++ b/manual/manual/tutorials/coreexamples.etex @@ -27,7 +27,7 @@ by ";;" in response to the "#" prompt, and the system compiles them on the fly, executes them, and prints the outcome of evaluation. Phrases are either simple expressions, or "let" definitions of identifiers (either values or functions). -\begin{caml_example} +\begin{caml_example}{toplevel} 1+2*3;; let pi = 4.0 *. atan 1.0;; let square x = x *. x;; @@ -39,12 +39,12 @@ the system infers their types from their usage in the function. Notice also that integers and floating-point numbers are distinct types, with distinct operators: "+" and "*" operate on integers, but "+." and "*." operate on floats. -\begin{caml_example}[error] +\begin{caml_example}{toplevel}[error] 1.0 * 2;; \end{caml_example} Recursive functions are defined with the "let rec" binding: -\begin{caml_example} +\begin{caml_example}{toplevel} let rec fib n = if n < 2 then n else fib (n-1) + fib (n-2);; fib 10;; @@ -55,7 +55,7 @@ fib 10;; In addition to integers and floating-point numbers, OCaml offers the usual basic data types: booleans, characters, and immutable character strings. -\begin{caml_example} +\begin{caml_example}{toplevel} (1 < 2) = false;; 'a';; "Hello world";; @@ -68,7 +68,7 @@ Lists are either given in extension as a bracketed list of semicolon-separated elements, or built from the empty list "[]" (pronounce ``nil'') by adding elements in front using the "::" (``cons'') operator. -\begin{caml_example} +\begin{caml_example}{toplevel} let l = ["is"; "a"; "tale"; "told"; "etc."];; "Life" :: l;; \end{caml_example} @@ -82,7 +82,7 @@ As with most OCaml data structures, inspecting and destructuring lists is performed by pattern-matching. List patterns have the exact same shape as list expressions, with identifier representing unspecified parts of the list. As an example, here is insertion sort on a list: -\begin{caml_example} +\begin{caml_example}{toplevel} let rec sort lst = match lst with [] -> [] @@ -102,7 +102,7 @@ given type. The reason why "sort" can apply to lists of any type is that the comparisons ("=", "<=", etc.) are {\em polymorphic} in OCaml: they operate between any two values of the same type. This makes "sort" itself polymorphic over all list types. -\begin{caml_example} +\begin{caml_example}{toplevel} sort [6;2;5;3];; sort [3.14; 2.718];; \end{caml_example} @@ -123,13 +123,13 @@ sense are supported and can be passed around freely just as any other piece of data. For instance, here is a "deriv" function that takes any float function as argument and returns an approximation of its derivative function: -\begin{caml_example} +\begin{caml_example}{toplevel} let deriv f dx = function x -> (f (x +. dx) -. f x) /. dx;; let sin' = deriv sin 1e-6;; sin' pi;; \end{caml_example} Even function composition is definable: -\begin{caml_example} +\begin{caml_example}{toplevel} let compose f g = function x -> f (g x);; let cos2 = compose square cos;; \end{caml_example} @@ -140,13 +140,13 @@ especially useful to provide iterators or similar generic operations over a data structure. For instance, the standard OCaml library provides a "List.map" functional that applies a given function to each element of a list, and returns the list of the results: -\begin{caml_example} +\begin{caml_example}{toplevel} List.map (function n -> n * 2 + 1) [0;1;2;3;4];; \end{caml_example} This functional, along with a number of other list and array functionals, is predefined because it is often useful, but there is nothing magic with it: it can easily be defined as follows. -\begin{caml_example} +\begin{caml_example}{toplevel} let rec map f l = match l with [] -> [] @@ -160,7 +160,7 @@ let rec map f l = User-defined data structures include records and variants. Both are defined with the "type" declaration. Here, we declare a record type to represent rational numbers. -\begin{caml_example} +\begin{caml_example}{toplevel} type ratio = {num: int; denom: int};; let add_ratio r1 r2 = {num = r1.num * r2.denom + r2.num * r1.denom; @@ -168,36 +168,36 @@ let add_ratio r1 r2 = add_ratio {num=1; denom=3} {num=2; denom=5};; \end{caml_example} Record fields can also be accessed through pattern-matching: -\begin{caml_example} +\begin{caml_example}{toplevel} let integer_part r = match r with {num=num; denom=denom} -> num / denom;; \end{caml_example} Since there is only one case in this pattern matching, it is safe to expand directly the argument "r" in a record pattern: -\begin{caml_example} +\begin{caml_example}{toplevel} let integer_part {num=num; denom=denom} = num / denom;; \end{caml_example} Unneeded fields can be omitted: -\begin{caml_example} +\begin{caml_example}{toplevel} let get_denom {denom=denom} = denom;; \end{caml_example} Optionally, missing fields can be made explicit by ending the list of fields with a trailing wildcard "_":: -\begin{caml_example} +\begin{caml_example}{toplevel} let get_num {num=num; _ } = num;; \end{caml_example} When both sides of the "=" sign are the same, it is possible to avoid repeating the field name by eliding the "=field" part: -\begin{caml_example} +\begin{caml_example}{toplevel} let integer_part {num; denom} = num / denom;; \end{caml_example} This short notation for fields also works when constructing records: -\begin{caml_example} +\begin{caml_example}{toplevel} let ratio num denom = {num; denom};; \end{caml_example} At last, it is possible to update few fields of a record at once: -\begin{caml_example} +\begin{caml_example}{toplevel} let integer_product integer ratio = { ratio with num = integer * ratio.num };; \end{caml_example} With this functional update notation, the record on the left-hand side @@ -211,7 +211,7 @@ inspecting them by pattern-matching. Constructor names are capitalized to distinguish them from variable names (which must start with a lowercase letter). For instance, here is a variant type for doing mixed arithmetic (integers and floats): -\begin{caml_example} +\begin{caml_example}{toplevel} type number = Int of int | Float of float | Error;; \end{caml_example} This declaration expresses that a value of type "number" is either an @@ -220,14 +220,14 @@ the result of an invalid operation (e.g. a division by zero). Enumerated types are a special case of variant types, where all alternatives are constants: -\begin{caml_example} +\begin{caml_example}{toplevel} type sign = Positive | Negative;; let sign_int n = if n >= 0 then Positive else Negative;; \end{caml_example} To define arithmetic operations for the "number" type, we use pattern-matching on the two numbers involved: -\begin{caml_example} +\begin{caml_example}{toplevel} let add_num n1 n2 = match (n1, n2) with (Int i1, Int i2) -> @@ -246,18 +246,18 @@ add_num (Int 123) (Float 3.14159);; Another interesting example of variant type is the built-in "'a option" type which represents either a value of type "'a" or an absence of value: -\begin{caml_example} +\begin{caml_example}{toplevel} type 'a option = Some of 'a | None;; \end{caml_example} This type is particularly useful when defining function that can fail in common situations, for instance -\begin{caml_example} +\begin{caml_example}{toplevel} let safe_square_root x = if x > 0. then Some(sqrt x) else None;; \end{caml_example} The most common usage of variant types is to describe recursive data structures. Consider for example the type of binary trees: -\begin{caml_example} +\begin{caml_example}{toplevel} type 'a btree = Empty | Node of 'a * 'a btree * 'a btree;; \end{caml_example} This definition reads as follows: a binary tree containing values of @@ -269,7 +269,7 @@ Operations on binary trees are naturally expressed as recursive functions following the same structure as the type definition itself. For instance, here are functions performing lookup and insertion in ordered binary trees (elements increase from left to right): -\begin{caml_example} +\begin{caml_example}{toplevel} let rec member x btree = match btree with Empty -> false @@ -294,7 +294,7 @@ as arrays. Arrays are either given in extension between "[|" and "|]" brackets, or allocated and initialized with the "Array.make" function, then filled up later by assignments. For instance, the function below sums two vectors (represented as float arrays) componentwise. -\begin{caml_example} +\begin{caml_example}{toplevel} let add_vect v1 v2 = let len = min (Array.length v1) (Array.length v2) in let res = Array.make len 0.0 in @@ -307,7 +307,7 @@ add_vect [| 1.0; 2.0 |] [| 3.0; 4.0 |];; Record fields can also be modified by assignment, provided they are declared "mutable" in the definition of the record type: -\begin{caml_example} +\begin{caml_example}{toplevel} type mutable_point = { mutable x: float; mutable y: float };; let translate p dx dy = p.x <- p.x +. dx; p.y <- p.y +. dy;; @@ -324,7 +324,7 @@ indirection cells (or one-element arrays), with operators "!" to fetch the current contents of the reference and ":=" to assign the contents. Variables can then be emulated by "let"-binding a reference. For instance, here is an in-place insertion sort over arrays: -\begin{caml_example} +\begin{caml_example}{toplevel} let insertion_sort a = for i = 1 to Array.length a - 1 do let val_i = a.(i) in @@ -341,7 +341,7 @@ References are also useful to write functions that maintain a current state between two calls to the function. For instance, the following pseudo-random number generator keeps the last returned number in a reference: -\begin{caml_example} +\begin{caml_example}{toplevel} let current_rand = ref 0;; let random () = current_rand := !current_rand * 25713 + 1345; @@ -350,7 +350,7 @@ let random () = Again, there is nothing magical with references: they are implemented as a single-field mutable record, as follows. -\begin{caml_example} +\begin{caml_example}{toplevel} type 'a ref = { mutable contents: 'a };; let ( ! ) r = r.contents;; let ( := ) r newval = r.contents <- newval;; @@ -361,7 +361,7 @@ a data structure, keeping its polymorphism. Without user-provided type annotations, this is not allowed, as polymorphism is only introduced on a global level. However, you can give explicitly polymorphic types to record fields. -\begin{caml_example} +\begin{caml_example}{toplevel} type idref = { mutable id: 'a. 'a -> 'a };; let r = {id = fun x -> x};; let g s = (s.id 1, s.id true);; @@ -378,7 +378,7 @@ control structure. Exceptions are declared with the "exception" construct, and signalled with the "raise" operator. For instance, the function below for taking the head of a list uses an exception to signal the case where an empty list is given. -\begin{caml_example} +\begin{caml_example}{toplevel} exception Empty_list;; let head l = match l with @@ -393,13 +393,13 @@ where the library functions cannot complete normally. For instance, the "List.assoc" function, which returns the data associated with a given key in a list of (key, data) pairs, raises the predefined exception "Not_found" when the key does not appear in the list: -\begin{caml_example} +\begin{caml_example}{toplevel} List.assoc 1 [(0, "zero"); (1, "one")];; List.assoc 2 [(0, "zero"); (1, "one")];; \end{caml_example} Exceptions can be trapped with the "try"\ldots"with" construct: -\begin{caml_example} +\begin{caml_example}{toplevel} let name_of_binary_digit digit = try List.assoc digit [0, "zero"; 1, "one"] @@ -414,7 +414,7 @@ exception value. Thus, several exceptions can be caught by one "try"\ldots"with" construct. Also, finalization can be performed by trapping all exceptions, performing the finalization, then raising again the exception: -\begin{caml_example} +\begin{caml_example}{toplevel} let temporarily_set_reference ref newval funct = let oldval = !ref in try @@ -434,7 +434,7 @@ We finish this introduction with a more complete example representative of the use of OCaml for symbolic processing: formal manipulations of arithmetic expressions containing variables. The following variant type describes the expressions we shall manipulate: -\begin{caml_example} +\begin{caml_example}{toplevel} type expression = Const of float | Var of string @@ -448,7 +448,7 @@ type expression = We first define a function to evaluate an expression given an environment that maps variable names to their values. For simplicity, the environment is represented as an association list. -\begin{caml_example} +\begin{caml_example}{toplevel} exception Unbound_variable of string;; let rec eval env exp = match exp with @@ -464,7 +464,7 @@ eval [("x", 1.0); ("y", 3.14)] (Prod(Sum(Var "x", Const 2.0), Var "y"));; Now for a real symbolic processing, we define the derivative of an expression with respect to a variable "dv": -\begin{caml_example} +\begin{caml_example}{toplevel} let rec deriv exp dv = match exp with Const c -> Const 0.0 @@ -493,7 +493,7 @@ rules (i.e. "*" binds tighter than "+") to avoid printing unnecessary parentheses. To this end, we maintain the current operator precedence and print parentheses around an operator only if its precedence is less than the current precedence. -\begin{caml_example} +\begin{caml_example}{toplevel} let print_expr exp = (* Local function definitions *) let open_paren prec op_prec = @@ -576,7 +576,7 @@ print_expr (deriv e "x"); print_newline ();; %% %#load"camlp4o.cma";; %% %\end{caml_example} %% %Then we are ready to define our parser. -%% \begin{caml_example} +%% \begin{caml_example}{toplevel} %% let rec parse_expr = parser %% [< e1 = parse_mult; e = parse_more_adds e1 >] -> e %% and parse_more_adds e1 = parser diff --git a/manual/manual/tutorials/lablexamples.etex b/manual/manual/tutorials/lablexamples.etex index 2c5eb1200c..d4ceef173c 100644 --- a/manual/manual/tutorials/lablexamples.etex +++ b/manual/manual/tutorials/lablexamples.etex @@ -15,7 +15,7 @@ If you have a look at modules ending in "Labels" in the standard library, you will see that function types have annotations you did not have in the functions you defined yourself. -\begin{caml_example} +\begin{caml_example}{toplevel} ListLabels.map;; StringLabels.sub;; \end{caml_example} @@ -26,7 +26,7 @@ flexibility to function application. You can give such names to arguments in your programs, by prefixing them with a tilde "~". -\begin{caml_example} +\begin{caml_example}{toplevel} let f ~x ~y = x - y;; let x = 3 and y = 2 in f ~x ~y;; \end{caml_example} @@ -35,7 +35,7 @@ When you want to use distinct names for the variable and the label appearing in the type, you can use a naming label of the form "~name:". This also applies when the argument is not a variable. -\begin{caml_example} +\begin{caml_example}{toplevel} let f ~x:x1 ~y:y1 = x1 - y1;; f ~x:3 ~y:2;; \end{caml_example} @@ -54,7 +54,7 @@ This allows commuting arguments in applications. One can also partially apply a function on any argument, creating a new function of the remaining parameters. -\begin{caml_example} +\begin{caml_example}{toplevel} let f ~x ~y = x - y;; f ~y:2 ~x:3;; ListLabels.fold_left;; @@ -66,7 +66,7 @@ If several arguments of a function bear the same label (or no label), they will not commute among themselves, and order matters. But they can still commute with other arguments. -\begin{caml_example} +\begin{caml_example}{toplevel} let hline ~x:x1 ~x:x2 ~y = (x1, x2, y);; hline ~x:3 ~y:2 ~x:5;; \end{caml_example} @@ -76,27 +76,27 @@ application is total (omitting all optional arguments), labels may be omitted. In practice, many applications are total, so that labels can often be omitted. -\begin{caml_example} +\begin{caml_example}{toplevel} f 3 2;; ListLabels.map succ [1;2;3];; \end{caml_example} But beware that functions like "ListLabels.fold_left" whose result type is a type variable will never be considered as totally applied. -\begin{caml_example}[error] +\begin{caml_example}{toplevel}[error] ListLabels.fold_left ( + ) 0 [1;2;3];; \end{caml_example} When a function is passed as an argument to a higher-order function, labels must match in both types. Neither adding nor removing labels are allowed. -\begin{caml_example} +\begin{caml_example}{toplevel} let h g = g ~x:3 ~y:2;; h f;; h ( + ) [@@expect error];; \end{caml_example} Note that when you don't need an argument, you can still use a wildcard pattern, but you must prefix it with the label. -\begin{caml_example} +\begin{caml_example}{toplevel} h (fun ~x:_ ~y -> y+1);; \end{caml_example} @@ -108,7 +108,7 @@ tilde "~" of non-optional ones, and the label is also prefixed by "?" in the function type. Default values may be given for such optional parameters. -\begin{caml_example} +\begin{caml_example}{toplevel} let bump ?(step = 1) x = x + step;; bump 2;; bump ~step:3 2;; @@ -122,7 +122,7 @@ Note that if that argument is labeled, you will only be able to eliminate optional arguments through the special case for total applications. -\begin{caml_example} +\begin{caml_example}{toplevel} let test ?(x = 0) ?(y = 0) () ?(z = 0) () = (x, y, z);; test ();; test ~x:2 () ~z:3 ();; @@ -132,7 +132,7 @@ Optional parameters may also commute with non-optional or unlabeled ones, as long as they are applied simultaneously. By nature, optional arguments do not commute with unlabeled arguments applied independently. -\begin{caml_example} +\begin{caml_example}{toplevel} test ~y:2 ~x:3 () ();; test () () ~z:1 ~y:2 ~x:3;; (test () ()) ~z:1 [@@expect error];; @@ -145,7 +145,7 @@ you do not give a default value, you have access to their internal representation, "type 'a option = None | Some of 'a". You can then provide different behaviors when an argument is present or not. -\begin{caml_example} +\begin{caml_example}{toplevel} let bump ?step x = match step with | None -> x * 2 @@ -158,7 +158,7 @@ call to another. This can be done by prefixing the applied argument with "?". This question mark disables the wrapping of optional argument in an option type. -\begin{caml_example} +\begin{caml_example}{toplevel} let test2 ?x ?y () = test ?x ?y () ();; test2 ?x:None;; \end{caml_example} @@ -171,7 +171,7 @@ applications, labels and optional arguments have the pitfall that they cannot be inferred as completely as the rest of the language. You can see it in the following two examples. -\begin{caml_example} +\begin{caml_example}{toplevel} let h' g = g ~y:2 ~x:3;; h' f [@@expect error];; let bump_it bump x = @@ -203,7 +203,7 @@ order. The right way to solve this problem for optional parameters is to add a type annotation to the argument "bump". -\begin{caml_example} +\begin{caml_example}{toplevel} let bump_it (bump : ?step:int -> int -> int) x = bump ~step:2 x;; bump_it bump 1;; @@ -220,7 +220,7 @@ parameters, the compiler will attempt to transform the argument to have it match the expected type, by passing "None" for all optional parameters. -\begin{caml_example} +\begin{caml_example}{toplevel} let twice f (x : int) = f(f x);; twice bump 2;; \end{caml_example} @@ -334,7 +334,7 @@ type will be inferred independently for each of its uses. In programs, polymorphic variants work like usual ones. You just have to prefix their names with a backquote character "`". -\begin{caml_example} +\begin{caml_example}{toplevel} [`On; `Off];; `Number 1;; let f = function `On -> 1 | `Off -> 0 | `Number n -> n;; @@ -357,7 +357,7 @@ variant types, that is types that cannot be refined. This is also the case for type abbreviations. Such types do not contain "<" or ">", but just an enumeration of the tags and their associated types, just like in a normal datatype definition. -\begin{caml_example} +\begin{caml_example}{toplevel} type 'a vlist = [`Nil | `Cons of 'a * 'a vlist];; let rec map f : 'a vlist -> 'b vlist = function | `Nil -> `Nil @@ -370,7 +370,7 @@ let rec map f : 'a vlist -> 'b vlist = function Type-checking polymorphic variants is a subtle thing, and some expressions may result in more complex type information. -\begin{caml_example} +\begin{caml_example}{toplevel} let f = function `A -> `C | `B -> `D | x -> x;; f `E;; \end{caml_example} @@ -381,7 +381,7 @@ returned as is, input and return types are identical. The notation "as 'a" denotes such type sharing. If we apply "f" to yet another tag "`E", it gets added to the list. -\begin{caml_example} +\begin{caml_example}{toplevel} let f1 = function `A x -> x = 1 | `B -> true | `C -> false let f2 = function `A x -> x = "a" | `B -> true ;; let f x = f1 x && f2 x;; @@ -398,7 +398,7 @@ Even if a value has a fixed variant type, one can still give it a larger type through coercions. Coercions are normally written with both the source type and the destination type, but in simple cases the source type may be omitted. -\begin{caml_example} +\begin{caml_example}{toplevel} type 'a wlist = [`Nil | `Cons of 'a * 'a wlist | `Snoc of 'a wlist * 'a];; let wlist_of_vlist l = (l : 'a vlist :> 'a wlist);; let open_vlist l = (l : 'a vlist :> [> 'a vlist]);; @@ -406,7 +406,7 @@ fun x -> (x :> [`A|`B|`C]);; \end{caml_example} You may also selectively coerce values through pattern matching. -\begin{caml_example} +\begin{caml_example}{toplevel} let split_cases = function | `Nil | `Cons _ as x -> `A x | `Snoc _ as x -> `B x @@ -417,7 +417,7 @@ alias-pattern, the alias is given a type containing only the tags enumerated in the or-pattern. This allows for many useful idioms, like incremental definition of functions. -\begin{caml_example} +\begin{caml_example}{toplevel} let num x = `Num x let eval1 eval (`Num x) = x let rec eval x = eval1 eval x ;; @@ -437,13 +437,13 @@ type myvariant = [`Tag1 of int | `Tag2 of bool];; \end{caml_eval} Such abbreviations may be used alone, -\begin{caml_example} +\begin{caml_example}{toplevel} let f = function | #myvariant -> "myvariant" | `Tag3 -> "Tag3";; \end{caml_example} or combined with with aliases. -\begin{caml_example} +\begin{caml_example}{toplevel} let g1 = function `Tag1 _ -> "Tag1" | `Tag2 _ -> "Tag2";; let g = function | #myvariant as x -> g1 x @@ -476,7 +476,7 @@ programs you are probably better off with core language variants. Beware also that some idioms make trivial errors very hard to find. For instance, the following code is probably wrong but the compiler has no way to see it. -\begin{caml_example} +\begin{caml_example}{toplevel} type abc = [`A | `B | `C] ;; let f = function | `As -> "A" @@ -484,7 +484,7 @@ let f = function let f : abc -> string = f ;; \end{caml_example} You can avoid such risks by annotating the definition itself. -\begin{caml_example}[error] +\begin{caml_example}{toplevel}[error] let f : abc -> string = function | `As -> "A" | #abc -> "other" ;; diff --git a/manual/manual/tutorials/moduleexamples.etex b/manual/manual/tutorials/moduleexamples.etex index 1f31f02627..7466e6bb86 100644 --- a/manual/manual/tutorials/moduleexamples.etex +++ b/manual/manual/tutorials/moduleexamples.etex @@ -16,7 +16,7 @@ is introduced by the "struct"\ldots"end" construct, which contains an arbitrary sequence of definitions. The structure is usually given a name with the "module" binding. Here is for instance a structure packaging together a type of priority queues and their operations: -\begin{caml_example} +\begin{caml_example}{toplevel} module PrioQueue = struct type priority = int @@ -49,7 +49,7 @@ Outside the structure, its components can be referred to using the For instance, "PrioQueue.insert" is the function "insert" defined inside the structure "PrioQueue" and "PrioQueue.queue" is the type "queue" defined in "PrioQueue". -\begin{caml_example} +\begin{caml_example}{toplevel} PrioQueue.insert PrioQueue.empty 1 "hello";; \end{caml_example} @@ -57,7 +57,7 @@ Another possibility is to open the module, which brings all identifiers defined inside the module in the scope of the current structure. -\begin{caml_example} +\begin{caml_example}{toplevel} open PrioQueue;; insert empty 1 "hello";; \end{caml_example} @@ -68,7 +68,7 @@ has been defined. In particular, opened modules can shadow identifiers present in the current scope, potentially leading to confusing errors: -\begin{caml_example} +\begin{caml_example}{toplevel} let empty = [] open PrioQueue;; let x = 1 :: empty [@@expect error];; @@ -81,24 +81,24 @@ concerned expression. This can also make the code easier to read -- the open statement is closer to where it is used-- and to refactor -- the code fragment is more self-contained. Two constructions are available for this purpose: -\begin{caml_example} +\begin{caml_example}{toplevel} let open PrioQueue in insert empty 1 "hello";; \end{caml_example} and -\begin{caml_example} +\begin{caml_example}{toplevel} PrioQueue.(insert empty 1 "hello");; \end{caml_example} In the second form, when the body of a local open is itself delimited by parentheses, braces or bracket, the parentheses of the local open can be omitted. For instance, -\begin{caml_example} +\begin{caml_example}{toplevel} PrioQueue.[empty] = PrioQueue.([empty]);; PrioQueue.[|empty|] = PrioQueue.([|empty|]);; PrioQueue.{ contents = empty } = PrioQueue.({ contents = empty });; \end{caml_example} becomes -\begin{caml_example} +\begin{caml_example}{toplevel} PrioQueue.[insert empty 1 "hello"];; \end{caml_example} @@ -107,7 +107,7 @@ another module by using an "include" statement. This can be particularly useful to extend existing modules. As an illustration, we could add functions that returns an optional value rather than an exception when the priority queue is empty. -\begin{caml_example} +\begin{caml_example}{toplevel} module PrioQueueOpt = struct include PrioQueue @@ -131,7 +131,7 @@ restricted type. For instance, the signature below specifies the three priority queue operations "empty", "insert" and "extract", but not the auxiliary function "remove_top". Similarly, it makes the "queue" type abstract (by not providing its actual representation as a concrete type). -\begin{caml_example} +\begin{caml_example}{toplevel} module type PRIOQUEUE = sig type priority = int (* still concrete *) @@ -146,7 +146,7 @@ Restricting the "PrioQueue" structure by this signature results in another view of the "PrioQueue" structure where the "remove_top" function is not accessible and the actual representation of priority queues is hidden: -\begin{caml_example} +\begin{caml_example}{toplevel} module AbstractPrioQueue = (PrioQueue : PRIOQUEUE);; AbstractPrioQueue.remove_top [@@expect error];; AbstractPrioQueue.insert AbstractPrioQueue.empty 1 "hello";; @@ -166,7 +166,7 @@ its components inside the current signature. For instance, we can extend the PRIOQUEUE signature with the "extract_opt" function: -\begin{caml_example} +\begin{caml_example}{toplevel} module type PRIOQUEUE_WITH_OPT = sig include PRIOQUEUE @@ -191,7 +191,7 @@ For instance, here is a structure implementing sets as sorted lists, parameterized by a structure providing the type of the set elements and an ordering function over this type (used to keep the sets sorted): -\begin{caml_example} +\begin{caml_example}{toplevel} type comparison = Less | Equal | Greater;; module type ORDERED_TYPE = sig @@ -224,7 +224,7 @@ module Set = \end{caml_example} By applying the "Set" functor to a structure implementing an ordered type, we obtain set operations for this type: -\begin{caml_example} +\begin{caml_example}{toplevel} module OrderedString = struct type t = string @@ -243,7 +243,7 @@ structure will not rely on sets being lists, and we can switch later to another, more efficient representation of sets without breaking their code. This can be achieved by restricting "Set" by a suitable functor signature: -\begin{caml_example} +\begin{caml_example}{toplevel} module type SETFUNCTOR = functor (Elt: ORDERED_TYPE) -> sig @@ -261,7 +261,7 @@ AbstractStringSet.add "gee" AbstractStringSet.empty;; In an attempt to write the type constraint above more elegantly, one may wish to name the signature of the structure returned by the functor, then use that signature in the constraint: -\begin{caml_example} +\begin{caml_example}{toplevel} module type SET = sig type element @@ -285,7 +285,7 @@ impossible above since "SET" is defined in a context where "Elt" does not exist. To overcome this difficulty, OCaml provides a "with type" construct over signatures that allows enriching a signature with extra type equalities: -\begin{caml_example} +\begin{caml_example}{toplevel} module AbstractSet2 = (Set : functor(Elt: ORDERED_TYPE) -> (SET with type element = Elt.t));; \end{caml_example} @@ -303,7 +303,7 @@ illustrate. Consider an ordering over character strings that is different from the standard ordering implemented in the "OrderedString" structure. For instance, we compare strings without distinguishing upper and lower case. -\begin{caml_example} +\begin{caml_example}{toplevel} module NoCaseString = struct type t = string diff --git a/manual/manual/tutorials/objectexamples.etex b/manual/manual/tutorials/objectexamples.etex index ecd0c976d4..5477b61311 100644 --- a/manual/manual/tutorials/objectexamples.etex +++ b/manual/manual/tutorials/objectexamples.etex @@ -52,7 +52,7 @@ The class "point" below defines one instance variable "x" and two methods "get_x" and "move". The initial value of the instance variable is "0". The variable "x" is declared mutable, so the method "move" can change its value. -\begin{caml_example} +\begin{caml_example}{toplevel} class point = object val mutable x = 0 @@ -62,7 +62,7 @@ class point = \end{caml_example} We now create a new point "p", instance of the "point" class. -\begin{caml_example} +\begin{caml_example}{toplevel} let p = new point;; \end{caml_example} Note that the type of "p" is "point". This is an abbreviation @@ -71,7 +71,7 @@ object type "<get_x : int; move : int -> unit>", listing the methods of class "point" along with their types. We now invoke some methods to "p": -\begin{caml_example} +\begin{caml_example}{toplevel} p#get_x;; p#move 3;; p#get_x;; @@ -81,7 +81,7 @@ The evaluation of the body of a class only takes place at object creation time. Therefore, in the following example, the instance variable "x" is initialized to different values for two different objects. -\begin{caml_example} +\begin{caml_example}{toplevel} let x0 = ref 0;; class point = object @@ -95,7 +95,7 @@ new point#get_x;; The class "point" can also be abstracted over the initial values of the "x" coordinate. -\begin{caml_example} +\begin{caml_example}{toplevel} class point = fun x_init -> object val mutable x = x_init @@ -105,7 +105,7 @@ class point = fun x_init -> \end{caml_example} Like in function definitions, the definition above can be abbreviated as: -\begin{caml_example} +\begin{caml_example}{toplevel} class point x_init = object val mutable x = x_init @@ -115,7 +115,7 @@ class point x_init = \end{caml_example} An instance of the class "point" is now a function that expects an initial parameter to create a point object: -\begin{caml_example} +\begin{caml_example}{toplevel} new point;; let p = new point 7;; \end{caml_example} @@ -123,7 +123,7 @@ The parameter "x_init" is, of course, visible in the whole body of the definition, including methods. For instance, the method "get_offset" in the class below returns the position of the object relative to its initial position. -\begin{caml_example} +\begin{caml_example}{toplevel} class point x_init = object val mutable x = x_init @@ -134,7 +134,7 @@ class point x_init = \end{caml_example} %Instance variables can only be used inside methods. For instance it would %not be possible to define -%\begin{caml_example} +%\begin{caml_example}{toplevel} %class point x_init = % object % val mutable x = x_init @@ -147,7 +147,7 @@ Expressions can be evaluated and bound before defining the object body of the class. This is useful to enforce invariants. For instance, points can be automatically adjusted to the nearest point on a grid, as follows: -\begin{caml_example} +\begin{caml_example}{toplevel} class adjusted_point x_init = let origin = (x_init / 10) * 10 in object @@ -161,12 +161,12 @@ class adjusted_point x_init = on the grid.) In fact, the same effect could here be obtained by calling the definition of class "point" with the value of the "origin". -\begin{caml_example} +\begin{caml_example}{toplevel} class adjusted_point x_init = point ((x_init / 10) * 10);; \end{caml_example} An alternate solution would have been to define the adjustment in a special allocation function: -\begin{caml_example} +\begin{caml_example}{toplevel} let new_adjusted_point x_init = new point ((x_init / 10) * 10);; \end{caml_example} However, the former pattern is generally more appropriate, since @@ -189,7 +189,7 @@ without going through a class. The syntax is exactly the same as for class expressions, but the result is a single object rather than a class. All the constructs described in the rest of this section also apply to immediate objects. -\begin{caml_example} +\begin{caml_example}{toplevel} let p = object val mutable x = 0 @@ -204,7 +204,7 @@ p#get_x;; Unlike classes, which cannot be defined inside an expression, immediate objects can appear anywhere, using variables from their environment. -\begin{caml_example} +\begin{caml_example}{toplevel} let minmax x y = if x < y then object method min = x method max = y end else object method min = y method max = x end;; @@ -223,7 +223,7 @@ A method or an initializer can send messages to self (that is, the current object). For that, self must be explicitly bound, here to the variable "s" ("s" could be any identifier, even though we will often choose the name "self".) -\begin{caml_example} +\begin{caml_example}{toplevel} class printable_point x_init = object (s) val mutable x = x_init @@ -240,7 +240,7 @@ particular, when the class "printable_point" is inherited, the variable A common problem with self is that, as its type may be extended in subclasses, you cannot fix it in advance. Here is a simple example. -\begin{caml_example} +\begin{caml_example}{toplevel} let ints = ref [];; class my_int = object (self) @@ -255,7 +255,7 @@ We will see in section \ref{ss:using-coercions} a workaround to this problem. Note however that, since immediate objects are not extensible, the problem does not occur with them. -\begin{caml_example} +\begin{caml_example}{toplevel} let my_int = object (self) method n = 1 @@ -272,7 +272,7 @@ is constructed. It is also possible to evaluate an expression immediately after the object has been built. Such code is written as an anonymous hidden method called an initializer. Therefore, it can access self and the instance variables. -\begin{caml_example} +\begin{caml_example}{toplevel} class printable_point x_init = let origin = (x_init / 10) * 10 in object (self) @@ -300,7 +300,7 @@ subclasses. A class containing virtual methods must be flagged "virtual", and cannot be instantiated (that is, no object of this class can be created). It still defines type abbreviations (treating virtual methods as other methods.) -\begin{caml_example} +\begin{caml_example}{toplevel} class virtual abstract_point x_init = object (self) method virtual get_x : int @@ -318,7 +318,7 @@ class point x_init = Instance variables can also be declared as virtual, with the same effect as with methods. -\begin{caml_example} +\begin{caml_example}{toplevel} class virtual abstract_point2 = object val mutable virtual x : int @@ -338,7 +338,7 @@ class point2 x_init = Private methods are methods that do not appear in object interfaces. They can only be invoked from other methods of the same object. -\begin{caml_example} +\begin{caml_example}{toplevel} class restricted_point x_init = object (self) val mutable x = x_init @@ -362,7 +362,7 @@ Private methods are inherited (they are by default visible in subclasses), unless they are hidden by signature matching, as described below. Private methods can be made public in a subclass. -\begin{caml_example} +\begin{caml_example}{toplevel} class point_again x = object (self) inherit restricted_point x @@ -375,7 +375,7 @@ annotation, this makes the method public, keeping the original definition. An alternative definition is -\begin{caml_example} +\begin{caml_example}{toplevel} class point_again x = object (self : < move : _; ..> ) inherit restricted_point x @@ -388,7 +388,7 @@ One could think that a private method should remain private in a subclass. However, since the method is visible in a subclass, it is always possible to pick its code and define a method of the same name that runs that code, so yet another (heavier) solution would be: -\begin{caml_example} +\begin{caml_example}{toplevel} class point_again x = object inherit restricted_point x as super @@ -409,7 +409,7 @@ appear in this order "method private virtual". Class interfaces are inferred from class definitions. They may also be defined directly and used to restrict the type of a class. Like class declarations, they also define a new type abbreviation. -\begin{caml_example} +\begin{caml_example}{toplevel} class type restricted_point_type = object method get_x : int @@ -421,16 +421,16 @@ In addition to program documentation, class interfaces can be used to constrain the type of a class. Both concrete instance variables and concrete private methods can be hidden by a class type constraint. Public methods and virtual members, however, cannot. -\begin{caml_example} +\begin{caml_example}{toplevel} class restricted_point' x = (restricted_point x : restricted_point_type);; \end{caml_example} Or, equivalently: -\begin{caml_example} +\begin{caml_example}{toplevel} class restricted_point' = (restricted_point : int -> restricted_point_type);; \end{caml_example} The interface of a class can also be specified in a module signature, and used to restrict the inferred signature of a module. -\begin{caml_example} +\begin{caml_example}{toplevel} module type POINT = sig class restricted_point' : int -> object @@ -451,7 +451,7 @@ We illustrate inheritance by defining a class of colored points that inherits from the class of points. This class has all instance variables and all methods of class "point", plus a new instance variable "c" and a new method "color". -\begin{caml_example} +\begin{caml_example}{toplevel} class colored_point x (c : string) = object inherit point x @@ -466,12 +466,12 @@ no method "color". However, the function "get_x" below is a generic function applying method "get_x" to any object "p" that has this method (and possibly some others, which are represented by an ellipsis in the type). Thus, it applies to both points and colored points. -\begin{caml_example} +\begin{caml_example}{toplevel} let get_succ_x p = p#get_x + 1;; get_succ_x p + get_succ_x p';; \end{caml_example} Methods need not be declared previously, as shown by the example: -\begin{caml_example} +\begin{caml_example}{toplevel} let set_x p = p#set_x;; let incr p = set_x p (get_succ_x p);; \end{caml_example} @@ -487,7 +487,7 @@ Previous definitions of a method can be reused by binding the related ancestor. Below, "super" is bound to the ancestor "printable_point". The name "super" is a pseudo value identifier that can only be used to invoke a super-class method, as in "super#print". -\begin{caml_example} +\begin{caml_example}{toplevel} class printable_colored_point y c = object (self) val c = c @@ -512,7 +512,7 @@ Note that for clarity's sake, the method "print" is explicitly marked as overriding another definition by annotating the "method" keyword with an exclamation mark "!". If the method "print" were not overriding the "print" method of "printable_point", the compiler would raise an error: -\begin{caml_example}[error] +\begin{caml_example}{toplevel}[error] object method! m = () end;; @@ -520,7 +520,7 @@ an exclamation mark "!". If the method "print" were not overriding the This explicit overriding annotation also works for "val" and "inherit": -\begin{caml_example} +\begin{caml_example}{toplevel} class another_printable_colored_point y c c' = object (self) inherit printable_point y @@ -535,7 +535,7 @@ class another_printable_colored_point y c c' = Reference cells can be implemented as objects. The naive definition fails to typecheck: -\begin{caml_example}[error] +\begin{caml_example}{toplevel}[error] class oref x_init = object val mutable x = x_init @@ -548,7 +548,7 @@ The reason is that at least one of the methods has a polymorphic type either the class should be parametric, or the method type should be constrained to a monomorphic type. A monomorphic instance of the class could be defined by: -\begin{caml_example} +\begin{caml_example}{toplevel} class oref (x_init:int) = object val mutable x = x_init @@ -558,7 +558,7 @@ class oref (x_init:int) = \end{caml_example} Note that since immediate objects do not define a class type, they have no such restriction. -\begin{caml_example} +\begin{caml_example}{toplevel} let new_oref x_init = object val mutable x = x_init @@ -570,7 +570,7 @@ On the other hand, a class for polymorphic references must explicitly list the type parameters in its declaration. Class type parameters are listed between "[" and "]". The type parameters must also be bound somewhere in the class body by a type constraint. -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a] oref x_init = object val mutable x = (x_init : 'a) @@ -582,7 +582,7 @@ let r = new oref 1 in r#set 2; (r#get);; The type parameter in the declaration may actually be constrained in the body of the class definition. In the class type, the actual value of the type parameter is displayed in the "constraint" clause. -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a] oref_succ (x_init:'a) = object val mutable x = x_init + 1 @@ -594,7 +594,7 @@ Let us consider a more complex example: define a circle, whose center may be any kind of point. We put an additional type constraint in method "move", since no free variables must remain unaccounted for by the class type parameters. -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a] circle (c : 'a) = object val mutable center = c @@ -612,7 +612,7 @@ object belonging to a subclass of class "point". It actually expands to alternate definition of "circle", which has slightly stronger constraints on its argument, as we now expect "center" to have a method "get_x". -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a] circle (c : 'a) = object constraint 'a = #point @@ -627,7 +627,7 @@ The class "colored_circle" is a specialized version of class "#colored_point", and adds a method "color". Note that when specializing a parameterized class, the instance of type parameter must always be explicitly given. It is again written between "[" and "]". -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a] colored_circle c = object constraint 'a = #colored_point @@ -644,7 +644,7 @@ While parameterized classes may be polymorphic in their contents, they are not enough to allow polymorphism of method use. A classical example is defining an iterator. -\begin{caml_example} +\begin{caml_example}{toplevel} List.fold_left;; class ['a] intlist (l : int list) = object @@ -654,7 +654,7 @@ class ['a] intlist (l : int list) = \end{caml_example} At first look, we seem to have a polymorphic iterator, however this does not work in practice. -\begin{caml_example} +\begin{caml_example}{toplevel} let l = new intlist [1; 2; 3];; l#fold (fun x y -> x+y) 0;; l;; @@ -669,7 +669,7 @@ The problem here is that quantification was wrongly located: it is not the class we want to be polymorphic, but the "fold" method. This can be achieved by giving an explicitly polymorphic type in the method definition. -\begin{caml_example} +\begin{caml_example}{toplevel} class intlist (l : int list) = object method empty = (l = []) @@ -694,7 +694,7 @@ cannot choose between those two types, and must be helped. However, the type can be completely omitted in the class definition if it is already known, through inheritance or type constraints on self. Here is an example of method overriding. -\begin{caml_example*} +\begin{caml_example*}{toplevel} class intlist_rev l = object inherit intlist l @@ -702,7 +702,7 @@ class intlist_rev l = end;; \end{caml_example*} The following idiom separates description and definition. -\begin{caml_example*} +\begin{caml_example*}{toplevel} class type ['a] iterator = object method fold : ('b -> 'a -> 'b) -> 'b -> 'b end;; class intlist l = @@ -719,18 +719,18 @@ methods, but you should be aware of some limitations of type inference. Namely, a polymorphic method can only be called if its type is known at the call site. Otherwise, the method will be assumed to be monomorphic, and given an incompatible type. -\begin{caml_example} +\begin{caml_example}{toplevel} let sum lst = lst#fold (fun x y -> x+y) 0;; sum l [@@expect error];; \end{caml_example} The workaround is easy: you should put a type constraint on the parameter. -\begin{caml_example} +\begin{caml_example}{toplevel} let sum (lst : _ #iterator) = lst#fold (fun x y -> x+y) 0;; \end{caml_example} Of course the constraint may also be an explicit method type. Only occurences of quantified variables are required. -\begin{caml_example} +\begin{caml_example}{toplevel} let sum lst = (lst : < fold : 'a. ('a -> _ -> 'a) -> 'a -> 'a; .. >)#fold (+) 0;; \end{caml_example} @@ -739,7 +739,7 @@ Another use of polymorphic methods is to allow some form of implicit subtyping in method arguments. We have already seen in section \ref{ss:inheritance} how some functions may be polymorphic in the class of their argument. This can be extended to methods. -\begin{caml_example} +\begin{caml_example}{toplevel} class type point0 = object method get_x : int end;; class distance_point x = object @@ -754,7 +754,7 @@ Note here the special syntax "(#point0 as 'a)" we have to use to quantify the extensible part of "#point0". As for the variable binder, it can be omitted in class specifications. If you want polymorphism inside object field it must be quantified independently. -\begin{caml_example} +\begin{caml_example}{toplevel} class multi_poly = object method m1 : 'a. (< n1 : 'b. 'b -> 'b; .. > as 'a) -> _ = @@ -778,7 +778,7 @@ domain and the codomain of the type coercion must be given. We have seen that points and colored points have incompatible types. For instance, they cannot be mixed in the same list. However, a colored point can be coerced to a point, hiding its "color" method: -\begin{caml_example} +\begin{caml_example}{toplevel} let colored_point_to_point cp = (cp : colored_point :> point);; let p = new point 3 and q = new colored_point 4 "blue";; let l = [p; (colored_point_to_point q)];; @@ -786,7 +786,7 @@ let l = [p; (colored_point_to_point q)];; An object of type "t" can be seen as an object of type "t'" only if "t" is a subtype of "t'". For instance, a point cannot be seen as a colored point. -\begin{caml_example}[error] +\begin{caml_example}{toplevel}[error] (p : point :> colored_point);; \end{caml_example} Indeed, narrowing coercions without runtime checks would be unsafe. @@ -803,43 +803,43 @@ colored points would remain unchanged and thus still be a subtype of points. % Conversely, the class "int_comparable" inherits from class %"comparable", but type "int_comparable" is not a subtype of "comparable". -%\begin{caml_example} +%\begin{caml_example}{toplevel} %function x -> (x : int_comparable :> comparable);; %\end{caml_example} The domain of a coercion can often be omitted. For instance, one can define: -\begin{caml_example} +\begin{caml_example}{toplevel} let to_point cp = (cp :> point);; \end{caml_example} In this case, the function "colored_point_to_point" is an instance of the function "to_point". This is not always true, however. The fully explicit coercion is more precise and is sometimes unavoidable. Consider, for example, the following class: -\begin{caml_example} +\begin{caml_example}{toplevel} class c0 = object method m = {< >} method n = 0 end;; \end{caml_example} The object type "c0" is an abbreviation for "<m : 'a; n : int> as 'a". Consider now the type declaration: -\begin{caml_example} +\begin{caml_example}{toplevel} class type c1 = object method m : c1 end;; \end{caml_example} The object type "c1" is an abbreviation for the type "<m : 'a> as 'a". The coercion from an object of type "c0" to an object of type "c1" is correct: -\begin{caml_example} +\begin{caml_example}{toplevel} fun (x:c0) -> (x : c0 :> c1);; \end{caml_example} %%% FIXME come up with a better example. % However, the domain of the coercion cannot be omitted here: -% \begin{caml_example} +% \begin{caml_example}{toplevel} % fun (x:c0) -> (x :> c1);; % \end{caml_example} However, the domain of the coercion cannot always be omitted. In that case, the solution is to use the explicit form. % Sometimes, a change in the class-type definition can also solve the problem -\begin{caml_example} +\begin{caml_example}{toplevel} class type c2 = object ('a) method m : 'a end;; fun (x:c0) -> (x :> c2);; \end{caml_example} @@ -852,7 +852,7 @@ allows leaving the domain implicit in most cases when coercing form a subclass to its superclass. % The type of a coercion can always be seen as below: -\begin{caml_example} +\begin{caml_example}{toplevel} let to_c1 x = (x :> c1);; let to_c2 x = (x :> c2);; \end{caml_example} @@ -872,7 +872,7 @@ parameterless classes the coercion "(_ :> c)" is always more general than "(_ : #c :> c)". %If a class type exposes the type of self through one of its parameters, this %is no longer true. Here is a counter-example. -%\begin{caml_example} +%\begin{caml_example}{toplevel} %class type ['a] c = object ('a) method m : 'a end;; %let to_c x = (x :> _ c);; %\end{caml_example} @@ -883,7 +883,7 @@ class "c" while defining class "c". The problem is due to the type abbreviation not being completely defined yet, and so its subtypes are not clearly known. Then, a coercion "(_ :> c)" or "(_ : #c :> c)" is taken to be the identity function, as in -\begin{caml_example} +\begin{caml_example}{toplevel} function x -> (x :> 'a);; \end{caml_example} As a consequence, if the coercion is applied to "self", as in the @@ -894,7 +894,7 @@ Indeed, the type of self cannot be closed: this would prevent any further extension of the class. Therefore, a type error is generated when the unification of this type with another type would result in a closed object type. -\begin{caml_example}[error] +\begin{caml_example}{toplevel}[error] class c = object method m = 1 end and d = object (self) inherit c @@ -905,12 +905,12 @@ end;; However, the most common instance of this problem, coercing self to its current class, is detected as a special case by the type checker, and properly typed. -\begin{caml_example} +\begin{caml_example}{toplevel} class c = object (self) method m = (self :> c) end;; \end{caml_example} This allows the following idiom, keeping a list of all objects belonging to a class or its subclasses: -\begin{caml_example} +\begin{caml_example}{toplevel} let all_c = ref [];; class c (m : int) = object (self) @@ -920,7 +920,7 @@ class c (m : int) = \end{caml_example} This idiom can in turn be used to retrieve an object whose type has been weakened: -\begin{caml_example} +\begin{caml_example}{toplevel} let rec lookup_obj obj = function [] -> raise Not_found | obj' :: l -> if (obj :> < >) = (obj' :> < >) then obj' else lookup_obj obj l ;; @@ -933,7 +933,7 @@ of type "c". \medskip The previous coercion problem can often be avoided by first defining the abbreviation, using a class type: -\begin{caml_example} +\begin{caml_example}{toplevel} class type c' = object method m : int end;; class c : c' = object method m = 1 end and d = object (self) @@ -945,12 +945,12 @@ end;; It is also possible to use a virtual class. Inheriting from this class simultaneously forces all methods of "c" to have the same type as the methods of "c'". -\begin{caml_example} +\begin{caml_example}{toplevel} class virtual c' = object method virtual m : int end;; class c = object (self) inherit c' method m = 1 end;; \end{caml_example} One could think of defining the type abbreviation directly: -\begin{caml_example*} +\begin{caml_example*}{toplevel} type c' = <m : int>;; \end{caml_example*} However, the abbreviation "#c'" cannot be defined directly in a similar way. @@ -958,7 +958,7 @@ It can only be defined by a class or a class-type definition. This is because a "#"-abbreviation carries an implicit anonymous variable ".." that cannot be explicitly named. The closer you get to it is: -\begin{caml_example*} +\begin{caml_example*}{toplevel} type 'a c'_class = 'a constraint 'a = < m : int; .. >;; \end{caml_example*} with an extra type variable capturing the open object type. @@ -971,7 +971,7 @@ It is possible to write a version of class "point" without assignments on the instance variables. The override construct "{< ... >}" returns a copy of ``self'' (that is, the current object), possibly changing the value of some instance variables. -\begin{caml_example} +\begin{caml_example}{toplevel} class functional_point y = object val x = y @@ -989,7 +989,7 @@ and "'a" appears inside the type of the method "move". The above definition of "functional_point" is not equivalent to the following: -\begin{caml_example} +\begin{caml_example}{toplevel} class bad_functional_point y = object val x = y @@ -1022,7 +1022,7 @@ A deeper assignment (for example if the instance variable is a reference cell) will of course affect both the original and the copy. The type of "Oo.copy" is the following: -\begin{caml_example} +\begin{caml_example}{toplevel} Oo.copy;; \end{caml_example} The keyword "as" in that type binds the type variable "'a" to @@ -1031,7 +1031,7 @@ any methods (represented by the ellipsis), and returns an object of the same type. The type of "Oo.copy" is different from type "< .. > -> < .. >" as each ellipsis represents a different set of methods. Ellipsis actually behaves as a type variable. -\begin{caml_example} +\begin{caml_example}{toplevel} let p = new point 5;; let q = Oo.copy p;; q#move 7; (p#get_x, q#get_x);; @@ -1042,7 +1042,7 @@ method "copy" with body "{< >}" has been defined in the class of "p". Objects can be compared using the generic comparison functions "=" and "<>". Two objects are equal if and only if they are physically equal. In particular, an object and its copy are not equal. -\begin{caml_example} +\begin{caml_example}{toplevel} let q = Oo.copy p;; p = q, p = p;; \end{caml_example} @@ -1055,7 +1055,7 @@ two objects have been created and it is not affected by mutation of fields. Cloning and override have a non empty intersection. They are interchangeable when used within an object and without overriding any field: -\begin{caml_example} +\begin{caml_example}{toplevel} class copy = object method copy = {< >} @@ -1070,7 +1070,7 @@ only the "Oo.copy" primitive can be used externally. Cloning can also be used to provide facilities for saving and restoring the state of objects. -\begin{caml_example} +\begin{caml_example}{toplevel} class backup = object (self : 'mytype) val mutable copy = None @@ -1080,7 +1080,7 @@ class backup = \end{caml_example} The above definition will only backup one level. The backup facility can be added to any class by using multiple inheritance. -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a] backup_ref x = object inherit ['a] oref x inherit backup end;; let rec get p n = if n = 0 then p # get else get (p # restore) (n-1);; let p = new backup_ref 0 in @@ -1089,7 +1089,7 @@ p # save; p # set 1; p # save; p # set 2; \end{caml_example} We can define a variant of backup that retains all copies. (We also add a method "clear" to manually erase all copies.) -\begin{caml_example} +\begin{caml_example}{toplevel} class backup = object (self : 'mytype) val mutable copy = None @@ -1098,7 +1098,7 @@ class backup = method clear = copy <- None end;; \end{caml_example} -\begin{caml_example} +\begin{caml_example}{toplevel} class ['a] backup_ref x = object inherit ['a] oref x inherit backup end;; let p = new backup_ref 0 in p # save; p # set 1; p # save; p # set 2; @@ -1113,7 +1113,7 @@ p # save; p # set 1; p # save; p # set 2; Recursive classes can be used to define objects whose types are mutually recursive. -\begin{caml_example} +\begin{caml_example}{toplevel} class window = object val mutable top_widget = (None : widget option) @@ -1139,7 +1139,7 @@ binary method "leq" of type "'a -> bool" where the type variable "'a" is bound to the type of self. Therefore, "#comparable" expands to "< leq : 'a -> bool; .. > as 'a". We see here that the binder "as" also allows writing recursive types. -\begin{caml_example} +\begin{caml_example}{toplevel} class virtual comparable = object (_ : 'a) method virtual leq : 'a -> bool @@ -1151,7 +1151,7 @@ more operations. We have to use a type constraint on the class parameter "x" because the primitive "<=" is a polymorphic function in OCaml. The "inherit" clause ensures that the type of objects of this class is an instance of "#comparable". -\begin{caml_example} +\begin{caml_example}{toplevel} class money (x : float) = object inherit comparable @@ -1171,7 +1171,7 @@ call to method "leq" on "m" with an argument that does not have a method "value", which would be an error. Similarly, the type "money2" below is not a subtype of type "money". -\begin{caml_example} +\begin{caml_example}{toplevel} class money2 x = object inherit money x @@ -1185,13 +1185,13 @@ will return the minimum of any two objects whose type unifies with #comparable -> #comparable", as the abbreviation "#comparable" hides a type variable (an ellipsis). Each occurrence of this abbreviation generates a new variable. -\begin{caml_example} +\begin{caml_example}{toplevel} let min (x : #comparable) y = if x#leq y then x else y;; \end{caml_example} This function can be applied to objects of type "money" or "money2". -\begin{caml_example} +\begin{caml_example}{toplevel} (min (new money 1.3) (new money 3.1))#value;; (min (new money2 5.0) (new money2 3.14))#value;; \end{caml_example} @@ -1207,7 +1207,7 @@ the "times" method would return an object of class "money2" but not of class The class "money" could naturally carry another binary method. Here is a direct definition: -\begin{caml_example} +\begin{caml_example}{toplevel} class money x = object (self : 'a) val repr = x @@ -1231,7 +1231,7 @@ the representation can easily be hidden inside objects by removing the method "value" as well. However, this is not possible as soon as some binary method requires access to the representation of objects of the same class (other than self). -\begin{caml_example} +\begin{caml_example}{toplevel} class safe_money x = object (self : 'a) val repr = x @@ -1243,7 +1243,7 @@ Here, the representation of the object is known only to a particular object. To make it available to other objects of the same class, we are forced to make it available to the whole world. However we can easily restrict the visibility of the representation using the module system. -\begin{caml_example*} +\begin{caml_example*}{toplevel} module type MONEY = sig type t diff --git a/manual/tools/caml_tex2.ml b/manual/tools/caml_tex2.ml index 97363e8c18..c0d4380f9c 100644 --- a/manual/tools/caml_tex2.ml +++ b/manual/tools/caml_tex2.ml @@ -233,6 +233,8 @@ let escape_specials s = exception Missing_double_semicolon of string * int +exception Missing_mode of string * int + let process_file file = prerr_endline ("Processing " ^ file); let ic = try open_in file with _ -> failwith "Cannot read input file" in @@ -249,39 +251,55 @@ let process_file file = open_out_gen [Open_wronly; Open_creat; Open_append; Open_text] 0x666 !outfile with _ -> failwith "Cannot open output file" in + let re_spaces = "[ \t]*" in + let re_start = ~!( + {|\\begin{caml_example\(\*?\)}|} ^ re_spaces + ^ {|\({toplevel}\|{verbatim}\)?|} ^ re_spaces + ^ {|\(\[\(.*\)\]\)?|} ^ re_spaces + ^ "$" + ) in try while true do let input = ref (input_line ic) in incr_phrase_start(); - if string_match - ~!"\\\\begin{caml_example\\(\\*?\\)}[ \t]*\\(\\[\\(.*\\)\\]\\)?[ \t]*$" - !input 0 + if string_match re_start !input 0 then begin let omit_answer = matched_group 1 !input = "*" in - let global_expected = try Output.expected @@ matched_group 3 !input - with Not_found -> Output.Ok - in + let explicit_stop = + match matched_group 2 !input with + | exception Not_found -> raise (Missing_mode(file, !phrase_stop)) + | "{toplevel}" -> true + | "{verbatim}" -> false + | _ -> assert false in + let global_expected = try Output.expected @@ matched_group 4 !input + with Not_found -> Output.Ok in start true oc main; let first = ref true in let read_phrase () = let phrase = Buffer.create 256 in let rec read () = let input = incr phrase_stop; input_line ic in - if string_match ~!"\\\\end{caml_example\\*?}[ \t]*$" - input 0 - then begin - if !phrase_stop = 1 + !phrase_start then - raise End_of_file - else - raise @@ Missing_double_semicolon (file,!phrase_stop) - end; + let implicit_stop = + if string_match ~!"\\\\end{caml_example\\*?}[ \t]*$" + input 0 + then + begin + if !phrase_stop = 1 + !phrase_start then + raise End_of_file + else if explicit_stop then + raise @@ Missing_double_semicolon (file,!phrase_stop) + else + true + end + else false in if Buffer.length phrase > 0 then Buffer.add_char phrase '\n'; - let stop = string_match ~!"\\(.*\\)[ \t]*;;[ \t]*$" input 0 in + let stop = implicit_stop + || string_match ~!"\\(.*\\)[ \t]*;;[ \t]*$" input 0 in if not stop then ( Buffer.add_string phrase input; read () ) else begin decr phrase_stop; - let last_input = matched_group 1 input in + let last_input = if implicit_stop then "" else matched_group 1 input in let expected = if string_match ~!{|\(.*\)\[@@expect \(.*\)\]|} last_input 0 then ( Buffer.add_string phrase (matched_group 1 last_input); @@ -289,14 +307,15 @@ let process_file file = else (Buffer.add_string phrase last_input; global_expected) in - Buffer.add_string phrase ";;"; - Buffer.contents phrase, expected + if not implicit_stop then Buffer.add_string phrase ";;"; + implicit_stop, Buffer.contents phrase, expected end in read () in try while true do - let phrase, expected = read_phrase () in - fprintf caml_output "%s\n" phrase; + let implicit_stop, phrase, expected = read_phrase () in + fprintf caml_output "%s%s" phrase + (if implicit_stop then ";;\n" else "\n"); flush caml_output; output_string caml_output "\"end_of_input\";;\n"; flush caml_output; @@ -335,7 +354,8 @@ let process_file file = code_env ~newline:false (Output.env status) oc output; stop true oc phrase_env; flush oc; - first := false + first := false; + if implicit_stop then raise End_of_file done with End_of_file -> phrase_start:= !phrase_stop; stop true oc main end @@ -364,12 +384,23 @@ let process_file file = ( Output.print_parsing_error k s; close_in ic; close_out oc; exit 1 ) | Missing_double_semicolon (file, line_number) -> - ( Format.eprintf "Error when evaluating a caml_example environment in \ - %s:\nmissing \";;\" at line %d\n" file (line_number-2); + ( Format.eprintf "@[<hov 2> Error \ + when evaluating a caml_example environment in %s:@;\ + missing \";;\" at line %d@]@." file (line_number-2); + close_in ic; close_out oc; + exit 1 + ) + | Missing_mode (file, line_number) -> + ( Format.eprintf "@[<hov 2>Error \ + when parsing a caml_example environment in %s:@;\ + missing mode argument at line %d,@ \ + available modes {toplevel,verbatim}@]@." + file (line_number-2); close_in ic; close_out oc; exit 1 ) + let _ = if !outfile <> "-" && !outfile <> "" then begin try close_out (open_out !outfile) diff --git a/middle_end/middle_end.ml b/middle_end/middle_end.ml index 8784287b02..829c58df3d 100644 --- a/middle_end/middle_end.ml +++ b/middle_end/middle_end.ml @@ -35,7 +35,7 @@ let middle_end ppf ~prefixname ~backend ~filename ~module_ident ~module_initializer = - Timings.time_call "flambda" (fun () -> + Profile.record_call "flambda" (fun () -> let pass_number = ref 0 in let round_number = ref 0 in let check flam = @@ -55,15 +55,15 @@ let middle_end ppf ~prefixname ~backend !round_number Flambda.print_program flam; Format.eprintf "\n@?" end; - let flam = Timings.time ~accumulate:true name pass flam in + let flam = Profile.record ~accumulate:true name pass flam in if !Clflags.flambda_invariant_checks then begin - Timings.time ~accumulate:true "check" check flam + Profile.record ~accumulate:true "check" check flam end; flam in - Timings.time_call ~accumulate:true "middle_end" (fun () -> + Profile.record_call ~accumulate:true "middle_end" (fun () -> let flam = - Timings.time_call ~accumulate:true "closure_conversion" (fun () -> + Profile.record_call ~accumulate:true "closure_conversion" (fun () -> module_initializer |> Closure_conversion.lambda_to_flambda ~backend ~module_ident ~size ~filename) diff --git a/ocamldoc/odoc_sig.ml b/ocamldoc/odoc_sig.ml index bc11e83040..18607f916c 100644 --- a/ocamldoc/odoc_sig.ml +++ b/ocamldoc/odoc_sig.ml @@ -607,6 +607,7 @@ module Analyser = ic_text = text_opt ; } + | Parsetree.Pcty_open _ (* one could also traverse the open *) | Parsetree.Pcty_signature _ | Parsetree.Pcty_arrow _ -> (* we don't have a name for the class signature, so we call it "object ... end" *) diff --git a/otherlibs/bigarray/bigarray.ml b/otherlibs/bigarray/bigarray.ml index 1c2ad3bd91..d5e66daf4d 100644 --- a/otherlibs/bigarray/bigarray.ml +++ b/otherlibs/bigarray/bigarray.ml @@ -109,6 +109,9 @@ module Array0 = struct external kind: ('a, 'b, 'c) t -> ('a, 'b) kind = "caml_ba_kind" external layout: ('a, 'b, 'c) t -> 'c layout = "caml_ba_layout" + external change_layout: ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t + = "caml_ba_change_layout" + let size_in_bytes arr = kind_size_in_bytes (kind arr) external blit: ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit = "caml_ba_blit" @@ -133,6 +136,9 @@ module Array1 = struct external kind: ('a, 'b, 'c) t -> ('a, 'b) kind = "caml_ba_kind" external layout: ('a, 'b, 'c) t -> 'c layout = "caml_ba_layout" + external change_layout: ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t + = "caml_ba_change_layout" + let size_in_bytes arr = (kind_size_in_bytes (kind arr)) * (dim arr) @@ -171,6 +177,9 @@ module Array2 = struct external kind: ('a, 'b, 'c) t -> ('a, 'b) kind = "caml_ba_kind" external layout: ('a, 'b, 'c) t -> 'c layout = "caml_ba_layout" + external change_layout: ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t + = "caml_ba_change_layout" + let size_in_bytes arr = (kind_size_in_bytes (kind arr)) * (dim1 arr) * (dim2 arr) @@ -222,6 +231,9 @@ module Array3 = struct external kind: ('a, 'b, 'c) t -> ('a, 'b) kind = "caml_ba_kind" external layout: ('a, 'b, 'c) t -> 'c layout = "caml_ba_layout" + external change_layout: ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t + = "caml_ba_change_layout" + let size_in_bytes arr = (kind_size_in_bytes (kind arr)) * (dim1 arr) * (dim2 arr) * (dim3 arr) diff --git a/otherlibs/bigarray/bigarray.mli b/otherlibs/bigarray/bigarray.mli index 0af832973e..39d5bbb030 100644 --- a/otherlibs/bigarray/bigarray.mli +++ b/otherlibs/bigarray/bigarray.mli @@ -471,6 +471,15 @@ module Array0 : sig external layout: ('a, 'b, 'c) t -> 'c layout = "caml_ba_layout" (** Return the layout of the given big array. *) + val change_layout: ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t + (** [Array0.change_layout a layout] returns a big array with the + specified [layout], sharing the data with [a]. No copying of elements + is involved: the new array and the original array share the same + storage space. + + @since 4.06.0 + *) + val size_in_bytes : ('a, 'b, 'c) t -> int (** [size_in_bytes a] is [a]'s {!kind_size_in_bytes}. *) @@ -525,6 +534,16 @@ module Array1 : sig external layout: ('a, 'b, 'c) t -> 'c layout = "caml_ba_layout" (** Return the layout of the given big array. *) + val change_layout: ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t + (** [Array1.change_layout a layout] returns a bigarray with the + specified [layout], sharing the data with [a] (and hence having + the same dimension as [a]). No copying of elements is involved: the + new array and the original array share the same storage space. + + @since 4.06.0 + *) + + val size_in_bytes : ('a, 'b, 'c) t -> int (** [size_in_bytes a] is the number of elements in [a] multiplied by [a]'s {!kind_size_in_bytes}. @@ -622,6 +641,18 @@ module Array2 : external layout: ('a, 'b, 'c) t -> 'c layout = "caml_ba_layout" (** Return the layout of the given big array. *) + val change_layout: ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t + (** [Array2.change_layout a layout] returns a bigarray with the + specified [layout], sharing the data with [a] (and hence having + the same dimensions as [a]). No copying of elements is involved: the + new array and the original array share the same storage space. + The dimensions are reversed, such that [get v [| a; b |]] in + C layout becomes [get v [| b+1; a+1 |]] in Fortran layout. + + @since 4.06.0 + *) + + val size_in_bytes : ('a, 'b, 'c) t -> int (** [size_in_bytes a] is the number of elements in [a] multiplied by [a]'s {!kind_size_in_bytes}. @@ -736,6 +767,18 @@ module Array3 : external layout: ('a, 'b, 'c) t -> 'c layout = "caml_ba_layout" (** Return the layout of the given big array. *) + + val change_layout: ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t + (** [Array3.change_layout a layout] returns a bigarray with the + specified [layout], sharing the data with [a] (and hence having + the same dimensions as [a]). No copying of elements is involved: the + new array and the original array share the same storage space. + The dimensions are reversed, such that [get v [| a; b; c |]] in + C layout becomes [get v [| c+1; b+1; a+1 |]] in Fortran layout. + + @since 4.06.0 + *) + val size_in_bytes : ('a, 'b, 'c) t -> int (** [size_in_bytes a] is the number of elements in [a] multiplied by [a]'s {!kind_size_in_bytes}. diff --git a/otherlibs/raw_spacetime_lib/.depend b/otherlibs/raw_spacetime_lib/.depend index 18fc1804b2..515304f035 100644 --- a/otherlibs/raw_spacetime_lib/.depend +++ b/otherlibs/raw_spacetime_lib/.depend @@ -1,3 +1,21 @@ raw_spacetime_lib.cmo : raw_spacetime_lib.cmi raw_spacetime_lib.cmx : raw_spacetime_lib.cmi raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : +raw_spacetime_lib.cmo : raw_spacetime_lib.cmi +raw_spacetime_lib.cmx : raw_spacetime_lib.cmi +raw_spacetime_lib.cmi : diff --git a/otherlibs/raw_spacetime_lib/raw_spacetime_lib.ml b/otherlibs/raw_spacetime_lib/raw_spacetime_lib.ml index e1010a9f89..2592d39329 100644 --- a/otherlibs/raw_spacetime_lib/raw_spacetime_lib.ml +++ b/otherlibs/raw_spacetime_lib/raw_spacetime_lib.ml @@ -4,7 +4,7 @@ (* *) (* Mark Shinwell and Leo White, Jane Street Europe *) (* *) -(* Copyright 2015--2016 Jane Street Group LLC *) +(* Copyright 2015--2017 Jane Street Group LLC *) (* *) (* All rights reserved. This file is distributed under the terms of *) (* the GNU Lesser General Public License version 2.1, with the *) @@ -101,22 +101,31 @@ module Shape_table = struct let _ = Indirect_call 0L let _ = Allocation_point 0L - let part_of_shape_size = function - | Direct_call _ - | Indirect_call _ -> 1 - | Allocation_point _ -> 3 - type raw = (Int64.t * (part_of_shape list)) list - type t = part_of_shape list Int64_map.t + type t = { + shapes : part_of_shape list Int64_map.t; + call_counts : bool; + } - let demarshal chn : t = + let part_of_shape_size t = function + | Direct_call _ -> if t.call_counts then 2 else 1 + | Indirect_call _ -> 1 + | Allocation_point _ -> 3 + + let demarshal chn ~call_counts : t = let raw : raw = Marshal.from_channel chn in - List.fold_left (fun map (key, data) -> Int64_map.add key data map) - Int64_map.empty - raw + let shapes = + List.fold_left (fun map (key, data) -> Int64_map.add key data map) + Int64_map.empty + raw + in + { shapes; + call_counts; + } - let find_exn = Int64_map.find + let find_exn func_id t = Int64_map.find func_id t.shapes + let call_counts t = t.call_counts end module Annotation = struct @@ -132,6 +141,7 @@ module Trace = struct type uninstrumented_node type t = node option + type trace = t (* This function unmarshals into malloc blocks, which mean that we obtain a straightforward means of writing [compare] on [node]s. *) @@ -209,6 +219,16 @@ module Trace = struct let callee_node (type target) (t : target t) : target = callee_node t.node t.offset + + external call_count : ocaml_node -> int -> int + = "caml_spacetime_only_works_for_native_code" + "caml_spacetime_ocaml_direct_call_point_call_count" + + let call_count t = + if Shape_table.call_counts t.shape_table then + Some (call_count t.node t.offset) + else + None end module Indirect_call_point = struct @@ -222,39 +242,59 @@ module Trace = struct module Callee = struct (* CR-soon mshinwell: we should think about the names again. This is a "c_node" but it isn't foreign. *) - type t = foreign_node + type t = { + node : foreign_node; + call_counts : bool; + } - let is_null = foreign_node_is_null + let is_null t = foreign_node_is_null t.node (* CR-soon mshinwell: maybe rename ...c_node_call_site -> c_node_pc, since it isn't a call site in this case. *) - external callee : t -> Function_entry_point.t + external callee : foreign_node -> Function_entry_point.t = "caml_spacetime_only_works_for_native_code" "caml_spacetime_c_node_call_site" + let callee t = callee t.node + (* This can return a node satisfying "is_null" in the case of an uninitialised tail call point. See the comment in the C code. *) - external callee_node : t -> node + external callee_node : foreign_node -> node = "caml_spacetime_only_works_for_native_code" "caml_spacetime_c_node_callee_node" "noalloc" - external next : t -> foreign_node + let callee_node t = callee_node t.node + + external call_count : foreign_node -> int + = "caml_spacetime_only_works_for_native_code" + "caml_spacetime_c_node_call_count" + + let call_count t = + if t.call_counts then Some (call_count t.node) + else None + + external next : foreign_node -> foreign_node = "caml_spacetime_only_works_for_native_code" "caml_spacetime_c_node_next" "noalloc" let next t = - let next = next t in - if foreign_node_is_null next then None + let next = { t with node = next t.node; } in + if foreign_node_is_null next.node then None else Some next end - external callees : ocaml_node -> int -> Callee.t + external callees : ocaml_node -> int -> foreign_node = "caml_spacetime_only_works_for_native_code" "caml_spacetime_ocaml_indirect_call_point_callees" "noalloc" let callees t = - let callees = callees t.node t.offset in + let callees = + { Callee. + node = callees t.node t.offset; + call_counts = Shape_table.call_counts t.shape_table; + } + in if Callee.is_null callees then None else Some callees end @@ -317,7 +357,9 @@ module Trace = struct match t.remaining_layout with | [] -> None | part_of_shape::remaining_layout -> - let size = Shape_table.part_of_shape_size t.part_of_shape in + let size = + Shape_table.part_of_shape_size t.shape_table t.part_of_shape + in let offset = t.offset + size in assert (offset < Obj.size (Obj.repr t.node)); let t = @@ -351,7 +393,8 @@ module Trace = struct "caml_spacetime_compare_node" "noalloc" let fields t ~shape_table = - match Shape_table.find_exn (function_identifier t) shape_table with + let id = function_identifier t in + match Shape_table.find_exn id shape_table with | exception Not_found -> None | [] -> None | part_of_shape::remaining_layout -> @@ -555,6 +598,7 @@ module Heap_snapshot = struct finaliser_traces_by_thread : Trace.t array; snapshots : heap_snapshot array; events : Event.t list; + call_counts : bool; } let pathname_suffix_trace = "trace" @@ -586,17 +630,26 @@ module Heap_snapshot = struct let chn = open_in path in let magic_number : int = Marshal.from_channel chn in let magic_number_base = magic_number land 0xffff_ffff in - let version_number = magic_number lsr 32 in + let version_number = (magic_number lsr 32) land 0xffff in + let features = (magic_number lsr 48) land 0xffff in if magic_number_base <> 0xace00ace then begin failwith "Raw_spacetime_lib: not a Spacetime profiling file" end else begin match version_number with | 0 -> + let call_counts = + match features with + | 0 -> false + | 1 -> true + | _ -> + failwith "Raw_spacetime_lib: unknown Spacetime profiling file \ + feature set" + in let snapshots, events = read_snapshots_and_events chn [] [] in let num_snapshots = Array.length snapshots in let time_of_writer_close : float = Marshal.from_channel chn in let frame_table = Frame_table.demarshal chn in - let shape_table = Shape_table.demarshal chn in + let shape_table = Shape_table.demarshal chn ~call_counts in let num_threads : int = Marshal.from_channel chn in let traces_by_thread = Array.init num_threads (fun _ -> None) in let finaliser_traces_by_thread = @@ -617,6 +670,7 @@ module Heap_snapshot = struct finaliser_traces_by_thread; snapshots; events; + call_counts; } | _ -> failwith "Raw_spacetime_lib: unknown Spacetime profiling file \ @@ -640,5 +694,6 @@ module Heap_snapshot = struct let shape_table t = t.shape_table let time_of_writer_close t = t.time_of_writer_close let events t = t.events + let has_call_counts t = t.call_counts end end diff --git a/otherlibs/raw_spacetime_lib/raw_spacetime_lib.mli b/otherlibs/raw_spacetime_lib/raw_spacetime_lib.mli index 51bbc91f7a..051057dde4 100644 --- a/otherlibs/raw_spacetime_lib/raw_spacetime_lib.mli +++ b/otherlibs/raw_spacetime_lib/raw_spacetime_lib.mli @@ -4,7 +4,7 @@ (* *) (* Mark Shinwell and Leo White, Jane Street Europe *) (* *) -(* Copyright 2015--2016 Jane Street Group LLC *) +(* Copyright 2015--2017 Jane Street Group LLC *) (* *) (* All rights reserved. This file is distributed under the terms of *) (* the GNU Lesser General Public License version 2.1, with the *) @@ -97,6 +97,7 @@ module Trace : sig information required to decode profiling annotations written into values' headers. *) type t + type trace = t type node type ocaml_node @@ -134,6 +135,11 @@ module Trace : sig (** The node corresponding to the callee. *) val callee_node : 'target t -> 'target + + (** The number of times the callee was called. Only available if the + compiler that recorded the Spacetime profile was configured with + "-with-spacetime-call-counts". [None] will be returned otherwise. *) + val call_count : _ t -> int option end module Indirect_call_point : sig @@ -154,6 +160,10 @@ module Trace : sig (** The node corresponding to the callee. *) val callee_node : t -> node + (** The number of times the callee was called. This returns [None] in + the same circumstances as [Direct_call_point.call_count], above. *) + val call_count : t -> int option + (** Move to the next callee to which this call point has branched. [None] is returned when the end of the list is reached. *) val next : t -> t option @@ -218,7 +228,7 @@ module Trace : sig module Call_point : sig (** A value of type [t] corresponds to a call point from non-OCaml code (to either non-OCaml code, or OCaml code via the usual - assembly veneer). *) + assembly veneer). Call counts are not available for such nodes. *) type t (** N.B. The address of the callee (of type [Function_entry_point.t]) is @@ -345,5 +355,9 @@ module Heap_snapshot : sig val num_snapshots : t -> int val snapshot : t -> index:int -> heap_snapshot val events : t -> Event.t list + + (** Returns [true] iff call count information was recorded in the + series. *) + val has_call_counts : t -> bool end end diff --git a/otherlibs/threads/pervasives.ml b/otherlibs/threads/pervasives.ml index 97cb52bc7f..470a1c5c54 100644 --- a/otherlibs/threads/pervasives.ml +++ b/otherlibs/threads/pervasives.ml @@ -163,7 +163,9 @@ external float : int -> float = "%floatofint" external float_of_int : int -> float = "%floatofint" external truncate : float -> int = "%intoffloat" external int_of_float : float -> int = "%intoffloat" -external float_of_bits : int64 -> float = "caml_int64_float_of_bits" +external float_of_bits : int64 -> float + = "caml_int64_float_of_bits" "caml_int64_float_of_bits_unboxed" + [@@unboxed] [@@noalloc] let infinity = float_of_bits 0x7F_F0_00_00_00_00_00_00L let neg_infinity = @@ -272,9 +274,8 @@ let valid_float_lexem s = | _ -> s in loop 0 -;; -let string_of_float f = valid_float_lexem (format_float "%.12g" f);; +let string_of_float f = valid_float_lexem (format_float "%.12g" f) external float_of_string : string -> float = "caml_float_of_string" @@ -430,8 +431,7 @@ let seek_out oc pos = flush oc; seek_out_blocking oc pos external pos_out : out_channel -> int = "caml_ml_pos_out" external out_channel_length : out_channel -> int = "caml_ml_channel_size" external close_out_channel : out_channel -> unit = "caml_ml_close_channel" - -let close_out oc = (try flush oc with _ -> ()); close_out_channel oc +let close_out oc = flush oc; close_out_channel oc let close_out_noerr oc = (try flush oc with _ -> ()); (try close_out_channel oc with _ -> ()) @@ -549,7 +549,7 @@ external seek_in : in_channel -> int -> unit = "caml_ml_seek_in" external pos_in : in_channel -> int = "caml_ml_pos_in" external in_channel_length : in_channel -> int = "caml_ml_channel_size" external close_in : in_channel -> unit = "caml_ml_close_channel" -let close_in_noerr ic = (try close_in ic with _ -> ());; +let close_in_noerr ic = (try close_in ic with _ -> ()) external set_binary_mode_in : in_channel -> bool -> unit = "caml_ml_set_binary_mode" @@ -607,13 +607,13 @@ type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6 type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4 -let string_of_format (Format (fmt, str)) = str +let string_of_format (Format (_fmt, str)) = str external format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6 = "%identity" -let (^^) (Format (fmt1, str1)) (Format (fmt2, str2)) = +let ( ^^ ) (Format (fmt1, str1)) (Format (fmt2, str2)) = Format (CamlinternalFormatBasics.concat_fmt fmt1 fmt2, str1 ^ "%," ^ str2) diff --git a/otherlibs/threads/unix.ml b/otherlibs/threads/unix.ml index bfebe792ac..261b87fc39 100644 --- a/otherlibs/threads/unix.ml +++ b/otherlibs/threads/unix.ml @@ -159,7 +159,9 @@ let handle_unix_error f arg = exit 2 external environment : unit -> string array = "unix_environment" +external unsafe_environment : unit -> string array = "unix_environment_unsafe" external getenv: string -> string = "caml_sys_getenv" +external unsafe_getenv: string -> string = "caml_sys_unsafe_getenv" external putenv: string -> string -> unit = "unix_putenv" type interval_timer = diff --git a/otherlibs/unix/envir.c b/otherlibs/unix/envir.c index 3c6b54dc3a..3ad4b9caa0 100644 --- a/otherlibs/unix/envir.c +++ b/otherlibs/unix/envir.c @@ -13,14 +13,22 @@ /* */ /**************************************************************************/ +#include <caml/config.h> + +#ifdef HAS_UNISTD +#include <unistd.h> +#endif +#include <sys/types.h> +#ifdef HAS_GETAUXVAL +#include <sys/auxv.h> +#endif + #include <caml/mlvalues.h> #include <caml/alloc.h> -#ifndef _WIN32 extern char ** environ; -#endif -CAMLprim value unix_environment(value unit) +CAMLprim value unix_environment_unsafe(value unit) { if (environ != NULL) { return caml_copy_string_array((const char**)environ); @@ -28,3 +36,33 @@ CAMLprim value unix_environment(value unit) return Atom(0); } } + +static char **secure_environ(void) +{ +#ifdef HAS_GETAUXVAL + if (!getauxval(AT_SECURE)) + return environ; + else + return NULL; +#elif defined(HAS_ISSETUGID) + if (!issetugid ()) + return environ; + else + return NULL; +#else + if (geteuid () == getuid () && getegid () == getgid ()) + return environ; + else + return NULL; +#endif +} + +CAMLprim value unix_environment(value unit) +{ + char **e = secure_environ(); + if (e != NULL) { + return caml_copy_string_array((const char**)e); + } else { + return Atom(0); + } +} diff --git a/otherlibs/unix/unix.ml b/otherlibs/unix/unix.ml index de379c9639..9d7e00ca00 100644 --- a/otherlibs/unix/unix.ml +++ b/otherlibs/unix/unix.ml @@ -186,7 +186,9 @@ let handle_unix_error f arg = exit 2 external environment : unit -> string array = "unix_environment" +external unsafe_environment : unit -> string array = "unix_environment_unsafe" external getenv: string -> string = "caml_sys_getenv" +external unsafe_getenv: string -> string = "caml_sys_unsafe_getenv" external putenv: string -> string -> unit = "unix_putenv" type process_status = diff --git a/otherlibs/unix/unix.mli b/otherlibs/unix/unix.mli index 2c69433852..d134157061 100644 --- a/otherlibs/unix/unix.mli +++ b/otherlibs/unix/unix.mli @@ -121,14 +121,39 @@ val handle_unix_error : ('a -> 'b) -> 'a -> 'b val environment : unit -> string array (** Return the process environment, as an array of strings - with the format ``variable=value''. *) + with the format ``variable=value''. The returned array + is empty if the process has special privileges. *) + +val unsafe_environment : unit -> string array +(** Return the process environment, as an array of strings with the + format ``variable=value''. Unlike {!environment}, this function + returns a populated array even if the process has special + privileges. See the documentation for {!unsafe_getenv} for more + details. + + @since 4.06.0 *) val getenv : string -> string (** Return the value associated to a variable in the process + environment, unless the process has special privileges. + @raise Not_found if the variable is unbound or the process has + special privileges. + + (This function is identical to {!Sys.getenv}. *) + +val unsafe_getenv : string -> string +(** Return the value associated to a variable in the process environment. - @raise Not_found if the variable is unbound. - (This function is identical to {!Sys.getenv}.) *) + Unlike {!getenv}, this function returns the value even if the + process has special privileges. It is considered unsafe because the + programmer of a setuid or setgid program must be careful to avoid + using maliciously crafted environment variables in the search path + for executables, the locations for temporary files or logs, and the + like. + + @raise Not_found if the variable is unbound. + @since 4.06.0 *) val putenv : string -> string -> unit (** [Unix.putenv name value] sets the value associated to a @@ -516,7 +541,7 @@ val map_file : [Invalid_argument] or [Failure] may be raised in cases where argument validation fails. - @since 4.05.0 *) + @since 4.06.0 *) (** {6 Operations on file names} *) @@ -1646,4 +1671,3 @@ val setsid : unit -> int its controlling terminal. On Windows, not implemented. *) - diff --git a/otherlibs/unix/unixLabels.mli b/otherlibs/unix/unixLabels.mli index b65e8b12dc..b12b3133ce 100644 --- a/otherlibs/unix/unixLabels.mli +++ b/otherlibs/unix/unixLabels.mli @@ -126,6 +126,20 @@ val getenv : string -> string environment. Raise [Not_found] if the variable is unbound. (This function is identical to [Sys.getenv].) *) +val unsafe_getenv : string -> string +(** Return the value associated to a variable in the process + environment. + + Unlike {!getenv}, this function returns the value even if the + process has special privileges. It is considered unsafe because the + programmer of a setuid or setgid program must be careful to avoid + using maliciously crafted environment variables in the search path + for executables, the locations for temporary files or logs, and the + like. + + @raise Not_found if the variable is unbound. + @since 4.06.0 *) + val putenv : string -> string -> unit (** [Unix.putenv name value] sets the value associated to a variable in the process environment. @@ -416,6 +430,59 @@ module LargeFile : whose sizes are greater than [max_int]. *) +(** {6 Mapping files into memory} *) + +val map_file : + file_descr -> ?pos:int64 -> kind:('a, 'b) CamlinternalBigarray.kind -> + layout:'c CamlinternalBigarray.layout -> shared:bool -> dims:int array -> + ('a, 'b, 'c) CamlinternalBigarray.genarray +(** Memory mapping of a file as a big array. + [map_file fd kind layout shared dims] + returns a big array of kind [kind], layout [layout], + and dimensions as specified in [dims]. The data contained in + this big array are the contents of the file referred to by + the file descriptor [fd] (as opened previously with + [Unix.openfile], for example). The optional [pos] parameter + is the byte offset in the file of the data being mapped; + it defaults to 0 (map from the beginning of the file). + + If [shared] is [true], all modifications performed on the array + are reflected in the file. This requires that [fd] be opened + with write permissions. If [shared] is [false], modifications + performed on the array are done in memory only, using + copy-on-write of the modified pages; the underlying file is not + affected. + + [Genarray.map_file] is much more efficient than reading + the whole file in a big array, modifying that big array, + and writing it afterwards. + + To adjust automatically the dimensions of the big array to + the actual size of the file, the major dimension (that is, + the first dimension for an array with C layout, and the last + dimension for an array with Fortran layout) can be given as + [-1]. [Genarray.map_file] then determines the major dimension + from the size of the file. The file must contain an integral + number of sub-arrays as determined by the non-major dimensions, + otherwise [Failure] is raised. + + If all dimensions of the big array are given, the file size is + matched against the size of the big array. If the file is larger + than the big array, only the initial portion of the file is + mapped to the big array. If the file is smaller than the big + array, the file is automatically grown to the size of the big array. + This requires write permissions on [fd]. + + Array accesses are bounds-checked, but the bounds are determined by + the initial call to [map_file]. Therefore, you should make sure no + other process modifies the mapped file while you're accessing it, + or a SIGBUS signal may be raised. This happens, for instance, if the + file is shrunk. + + [Invalid_argument] or [Failure] may be raised in cases where argument + validation fails. + @since 4.06.0 *) + (** {6 Operations on file names} *) diff --git a/otherlibs/win32unix/Makefile b/otherlibs/win32unix/Makefile index 0ebb75d85f..478bf10ccf 100644 --- a/otherlibs/win32unix/Makefile +++ b/otherlibs/win32unix/Makefile @@ -19,7 +19,7 @@ # Files in this directory WIN_FILES = accept.c bind.c channels.c close.c \ - close_on.c connect.c createprocess.c dup.c dup2.c errmsg.c \ + close_on.c connect.c createprocess.c dup.c dup2.c errmsg.c envir.c \ getpeername.c getpid.c getsockname.c gettimeofday.c \ link.c listen.c lockf.c lseek.c nonblock.c \ mkdir.c mmap.c open.c pipe.c read.c readlink.c rename.c \ @@ -30,7 +30,7 @@ WIN_FILES = accept.c bind.c channels.c close.c \ # Files from the ../unix directory UNIX_FILES = access.c addrofstr.c chdir.c chmod.c cst2constr.c \ - cstringv.c envir.c execv.c execve.c execvp.c \ + cstringv.c execv.c execve.c execvp.c \ exit.c getaddrinfo.c getcwd.c gethost.c gethostname.c \ getnameinfo.c getproto.c \ getserv.c gmtime.c mmap_ba.c putenv.c rmdir.c \ diff --git a/otherlibs/win32unix/envir.c b/otherlibs/win32unix/envir.c new file mode 100644 index 0000000000..3ca8164334 --- /dev/null +++ b/otherlibs/win32unix/envir.c @@ -0,0 +1,27 @@ +/**************************************************************************/ +/* */ +/* OCaml */ +/* */ +/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */ +/* */ +/* Copyright 1996 Institut National de Recherche en Informatique et */ +/* en Automatique. */ +/* */ +/* All rights reserved. This file is distributed under the terms of */ +/* the GNU Lesser General Public License version 2.1, with the */ +/* special exception on linking described in the file LICENSE. */ +/* */ +/**************************************************************************/ + +#include <caml/mlvalues.h> +#include <caml/alloc.h> + +CAMLprim value unix_environment(value unit) +{ + /* Win32 doesn't have a notion of setuid bit, so accessing environ is safe. */ + if (environ != NULL) { + return caml_copy_string_array((const char**)environ); + } else { + return Atom(0); + } +} diff --git a/otherlibs/win32unix/unix.ml b/otherlibs/win32unix/unix.ml index 8adc319b42..73b34144e9 100644 --- a/otherlibs/win32unix/unix.ml +++ b/otherlibs/win32unix/unix.ml @@ -121,7 +121,10 @@ let handle_unix_error f arg = exit 2 external environment : unit -> string array = "unix_environment" +(* On Win32 environment access is always considered safe. *) +let unsafe_environment = environment external getenv: string -> string = "caml_sys_getenv" +external unsafe_getenv: string -> string = "caml_sys_unsafe_getenv" external putenv: string -> string -> unit = "unix_putenv" type process_status = @@ -393,6 +396,17 @@ let mkfifo _name _perm = invalid_arg "Unix.mkfifo not implemented" external readlink : string -> string = "unix_readlink" external symlink_stub : bool -> string -> string -> unit = "unix_symlink" +(* See https://caml.inria.fr/mantis/view.php?id=7564. + The Windows API used to create symbolic links does not normalize the target + of a symbolic link, so we do it here. Note that we cannot use the native + Windows call GetFullPathName to do this because we need relative paths to + stay relative. *) +let normalize_slashes path = + if String.length path >= 4 && path.[0] = '\\' && path.[1] = '\\' && path.[2] = '?' && path.[3] = '\\' then + path + else + String.init (String.length path) (fun i -> match path.[i] with '/' -> '\\' | c -> c) + let symlink ?to_dir source dest = let to_dir = match to_dir with @@ -404,7 +418,8 @@ let symlink ?to_dir source dest = with _ -> false in - symlink_stub to_dir source dest + let source = normalize_slashes source in + symlink_stub to_dir source dest external has_symlink : unit -> bool = "unix_has_symlink" @@ -562,7 +577,7 @@ type msg_flag = | MSG_DONTROUTE | MSG_PEEK -external socket : +external socket : ?cloexec: bool -> socket_domain -> socket_type -> int -> file_descr = "unix_socket" let socketpair ?cloexec:_ _dom _ty _proto = invalid_arg "Unix.socketpair not implemented" @@ -951,7 +966,7 @@ let open_process_full cmd env = with e -> close out_read; close out_write; close in_read; close in_write; - close err_read; close err_write; + close err_read; close err_write; raise e end; close out_read; diff --git a/parsing/ast_helper.ml b/parsing/ast_helper.ml index 939c29b520..2c28493395 100644 --- a/parsing/ast_helper.ml +++ b/parsing/ast_helper.ml @@ -291,6 +291,7 @@ module Cl = struct let let_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcl_let (a, b, c)) let constraint_ ?loc ?attrs a b = mk ?loc ?attrs (Pcl_constraint (a, b)) let extension ?loc ?attrs a = mk ?loc ?attrs (Pcl_extension a) + let open_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcl_open (a, b, c)) end module Cty = struct @@ -306,6 +307,7 @@ module Cty = struct let signature ?loc ?attrs a = mk ?loc ?attrs (Pcty_signature a) let arrow ?loc ?attrs a b c = mk ?loc ?attrs (Pcty_arrow (a, b, c)) let extension ?loc ?attrs a = mk ?loc ?attrs (Pcty_extension a) + let open_ ?loc ?attrs a b c = mk ?loc ?attrs (Pcty_open (a, b, c)) end module Ctf = struct diff --git a/parsing/ast_helper.mli b/parsing/ast_helper.mli index e43e016acd..ce9ef0ce4b 100644 --- a/parsing/ast_helper.mli +++ b/parsing/ast_helper.mli @@ -352,6 +352,8 @@ module Cty: val arrow: ?loc:loc -> ?attrs:attrs -> arg_label -> core_type -> class_type -> class_type val extension: ?loc:loc -> ?attrs:attrs -> extension -> class_type + val open_: ?loc:loc -> ?attrs:attrs -> override_flag -> lid -> class_type + -> class_type end (** Class type fields *) @@ -390,6 +392,8 @@ module Cl: val constraint_: ?loc:loc -> ?attrs:attrs -> class_expr -> class_type -> class_expr val extension: ?loc:loc -> ?attrs:attrs -> extension -> class_expr + val open_: ?loc:loc -> ?attrs:attrs -> override_flag -> lid -> class_expr + -> class_expr end (** Class fields *) diff --git a/parsing/ast_iterator.ml b/parsing/ast_iterator.ml index 2ba057607c..9d51cd8a70 100755 --- a/parsing/ast_iterator.ml +++ b/parsing/ast_iterator.ml @@ -186,6 +186,8 @@ module CT = struct | Pcty_arrow (_lab, t, ct) -> sub.typ sub t; sub.class_type sub ct | Pcty_extension x -> sub.extension sub x + | Pcty_open (_ovf, lid, e) -> + iter_loc sub lid; sub.class_type sub e let iter_field sub {pctf_desc = desc; pctf_loc = loc; pctf_attributes = attrs} = @@ -431,6 +433,8 @@ module CE = struct | Pcl_constraint (ce, ct) -> sub.class_expr sub ce; sub.class_type sub ct | Pcl_extension x -> sub.extension sub x + | Pcl_open (_ovf, lid, e) -> + iter_loc sub lid; sub.class_expr sub e let iter_kind sub = function | Cfk_concrete (_o, e) -> sub.expr sub e diff --git a/parsing/ast_mapper.ml b/parsing/ast_mapper.ml index e0ffcebaa1..fa20b03021 100644 --- a/parsing/ast_mapper.ml +++ b/parsing/ast_mapper.ml @@ -195,6 +195,8 @@ module CT = struct | Pcty_arrow (lab, t, ct) -> arrow ~loc ~attrs lab (sub.typ sub t) (sub.class_type sub ct) | Pcty_extension x -> extension ~loc ~attrs (sub.extension sub x) + | Pcty_open (ovf, lid, ct) -> + open_ ~loc ~attrs ovf (map_loc sub lid) (sub.class_type sub ct) let map_field sub {pctf_desc = desc; pctf_loc = loc; pctf_attributes = attrs} = @@ -455,6 +457,8 @@ module CE = struct | Pcl_constraint (ce, ct) -> constraint_ ~loc ~attrs (sub.class_expr sub ce) (sub.class_type sub ct) | Pcl_extension x -> extension ~loc ~attrs (sub.extension sub x) + | Pcl_open (ovf, lid, ce) -> + open_ ~loc ~attrs ovf (map_loc sub lid) (sub.class_expr sub ce) let map_kind sub = function | Cfk_concrete (o, e) -> Cfk_concrete (o, sub.expr sub e) diff --git a/parsing/depend.ml b/parsing/depend.ml index 42af0c5251..d68b440b8d 100644 --- a/parsing/depend.ml +++ b/parsing/depend.ml @@ -18,6 +18,8 @@ open Location open Longident open Parsetree +let pp_deps = ref [] + module StringSet = Set.Make(struct type t = string let compare = compare end) module StringMap = Map.Make(String) @@ -168,6 +170,8 @@ let rec add_class_type bv cty = | Pcty_arrow(_, ty1, cty2) -> add_type bv ty1; add_class_type bv cty2 | Pcty_extension e -> handle_extension e + | Pcty_open (_ovf, m, e) -> + let bv = open_module bv m.txt in add_class_type bv e and add_class_type_field bv pctf = match pctf.pctf_desc with @@ -503,6 +507,8 @@ and add_class_expr bv ce = | Pcl_constraint(ce, ct) -> add_class_expr bv ce; add_class_type bv ct | Pcl_extension e -> handle_extension e + | Pcl_open (_ovf, m, e) -> + let bv = open_module bv m.txt in add_class_expr bv e and add_class_field bv pcf = match pcf.pcf_desc with diff --git a/parsing/depend.mli b/parsing/depend.mli index e34abbe7fc..6efd5e09ed 100644 --- a/parsing/depend.mli +++ b/parsing/depend.mli @@ -26,6 +26,9 @@ val weaken_map : StringSet.t -> map_tree -> map_tree val free_structure_names : StringSet.t ref +(* dependencies found by preprocessing tools (plugins) *) +val pp_deps : string list ref + val open_module : bound_map -> Longident.t -> bound_map val add_use_file : bound_map -> Parsetree.toplevel_phrase list -> unit diff --git a/parsing/lexer.mll b/parsing/lexer.mll index 6936c8265d..178f3be852 100644 --- a/parsing/lexer.mll +++ b/parsing/lexer.mll @@ -99,35 +99,14 @@ let keyword_table = (* To buffer string literals *) -let initial_string_buffer = Bytes.create 256 -let string_buff = ref initial_string_buffer -let string_index = ref 0 - -let reset_string_buffer () = - string_buff := initial_string_buffer; - string_index := 0 - -let store_string_char c = - if !string_index >= Bytes.length !string_buff then begin - let new_buff = Bytes.create (Bytes.length (!string_buff) * 2) in - Bytes.blit !string_buff 0 new_buff 0 (Bytes.length !string_buff); - string_buff := new_buff - end; - Bytes.unsafe_set !string_buff !string_index c; - incr string_index - -let store_string s = - for i = 0 to String.length s - 1 do - store_string_char s.[i]; - done - -let store_lexeme lexbuf = - store_string (Lexing.lexeme lexbuf) - -let get_stored_string () = - let s = Bytes.sub_string !string_buff 0 !string_index in - string_buff := initial_string_buffer; - s +let string_buffer = Buffer.create 256 +let reset_string_buffer () = Buffer.reset string_buffer +let get_stored_string () = Buffer.contents string_buffer + +let store_string_char c = Buffer.add_char string_buffer c +let store_string_utf_8_uchar u = Buffer.add_utf_8_uchar string_buffer u +let store_string s = Buffer.add_string string_buffer s +let store_lexeme lexbuf = store_string (Lexing.lexeme lexbuf) (* To store the position of the beginning of a string and comment *) let string_start_loc = ref Location.none;; @@ -141,6 +120,9 @@ let print_warnings = ref true let store_escaped_char lexbuf c = if in_comment () then store_lexeme lexbuf else store_string_char c +let store_escaped_uchar lexbuf u = + if in_comment () then store_lexeme lexbuf else store_string_utf_8_uchar u + let with_comment_buffer comment lexbuf = let start_loc = Location.curr lexbuf in comment_start_loc := [start_loc]; @@ -153,6 +135,21 @@ let with_comment_buffer comment lexbuf = (* To translate escape sequences *) +let hex_digit_value d = (* assert (d in '0'..'9' 'a'..'f' 'A'..'F') *) + let d = Char.code d in + if d >= 97 then d - 87 else + if d >= 65 then d - 55 else + d - 48 + +let hex_num_value lexbuf ~first ~last = + let rec loop acc i = match i > last with + | true -> acc + | false -> + let value = hex_digit_value (Lexing.lexeme_char lexbuf i) in + loop (16 * acc + value) (i + 1) + in + loop 0 first + let char_for_backslash = function | 'n' -> '\010' | 'r' -> '\013' @@ -178,17 +175,24 @@ let char_for_octal_code lexbuf i = Char.chr c let char_for_hexadecimal_code lexbuf i = - let d1 = Char.code (Lexing.lexeme_char lexbuf i) in - let val1 = if d1 >= 97 then d1 - 87 - else if d1 >= 65 then d1 - 55 - else d1 - 48 - in - let d2 = Char.code (Lexing.lexeme_char lexbuf (i+1)) in - let val2 = if d2 >= 97 then d2 - 87 - else if d2 >= 65 then d2 - 55 - else d2 - 48 + let byte = hex_num_value lexbuf ~first:i ~last:(i+1) in + Char.chr byte + +let uchar_for_uchar_escape lexbuf = + let err e = + raise + (Error (Illegal_escape (Lexing.lexeme lexbuf ^ e), Location.curr lexbuf)) in - Char.chr (val1 * 16 + val2) + let len = Lexing.lexeme_end lexbuf - Lexing.lexeme_start lexbuf in + let first = 3 (* skip opening \u{ *) in + let last = len - 2 (* skip closing } *) in + let digit_count = last - first + 1 in + match digit_count > 6 with + | true -> err ", too many digits, expected 1 to 6 hexadecimal digits" + | false -> + let cp = hex_num_value lexbuf ~first ~last in + if Uchar.is_valid cp then Uchar.unsafe_of_int cp else + err (", " ^ Printf.sprintf "%X" cp ^ " is not a Unicode scalar value") (* recover the name from a LABEL or OPTLABEL token *) @@ -290,6 +294,8 @@ let symbolchar = ['!' '$' '%' '&' '*' '+' '-' '.' '/' ':' '<' '=' '>' '?' '@' '^' '|' '~'] let decimal_literal = ['0'-'9'] ['0'-'9' '_']* +let hex_digit = + ['0'-'9' 'A'-'F' 'a'-'f'] let hex_literal = '0' ['x' 'X'] ['0'-'9' 'A'-'F' 'a'-'f']['0'-'9' 'A'-'F' 'a'-'f' '_']* let oct_literal = @@ -627,6 +633,9 @@ and string = parse | '\\' 'x' ['0'-'9' 'a'-'f' 'A'-'F'] ['0'-'9' 'a'-'f' 'A'-'F'] { store_escaped_char lexbuf (char_for_hexadecimal_code lexbuf 2); string lexbuf } + | '\\' 'u' '{' hex_digit+ '}' + { store_escaped_uchar lexbuf (uchar_for_uchar_escape lexbuf); + string lexbuf } | '\\' _ { if not (in_comment ()) then begin (* Should be an error, but we are very lax. diff --git a/parsing/parser.mly b/parsing/parser.mly index efa3aadff1..aef35c3de8 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -260,6 +260,8 @@ let mkpat_attrs d attrs = let wrap_class_attrs body attrs = {body with pcl_attributes = attrs @ body.pcl_attributes} +let wrap_class_type_attrs body attrs = + {body with pcty_attributes = attrs @ body.pcty_attributes} let wrap_mod_attrs body attrs = {body with pmod_attributes = attrs @ body.pmod_attributes} let wrap_mty_attrs body attrs = @@ -1033,6 +1035,8 @@ class_expr: { mkclass(Pcl_apply($1, List.rev $2)) } | let_bindings IN class_expr { class_of_let_bindings $1 $3 } + | LET OPEN override_flag attributes mod_longident IN class_expr + { wrap_class_attrs (mkclass(Pcl_open($3, mkrhs $5 5, $7))) $4 } | class_expr attribute { Cl.attr $1 $2 } | extension @@ -1165,6 +1169,8 @@ class_signature: { Cty.attr $1 $2 } | extension { mkcty(Pcty_extension $1) } + | LET OPEN override_flag attributes mod_longident IN class_signature + { wrap_class_type_attrs (mkcty(Pcty_open($3, mkrhs $5 5, $7))) $4 } ; class_sig_body: class_self_type class_sig_fields diff --git a/parsing/parsetree.mli b/parsing/parsetree.mli index 4ccfd62428..cd7f1524ab 100644 --- a/parsing/parsetree.mli +++ b/parsing/parsetree.mli @@ -505,6 +505,8 @@ and class_type_desc = *) | Pcty_extension of extension (* [%id] *) + | Pcty_open of override_flag * Longident.t loc * class_type + (* let open M in CT *) and class_signature = { @@ -594,7 +596,10 @@ and class_expr_desc = | Pcl_constraint of class_expr * class_type (* (CE : CT) *) | Pcl_extension of extension - (* [%id] *) + (* [%id] *) + | Pcl_open of override_flag * Longident.t loc * class_expr + (* let open M in CE *) + and class_structure = { diff --git a/parsing/pprintast.ml b/parsing/pprintast.ml index 7ac916de8a..1471ff245c 100644 --- a/parsing/pprintast.ml +++ b/parsing/pprintast.ml @@ -30,7 +30,7 @@ open Ast_helper let prefix_symbols = [ '!'; '?'; '~' ] ;; let infix_symbols = [ '='; '<'; '>'; '@'; '^'; '|'; '&'; '+'; '-'; '*'; '/'; - '$'; '%' ] + '$'; '%'; '#' ] (* type fixity = Infix| Prefix *) let special_infix_strings = ["asr"; "land"; "lor"; "lsl"; "lsr"; "lxor"; "mod"; "or"; ":="; "!=" ] @@ -276,7 +276,7 @@ and core_type1 ctxt f x = (fun f l -> match l with |[] -> () |[x]-> pp f "%a@;" (core_type1 ctxt) x - | _ -> list ~first:"(" ~last:")@;" (core_type ctxt) ~sep:"," f l) + | _ -> list ~first:"(" ~last:")@;" (core_type ctxt) ~sep:",@;" f l) l longident_loc li | Ptyp_variant (l, closed, low) -> let type_variant_helper f x = @@ -382,7 +382,7 @@ and pattern1 ctxt (f:Format.formatter) (x:pattern) : unit = else (match po with | Some x -> pp f "%a@;%a" longident_loc li (simple_pattern ctxt) x - | None -> pp f "%a@;"longident_loc li ) + | None -> pp f "%a" longident_loc li) | _ -> simple_pattern ctxt f x and simple_pattern ctxt (f:Format.formatter) (x:pattern) : unit = @@ -415,7 +415,7 @@ and simple_pattern ctxt (f:Format.formatter) (x:pattern) : unit = pp f "@[<2>{@;%a;_}@]" (list longident_x_pattern ~sep:";@;") l end | Ppat_tuple l -> - pp f "@[<1>(%a)@]" (list ~sep:"," (pattern1 ctxt)) l (* level1*) + pp f "@[<1>(%a)@]" (list ~sep:",@;" (pattern1 ctxt)) l (* level1*) | Ppat_constant (c) -> pp f "%a" constant c | Ppat_interval (c1, c2) -> pp f "%a..%a" constant c1 constant c2 | Ppat_variant (l,None) -> pp f "`%s" l @@ -518,7 +518,7 @@ and expression ctxt f x = when ctxt.semi -> paren true (expression reset_ctxt) f x | Pexp_fun (l, e0, p, e) -> - pp f "@[<2>fun@;%a@;->@;%a@]" + pp f "@[<2>fun@;%a->@;%a@]" (label_exp ctxt) (l, e0, p) (expression ctxt) e | Pexp_function l -> @@ -798,6 +798,9 @@ and class_type ctxt f x = | Pcty_extension e -> extension ctxt f e; attributes ctxt f x.pcty_attributes + | Pcty_open (ovf, lid, e) -> + pp f "@[<2>let open%s %a in@;%a@]" (override ovf) longident_loc lid + (class_type ctxt) e (* [class type a = object end] *) and class_type_declaration_list ctxt f l = @@ -914,6 +917,9 @@ and class_expr ctxt f x = (class_expr ctxt) ce (class_type ctxt) ct | Pcl_extension e -> extension ctxt f e + | Pcl_open (ovf, lid, e) -> + pp f "@[<2>let open%s %a in@;%a@]" (override ovf) longident_loc lid + (class_expr ctxt) e and module_type ctxt f x = if x.pmty_attributes <> [] then begin @@ -1133,7 +1139,7 @@ and binding ctxt f {pvb_pat=p; pvb_expr=x; _} = pp f "%a@;: %a@;=@;%a" (simple_pattern ctxt) p (core_type ctxt) ct (expression ctxt) e | Some (p, tyvars, ct, e) -> begin - pp f "%a@;: type@;%a.%a@;=@;%a" + pp f "%a@;: type@;%a.@;%a@;=@;%a" (simple_pattern ctxt) p (list pp_print_string ~sep:"@;") (tyvars_str tyvars) (core_type ctxt) ct (expression ctxt) e end @@ -1158,7 +1164,7 @@ and binding ctxt f {pvb_pat=p; pvb_expr=x; _} = (* [in] is not printed *) and bindings ctxt f (rf,l) = let binding kwd rf f x = - pp f "@[<2>%s %a%a@]@ %a" kwd rec_flag rf + pp f "@[<2>%s %a%a@]%a" kwd rec_flag rf (binding ctxt) x (item_attributes ctxt) x.pvb_attributes in match l with @@ -1296,7 +1302,7 @@ and type_param ctxt f (ct, a) = and type_params ctxt f = function | [] -> () - | l -> pp f "%a " (list (type_param ctxt) ~first:"(" ~last:")" ~sep:",") l + | l -> pp f "%a " (list (type_param ctxt) ~first:"(" ~last:")" ~sep:",@;") l and type_def_list ctxt f (rf, l) = let type_decl kwd rf f x = @@ -1411,7 +1417,7 @@ and constructor_declaration ctxt f (name, args, res, attrs) = (fun f -> function | Pcstr_tuple [] -> core_type1 ctxt f r | Pcstr_tuple l -> pp f "%a@;->@;%a" - (list (core_type1 ctxt) ~sep:"*@;") l + (list (core_type1 ctxt) ~sep:"@;*@;") l (core_type1 ctxt) r | Pcstr_record l -> pp f "%a@;->@;%a" (record_declaration ctxt) l (core_type1 ctxt) r diff --git a/parsing/printast.ml b/parsing/printast.ml index 3b39d380f6..ed4f1bbe04 100644 --- a/parsing/printast.ml +++ b/parsing/printast.ml @@ -485,6 +485,10 @@ and class_type i ppf x = | Pcty_extension (s, arg) -> line i ppf "Pcty_extension \"%s\"\n" s.txt; payload i ppf arg + | Pcty_open (ovf, m, e) -> + line i ppf "Pcty_open %a \"%a\"\n" fmt_override_flag ovf + fmt_longident_loc m; + class_type i ppf e and class_signature i ppf cs = line i ppf "class_signature\n"; @@ -572,6 +576,10 @@ and class_expr i ppf x = | Pcl_extension (s, arg) -> line i ppf "Pcl_extension \"%s\"\n" s.txt; payload i ppf arg + | Pcl_open (ovf, m, e) -> + line i ppf "Pcl_open %a \"%a\"\n" fmt_override_flag ovf + fmt_longident_loc m; + class_expr i ppf e and class_structure i ppf { pcstr_self = p; pcstr_fields = l } = line i ppf "class_structure\n"; diff --git a/stdlib/arg.ml b/stdlib/arg.ml index 0f9095a7f4..e315e51121 100644 --- a/stdlib/arg.ml +++ b/stdlib/arg.ml @@ -309,8 +309,13 @@ let second_word s = else if s.[n] = ' ' then loop (n+1) else n in - try loop (String.index s ' ') - with Not_found -> len + match String.index s '\t' with + | n -> loop (n+1) + | exception Not_found -> + begin match String.index s ' ' with + | n -> loop (n+1) + | exception Not_found -> len + end let max_arg_len cur (kwd, spec, doc) = @@ -319,6 +324,10 @@ let max_arg_len cur (kwd, spec, doc) = | _ -> max cur (String.length kwd + second_word doc) +let replace_leading_tab s = + let seen = ref false in + String.map (function '\t' when not !seen -> seen := true; ' ' | c -> c) s + let add_padding len ksd = match ksd with | (_, _, "") -> @@ -328,16 +337,16 @@ let add_padding len ksd = | (kwd, (Symbol _ as spec), msg) -> let cutcol = second_word msg in let spaces = String.make ((max 0 (len - cutcol)) + 3) ' ' in - (kwd, spec, "\n" ^ spaces ^ msg) + (kwd, spec, "\n" ^ spaces ^ replace_leading_tab msg) | (kwd, spec, msg) -> let cutcol = second_word msg in let kwd_len = String.length kwd in let diff = len - kwd_len - cutcol in if diff <= 0 then - (kwd, spec, msg) + (kwd, spec, replace_leading_tab msg) else let spaces = String.make diff ' ' in - let prefix = String.sub msg 0 cutcol in + let prefix = String.sub (replace_leading_tab msg) 0 cutcol in let suffix = String.sub msg cutcol (String.length msg - cutcol) in (kwd, spec, prefix ^ spaces ^ suffix) diff --git a/stdlib/arg.mli b/stdlib/arg.mli index 8d4528d74f..6b6ee9e402 100644 --- a/stdlib/arg.mli +++ b/stdlib/arg.mli @@ -168,14 +168,13 @@ val usage_string : (key * spec * doc) list -> usage_msg -> string if provided with the same parameters. *) val align: ?limit: int -> (key * spec * doc) list -> (key * spec * doc) list -(** Align the documentation strings by inserting spaces at the first - space, according to the length of the keyword. Use a - space as the first character in a doc string if you want to - align the whole string. The doc strings corresponding to - [Symbol] arguments are aligned on the next line. - @param limit options with keyword and message longer than - [limit] will not be used to compute the alignment. -*) +(** Align the documentation strings by inserting spaces at the first alignment + separator (tab or, if tab is not found, space), according to the length of + the keyword. Use a alignment separator as the first character in a doc + string if you want to align the whole string. The doc strings corresponding + to [Symbol] arguments are aligned on the next line. + @param limit options with keyword and message longer than [limit] will not + be used to compute the alignment. *) val current : int ref (** Position (in {!Sys.argv}) of the argument being processed. You can diff --git a/stdlib/bytes.ml b/stdlib/bytes.ml index f048a95177..0783babcb8 100644 --- a/stdlib/bytes.ml +++ b/stdlib/bytes.ml @@ -113,7 +113,7 @@ let iter f a = let iteri f a = for i = 0 to length a - 1 do f i (unsafe_get a i) done -let ensure_ge x y = if x >= y then x else invalid_arg "Bytes.concat" +let ensure_ge (x:int) y = if x >= y then x else invalid_arg "Bytes.concat" let rec sum_lengths acc seplen = function | [] -> acc diff --git a/stdlib/format.mli b/stdlib/format.mli index ba9d56f73a..511e69ed3a 100644 --- a/stdlib/format.mli +++ b/stdlib/format.mli @@ -36,7 +36,6 @@ functions provided by this module. This style is more basic but more verbose than the concise [fprintf] format strings. - For instance, the sequence [open_box 0; print_string "x ="; print_space (); print_int 1; close_box (); print_newline ()] @@ -57,7 +56,7 @@ the remaining material, e.g. evaluate [print_newline ()]. The behavior of pretty-printing commands is unspecified - if there is no open pretty-printing box. Each box open via + if there is no open pretty-printing box. Each box opened by one of the [open_] functions below must be closed using [close_box] for proper formatting. Otherwise, some of the material printed in the boxes may not be output, or may be formatted incorrectly. @@ -72,7 +71,7 @@ The pretty-printing functions output material that is delayed in the pretty-printer queue and stacks in order to compute proper line - splitting. In contrast, basic I/O output functions write directely in + splitting. In contrast, basic I/O output functions write directly in their output device. As a consequence, the output of a basic I/O function may appear before the output of a pretty-printing function that has been called before. For instance, @@ -89,7 +88,7 @@ (** {6 Pretty-printing boxes} *) (** The pretty-printing engine uses the concepts of pretty-printing box and - break hint to drive the indentation and the line splitting behavior of the + break hint to drive indentation and line splitting behavior of the pretty-printer. Each different pretty-printing box kind introduces a specific line splitting @@ -101,7 +100,7 @@ - within an {e horizontal/vertical} box, if the box fits on the current line then break hints never split the line, otherwise break hint always split the line, - - within an {e compacting} box, a break hint never splits the line, + - within a {e compacting} box, a break hint never splits the line, unless there is no more room on the current line. Note that line splitting policy is box specific: the policy of a box does @@ -226,7 +225,7 @@ val print_space : unit -> unit the pretty-printer may split the line at this point, otherwise it prints one space. - [print_space] is equivalent to [print_break 1 0]. + [print_space ()] is equivalent to [print_break 1 0]. *) val print_cut : unit -> unit @@ -234,7 +233,7 @@ val print_cut : unit -> unit the pretty-printer may split the line at this point, otherwise it prints nothing. - [print_cut] is equivalent to [print_break 0 0]. + [print_cut ()] is equivalent to [print_break 0 0]. *) val print_break : int -> int -> unit @@ -255,7 +254,6 @@ val force_newline : unit -> unit interfere with current line counters and box size calculation. Using break hints within an enclosing vertical box is a better alternative. - *) val print_if_newline : unit -> unit @@ -289,7 +287,6 @@ val print_flush : unit -> unit to flush the out channel; these explicit flush calls could foil the buffering strategy of output channels and could dramatically impact efficiency. - *) val print_newline : unit -> unit @@ -314,6 +311,10 @@ val set_margin : int -> unit Nothing happens if [d] is smaller than 2. If [d] is too large, the right margin is set to the maximum admissible value (which is greater than [10 ^ 9]). + If [d] is less than the current maximum indentation limit, the + maximum indentation limit is decreased while trying to preserve + a minimal ratio [max_indent/margin>=50%] and if possible + the current difference [margin - max_indent]. *) val get_margin : unit -> int @@ -324,11 +325,15 @@ val get_margin : unit -> int val set_max_indent : int -> unit (** [set_max_indent d] sets the maximum indentation limit of lines to [d] (in characters): - once this limit is reached, new pretty-printing boxes are rejected to the left, - if they do not fit on the current line. + once this limit is reached, new pretty-printing boxes are rejected to the + left, if they do not fit on the current line. + Nothing happens if [d] is smaller than 2. If [d] is too large, the limit is set to the maximum admissible value (which is greater than [10 ^ 9]). + + If [d] is greater or equal than the current margin, it is ignored, + and the current maximum indentation limit is kept. *) val get_max_indent : unit -> int @@ -336,15 +341,20 @@ val get_max_indent : unit -> int (** {6 Maximum formatting depth} *) -(** The maximum formatting depth is the maximum allowed number of - simultaneously open pretty-printing boxes before ellipsis. *) +(** The maximum formatting depth is the maximum number of pretty-printing + boxes simultaneously open. + + Material inside boxes nested deeper is printed as an ellipsis (more + precisely as the text returned by {!get_ellipsis_text} [()]). +*) val set_max_boxes : int -> unit (** [set_max_boxes max] sets the maximum number of pretty-printing boxes simultaneously open. Material inside boxes nested deeper is printed as an ellipsis (more - precisely as the text returned by [get_ellipsis_text ()]). + precisely as the text returned by {!get_ellipsis_text} [()]). + Nothing happens if [max] is smaller than 2. *) @@ -355,7 +365,7 @@ val get_max_boxes : unit -> int val over_max_boxes : unit -> bool (** Tests if the maximum number of pretty-printing boxes allowed have already - been open. + been opened. *) (** {6 Tabulation boxes} *) @@ -372,8 +382,8 @@ val over_max_boxes : unit -> bool Note: printing within tabulation box is line directed, so arbitrary line splitting inside a tabulation box leads to poor rendering. Yet, controlled - use of tabulation boxes allows simple printing of columns within {!Format}. - + use of tabulation boxes allows simple printing of columns within + module {!Format}. *) val open_tbox : unit -> unit @@ -388,7 +398,6 @@ val open_tbox : unit -> unit A tabulation box features specific {e tabulation breaks} to move to next tabulation marker or split the line. Function {!Format.print_tbreak} prints a tabulation break. - *) val close_tbox : unit -> unit @@ -417,7 +426,8 @@ val print_tbreak : int -> int -> unit tabulation marker of the box. If the pretty-printer splits the line, [offset] is added to - the current indentation. *) + the current indentation. +*) (** {6 Ellipsis} *) @@ -507,8 +517,8 @@ val open_tag : tag -> unit (** [open_tag t] opens the semantic tag named [t]. The [print_open_tag] tag-printing function of the formatter is called with - [t] as argument; then the opening tag marker, as given by [mark_open_tag t] - is written into the output device of the formatter. + [t] as argument; then the opening tag marker for [t], as given by + [mark_open_tag t], is written into the output device of the formatter. *) val close_tag : unit -> unit @@ -521,13 +531,14 @@ val close_tag : unit -> unit val set_tags : bool -> unit (** [set_tags b] turns on or off the treatment of semantic tags - (default is off). *) + (default is off). +*) val set_print_tags : bool -> unit (** [set_print_tags b] turns on or off the tag-printing operations. *) val set_mark_tags : bool -> unit -(** [set_mark_tags b] turns on or off the tag-marking operation. *) +(** [set_mark_tags b] turns on or off the tag-marking operations. *) val get_print_tags : unit -> bool (** Return the current status of tag-printing operations. *) @@ -541,8 +552,9 @@ val set_formatter_out_channel : Pervasives.out_channel -> unit (** Redirect the standard pretty-printer output to the given channel. (All the output functions of the standard formatter are set to the default output functions printing to the given channel.) + [set_formatter_out_channel] is equivalent to - [pp_set_formatter_out_channel std_formatter]. + {!pp_set_formatter_out_channel} [std_formatter]. *) val set_formatter_output_functions : @@ -598,15 +610,15 @@ type formatter_out_functions = { By default: - fields [out_string] and [out_flush] are output device specific; - (e.g. [!Pervasives.output_string] and [!Pervasives.flush] for a - [!Pervasives.out_channel] device, or [Buffer.add_substring] and - [!Pervasives.ignore] for a [Buffer.t] output device), + (e.g. {!Pervasives.output_string} and {!Pervasives.flush} for a + {!Pervasives.out_channel} device, or [Buffer.add_substring] and + {!Pervasives.ignore} for a [Buffer.t] output device), - field [out_newline] is equivalent to [out_string "\n" 0 1]; - field [out_spaces] is equivalent to [out_string (String.make n ' ') 0 n]; - field [out_indent] is the same as field [out_spaces]. + @since 4.01.0 *) - val set_formatter_out_functions : formatter_out_functions -> unit (** [set_formatter_out_functions out_funs] Set all the pretty-printer output functions to those of argument @@ -616,17 +628,21 @@ val set_formatter_out_functions : formatter_out_functions -> unit something else than just printing space characters) and the meaning of new lines opening (which can be connected to any other action needed by the application at hand). -*) + Reasonable defaults for functions [out_spaces] and [out_newline] are + respectively [out_funs.out_string (String.make n ' ') 0 n] and + [out_funs.out_string "\n" 0 1]. + @since 4.01.0 +*) val get_formatter_out_functions : unit -> formatter_out_functions (** Return the current output functions of the pretty-printer, including line splitting and indentation functions. Useful to record the current setting and restore it afterwards. - @since 4.01.0 *) - + @since 4.01.0 +*) -(** {6:tagsmeaning Redefining semantic tags operations} *) +(** {6:tagsmeaning Redefining semantic tag operations} *) type formatter_tag_functions = { mark_open_tag : tag -> string; @@ -647,7 +663,7 @@ val set_formatter_tag_functions : formatter_tag_functions -> unit opening and closing semantic tag operations to use the functions in [tag_funs]. - When opening a semantic tag name [t], the string [t] is passed to the + When opening a semantic tag with name [t], the string [t] is passed to the opening tag-marking function (the [mark_open_tag] field of the record [tag_funs]), that must return the opening tag marker for that name. When the next call to [close_tag ()] happens, the semantic tag @@ -677,49 +693,48 @@ type formatter boxes simultaneously open, ellipsis, and so on, are specific to each formatter and may be fixed independently. - For instance, given a [!Buffer.t] buffer [b], [formatter_of_buffer b] + For instance, given a {!Buffer.t} buffer [b], {!formatter_of_buffer} [b] returns a new formatter using buffer [b] as its output device. - Similarly, given a [!Pervasives.out_channel] output channel [oc], - [formatter_of_out_channel oc] returns a new formatter using + Similarly, given a {!Pervasives.out_channel} output channel [oc], + {!formatter_of_out_channel} [oc] returns a new formatter using channel [oc] as its output device. Alternatively, given [out_funs], a complete set of output functions for a - formatter, then {!formatter_of_out_function out_funs} computes a new + formatter, then {!formatter_of_out_functions} [out_funs] computes a new formatter using those functions for output. - *) val formatter_of_out_channel : out_channel -> formatter (** [formatter_of_out_channel oc] returns a new formatter writing - to the corresponding channel [oc]. + to the corresponding output channel [oc]. *) val std_formatter : formatter (** The standard formatter to write to standard output. - It is defined as [formatter_of_out_channel stdout]. + It is defined as {!formatter_of_out_channel} {!Pervasives.stdout}. *) val err_formatter : formatter -(** A formatter to to write to standard error. +(** A formatter to write to standard error. - It is defined as [formatter_of_out_channel stderr]. + It is defined as {!formatter_of_out_channel} {!Pervasives.stderr}. *) val formatter_of_buffer : Buffer.t -> formatter (** [formatter_of_buffer b] returns a new formatter writing to buffer [b]. At the end of pretty-printing, the formatter must be flushed - using [pp_print_flush] or [pp_print_newline], to print all the pending - material into the buffer. + using {!pp_print_flush} or {!pp_print_newline}, to print all the + pending material into the buffer. *) val stdbuf : Buffer.t (** The string buffer in which [str_formatter] writes. *) val str_formatter : formatter -(** A formatter to output to the [stdbuf] string buffer. +(** A formatter to output to the {!stdbuf} string buffer. - [str_formatter] is defined as [formatter_of_buffer stdbuf]. + [str_formatter] is defined as {!formatter_of_buffer} {!stdbuf}. *) val flush_str_formatter : unit -> string @@ -732,15 +747,17 @@ val make_formatter : (** [make_formatter out flush] returns a new formatter that outputs with function [out], and flushes with function [flush]. - For instance, a formatter to the [!Pervasives.out_channel] [oc] is returned - by [make_formatter (!Pervasives.output oc) (fun () -> !Pervasives.flush - oc)]. + For instance, {[ + make_formatter + (Pervasives.output oc) + (fun () -> Pervasives.flush oc) ]} + returns a formatter to the {!Pervasives.out_channel} [oc]. *) val formatter_of_out_functions : formatter_out_functions -> formatter (** [formatter_of_out_functions out_funs] returns a new formatter that writes - with the set of output functions [out_funs]. + with the set of output functions [out_funs]. See definition of type {!formatter_out_functions} for the meaning of argument [out_funs]. @@ -748,16 +765,26 @@ val formatter_of_out_functions : @since 4.04.0 *) - (** {7 Symbolic pretty-printing} *) (** - Symbolic pretty-printing is pretty-printing with no low level output. + Symbolic pretty-printing is pretty-printing using a symbolic formatter, + i.e. a formatter that outputs symbolic pretty-printing items. When using a symbolic formatter, all regular pretty-printing activities occur but output material is symbolic and stored in a buffer of output items. At the end of pretty-printing, flushing the output buffer allows - post-processing of symbolic output before low level output operations. + post-processing of symbolic output before performing low level output + operations. + + In practice, first define a symbolic output buffer [b] using: + - [let sob = make_symbolic_output_buffer ()]. + Then define a symbolic formatter with: + - [let ppf = formatter_of_symbolic_output_buffer sob] + + Use symbolic formatter [ppf] as usual, and retrieve symbolic items at end + of pretty-printing by flushing symbolic output buffer [sob] with: + - [flush_symbolic_output_buffer sob]. *) type symbolic_output_item = @@ -886,11 +913,11 @@ val pp_set_formatter_out_functions : val pp_get_formatter_out_functions : formatter -> unit -> formatter_out_functions - (** These functions are the basic ones: usual functions operating on the standard formatter are defined via partial evaluation of these primitives. For instance, - [print_string] is equal to [pp_print_string std_formatter]. + {!print_string} is equal to {!pp_print_string} {!std_formatter}. + @since 4.01.0 *) @@ -901,7 +928,7 @@ val pp_print_list: (formatter -> 'a -> unit) -> (formatter -> 'a list -> unit) (** [pp_print_list ?pp_sep pp_v ppf l] prints items of list [l], using [pp_v] to print each item, and calling [pp_sep] - between items ([pp_sep] defaults to {!pp_print_cut}). + between items ([pp_sep] defaults to {!pp_print_cut}. Does nothing on empty lists. @since 4.02.0 @@ -981,8 +1008,8 @@ val fprintf : formatter -> ('a, formatter, unit) format -> 'a specification is any character string that does not contain the closing character ['>']. If omitted, the tag name defaults to the empty string. - For more details about semantic tags, see the functions [{!open_tag}] and - [{!close_tag}]. + For more details about semantic tags, see the functions {!open_tag} and + {!close_tag}. - [@\}]: close the most recently opened semantic tag. - [@?]: flush the pretty-printer as with [print_flush ()]. This is equivalent to the conversion [%!]. diff --git a/stdlib/int32.mli b/stdlib/int32.mli index 19d7897a22..f27d8c911c 100644 --- a/stdlib/int32.mli +++ b/stdlib/int32.mli @@ -128,10 +128,18 @@ external to_float : int32 -> float external of_string : string -> int32 = "caml_int32_of_string" (** Convert the given string to a 32-bit integer. - The string is read in decimal (by default) or in hexadecimal, - octal or binary if the string begins with [0x], [0o] or [0b] - respectively. - Raise [Failure "int_of_string"] if the given string is not + The string is read in decimal (by default, or if the string + begins with [0u]) or in hexadecimal, octal or binary if the + string begins with [0x], [0o] or [0b] respectively. + + The [0u] prefix reads the input as an unsigned integer in the range + [[0, 2*Int32.max_int+1]]. If the input exceeds {!Int32.max_int} + it is converted to the signed integer + [Int32.min_int + input - Int32.max_int - 1]. + + The [_] (underscore) character can appear anywhere in the string + and is ignored. + Raise [Failure "Int32.of_string"] if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type [int32]. *) diff --git a/stdlib/int64.mli b/stdlib/int64.mli index d8aacd53fd..8ee2669c67 100644 --- a/stdlib/int64.mli +++ b/stdlib/int64.mli @@ -150,10 +150,18 @@ external to_nativeint : int64 -> nativeint = "%int64_to_nativeint" external of_string : string -> int64 = "caml_int64_of_string" (** Convert the given string to a 64-bit integer. - The string is read in decimal (by default) or in hexadecimal, - octal or binary if the string begins with [0x], [0o] or [0b] - respectively. - Raise [Failure "int_of_string"] if the given string is not + The string is read in decimal (by default, or if the string + begins with [0u]) or in hexadecimal, octal or binary if the + string begins with [0x], [0o] or [0b] respectively. + + The [0u] prefix reads the input as an unsigned integer in the range + [[0, 2*Int64.max_int+1]]. If the input exceeds {!Int64.max_int} + it is converted to the signed integer + [Int64.min_int + input - Int64.max_int - 1]. + + The [_] (underscore) character can appear anywhere in the string + and is ignored. + Raise [Failure "Int64.of_string"] if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type [int64]. *) diff --git a/stdlib/nativeint.mli b/stdlib/nativeint.mli index b733318db4..683be52940 100644 --- a/stdlib/nativeint.mli +++ b/stdlib/nativeint.mli @@ -158,10 +158,16 @@ external to_int32 : nativeint -> int32 = "%nativeint_to_int32" external of_string : string -> nativeint = "caml_nativeint_of_string" (** Convert the given string to a native integer. - The string is read in decimal (by default) or in hexadecimal, - octal or binary if the string begins with [0x], [0o] or [0b] - respectively. - Raise [Failure "int_of_string"] if the given string is not + The string is read in decimal (by default, or if the string + begins with [0u]) or in hexadecimal, octal or binary if the + string begins with [0x], [0o] or [0b] respectively. + + The [0u] prefix reads the input as an unsigned integer in the range + [[0, 2*Nativeint.max_int+1]]. If the input exceeds {!Nativeint.max_int} + it is converted to the signed integer + [Int64.min_int + input - Nativeint.max_int - 1]. + + Raise [Failure "Nativeint.of_string"] if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type [nativeint]. *) diff --git a/stdlib/pervasives.ml b/stdlib/pervasives.ml index fc7d92187c..faa421871a 100644 --- a/stdlib/pervasives.ml +++ b/stdlib/pervasives.ml @@ -187,7 +187,7 @@ external classify_float : (float [@unboxed]) -> fpclass = (* String and byte sequence operations -- more in modules String and Bytes *) external string_length : string -> int = "%string_length" -external bytes_length : bytes -> int = "%string_length" +external bytes_length : bytes -> int = "%bytes_length" external bytes_create : int -> bytes = "caml_create_bytes" external string_blit : string -> int -> bytes -> int -> int -> unit = "caml_blit_string" [@@noalloc] @@ -258,7 +258,6 @@ let int_of_string_opt s = try Some (int_of_string s) with Failure _ -> None - external string_get : string -> int -> char = "%string_safe_get" let valid_float_lexem s = @@ -271,7 +270,6 @@ let valid_float_lexem s = in loop 0 - let string_of_float f = valid_float_lexem (format_float "%.12g" f) external float_of_string : string -> float = "caml_float_of_string" @@ -332,7 +330,13 @@ external out_channels_list : unit -> out_channel list let flush_all () = let rec iter = function [] -> () - | a :: l -> (try flush a with _ -> ()); iter l + | a::l -> + begin try + flush a + with Sys_error _ -> + () (* ignore channels closed during a preceding flush. *) + end; + iter l in iter (out_channels_list ()) external unsafe_output : out_channel -> bytes -> int -> int -> unit diff --git a/stdlib/pervasives.mli b/stdlib/pervasives.mli index c5af5c2a18..f6a6f1153e 100644 --- a/stdlib/pervasives.mli +++ b/stdlib/pervasives.mli @@ -623,9 +623,16 @@ val string_of_int : int -> string external int_of_string : string -> int = "caml_int_of_string" (** Convert the given string to an integer. - The string is read in decimal (by default), in hexadecimal (if it - begins with [0x] or [0X]), in octal (if it begins with [0o] or [0O]), - or in binary (if it begins with [0b] or [0B]). + The string is read in decimal (by default, or if the string + begins with [0u]), in hexadecimal (if it begins with [0x] or + [0X]), in octal (if it begins with [0o] or [0O]), or in binary + (if it begins with [0b] or [0B]). + + The [0u] prefix reads the input as an unsigned integer in the range + [[0, 2*max_int+1]]. If the input exceeds {!max_int} + it is converted to the signed integer + [min_int + input - max_int - 1]. + The [_] (underscore) character can appear anywhere in the string and is ignored. Raise [Failure "int_of_string"] if the given string is not diff --git a/stdlib/scanf.mli b/stdlib/scanf.mli index ea0d4ce752..b848164e1c 100644 --- a/stdlib/scanf.mli +++ b/stdlib/scanf.mli @@ -218,7 +218,7 @@ type ('a, 'b, 'c, 'd) scanner = For instance, the {!Scanf.scanf} function below has type [('a, 'b, 'c, 'd) scanner], since it is a formatted input function that reads from {!Scanning.stdin}: [scanf fmt f] applies [f] to the arguments - specified by [fmt], reading those arguments from [!Pervasives.stdin] as + specified by [fmt], reading those arguments from {!Pervasives.stdin} as expected. If the format [fmt] has some [%r] indications, the corresponding diff --git a/stdlib/string.ml b/stdlib/string.ml index 1d38227431..9a4b533fcf 100644 --- a/stdlib/string.ml +++ b/stdlib/string.ml @@ -50,7 +50,7 @@ let fill = let blit = B.blit_string -let ensure_ge x y = if x >= y then x else invalid_arg "String.concat" +let ensure_ge (x:int) y = if x >= y then x else invalid_arg "String.concat" let rec sum_lengths acc seplen = function | [] -> acc diff --git a/testsuite/makefiles/Makefile.common b/testsuite/makefiles/Makefile.common index 7e395b6800..43c232d6c7 100644 --- a/testsuite/makefiles/Makefile.common +++ b/testsuite/makefiles/Makefile.common @@ -71,6 +71,7 @@ defaultclean: .S.o: @$(ASPP) $(ASPPFLAGS) -DSYS_$(SYSTEM) -DMODEL_$(MODEL) -o $*.o $*.S +.PRECIOUS: %.s .s.o: @$(ASPP) $(ASPPFLAGS) -DSYS_$(SYSTEM) -o $*.o $*.s diff --git a/testsuite/tests/asmcomp/main.ml b/testsuite/tests/asmcomp/main.ml index da7601383c..c9eb2dca31 100644 --- a/testsuite/tests/asmcomp/main.ml +++ b/testsuite/tests/asmcomp/main.ml @@ -58,10 +58,10 @@ let main() = "-dreload", Arg.Set dump_reload, ""; "-dscheduling", Arg.Set dump_scheduling, ""; "-dlinear", Arg.Set dump_linear, ""; - "-dtimings", Arg.Set print_timings, ""; + "-dtimings", Arg.Unit (fun () -> profile_columns := [ `Time ]), ""; ] compile_file usage let () = main (); - if !Clflags.print_timings then Timings.print Format.std_formatter; + Profile.print Format.std_formatter !Clflags.profile_columns; exit 0 diff --git a/testsuite/tests/basic/eval_order_4.ml b/testsuite/tests/basic/eval_order_4.ml new file mode 100644 index 0000000000..8e29f4551c --- /dev/null +++ b/testsuite/tests/basic/eval_order_4.ml @@ -0,0 +1,17 @@ +(* PR#7531 *) + +let f = + (let _i = print_endline "first" + in fun q -> fun i -> "") (print_endline "x") + +let _ = + let k = + (let _i = print_int 1 + in fun q -> fun i -> "") () + in k (print_int 0) + +let () = + print_endline "foo"; + ignore ((f ()) : string); + ignore ((f ()) : string); + print_endline "bar" diff --git a/testsuite/tests/basic/eval_order_4.reference b/testsuite/tests/basic/eval_order_4.reference new file mode 100644 index 0000000000..426ddfda68 --- /dev/null +++ b/testsuite/tests/basic/eval_order_4.reference @@ -0,0 +1,4 @@ +x +first +10foo +bar diff --git a/testsuite/tests/formats-transition/ignored_scan_counters.ml b/testsuite/tests/formats-transition/ignored_scan_counters.ml index 307f8a59cf..2186a82dc1 100644 --- a/testsuite/tests/formats-transition/ignored_scan_counters.ml +++ b/testsuite/tests/formats-transition/ignored_scan_counters.ml @@ -1,5 +1,8 @@ (* Benoit's patch did not support %_[nlNL]; test their behavior *) +(* Ignore OCAMLRUNPARAM=b to be reproducible *) +Printexc.record_backtrace false;; + (* not supported by Printf or Format: fails at runtime *) let () = Printf.printf "%_n" ;; diff --git a/testsuite/tests/formats-transition/ignored_scan_counters.ml.reference b/testsuite/tests/formats-transition/ignored_scan_counters.ml.reference index 6d8d098b5a..55f8ee6855 100644 --- a/testsuite/tests/formats-transition/ignored_scan_counters.ml.reference +++ b/testsuite/tests/formats-transition/ignored_scan_counters.ml.reference @@ -1,5 +1,6 @@ -# Exception: Invalid_argument "Printf: bad conversion %_". +# - : unit = () +# Exception: Invalid_argument "Printf: bad conversion %_". # Exception: Invalid_argument "Printf: bad conversion %_". # Exception: Invalid_argument "Printf: bad conversion %_". # Exception: Invalid_argument "Printf: bad conversion %_". diff --git a/testsuite/tests/lexing/Makefile b/testsuite/tests/lexing/Makefile new file mode 100644 index 0000000000..9625a3fbc3 --- /dev/null +++ b/testsuite/tests/lexing/Makefile @@ -0,0 +1,3 @@ +BASEDIR=../.. +include $(BASEDIR)/makefiles/Makefile.toplevel +include $(BASEDIR)/makefiles/Makefile.common diff --git a/testsuite/tests/lexing/uchar_esc.ml b/testsuite/tests/lexing/uchar_esc.ml new file mode 100644 index 0000000000..b288ac2561 --- /dev/null +++ b/testsuite/tests/lexing/uchar_esc.ml @@ -0,0 +1,34 @@ + +(* Correct escapes and their encoding *) + +let () = + assert ("\xF0\x9F\x90\xAB" = "\u{1F42B}"); + assert ("\xF0\x9F\x90\xAB" = "\u{01F42B}"); + assert ("\x00" = "\u{0}"); + assert ("\x00" = "\u{00}"); + assert ("\x00" = "\u{000}"); + assert ("\x00" = "\u{0000}"); + assert ("\x00" = "\u{00000}"); + assert ("\x00" = "\u{000000}"); + assert ("\xC3\xA9" = "\u{E9}"); + assert ("\xC3\xA9" = "\u{0E9}"); + assert ("\xC3\xA9" = "\u{00E9}"); + assert ("\xC3\xA9" = "\u{000E9}"); + assert ("\xC3\xA9" = "\u{0000E9}"); + assert ("\xC3\xA9" = "\u{0000E9}"); + assert ("\xF4\x8F\xBF\xBF" = "\u{10FFFF}"); + () +;; + + +(* Errors *) + +let invalid_sv = "\u{0D800}" ;; +let invalid_sv = "\u{D800}" ;; +let invalid_sv = "\u{D900}" ;; +let invalid_sv = "\u{DFFF}" ;; +let invalid_sv = "\u{110000} ;; + +let too_many_digits = "\u{01234567}" ;; +let no_hex_digits = "\u{}" ;; +let illegal_hex_digit = "\u{u}" ;; diff --git a/testsuite/tests/lexing/uchar_esc.ml.reference b/testsuite/tests/lexing/uchar_esc.ml.reference new file mode 100644 index 0000000000..8730059c99 --- /dev/null +++ b/testsuite/tests/lexing/uchar_esc.ml.reference @@ -0,0 +1,36 @@ + +# # Characters 34-43: + let invalid_sv = "\u{0D800}" ;; + ^^^^^^^^^ +Error: Illegal backslash escape in string or character (\u{0D800}, D800 is not a Unicode scalar value) +# Characters 18-26: + let invalid_sv = "\u{D800}" ;; + ^^^^^^^^ +Error: Illegal backslash escape in string or character (\u{D800}, D800 is not a Unicode scalar value) +# Characters 18-26: + let invalid_sv = "\u{D900}" ;; + ^^^^^^^^ +Error: Illegal backslash escape in string or character (\u{D900}, D900 is not a Unicode scalar value) +# Characters 18-26: + let invalid_sv = "\u{DFFF}" ;; + ^^^^^^^^ +Error: Illegal backslash escape in string or character (\u{DFFF}, DFFF is not a Unicode scalar value) +# Characters 18-28: + let invalid_sv = "\u{110000} ;; + ^^^^^^^^^^ +Error: Illegal backslash escape in string or character (\u{110000}, 110000 is not a Unicode scalar value) +# Characters 24-36: + let too_many_digits = "\u{01234567}" ;; + ^^^^^^^^^^^^ +Error: Illegal backslash escape in string or character (\u{01234567}, too many digits, expected 1 to 6 hexadecimal digits) +# Characters 21-23: + let no_hex_digits = "\u{}" ;; + ^^ +Warning 14: illegal backslash escape in string. +val no_hex_digits : string = "\\u{}" +# Characters 25-27: + let illegal_hex_digit = "\u{u}" ;; + ^^ +Warning 14: illegal backslash escape in string. +val illegal_hex_digit : string = "\\u{u}" +# diff --git a/testsuite/tests/lib-arg/testarg.ml b/testsuite/tests/lib-arg/testarg.ml index 380f420cd8..110023754e 100644 --- a/testsuite/tests/lib-arg/testarg.ml +++ b/testsuite/tests/lib-arg/testarg.ml @@ -187,3 +187,18 @@ let test_expand spec argv reference = test_expand (expand1@spec) args1 expected1;; test_expand (expand2@spec) args2 expected2;; + +let test_align () = + let spec = + [ + "-foo", Arg.String ignore, "FOO Do foo with FOO"; + "-bar", Arg.Tuple [Arg.String ignore; Arg.String ignore], "FOO BAR\tDo bar with FOO and BAR"; + "-cha", Arg.Unit ignore, " Another option"; + "-sym", Arg.Symbol (["a"; "b"], ignore), "\ty\tfoo"; + "-sym2", Arg.Symbol (["a"; "b"], ignore), "x bar"; + ] + in + print_endline (Arg.usage_string (Arg.align spec) "") +;; + +test_align ();; diff --git a/testsuite/tests/lib-arg/testarg.reference b/testsuite/tests/lib-arg/testarg.reference index e69de29bb2..6049276299 100644 --- a/testsuite/tests/lib-arg/testarg.reference +++ b/testsuite/tests/lib-arg/testarg.reference @@ -0,0 +1,11 @@ + + -foo FOO Do foo with FOO + -bar FOO BAR Do bar with FOO and BAR + -cha Another option + -sym {a|b} + y foo + -sym2 {a|b} + x bar + -help Display this list of options + --help Display this list of options + diff --git a/testsuite/tests/lib-bigarray/change_layout.ml b/testsuite/tests/lib-bigarray/change_layout.ml new file mode 100644 index 0000000000..506b545bf0 --- /dev/null +++ b/testsuite/tests/lib-bigarray/change_layout.ml @@ -0,0 +1,142 @@ +(** Test the various change_layout for Genarray and the various Array[n] *) + +open Bigarray + +let pp_sep ppf () = Format.fprintf ppf ";@ " + let print_array pp ppf a = + Format.fprintf ppf "@[<hov>⟦%a⟧@]" + Format.(pp_print_list ~pp_sep pp) (Array.to_list a) + +let print_index = print_array Format.pp_print_int + +let do_test n test = + let rec aux l n = + if n = 0 then l + else + aux + begin match test (n-1) with + | Some error -> error :: l + | None -> l + end + (n-1) in + aux [] n + +let kind = float64 + +let c = c_layout +let fortran = fortran_layout + +let rank = 5 +let dims = Array.init rank (fun n -> n+2) +let size = Array.fold_left ( * ) 1 dims + +let report s test = + let errors = do_test size test in + if errors = [] then + Format.printf"@[%s: Ok@]@." s + else + Format.printf "@[%s:@;Failed at indices @[<hov>%a@]@]@." s + (Format.pp_print_list ~pp_sep print_index) + errors + +let array = + let a = Array1.create kind c size in + for i = 0 to size - 1 do a.{i} <- float i done; + a + +(** Test for generic biggarray *) +let gen = reshape (genarray_of_array1 array) dims + +let sizes = + let a = Array.make rank 1 in + let _ = Array.fold_left (fun (i,s) x -> a.(i)<- s; (i+1, s * x)) (0,1) dims in + a + +let multi_index n = + Array.init rank ( fun i -> (n / sizes.(i)) mod dims.(i) ) + +let testG n = + let pos = multi_index n in + let initial = Genarray.get gen pos in + Genarray.set gen pos (-1.); + let different = Genarray.get gen pos <> initial in + let gen' = Genarray.change_layout gen fortran in + Genarray.set gen' ( Array.init rank @@ fun n -> 1 + pos.( rank - 1 - n ) ) initial; + if not (different && initial = Genarray.get gen pos) then Some pos + else None + +;; +report "Generic rank test" testG +;; + +(* Scalar *) +let scalar = + let a = Array0.create kind c in + Array0.set a 0.; a +;; +let test = + let a' = Array0.change_layout scalar fortran in + Array0.set a' 1.; + Array0.get scalar = 1. + +;; +Format.printf "Scalar test: %s@." (if test then "Ok" else "Failed") +;; + +(* Vector *) +let vec = array1_of_genarray @@ reshape gen [|size|] +let test1 i = + let initial = vec.{i} in + vec.{i} <- -1.; + let different = vec.{i} <> initial in + let vec' = Array1.change_layout vec fortran in + vec'.{ i + 1 } <- initial; + if different && initial = vec.{i} then None + else Some [|i|] + +;; +report "Rank-1 array test" test1 +;; + +(* Matrix *) +let mat = array2_of_genarray @@ reshape gen [|dims.(0); size / dims.(0) |] +let bi_index n = n mod dims.(0), n / dims.(0) + +let test2 n = + let i, j = bi_index n in + let initial = mat.{i,j} in + mat.{i,j} <- -1.; + let different = mat.{i,j} <> initial in + let mat' = Array2.change_layout mat fortran in + mat'.{ j + 1, i + 1 } <- initial; + if different && initial = mat.{i, j} then None + else Some [|i; j|] + + +;; +report "Rank-2 array test" test2 +;; + +(* Rank 3 *) +let t3 = array3_of_genarray @@ + reshape gen [|dims.(0); dims.(1); size / (dims.(0) * dims.(1)) |] + +let tri_index n = + n mod dims.(0), + (n/ dims.(0)) mod dims.(1), + n / (dims.(0) * dims.(1)) + +let test3 n = + let i, j, k = tri_index n in + let initial = t3.{i,j,k} in + t3.{i,j,k} <- -1.; + let different = t3.{i,j,k} <> initial in + let t3' = Array3.change_layout t3 fortran in + t3'.{ k + 1, j + 1, i + 1 } <- initial; + if different && initial = t3.{i, j, k} then None + else Some [|i;j;k|] + + +;; +report "Rank-3 array test" test3 +;; diff --git a/testsuite/tests/lib-bigarray/change_layout.reference b/testsuite/tests/lib-bigarray/change_layout.reference new file mode 100644 index 0000000000..bab576ec8c --- /dev/null +++ b/testsuite/tests/lib-bigarray/change_layout.reference @@ -0,0 +1,5 @@ +Generic rank test: Ok +Scalar test: Ok +Rank-1 array test: Ok +Rank-2 array test: Ok +Rank-3 array test: Ok diff --git a/testsuite/tests/lib-unix/cmdline_prog.c b/testsuite/tests/lib-unix/cmdline_prog.c new file mode 100644 index 0000000000..c67a75633b --- /dev/null +++ b/testsuite/tests/lib-unix/cmdline_prog.c @@ -0,0 +1,10 @@ +#include <stdio.h> + +int main (int argc, char *argv[]) +{ + int i; + for (i = 1; i < argc; i ++) { + printf ("%s\n", argv[i]); + } + return 0; +} diff --git a/testsuite/tests/lib-unix/common/Makefile b/testsuite/tests/lib-unix/common/Makefile index 2883a8aeb4..706137bead 100644 --- a/testsuite/tests/lib-unix/common/Makefile +++ b/testsuite/tests/lib-unix/common/Makefile @@ -23,11 +23,15 @@ ADD_BYTERUN_FLAGS="-I $(OTOPDIR)/otherlibs/win32unix" endif default: reflector.exe fdstatus.exe cmdline_prog.exe - $(MAKE) check + @$(MAKE) check include $(BASEDIR)/makefiles/Makefile.several include $(BASEDIR)/makefiles/Makefile.common %.exe: %.c - @$(CC) $(CFLAGS) $(CPPFLAGS) $(if $(filter msvc,$(CCOMPTYPE)),/Fe$*.exe,-o $*.exe) $*.c - +ifeq ($(CCOMPTYPE),msvc) + @set -o pipefail ; \ + $(CC) $(CFLAGS) $(CPPFLAGS) /Fe$*.exe $*.c | tail -n +2 +else + @$(CC) $(CFLAGS) $(CPPFLAGS) -o $*.exe $*.c +endif diff --git a/testsuite/tests/lib-unix/common/cloexec.ml b/testsuite/tests/lib-unix/common/cloexec.ml index 462882b1be..d7e1e29245 100644 --- a/testsuite/tests/lib-unix/common/cloexec.ml +++ b/testsuite/tests/lib-unix/common/cloexec.ml @@ -6,7 +6,11 @@ let string_of_fd (fd: Unix.file_descr) : string = match Sys.os_type with | "Unix" | "Cygwin" -> string_of_int (Obj.magic fd : int) - | "Win32" -> Int32.to_string (Obj.magic fd : int32) + | "Win32" -> + if Sys.word_size = 32 then + Int32.to_string (Obj.magic fd : int32) + else + Int64.to_string (Obj.magic fd : int64) | _ -> assert false let _ = @@ -33,7 +37,7 @@ let _ = try Unix.(socketpair ~cloexec:true PF_UNIX SOCK_STREAM 0) with Invalid_argument _ -> (p2, p2') in - let fds = [| f0;f1;f2; d0;d1;d2; + let fds = [| f0;f1;f2; d0;d1;d2; p0;p0';p1;p1';p2;p2'; s0;s1;s2; x0;x0';x1;x1';x2;x2' |] in @@ -45,4 +49,3 @@ let _ = ignore (Unix.waitpid [] pid); Array.iter (fun fd -> try Unix.close fd with Unix.Unix_error _ -> ()) fds; Sys.remove "tmp.txt" - diff --git a/testsuite/tests/lib-unix/common/fdstatus.c b/testsuite/tests/lib-unix/common/fdstatus.c index 6a052d6e6c..b87704188d 100644 --- a/testsuite/tests/lib-unix/common/fdstatus.c +++ b/testsuite/tests/lib-unix/common/fdstatus.c @@ -16,13 +16,17 @@ void process_fd(char * s) HANDLE h; DWORD flags; +#ifdef _WIN64 + h = (HANDLE) _atoi64(s); +#else h = (HANDLE) atoi(s); +#endif if (GetHandleInformation(h, &flags)) { printf("open\n"); } else if (GetLastError() == ERROR_INVALID_HANDLE) { printf("closed\n"); } else { - printf("error %d\n", GetLastError()); + printf("error %lu\n", (unsigned long)(GetLastError())); } } diff --git a/testsuite/tests/lib-unix/test_unix_cmdline.ml b/testsuite/tests/lib-unix/test_unix_cmdline.ml new file mode 100644 index 0000000000..f0f7679b08 --- /dev/null +++ b/testsuite/tests/lib-unix/test_unix_cmdline.ml @@ -0,0 +1,28 @@ +open Unix + +let prog_name = "cmdline_prog.exe" + +let run args = + let out, inp = pipe () in + let in_chan = in_channel_of_descr out in + set_binary_mode_in in_chan false; + let pid = create_process ("./" ^ prog_name) (Array.of_list (prog_name :: args)) Unix.stdin inp Unix.stderr in + List.iter (fun arg -> + let s = input_line in_chan in + Printf.printf "%S -> %S [%s]\n" arg s (if s = arg then "OK" else "FAIL") + ) args; + close_in in_chan; + let _, exit = waitpid [] pid in + assert (exit = WEXITED 0) + +let () = + List.iter run + [ + [""; ""; "\t \011"]; + ["a"; "b"; "c.txt@!"]; + ["\""]; + [" "; " a "; " \" \\\" "]; + [" \\ \\ \\\\\\"]; + [" \"hola \""]; + ["a\tb"]; + ] diff --git a/testsuite/tests/lib-unix/test_unix_cmdline.reference b/testsuite/tests/lib-unix/test_unix_cmdline.reference new file mode 100644 index 0000000000..7d2f2c2a91 --- /dev/null +++ b/testsuite/tests/lib-unix/test_unix_cmdline.reference @@ -0,0 +1,13 @@ +"" -> "" [OK] +"" -> "" [OK] +"\t \011" -> "\t \011" [OK] +"a" -> "a" [OK] +"b" -> "b" [OK] +"c.txt@!" -> "c.txt@!" [OK] +"\"" -> "\"" [OK] +" " -> " " [OK] +" a " -> " a " [OK] +" \" \\\" " -> " \" \\\" " [OK] +" \\ \\ \\\\\\" -> " \\ \\ \\\\\\" [OK] +" \"hola \"" -> " \"hola \"" [OK] +"a\tb" -> "a\tb" [OK] diff --git a/testsuite/tests/lib-unix/win-symlink/Makefile b/testsuite/tests/lib-unix/win-symlink/Makefile new file mode 100755 index 0000000000..c0c031ac09 --- /dev/null +++ b/testsuite/tests/lib-unix/win-symlink/Makefile @@ -0,0 +1,16 @@ +BASEDIR=../../.. +LIBRARIES=unix +ADD_COMPFLAGS=-I $(OTOPDIR)/otherlibs/$(UNIXLIBVAR)unix +LD_PATH=$(TOPDIR)/otherlibs/$(UNIXLIBVAR)unix +MAIN_MODULE=test +TEST_TEMP_FILES=link1 link2 test.txt + +test: + @if $(OCAML) $(ADD_COMPFLAGS) unix.cma precheck.ml; then \ + $(MAKE) default; \ + else \ + echo " ... testing => skipped (not on Windows and/or symlinks not allowed)"; \ + fi + +include $(BASEDIR)/makefiles/Makefile.one +include $(BASEDIR)/makefiles/Makefile.common diff --git a/testsuite/tests/lib-unix/win-symlink/precheck.ml b/testsuite/tests/lib-unix/win-symlink/precheck.ml new file mode 100755 index 0000000000..85c9550f23 --- /dev/null +++ b/testsuite/tests/lib-unix/win-symlink/precheck.ml @@ -0,0 +1,2 @@ +let () = + exit (if Sys.win32 && Unix.has_symlink () then 0 else 1) diff --git a/testsuite/tests/lib-unix/win-symlink/test.ml b/testsuite/tests/lib-unix/win-symlink/test.ml new file mode 100755 index 0000000000..0c8556d238 --- /dev/null +++ b/testsuite/tests/lib-unix/win-symlink/test.ml @@ -0,0 +1,19 @@ +let link1 = "link1" +let link2 = "link2" + +let link_exists s = + try (Unix.lstat s).Unix.st_kind = Unix.S_LNK with _ -> false + +let main () = + close_out (open_out "test.txt"); + if link_exists link1 then Sys.remove link1; + if link_exists link2 then Sys.remove link2; + Unix.symlink ~to_dir:false ".\\test.txt" link1; + assert ((Unix.stat link1).Unix.st_kind = Unix.S_REG); + print_endline "Unix.symlink works with backwards slashes"; + Unix.symlink ~to_dir:false "./test.txt" link2; + assert ((Unix.stat link2).Unix.st_kind = Unix.S_REG); + print_endline "Unix.symlink works with forward slashes" + +let () = + Unix.handle_unix_error main () diff --git a/testsuite/tests/lib-unix/win-symlink/test.reference b/testsuite/tests/lib-unix/win-symlink/test.reference new file mode 100644 index 0000000000..871a3e019e --- /dev/null +++ b/testsuite/tests/lib-unix/win-symlink/test.reference @@ -0,0 +1,2 @@ +Unix.symlink works with backwards slashes +Unix.symlink works with forward slashes diff --git a/testsuite/tests/parsetree/source.ml b/testsuite/tests/parsetree/source.ml index 896eb52713..ef67a9746a 100644 --- a/testsuite/tests/parsetree/source.ml +++ b/testsuite/tests/parsetree/source.ml @@ -7294,3 +7294,22 @@ let f = function _::(_::_ [@foo]) -> () | _ -> ();; function {contents=contents[@foo]} -> ();; fun contents -> {contents=contents[@foo]};; ((); (((); ())[@foo]));; + +(* https://github.com/LexiFi/gen_js_api/issues/61 *) + +let () = foo##.bar := ();; + +(* "let open" in classes and class types *) + +class c = + let open M in + object + method f : t = x + end +;; +class type ct = + let open M in + object + method f : t + end +;; diff --git a/testsuite/tests/printing-types/Makefile b/testsuite/tests/printing-types/Makefile new file mode 100644 index 0000000000..9625a3fbc3 --- /dev/null +++ b/testsuite/tests/printing-types/Makefile @@ -0,0 +1,3 @@ +BASEDIR=../.. +include $(BASEDIR)/makefiles/Makefile.toplevel +include $(BASEDIR)/makefiles/Makefile.common diff --git a/testsuite/tests/printing-types/pr248.ml b/testsuite/tests/printing-types/pr248.ml new file mode 100644 index 0000000000..6f83e57e1e --- /dev/null +++ b/testsuite/tests/printing-types/pr248.ml @@ -0,0 +1,13 @@ +(** Test that weak variables keep their names long enough *) + +let f y = fun x -> x +let blah = f 0 +let splash () = blah (failwith "coucou") +let blurp = f 0;; + +blah 1;; + +let g = f ();; + +g (fun x -> x);; +let h = g (f ());; diff --git a/testsuite/tests/printing-types/pr248.ml.reference b/testsuite/tests/printing-types/pr248.ml.reference new file mode 100644 index 0000000000..44c9fad249 --- /dev/null +++ b/testsuite/tests/printing-types/pr248.ml.reference @@ -0,0 +1,10 @@ + +# val f : 'a -> 'b -> 'b = <fun> +val blah : '_weak1 -> '_weak1 = <fun> +val splash : unit -> '_weak1 = <fun> +val blurp : '_weak2 -> '_weak2 = <fun> +# - : int = 1 +# val g : '_weak3 -> '_weak3 = <fun> +# - : '_weak4 -> '_weak4 = <fun> +# val h : '_weak4 -> '_weak4 = <fun> +# diff --git a/testsuite/tests/tool-command-line/Makefile b/testsuite/tests/tool-command-line/Makefile index b2200c6b3f..148dafa202 100644 --- a/testsuite/tests/tool-command-line/Makefile +++ b/testsuite/tests/tool-command-line/Makefile @@ -17,7 +17,7 @@ BASEDIR=../.. default: - $(MAKE) byte + @$(MAKE) byte @if $(BYTECODE_ONLY); then $(MAKE) opt-skipped ; else \ $(MAKE) opt; \ fi diff --git a/testsuite/tests/translprim/module_coercion.ml.reference b/testsuite/tests/translprim/module_coercion.ml.reference index ca77102029..27cd3f7329 100644 --- a/testsuite/tests/translprim/module_coercion.ml.reference +++ b/testsuite/tests/translprim/module_coercion.ml.reference @@ -1,115 +1,125 @@ (setglobal Module_coercion! - (let (M = (makeblock 0)) + (let + (M = (module-defn(M) module_coercion.ml(1):0-699 (makeblock 0))) (makeblock 0 M - (makeblock 0 (function prim stub (array.length[int] prim)) - (function prim prim stub - (array.get[int] prim prim)) - (function prim prim stub - (array.unsafe_get[int] prim prim)) - (function prim prim prim stub - (array.set[int] prim prim prim)) - (function prim prim prim stub - (array.unsafe_set[int] prim prim prim)) - (function prim prim stub - (caml_int_compare prim prim)) - (function prim prim stub (== prim prim)) - (function prim prim stub (!= prim prim)) - (function prim prim stub (< prim prim)) - (function prim prim stub (> prim prim)) - (function prim prim stub (<= prim prim)) - (function prim prim stub (>= prim prim))) - (makeblock 0 (function prim stub (array.length[float] prim)) - (function prim prim stub - (array.get[float] prim prim)) - (function prim prim stub - (array.unsafe_get[float] prim prim)) - (function prim prim prim stub - (array.set[float] prim prim prim)) - (function prim prim prim stub - (array.unsafe_set[float] prim prim prim)) - (function prim prim stub - (caml_float_compare prim prim)) - (function prim prim stub (==. prim prim)) - (function prim prim stub (!=. prim prim)) - (function prim prim stub (<. prim prim)) - (function prim prim stub (>. prim prim)) - (function prim prim stub (<=. prim prim)) - (function prim prim stub (>=. prim prim))) - (makeblock 0 (function prim stub (array.length[addr] prim)) - (function prim prim stub - (array.get[addr] prim prim)) - (function prim prim stub - (array.unsafe_get[addr] prim prim)) - (function prim prim prim stub - (array.set[addr] prim prim prim)) - (function prim prim prim stub - (array.unsafe_set[addr] prim prim prim)) - (function prim prim stub - (caml_string_compare prim prim)) - (function prim prim stub - (caml_string_equal prim prim)) - (function prim prim stub - (caml_string_notequal prim prim)) - (function prim prim stub - (caml_string_lessthan prim prim)) - (function prim prim stub - (caml_string_greaterthan prim prim)) - (function prim prim stub - (caml_string_lessequal prim prim)) - (function prim prim stub - (caml_string_greaterequal prim prim))) - (makeblock 0 (function prim stub (array.length[addr] prim)) - (function prim prim stub - (array.get[addr] prim prim)) - (function prim prim stub - (array.unsafe_get[addr] prim prim)) - (function prim prim prim stub - (array.set[addr] prim prim prim)) - (function prim prim prim stub - (array.unsafe_set[addr] prim prim prim)) - (function prim prim stub - (caml_int32_compare prim prim)) - (function prim prim stub (Int32.== prim prim)) - (function prim prim stub (Int32.!= prim prim)) - (function prim prim stub (Int32.< prim prim)) - (function prim prim stub (Int32.> prim prim)) - (function prim prim stub (Int32.<= prim prim)) - (function prim prim stub (Int32.>= prim prim))) - (makeblock 0 (function prim stub (array.length[addr] prim)) - (function prim prim stub - (array.get[addr] prim prim)) - (function prim prim stub - (array.unsafe_get[addr] prim prim)) - (function prim prim prim stub - (array.set[addr] prim prim prim)) - (function prim prim prim stub - (array.unsafe_set[addr] prim prim prim)) - (function prim prim stub - (caml_int64_compare prim prim)) - (function prim prim stub (Int64.== prim prim)) - (function prim prim stub (Int64.!= prim prim)) - (function prim prim stub (Int64.< prim prim)) - (function prim prim stub (Int64.> prim prim)) - (function prim prim stub (Int64.<= prim prim)) - (function prim prim stub (Int64.>= prim prim))) - (makeblock 0 (function prim stub (array.length[addr] prim)) - (function prim prim stub - (array.get[addr] prim prim)) - (function prim prim stub - (array.unsafe_get[addr] prim prim)) - (function prim prim prim stub - (array.set[addr] prim prim prim)) - (function prim prim prim stub - (array.unsafe_set[addr] prim prim prim)) - (function prim prim stub - (caml_nativeint_compare prim prim)) - (function prim prim stub - (Nativeint.== prim prim)) - (function prim prim stub - (Nativeint.!= prim prim)) - (function prim prim stub (Nativeint.< prim prim)) - (function prim prim stub (Nativeint.> prim prim)) - (function prim prim stub - (Nativeint.<= prim prim)) - (function prim prim stub - (Nativeint.>= prim prim)))))) + (module-defn(M_int) module_coercion.ml(32):1116-1155 + (makeblock 0 (function prim stub (array.length[int] prim)) + (function prim prim stub + (array.get[int] prim prim)) + (function prim prim stub + (array.unsafe_get[int] prim prim)) + (function prim prim prim stub + (array.set[int] prim prim prim)) + (function prim prim prim stub + (array.unsafe_set[int] prim prim prim)) + (function prim prim stub + (caml_int_compare prim prim)) + (function prim prim stub (== prim prim)) + (function prim prim stub (!= prim prim)) + (function prim prim stub (< prim prim)) + (function prim prim stub (> prim prim)) + (function prim prim stub (<= prim prim)) + (function prim prim stub (>= prim prim)))) + (module-defn(M_float) module_coercion.ml(33):1158-1201 + (makeblock 0 + (function prim stub (array.length[float] prim)) + (function prim prim stub + (array.get[float] prim prim)) + (function prim prim stub + (array.unsafe_get[float] prim prim)) + (function prim prim prim stub + (array.set[float] prim prim prim)) + (function prim prim prim stub + (array.unsafe_set[float] prim prim prim)) + (function prim prim stub + (caml_float_compare prim prim)) + (function prim prim stub (==. prim prim)) + (function prim prim stub (!=. prim prim)) + (function prim prim stub (<. prim prim)) + (function prim prim stub (>. prim prim)) + (function prim prim stub (<=. prim prim)) + (function prim prim stub (>=. prim prim)))) + (module-defn(M_string) module_coercion.ml(34):1204-1249 + (makeblock 0 (function prim stub (array.length[addr] prim)) + (function prim prim stub + (array.get[addr] prim prim)) + (function prim prim stub + (array.unsafe_get[addr] prim prim)) + (function prim prim prim stub + (array.set[addr] prim prim prim)) + (function prim prim prim stub + (array.unsafe_set[addr] prim prim prim)) + (function prim prim stub + (caml_string_compare prim prim)) + (function prim prim stub + (caml_string_equal prim prim)) + (function prim prim stub + (caml_string_notequal prim prim)) + (function prim prim stub + (caml_string_lessthan prim prim)) + (function prim prim stub + (caml_string_greaterthan prim prim)) + (function prim prim stub + (caml_string_lessequal prim prim)) + (function prim prim stub + (caml_string_greaterequal prim prim)))) + (module-defn(M_int32/1104) module_coercion.ml(35):1252-1295 + (makeblock 0 (function prim stub (array.length[addr] prim)) + (function prim prim stub + (array.get[addr] prim prim)) + (function prim prim stub + (array.unsafe_get[addr] prim prim)) + (function prim prim prim stub + (array.set[addr] prim prim prim)) + (function prim prim prim stub + (array.unsafe_set[addr] prim prim prim)) + (function prim prim stub + (caml_int32_compare prim prim)) + (function prim prim stub (Int32.== prim prim)) + (function prim prim stub (Int32.!= prim prim)) + (function prim prim stub (Int32.< prim prim)) + (function prim prim stub (Int32.> prim prim)) + (function prim prim stub (Int32.<= prim prim)) + (function prim prim stub (Int32.>= prim prim)))) + (module-defn(M_int64/1129) module_coercion.ml(36):1298-1341 + (makeblock 0 (function prim stub (array.length[addr] prim)) + (function prim prim stub + (array.get[addr] prim prim)) + (function prim prim stub + (array.unsafe_get[addr] prim prim)) + (function prim prim prim stub + (array.set[addr] prim prim prim)) + (function prim prim prim stub + (array.unsafe_set[addr] prim prim prim)) + (function prim prim stub + (caml_int64_compare prim prim)) + (function prim prim stub (Int64.== prim prim)) + (function prim prim stub (Int64.!= prim prim)) + (function prim prim stub (Int64.< prim prim)) + (function prim prim stub (Int64.> prim prim)) + (function prim prim stub (Int64.<= prim prim)) + (function prim prim stub (Int64.>= prim prim)))) + (module-defn(M_nativeint) module_coercion.ml(37):1344-1395 + (makeblock 0 (function prim stub (array.length[addr] prim)) + (function prim prim stub + (array.get[addr] prim prim)) + (function prim prim stub + (array.unsafe_get[addr] prim prim)) + (function prim prim prim stub + (array.set[addr] prim prim prim)) + (function prim prim prim stub + (array.unsafe_set[addr] prim prim prim)) + (function prim prim stub + (caml_nativeint_compare prim prim)) + (function prim prim stub + (Nativeint.== prim prim)) + (function prim prim stub + (Nativeint.!= prim prim)) + (function prim prim stub + (Nativeint.< prim prim)) + (function prim prim stub + (Nativeint.> prim prim)) + (function prim prim stub + (Nativeint.<= prim prim)) + (function prim prim stub + (Nativeint.>= prim prim))))))) diff --git a/testsuite/tests/typing-extensions/cast.ml b/testsuite/tests/typing-extensions/cast.ml index 855f4df76c..1efcfd5090 100644 --- a/testsuite/tests/typing-extensions/cast.ml +++ b/testsuite/tests/typing-extensions/cast.ml @@ -1,3 +1,5 @@ +(* Ignore OCAMLRUNPARAM=b to be reproducible *) +Printexc.record_backtrace false;; (* By using two types we can have a recursive constraint *) type 'a class_name = .. constraint 'a = < cast: 'a. 'a name -> 'a; ..> diff --git a/testsuite/tests/typing-extensions/cast.ml.reference b/testsuite/tests/typing-extensions/cast.ml.reference index 468a7c9454..3478d60fab 100644 --- a/testsuite/tests/typing-extensions/cast.ml.reference +++ b/testsuite/tests/typing-extensions/cast.ml.reference @@ -1,4 +1,5 @@ +# - : unit = () # type 'b class_name = .. constraint 'b = < cast : 'a. 'a name -> 'a; .. > and 'a name = Class : 'a class_name -> (< cast : 'a0. 'a0 name -> 'a0; .. > as 'a) name diff --git a/testsuite/tests/typing-extensions/extensions.ml b/testsuite/tests/typing-extensions/extensions.ml index edb14c8b22..f6d6c9005b 100644 --- a/testsuite/tests/typing-extensions/extensions.ml +++ b/testsuite/tests/typing-extensions/extensions.ml @@ -1,3 +1,5 @@ +(* Ignore OCAMLRUNPARAM=b to be reproducible *) +Printexc.record_backtrace false;; type foo = .. ;; diff --git a/testsuite/tests/typing-extensions/extensions.ml.reference b/testsuite/tests/typing-extensions/extensions.ml.reference index bd814df8a3..ea2cfb8cd2 100644 --- a/testsuite/tests/typing-extensions/extensions.ml.reference +++ b/testsuite/tests/typing-extensions/extensions.ml.reference @@ -1,4 +1,5 @@ +# - : unit = () # type foo = .. # type foo += A | B of int # val is_a : foo -> bool = <fun> diff --git a/testsuite/tests/typing-gadts/omega07.ml b/testsuite/tests/typing-gadts/omega07.ml index 6c729abe8d..5fd175c3e4 100644 --- a/testsuite/tests/typing-gadts/omega07.ml +++ b/testsuite/tests/typing-gadts/omega07.ml @@ -898,11 +898,11 @@ val _0 : ((zero, int, 'a) rcons, int) lam = Var Zero val suc : (('a, 'b, (suc, int -> int, 'c) rcons) rcons, int) lam -> (('a, 'b, (suc, int -> int, 'c) rcons) rcons, int) lam = <fun> -val _1 : ((zero, int, (suc, int -> int, '_a) rcons) rcons, int) lam = +val _1 : ((zero, int, (suc, int -> int, '_weak1) rcons) rcons, int) lam = App (Shift (Var Suc), Var Zero) -val _2 : ((zero, int, (suc, int -> int, '_a) rcons) rcons, int) lam = +val _2 : ((zero, int, (suc, int -> int, '_weak2) rcons) rcons, int) lam = App (Shift (Var Suc), App (Shift (Var Suc), Var Zero)) -val _3 : ((zero, int, (suc, int -> int, '_a) rcons) rcons, int) lam = +val _3 : ((zero, int, (suc, int -> int, '_weak3) rcons) rcons, int) lam = App (Shift (Var Suc), App (Shift (Var Suc), App (Shift (Var Suc), Var Zero))) val add : @@ -916,7 +916,8 @@ val double : Abs (<poly>, App (App (Shift (Shift (Shift (Var Add))), Var <poly>), Var <poly>)) val ex3 : - ((zero, int, (suc, int -> int, (add, int -> int -> int, '_a) rcons) rcons) + ((zero, int, + (suc, int -> int, (add, int -> int -> int, '_weak4) rcons) rcons) rcons, int) lam = App diff --git a/testsuite/tests/typing-gadts/unify_mb.ml b/testsuite/tests/typing-gadts/unify_mb.ml index f11f92cc1f..567046a02d 100644 --- a/testsuite/tests/typing-gadts/unify_mb.ml +++ b/testsuite/tests/typing-gadts/unify_mb.ml @@ -232,10 +232,10 @@ let t' = subst' d t [%%expect{| val s : 'a succ succ succ term = Fork (Var FZ, Fork (Var (FS (FS FZ)), Leaf)) val t : 'a succ succ term = Fork (Var (FS FZ), Var (FS FZ)) -val d : '_a succ succ succ ealist = +val d : '_weak1 succ succ succ ealist = EAlist (Asnoc (Asnoc (Anil, Fork (Var FZ, Leaf), FZ), Var FZ, FZ)) -val s' : '_a succ succ succ term = +val s' : '_weak1 succ succ succ term = Fork (Fork (Var FZ, Leaf), Fork (Var FZ, Leaf)) -val t' : '_a succ succ succ term = +val t' : '_weak1 succ succ succ term = Fork (Fork (Var FZ, Leaf), Fork (Var FZ, Leaf)) |}];; diff --git a/testsuite/tests/typing-modules/pr7348.ml b/testsuite/tests/typing-modules/pr7348.ml new file mode 100644 index 0000000000..eac11e8174 --- /dev/null +++ b/testsuite/tests/typing-modules/pr7348.ml @@ -0,0 +1,37 @@ +module F (X : sig type t = private < foo:int; ..> val x : t end) = struct + let x : < foo: int; ..> = X.x +end;; +[%%expect{| +module F : + functor (X : sig type t = private < foo : int; .. > val x : t end) -> + sig val x : X.t end +|}] + +module M = struct + type t = < foo: int; bar: int> + let x = object + method foo = 0 + method bar = 0 + end +end;; +[%%expect{| +module M : + sig type t = < bar : int; foo : int > val x : < bar : int; foo : int > end +|}] + +module N = F(M);; +[%%expect{| +module N : sig val x : M.t end +|}] + +module A : sig end = struct + module F (X : sig type t = private < foo:int; ..> val x : t end) = struct + let x : < foo: int; ..> = X.x + end + + module N = F(M) + let _ = (N.x = M.x) +end;; +[%%expect{| +module A : sig end +|}] diff --git a/testsuite/tests/typing-multifile/Makefile b/testsuite/tests/typing-multifile/Makefile index eb84bf75c9..43963ed736 100644 --- a/testsuite/tests/typing-multifile/Makefile +++ b/testsuite/tests/typing-multifile/Makefile @@ -14,9 +14,9 @@ #************************************************************************** BASEDIR=../.. -GENERATED= a.ml b.ml c.ml d.mli e.ml +GENERATED= a.ml b.ml c.ml d.mli e.ml f.ml g.ml test -default: pr7325 pr6372 +default: pr7325 pr6372 pr7563 pr7325: @printf " ... testing pr7325:" @@ -33,6 +33,15 @@ pr6372: @$(OCAMLC) -c d.mli e.ml \ && echo " => passed" || echo " => failed" +pr7563: + @printf " ... testing pr7563:" + @echo "module A = struct end" > f.ml + @echo "module Alias = A" >> f.ml + @echo "exception Alias" >> f.ml + @echo "let alias = Alias" >> f.ml + @echo "exit (if F.Alias = F.alias then 0 else 1)" > g.ml + @$(OCAMLC) f.ml g.ml -o test && ./test && echo " => passed" || echo " => failed" + clean: defaultclean @rm -f $(GENERATED) diff --git a/testsuite/tests/typing-objects/Tests.ml.principal.reference b/testsuite/tests/typing-objects/Tests.ml.principal.reference index 7b1164e680..ba027f1de8 100644 --- a/testsuite/tests/typing-objects/Tests.ml.principal.reference +++ b/testsuite/tests/typing-objects/Tests.ml.principal.reference @@ -50,14 +50,14 @@ Error: The abbreviation c is used with parameters bool c constraint 'b = 'a * < x : 'b > * 'c * 'd method f : 'a -> 'b -> unit end -# val x : '_a list ref = {contents = []} +# val x : '_weak1 list ref = {contents = []} # Characters 0-50: class ['a] c () = object method f = (x : 'a) end.. Error: The type of this class, class ['a] c : - unit -> object constraint 'a = '_b list ref method f : 'a end, + unit -> object constraint 'a = '_weak1 list ref method f : 'a end, contains type variables that cannot be generalized # Characters 21-53: type 'a c = <f : 'a c; g : 'a d> @@ -265,7 +265,7 @@ Error: Type int -> bool is not a subtype of int -> int Type bool is not a subtype of int # - : < > -> < > = <fun> # - : < .. > -> < > = <fun> -# val x : '_a list ref = {contents = []} +# val x : '_weak2 list ref = {contents = []} # module F : functor (X : sig end) -> sig type t = int end # - : < m : int > list ref = {contents = []} # type 'a t diff --git a/testsuite/tests/typing-objects/Tests.ml.reference b/testsuite/tests/typing-objects/Tests.ml.reference index 7b1164e680..ba027f1de8 100644 --- a/testsuite/tests/typing-objects/Tests.ml.reference +++ b/testsuite/tests/typing-objects/Tests.ml.reference @@ -50,14 +50,14 @@ Error: The abbreviation c is used with parameters bool c constraint 'b = 'a * < x : 'b > * 'c * 'd method f : 'a -> 'b -> unit end -# val x : '_a list ref = {contents = []} +# val x : '_weak1 list ref = {contents = []} # Characters 0-50: class ['a] c () = object method f = (x : 'a) end.. Error: The type of this class, class ['a] c : - unit -> object constraint 'a = '_b list ref method f : 'a end, + unit -> object constraint 'a = '_weak1 list ref method f : 'a end, contains type variables that cannot be generalized # Characters 21-53: type 'a c = <f : 'a c; g : 'a d> @@ -265,7 +265,7 @@ Error: Type int -> bool is not a subtype of int -> int Type bool is not a subtype of int # - : < > -> < > = <fun> # - : < .. > -> < > = <fun> -# val x : '_a list ref = {contents = []} +# val x : '_weak2 list ref = {contents = []} # module F : functor (X : sig end) -> sig type t = int end # - : < m : int > list ref = {contents = []} # type 'a t diff --git a/testsuite/tests/typing-objects/open_in_classes.ml b/testsuite/tests/typing-objects/open_in_classes.ml new file mode 100755 index 0000000000..24c0b34dfe --- /dev/null +++ b/testsuite/tests/typing-objects/open_in_classes.ml @@ -0,0 +1,17 @@ +module M = struct + type t = int + let x = 42 +end +;; +class c = + let open M in + object + method f : t = x + end +;; +class type ct = + let open M in + object + method f : t + end +;; diff --git a/testsuite/tests/typing-objects/open_in_classes.ml.reference b/testsuite/tests/typing-objects/open_in_classes.ml.reference new file mode 100644 index 0000000000..eaafa30f16 --- /dev/null +++ b/testsuite/tests/typing-objects/open_in_classes.ml.reference @@ -0,0 +1,5 @@ + +# module M : sig type t = int val x : int end +# class c : object method f : M.t end +# class type ct = object method f : M.t end +# diff --git a/testsuite/tests/typing-poly/poly.ml b/testsuite/tests/typing-poly/poly.ml index bc9ceae317..0e2969217b 100644 --- a/testsuite/tests/typing-poly/poly.ml +++ b/testsuite/tests/typing-poly/poly.ml @@ -1459,9 +1459,10 @@ let x = f 3;; [%%expect{| type (+'a, -'b) foo = private int val f : int -> ('a, 'a) foo = <fun> -val x : ('_a, '_a) foo = 3 +val x : ('_weak1, '_weak1) foo = 3 |}] + (* PR#7344*) let rec f : unit -> < m: 'a. 'a -> 'a> = fun () -> let x = f () in @@ -1585,3 +1586,13 @@ type t = < int #A.t1 > Line _, characters 11-20: Error: Illegal open object type |}] +(* GPR#1142 *) + +module M () = struct + let f : 'a -> 'a = assert false + let g : 'a -> 'a = raise Not_found +end + +[%%expect{| +module M : functor () -> sig val f : 'a -> 'a val g : 'a -> 'a end +|}] diff --git a/testsuite/tests/typing-short-paths/Makefile b/testsuite/tests/typing-short-paths/Makefile index 3e5a5df040..10856782bd 100644 --- a/testsuite/tests/typing-short-paths/Makefile +++ b/testsuite/tests/typing-short-paths/Makefile @@ -17,3 +17,7 @@ BASEDIR=../.. include $(BASEDIR)/makefiles/Makefile.toplevel include $(BASEDIR)/makefiles/Makefile.common TOPFLAGS = -short-paths + +default: gpr1223_foo.cmi gpr1223_bar.cmi + +gpr1223_bar.cmi: gpr1223_foo.cmi diff --git a/testsuite/tests/typing-short-paths/gpr1223.ml b/testsuite/tests/typing-short-paths/gpr1223.ml new file mode 100644 index 0000000000..0c481dbb5b --- /dev/null +++ b/testsuite/tests/typing-short-paths/gpr1223.ml @@ -0,0 +1,4 @@ + +let y = Gpr1223_bar.N.O.T;; + +let x = Gpr1223_bar.M.T;; diff --git a/testsuite/tests/typing-short-paths/gpr1223.ml.reference b/testsuite/tests/typing-short-paths/gpr1223.ml.reference new file mode 100644 index 0000000000..cf578cdb3b --- /dev/null +++ b/testsuite/tests/typing-short-paths/gpr1223.ml.reference @@ -0,0 +1,4 @@ + +# val y : Gpr1223_bar.N.O.t = Gpr1223_bar.N.O.T +# val x : Gpr1223_bar.M.t = Gpr1223_bar.M.T +# diff --git a/testsuite/tests/typing-short-paths/gpr1223_bar.mli b/testsuite/tests/typing-short-paths/gpr1223_bar.mli new file mode 100644 index 0000000000..f3f51e0906 --- /dev/null +++ b/testsuite/tests/typing-short-paths/gpr1223_bar.mli @@ -0,0 +1,12 @@ + +module M : Gpr1223_foo.S + +module N : sig + + module O : sig + + type t = T + + end + +end diff --git a/testsuite/tests/typing-short-paths/gpr1223_foo.mli b/testsuite/tests/typing-short-paths/gpr1223_foo.mli new file mode 100644 index 0000000000..b46079d7fb --- /dev/null +++ b/testsuite/tests/typing-short-paths/gpr1223_foo.mli @@ -0,0 +1,6 @@ + +module type S = sig + + type t = T + +end diff --git a/testsuite/tests/typing-short-paths/pr7543.ml b/testsuite/tests/typing-short-paths/pr7543.ml new file mode 100644 index 0000000000..9c89061458 --- /dev/null +++ b/testsuite/tests/typing-short-paths/pr7543.ml @@ -0,0 +1,9 @@ +(** Test that short-path printtyp does not fail on packed module. + + Packed modules does not respect the arity of type constructor, which can break + the path normalization within the short-path code path. +*) +module type S = sig type t end;; +module N = struct type 'a t = 'a end;; +let f (module M:S with type t = unit) = ();; +let () = f (module N);; diff --git a/testsuite/tests/typing-short-paths/pr7543.ml.reference b/testsuite/tests/typing-short-paths/pr7543.ml.reference new file mode 100644 index 0000000000..74fe45c208 --- /dev/null +++ b/testsuite/tests/typing-short-paths/pr7543.ml.reference @@ -0,0 +1,18 @@ + +# * * * * module type S = sig type t end +# module N : sig type 'a t = 'a end +# val f : (module S with type t = unit) -> unit = <fun> +# Characters 19-20: + let () = f (module N);; + ^ +Error: Signature mismatch: + Modules do not match: + sig type 'a t = 'a end + is not included in + sig type t = N.t end + Type declarations do not match: + type 'a t = 'a + is not included in + type t = N.t + They have different arities. +# diff --git a/testsuite/tests/typing-unboxed-types/test.ml b/testsuite/tests/typing-unboxed-types/test.ml index f187b76d81..8e0b337bc8 100644 --- a/testsuite/tests/typing-unboxed-types/test.ml +++ b/testsuite/tests/typing-unboxed-types/test.ml @@ -119,3 +119,38 @@ module T : sig end = struct type t = A of int [@@ocaml.unboxed] end;; + +(* regression test for PR#7511 (wrong determination of unboxability for GADTs) +*) +type 'a s = S : 'a -> 'a s [@@unboxed];; +type t = T : _ s -> t [@@unboxed];; + +(* regression test for GPR#1133 (follow-up to PR#7511) *) +type 'a s = S : 'a -> 'a option s [@@unboxed];; +type t = T : _ s -> t [@@unboxed];; + +(* Another test for GPR#1133: abstract types *) +module M : sig + type 'a r constraint 'a = unit -> 'b + val inj : 'b -> (unit -> 'b) r +end = struct + type 'a r = 'b constraint 'a = unit -> 'b + let inj x = x +end;; + +(* reject *) +type t = T : (unit -> _) M.r -> t [@@unboxed];; + +type 'a s = S : (unit -> 'a) M.r -> 'a option s [@@unboxed];; + +(* reject *) +type t = T : _ s -> t [@@unboxed];; + +(* accept *) +type 'a t = T : 'a s -> 'a t [@@unboxed];; + + +(* Another corner case from GPR#1133 *) +type _ s = S : 'a t -> _ s [@@unboxed] + and _ t = T : 'a -> 'a s t +;; diff --git a/testsuite/tests/typing-unboxed-types/test.ml.reference b/testsuite/tests/typing-unboxed-types/test.ml.reference index b555db8d12..10a118d86f 100644 --- a/testsuite/tests/typing-unboxed-types/test.ml.reference +++ b/testsuite/tests/typing-unboxed-types/test.ml.reference @@ -144,7 +144,12 @@ Error: Signature mismatch: Error: This type cannot be unboxed because it might contain both float and non-float values. You should annotate it with [@@ocaml.boxed]. -# type t18 = A : 'a list abs -> t18 [@@unboxed] +# Characters 19-69: + type t18 = A : _ list abs -> t18 [@@ocaml.unboxed];; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Error: This type cannot be unboxed because + it might contain both float and non-float values. + You should annotate it with [@@ocaml.boxed]. # * Characters 176-256: ......struct type t = A of float [@@ocaml.unboxed] @@ -159,4 +164,40 @@ Error: Signature mismatch: Their internal representations differ: the first declaration uses unboxed float representation. # * * module T : sig type t [@@immediate] end +# * type 'a s = S : 'a -> 'a s [@@unboxed] +# Characters 0-33: + type t = T : _ s -> t [@@unboxed];; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Error: This type cannot be unboxed because + it might contain both float and non-float values. + You should annotate it with [@@ocaml.boxed]. +# type 'a s = S : 'a -> 'a option s [@@unboxed] +# Characters 0-33: + type t = T : _ s -> t [@@unboxed];; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Error: This type cannot be unboxed because + it might contain both float and non-float values. + You should annotate it with [@@ocaml.boxed]. +# module M : + sig type 'a r constraint 'a = unit -> 'b val inj : 'b -> (unit -> 'b) r end +# Characters 14-59: + type t = T : (unit -> _) M.r -> t [@@unboxed];; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Error: This type cannot be unboxed because + it might contain both float and non-float values. + You should annotate it with [@@ocaml.boxed]. +# type 'a s = S : (unit -> 'a) M.r -> 'a option s [@@unboxed] +# Characters 14-47: + type t = T : _ s -> t [@@unboxed];; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Error: This type cannot be unboxed because + it might contain both float and non-float values. + You should annotate it with [@@ocaml.boxed]. +# type 'a t = T : 'a s -> 'a t [@@unboxed] +# Characters 42-81: + type _ s = S : 'a t -> _ s [@@unboxed] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Error: This type cannot be unboxed because + it might contain both float and non-float values. + You should annotate it with [@@ocaml.boxed]. # diff --git a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml index 78557072cc..2b52368e33 100644 --- a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml +++ b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml @@ -1,3 +1,6 @@ +(* Ignore OCAMLRUNPARAM=b to be reproducible *) +Printexc.record_backtrace false;; + let () = print_endline "\n\ <----------------------------------------------------------------------\n\ To check the result file for this test, it suffices to look for \"val\"\n\ diff --git a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml.reference b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml.reference index 2b9d4c2bd8..ece388aa20 100644 --- a/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml.reference +++ b/testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml.reference @@ -1,5 +1,6 @@ -# +# - : unit = () +# <---------------------------------------------------------------------- To check the result file for this test, it suffices to look for "val" lines corresponding to toplevel answers. If they start with @@ -22,7 +23,7 @@ Warning 57: Ambiguous or-pattern variables under guard; variable x may match different arguments. (See manual section 8.5) val ambiguous_typical_example : expr * expr -> unit = <fun> # Note that an Assert_failure is expected just below. -# Exception: Assert_failure ("//toplevel//", 23, 6). +# Exception: Assert_failure ("//toplevel//", 25, 6). # val not_ambiguous__no_orpat : int option -> unit = <fun> # val not_ambiguous__no_guard : [< `A | `B | `C ] -> unit = <fun> # val not_ambiguous__no_patvar_in_guard : diff --git a/testsuite/tests/typing-warnings/application.ml b/testsuite/tests/typing-warnings/application.ml index a0c420616f..8948dc8cb2 100644 --- a/testsuite/tests/typing-warnings/application.ml +++ b/testsuite/tests/typing-warnings/application.ml @@ -1,2 +1,5 @@ +(* Ignore OCAMLRUNPARAM=b to be reproducible *) +Printexc.record_backtrace false;; + let _ = ignore (+);; let _ = raise Exit 3;; diff --git a/testsuite/tests/typing-warnings/application.ml.reference b/testsuite/tests/typing-warnings/application.ml.reference index da825fd089..d35fd40e39 100644 --- a/testsuite/tests/typing-warnings/application.ml.reference +++ b/testsuite/tests/typing-warnings/application.ml.reference @@ -1,5 +1,6 @@ -# Characters 15-18: +# - : unit = () +# Characters 16-19: let _ = ignore (+);; ^^^ Warning 5: this function application is partial, diff --git a/testsuite/tests/typing-warnings/pr6872.ml b/testsuite/tests/typing-warnings/pr6872.ml index 283af4ccd4..73870a02ec 100644 --- a/testsuite/tests/typing-warnings/pr6872.ml +++ b/testsuite/tests/typing-warnings/pr6872.ml @@ -1,3 +1,6 @@ +(* Ignore OCAMLRUNPARAM=b to be reproducible *) +Printexc.record_backtrace false;; + exception A;; type a = A;; diff --git a/testsuite/tests/typing-warnings/pr6872.ml.principal.reference b/testsuite/tests/typing-warnings/pr6872.ml.principal.reference index eaebf2253f..616b45485d 100644 --- a/testsuite/tests/typing-warnings/pr6872.ml.principal.reference +++ b/testsuite/tests/typing-warnings/pr6872.ml.principal.reference @@ -1,5 +1,6 @@ -# exception A +# - : unit = () +# exception A # type a = A # Characters 1-2: A;; diff --git a/testsuite/tests/typing-warnings/pr6872.ml.reference b/testsuite/tests/typing-warnings/pr6872.ml.reference index 7c0b350382..5cd4291f79 100644 --- a/testsuite/tests/typing-warnings/pr6872.ml.reference +++ b/testsuite/tests/typing-warnings/pr6872.ml.reference @@ -1,5 +1,6 @@ -# exception A +# - : unit = () +# exception A # type a = A # Characters 1-2: A;; diff --git a/testsuite/tests/typing-warnings/pr7297.ml b/testsuite/tests/typing-warnings/pr7297.ml index 64b6fd5ad6..f55c0a329b 100644 --- a/testsuite/tests/typing-warnings/pr7297.ml +++ b/testsuite/tests/typing-warnings/pr7297.ml @@ -1 +1,4 @@ +(* Ignore OCAMLRUNPARAM=b to be reproducible *) +Printexc.record_backtrace false;; + let () = raise Exit; () ;; (* warn *) diff --git a/testsuite/tests/typing-warnings/pr7297.ml.reference b/testsuite/tests/typing-warnings/pr7297.ml.reference index 9c9dbdd061..bc8580fcb7 100644 --- a/testsuite/tests/typing-warnings/pr7297.ml.reference +++ b/testsuite/tests/typing-warnings/pr7297.ml.reference @@ -1,5 +1,6 @@ -# Characters 9-19: +# - : unit = () +# Characters 10-20: let () = raise Exit; () ;; (* warn *) ^^^^^^^^^^ Warning 21: this statement never returns (or has an unsound type.) diff --git a/tools/Makefile b/tools/Makefile index f640d7fd57..92d9e99e78 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -133,8 +133,8 @@ CSLPROF_IMPORTS=misc.cmo config.cmo identifiable.cmo numbers.cmo \ $(call byte_and_opt,ocamlprof,$(CSLPROF_IMPORTS) profiling.cmo $(CSLPROF),) -ocamlcp_cmos = misc.cmo warnings.cmo config.cmo identifiable.cmo numbers.cmo \ - arg_helper.cmo clflags.cmo main_args.cmo +ocamlcp_cmos = misc.cmo profile.cmo warnings.cmo config.cmo identifiable.cmo \ + numbers.cmo arg_helper.cmo clflags.cmo main_args.cmo $(call byte_and_opt,ocamlcp,$(ocamlcp_cmos) ocamlcp.cmo,) $(call byte_and_opt,ocamloptp,$(ocamlcp_cmos) ocamloptp.cmo,) diff --git a/tools/ocamlcp.ml b/tools/ocamlcp.ml index 278952f75e..0aeaf2ce1b 100644 --- a/tools/ocamlcp.ml +++ b/tools/ocamlcp.ml @@ -126,6 +126,7 @@ module Options = Main_args.Make_bytecomp_options (struct let _dflambda = option "-dflambda" let _dinstr = option "-dinstr" let _dtimings = option "-dtimings" + let _dprofile = option "-dprofile" let _args = Arg.read_arg let _args0 = Arg.read_arg0 let anonymous = process_file diff --git a/tools/ocamldep.ml b/tools/ocamldep.ml index 34c4a5740e..e1971fa894 100644 --- a/tools/ocamldep.ml +++ b/tools/ocamldep.ml @@ -1,608 +1 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) -(* *) -(* Copyright 1999 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -open Compenv -open Parsetree -module StringMap = Depend.StringMap - -let ppf = Format.err_formatter -(* Print the dependencies *) - -type file_kind = ML | MLI;; - -let load_path = ref ([] : (string * string array) list) -let ml_synonyms = ref [".ml"] -let mli_synonyms = ref [".mli"] -let shared = ref false -let native_only = ref false -let bytecode_only = ref false -let error_occurred = ref false -let raw_dependencies = ref false -let sort_files = ref false -let all_dependencies = ref false -let one_line = ref false -let files = ref [] -let allow_approximation = ref false -let map_files = ref [] -let module_map = ref StringMap.empty -let debug = ref false - -(* Fix path to use '/' as directory separator instead of '\'. - Only under Windows. *) - -let fix_slash s = - if Sys.os_type = "Unix" then s else begin - String.map (function '\\' -> '/' | c -> c) s - end - -(* Since we reinitialize load_path after reading OCAMLCOMP, - we must use a cache instead of calling Sys.readdir too often. *) -let dirs = ref StringMap.empty -let readdir dir = - try - StringMap.find dir !dirs - with Not_found -> - let contents = - try - Sys.readdir dir - with Sys_error msg -> - Format.fprintf Format.err_formatter "@[Bad -I option: %s@]@." msg; - error_occurred := true; - [||] - in - dirs := StringMap.add dir contents !dirs; - contents - -let add_to_list li s = - li := s :: !li - -let add_to_load_path dir = - try - let dir = Misc.expand_directory Config.standard_library dir in - let contents = readdir dir in - add_to_list load_path (dir, contents) - with Sys_error msg -> - Format.fprintf Format.err_formatter "@[Bad -I option: %s@]@." msg; - error_occurred := true - -let add_to_synonym_list synonyms suffix = - if (String.length suffix) > 1 && suffix.[0] = '.' then - add_to_list synonyms suffix - else begin - Format.fprintf Format.err_formatter "@[Bad suffix: '%s'@]@." suffix; - error_occurred := true - end - -(* Find file 'name' (capitalized) in search path *) -let find_file name = - let uname = String.uncapitalize_ascii name in - let rec find_in_array a pos = - if pos >= Array.length a then None else begin - let s = a.(pos) in - if s = name || s = uname then Some s else find_in_array a (pos + 1) - end in - let rec find_in_path = function - [] -> raise Not_found - | (dir, contents) :: rem -> - match find_in_array contents 0 with - Some truename -> - if dir = "." then truename else Filename.concat dir truename - | None -> find_in_path rem in - find_in_path !load_path - -let rec find_file_in_list = function - [] -> raise Not_found -| x :: rem -> try find_file x with Not_found -> find_file_in_list rem - - -let find_dependency target_kind modname (byt_deps, opt_deps) = - try - let candidates = List.map ((^) modname) !mli_synonyms in - let filename = find_file_in_list candidates in - let basename = Filename.chop_extension filename in - let cmi_file = basename ^ ".cmi" in - let cmx_file = basename ^ ".cmx" in - let ml_exists = - List.exists (fun ext -> Sys.file_exists (basename ^ ext)) !ml_synonyms in - let new_opt_dep = - if !all_dependencies then - match target_kind with - | MLI -> [ cmi_file ] - | ML -> - cmi_file :: (if ml_exists then [ cmx_file ] else []) - else - (* this is a make-specific hack that makes .cmx to be a 'proxy' - target that would force the dependency on .cmi via transitivity *) - if ml_exists - then [ cmx_file ] - else [ cmi_file ] - in - ( cmi_file :: byt_deps, new_opt_dep @ opt_deps) - with Not_found -> - try - (* "just .ml" case *) - let candidates = List.map ((^) modname) !ml_synonyms in - let filename = find_file_in_list candidates in - let basename = Filename.chop_extension filename in - let cmi_file = basename ^ ".cmi" in - let cmx_file = basename ^ ".cmx" in - let bytenames = - if !all_dependencies then - match target_kind with - | MLI -> [ cmi_file ] - | ML -> [ cmi_file ] - else - (* again, make-specific hack *) - [basename ^ (if !native_only then ".cmx" else ".cmo")] in - let optnames = - if !all_dependencies - then match target_kind with - | MLI -> [ cmi_file ] - | ML -> [ cmi_file; cmx_file ] - else [ cmx_file ] - in - (bytenames @ byt_deps, optnames @ opt_deps) - with Not_found -> - (byt_deps, opt_deps) - -let (depends_on, escaped_eol) = (":", " \\\n ") - -let print_filename s = - let s = if !Clflags.force_slash then fix_slash s else s in - if not (String.contains s ' ') then begin - print_string s; - end else begin - let rec count n i = - if i >= String.length s then n - else if s.[i] = ' ' then count (n+1) (i+1) - else count n (i+1) - in - let spaces = count 0 0 in - let result = Bytes.create (String.length s + spaces) in - let rec loop i j = - if i >= String.length s then () - else if s.[i] = ' ' then begin - Bytes.set result j '\\'; - Bytes.set result (j+1) ' '; - loop (i+1) (j+2); - end else begin - Bytes.set result j s.[i]; - loop (i+1) (j+1); - end - in - loop 0 0; - print_bytes result; - end -;; - -let print_dependencies target_files deps = - let rec print_items pos = function - [] -> print_string "\n" - | dep :: rem -> - if !one_line || (pos + 1 + String.length dep <= 77) then begin - if pos <> 0 then print_string " "; print_filename dep; - print_items (pos + String.length dep + 1) rem - end else begin - print_string escaped_eol; print_filename dep; - print_items (String.length dep + 4) rem - end in - print_items 0 (target_files @ [depends_on] @ deps) - -let print_raw_dependencies source_file deps = - print_filename source_file; print_string depends_on; - Depend.StringSet.iter - (fun dep -> - (* filter out "*predef*" *) - if (String.length dep > 0) - && (match dep.[0] with - | 'A'..'Z' | '\128'..'\255' -> true - | _ -> false) then - begin - print_char ' '; - print_string dep - end) - deps; - print_char '\n' - - -(* Process one file *) - -let report_err exn = - error_occurred := true; - Location.report_exception Format.err_formatter exn - -let tool_name = "ocamldep" - -let rec lexical_approximation lexbuf = - (* Approximation when a file can't be parsed. - Heuristic: - - first component of any path starting with an uppercase character is a - dependency. - - always skip the token after a dot, unless dot is preceded by a - lower-case identifier - - always skip the token after a backquote - *) - try - let rec process after_lident lexbuf = - match Lexer.token lexbuf with - | Parser.UIDENT name -> - Depend.free_structure_names := - Depend.StringSet.add name !Depend.free_structure_names; - process false lexbuf - | Parser.LIDENT _ -> process true lexbuf - | Parser.DOT when after_lident -> process false lexbuf - | Parser.DOT | Parser.BACKQUOTE -> skip_one lexbuf - | Parser.EOF -> () - | _ -> process false lexbuf - and skip_one lexbuf = - match Lexer.token lexbuf with - | Parser.DOT | Parser.BACKQUOTE -> skip_one lexbuf - | Parser.EOF -> () - | _ -> process false lexbuf - - in - process false lexbuf - with Lexer.Error _ -> lexical_approximation lexbuf - -let read_and_approximate inputfile = - error_occurred := false; - Depend.free_structure_names := Depend.StringSet.empty; - let ic = open_in_bin inputfile in - try - seek_in ic 0; - Location.input_name := inputfile; - let lexbuf = Lexing.from_channel ic in - Location.init lexbuf inputfile; - lexical_approximation lexbuf; - close_in ic; - !Depend.free_structure_names - with exn -> - close_in ic; - report_err exn; - !Depend.free_structure_names - -let read_parse_and_extract parse_function extract_function def ast_kind - source_file = - Depend.free_structure_names := Depend.StringSet.empty; - try - let input_file = Pparse.preprocess source_file in - begin try - let ast = - Pparse.file ~tool_name Format.err_formatter - input_file parse_function ast_kind - in - let bound_vars = - List.fold_left - (fun bv modname -> - Depend.open_module bv (Longident.parse modname)) - !module_map ((* PR#7248 *) List.rev !Clflags.open_modules) - in - let r = extract_function bound_vars ast in - Pparse.remove_preprocessed input_file; - (!Depend.free_structure_names, r) - with x -> - Pparse.remove_preprocessed input_file; - raise x - end - with x -> begin - report_err x; - if not !allow_approximation - then (Depend.StringSet.empty, def) - else (read_and_approximate source_file, def) - end - -let print_ml_dependencies source_file extracted_deps = - let basename = Filename.chop_extension source_file in - let byte_targets = [ basename ^ ".cmo" ] in - let native_targets = - if !all_dependencies - then [ basename ^ ".cmx"; basename ^ ".o" ] - else [ basename ^ ".cmx" ] in - let shared_targets = [ basename ^ ".cmxs" ] in - let init_deps = if !all_dependencies then [source_file] else [] in - let cmi_name = basename ^ ".cmi" in - let init_deps, extra_targets = - if List.exists (fun ext -> Sys.file_exists (basename ^ ext)) - !mli_synonyms - then (cmi_name :: init_deps, cmi_name :: init_deps), [] - else (init_deps, init_deps), - (if !all_dependencies then [cmi_name] else []) - in - let (byt_deps, native_deps) = - Depend.StringSet.fold (find_dependency ML) - extracted_deps init_deps in - if not !native_only then - print_dependencies (byte_targets @ extra_targets) byt_deps; - if not !bytecode_only then - begin - print_dependencies (native_targets @ extra_targets) native_deps; - if !shared then - print_dependencies (shared_targets @ extra_targets) native_deps - end - -let print_mli_dependencies source_file extracted_deps = - let basename = Filename.chop_extension source_file in - let (byt_deps, _opt_deps) = - Depend.StringSet.fold (find_dependency MLI) - extracted_deps ([], []) in - print_dependencies [basename ^ ".cmi"] byt_deps - -let print_file_dependencies (source_file, kind, extracted_deps) = - if !raw_dependencies then begin - print_raw_dependencies source_file extracted_deps - end else - match kind with - | ML -> print_ml_dependencies source_file extracted_deps - | MLI -> print_mli_dependencies source_file extracted_deps - - -let ml_file_dependencies source_file = - let parse_use_file_as_impl lexbuf = - let f x = - match x with - | Ptop_def s -> s - | Ptop_dir _ -> [] - in - List.flatten (List.map f (Parse.use_file lexbuf)) - in - let (extracted_deps, ()) = - read_parse_and_extract parse_use_file_as_impl Depend.add_implementation () - Pparse.Structure source_file - in - files := (source_file, ML, extracted_deps) :: !files - -let mli_file_dependencies source_file = - let (extracted_deps, ()) = - read_parse_and_extract Parse.interface Depend.add_signature () - Pparse.Signature source_file - in - files := (source_file, MLI, extracted_deps) :: !files - -let process_file_as process_fun def source_file = - Compenv.readenv ppf (Before_compile source_file); - load_path := []; - List.iter add_to_load_path ( - (!Compenv.last_include_dirs @ - !Clflags.include_dirs @ - !Compenv.first_include_dirs - )); - Location.input_name := source_file; - try - if Sys.file_exists source_file then process_fun source_file else def - with x -> report_err x; def - -let process_file source_file ~ml_file ~mli_file ~def = - if List.exists (Filename.check_suffix source_file) !ml_synonyms then - process_file_as ml_file def source_file - else if List.exists (Filename.check_suffix source_file) !mli_synonyms then - process_file_as mli_file def source_file - else def - -let file_dependencies source_file = - process_file source_file ~def:() - ~ml_file:ml_file_dependencies - ~mli_file:mli_file_dependencies - -let file_dependencies_as kind = - match kind with - | ML -> process_file_as ml_file_dependencies () - | MLI -> process_file_as mli_file_dependencies () - -let sort_files_by_dependencies files = - let h = Hashtbl.create 31 in - let worklist = ref [] in - -(* Init Hashtbl with all defined modules *) - let files = List.map (fun (file, file_kind, deps) -> - let modname = - String.capitalize_ascii (Filename.chop_extension (Filename.basename file)) - in - let key = (modname, file_kind) in - let new_deps = ref [] in - Hashtbl.add h key (file, new_deps); - worklist := key :: !worklist; - (modname, file_kind, deps, new_deps) - ) files in - -(* Keep only dependencies to defined modules *) - List.iter (fun (modname, file_kind, deps, new_deps) -> - let add_dep modname kind = - new_deps := (modname, kind) :: !new_deps; - in - Depend.StringSet.iter (fun modname -> - match file_kind with - ML -> (* ML depends both on ML and MLI *) - if Hashtbl.mem h (modname, MLI) then add_dep modname MLI; - if Hashtbl.mem h (modname, ML) then add_dep modname ML - | MLI -> (* MLI depends on MLI if exists, or ML otherwise *) - if Hashtbl.mem h (modname, MLI) then add_dep modname MLI - else if Hashtbl.mem h (modname, ML) then add_dep modname ML - ) deps; - if file_kind = ML then (* add dep from .ml to .mli *) - if Hashtbl.mem h (modname, MLI) then add_dep modname MLI - ) files; - -(* Print and remove all files with no remaining dependency. Iterate - until all files have been removed (worklist is empty) or - no file was removed during a turn (cycle). *) - let printed = ref true in - while !printed && !worklist <> [] do - let files = !worklist in - worklist := []; - printed := false; - List.iter (fun key -> - let (file, deps) = Hashtbl.find h key in - let set = !deps in - deps := []; - List.iter (fun key -> - if Hashtbl.mem h key then deps := key :: !deps - ) set; - if !deps = [] then begin - printed := true; - Printf.printf "%s " file; - Hashtbl.remove h key; - end else - worklist := key :: !worklist - ) files - done; - - if !worklist <> [] then begin - Format.fprintf Format.err_formatter - "@[Warning: cycle in dependencies. End of list is not sorted.@]@."; - let sorted_deps = - let li = ref [] in - Hashtbl.iter (fun _ file_deps -> li := file_deps :: !li) h; - List.sort (fun (file1, _) (file2, _) -> String.compare file1 file2) !li - in - List.iter (fun (file, deps) -> - Format.fprintf Format.err_formatter "\t@[%s: " file; - List.iter (fun (modname, kind) -> - Format.fprintf Format.err_formatter "%s.%s " modname - (if kind=ML then "ml" else "mli"); - ) !deps; - Format.fprintf Format.err_formatter "@]@."; - Printf.printf "%s " file) sorted_deps; - end; - Printf.printf "\n%!"; - () - -(* Map *) - -let rec dump_map s0 ppf m = - let open Depend in - StringMap.iter - (fun key (Node(s1,m')) -> - let s = StringSet.diff s1 s0 in - if StringSet.is_empty s then - Format.fprintf ppf "@ @[<hv2>module %s : sig%a@;<1 -2>end@]" - key (dump_map (StringSet.union s1 s0)) m' - else - Format.fprintf ppf "@ module %s = %s" key (StringSet.choose s)) - m - -let process_ml_map = - read_parse_and_extract Parse.implementation Depend.add_implementation_binding - StringMap.empty Pparse.Structure - -let process_mli_map = - read_parse_and_extract Parse.interface Depend.add_signature_binding - StringMap.empty Pparse.Signature - -let parse_map fname = - map_files := fname :: !map_files ; - let old_transp = !Clflags.transparent_modules in - Clflags.transparent_modules := true; - let (deps, m) = - process_file fname ~def:(Depend.StringSet.empty, StringMap.empty) - ~ml_file:process_ml_map - ~mli_file:process_mli_map - in - Clflags.transparent_modules := old_transp; - let modname = - String.capitalize_ascii - (Filename.basename (Filename.chop_extension fname)) in - if StringMap.is_empty m then - report_err (Failure (fname ^ " : empty map file or parse error")); - let mm = Depend.make_node m in - if !debug then begin - Format.printf "@[<v>%s:%t%a@]@." fname - (fun ppf -> Depend.StringSet.iter (Format.fprintf ppf " %s") deps) - (dump_map deps) (StringMap.add modname mm StringMap.empty) - end; - let mm = Depend.(weaken_map (StringSet.singleton modname) mm) in - module_map := StringMap.add modname mm !module_map -;; - - -(* Entry point *) - -let usage = "Usage: ocamldep [options] <source files>\nOptions are:" - -let print_version () = - Format.printf "ocamldep, version %s@." Sys.ocaml_version; - exit 0; -;; - -let print_version_num () = - Format.printf "%s@." Sys.ocaml_version; - exit 0; -;; - -let _ = - Clflags.classic := false; - add_to_list first_include_dirs Filename.current_dir_name; - Compenv.readenv ppf Before_args; - Clflags.add_arguments __LOC__ [ - "-absname", Arg.Set Location.absname, - " Show absolute filenames in error messages"; - "-all", Arg.Set all_dependencies, - " Generate dependencies on all files"; - "-allow-approx", Arg.Set allow_approximation, - " Fallback to a lexer-based approximation on unparseable files"; - "-as-map", Arg.Set Clflags.transparent_modules, - " Omit delayed dependencies for module aliases (-no-alias-deps -w -49)"; - (* "compiler uses -no-alias-deps, and no module is coerced"; *) - "-debug-map", Arg.Set debug, - " Dump the delayed dependency map for each map file"; - "-I", Arg.String (add_to_list Clflags.include_dirs), - "<dir> Add <dir> to the list of include directories"; - "-impl", Arg.String (file_dependencies_as ML), - "<f> Process <f> as a .ml file"; - "-intf", Arg.String (file_dependencies_as MLI), - "<f> Process <f> as a .mli file"; - "-map", Arg.String parse_map, - "<f> Read <f> and propagate delayed dependencies to following files"; - "-ml-synonym", Arg.String(add_to_synonym_list ml_synonyms), - "<e> Consider <e> as a synonym of the .ml extension"; - "-mli-synonym", Arg.String(add_to_synonym_list mli_synonyms), - "<e> Consider <e> as a synonym of the .mli extension"; - "-modules", Arg.Set raw_dependencies, - " Print module dependencies in raw form (not suitable for make)"; - "-native", Arg.Set native_only, - " Generate dependencies for native-code only (no .cmo files)"; - "-bytecode", Arg.Set bytecode_only, - " Generate dependencies for bytecode-code only (no .cmx files)"; - "-one-line", Arg.Set one_line, - " Output one line per file, regardless of the length"; - "-open", Arg.String (add_to_list Clflags.open_modules), - "<module> Opens the module <module> before typing"; - "-plugin", Arg.String Compplugin.load, - "<plugin> Load dynamic plugin <plugin>"; - "-pp", Arg.String(fun s -> Clflags.preprocessor := Some s), - "<cmd> Pipe sources through preprocessor <cmd>"; - "-ppx", Arg.String (add_to_list first_ppx), - "<cmd> Pipe abstract syntax trees through preprocessor <cmd>"; - "-shared", Arg.Set shared, - " Generate dependencies for native plugin files (.cmxs targets)"; - "-slash", Arg.Set Clflags.force_slash, - " (Windows) Use forward slash / instead of backslash \\ in file paths"; - "-sort", Arg.Set sort_files, - " Sort files according to their dependencies"; - "-version", Arg.Unit print_version, - " Print version and exit"; - "-vnum", Arg.Unit print_version_num, - " Print version number and exit"; - "-args", Arg.Expand Arg.read_arg, - "<file> Read additional newline separated command line arguments \n\ - \ from <file>"; - "-args0", Arg.Expand Arg.read_arg0, - "<file> Read additional NUL separated command line arguments from \n\ - \ <file>" - ]; - Clflags.parse_arguments file_dependencies usage; - Compenv.readenv ppf Before_link; - if !sort_files then sort_files_by_dependencies !files - else List.iter print_file_dependencies (List.sort compare !files); - exit (if !error_occurred then 2 else 0) +let () = Makedepend.main () diff --git a/tools/ocamloptp.ml b/tools/ocamloptp.ml index 895031931a..1253f89edc 100644 --- a/tools/ocamloptp.ml +++ b/tools/ocamloptp.ml @@ -174,6 +174,7 @@ module Options = Main_args.Make_optcomp_options (struct let _dstartup = option "-dstartup" let _dinterval = option "-dinterval" let _dtimings = option "-dtimings" + let _dprofile = option "-dprofile" let _opaque = option "-opaque" let _args = Arg.read_arg diff --git a/tools/ocamlprof.ml b/tools/ocamlprof.ml index fb08ffd5ea..2e72d52cf0 100644 --- a/tools/ocamlprof.ml +++ b/tools/ocamlprof.ml @@ -367,6 +367,7 @@ and rewrite_class_expr iflag cexpr = | Pcl_let (_, spat_sexp_list, cexpr) -> rewrite_patexp_list iflag spat_sexp_list; rewrite_class_expr iflag cexpr + | Pcl_open (_, _, cexpr) | Pcl_constraint (cexpr, _) -> rewrite_class_expr iflag cexpr | Pcl_extension _ -> () diff --git a/toplevel/topdirs.ml b/toplevel/topdirs.ml index a28ee990a6..c956513bec 100644 --- a/toplevel/topdirs.ml +++ b/toplevel/topdirs.ml @@ -621,7 +621,7 @@ let () = { section = section_env; doc = "Print the signatures of components \ - from any of the above categories."; + from any of the categories below."; } let _ = add_directive "trace" diff --git a/toplevel/topmain.ml b/toplevel/topmain.ml index 1a8757b331..7a0c07ed21 100644 --- a/toplevel/topmain.ml +++ b/toplevel/topmain.ml @@ -144,7 +144,8 @@ module Options = Main_args.Make_bytetop_options (struct let _drawlambda = set dump_rawlambda let _dlambda = set dump_lambda let _dflambda = set dump_flambda - let _dtimings = set print_timings + let _dtimings () = profile_columns := [ `Time ] + let _dprofile () = profile_columns := Profile.all_columns let _dinstr = set dump_instr let _args = wrap_expand Arg.read_arg diff --git a/typing/btype.ml b/typing/btype.ml index 686bfc442d..d94693b1ea 100644 --- a/typing/btype.ml +++ b/typing/btype.ml @@ -59,6 +59,7 @@ let newmarkedgenvar () = let is_Tvar = function {desc=Tvar _} -> true | _ -> false let is_Tunivar = function {desc=Tunivar _} -> true | _ -> false +let is_Tconstr = function {desc=Tconstr _} -> true | _ -> false let dummy_method = "*dummy method*" let default_mty = function @@ -208,27 +209,31 @@ let proxy ty = (**** Utilities for fixed row private types ****) -let has_constr_row t = +let row_of_type t = match (repr t).desc with Tobject(t,_) -> - let rec check_row t = - match (repr t).desc with - Tfield(_,_,_,t) -> check_row t - | Tconstr _ -> true - | _ -> false - in check_row t + let rec get_row t = + let t = repr t in + match t.desc with + Tfield(_,_,_,t) -> get_row t + | _ -> t + in get_row t | Tvariant row -> - (match row_more row with {desc=Tconstr _} -> true | _ -> false) + row_more row | _ -> - false + t + +let has_constr_row t = + not (is_Tconstr t) && is_Tconstr (row_of_type t) let is_row_name s = let l = String.length s in if l < 4 then false else String.sub s (l-4) 4 = "#row" -let is_constr_row t = +let is_constr_row ~allow_ident t = match t.desc with - Tconstr (Path.Pident id, _, _) -> is_row_name (Ident.name id) + Tconstr (Path.Pident id, _, _) when allow_ident -> + is_row_name (Ident.name id) | Tconstr (Path.Pdot (_, s, _), _, _) -> is_row_name s | _ -> false diff --git a/typing/btype.mli b/typing/btype.mli index 08d8d04763..aaa426a8ab 100644 --- a/typing/btype.mli +++ b/typing/btype.mli @@ -46,6 +46,7 @@ val newmarkedgenvar: unit -> type_expr val is_Tvar: type_expr -> bool val is_Tunivar: type_expr -> bool +val is_Tconstr: type_expr -> bool val dummy_method: label val default_mty: module_type option -> module_type @@ -80,9 +81,10 @@ val proxy: type_expr -> type_expr or a row variable *) (**** Utilities for private abbreviations with fixed rows ****) +val row_of_type: type_expr -> type_expr val has_constr_row: type_expr -> bool val is_row_name: string -> bool -val is_constr_row: type_expr -> bool +val is_constr_row: allow_ident:bool -> type_expr -> bool (**** Utilities for type traversal ****) diff --git a/typing/ctype.ml b/typing/ctype.ml index fc06b06a59..e5094ec0e8 100644 --- a/typing/ctype.ml +++ b/typing/ctype.ml @@ -4205,7 +4205,15 @@ let rec normalize_type_rec env visited ty = let ty = repr ty in if not (TypeSet.mem ty !visited) then begin visited := TypeSet.add ty !visited; - begin match ty.desc with + let tm = row_of_type ty in + begin if not (is_Tconstr ty) && is_constr_row ~allow_ident:false tm then + match tm.desc with (* PR#7348 *) + Tconstr (Path.Pdot(m,i,pos), tl, _abbrev) -> + let i' = String.sub i 0 (String.length i - 4) in + log_type ty; + ty.desc <- Tconstr(Path.Pdot(m,i',pos), tl, ref Mnil) + | _ -> assert false + else match ty.desc with | Tvariant row -> let row = row_repr row in let fields = List.map diff --git a/typing/env.ml b/typing/env.ml index d16e1e721a..c5e26fc1e4 100644 --- a/typing/env.ml +++ b/typing/env.ml @@ -72,31 +72,46 @@ let error err = raise (Error err) module EnvLazy : sig type ('a,'b) t + type log + val force : ('a -> 'b) -> ('a,'b) t -> 'b val create : 'a -> ('a,'b) t val get_arg : ('a,'b) t -> 'a option + (* [force_logged log f t] is equivalent to [force f t] but if [f] returns [None] then + [t] is recorded in [log]. [backtrack log] will then reset all the recorded [t]s back + to their original state. *) + val log : unit -> log + val force_logged : log -> ('a -> 'b option) -> ('a,'b option) t -> 'b option + val backtrack : log -> unit + end = struct type ('a,'b) t = ('a,'b) eval ref and ('a,'b) eval = - Done of 'b + | Done of 'b | Raise of exn | Thunk of 'a + type undo = + | Nil + | Cons : ('a, 'b) t * 'a * undo -> undo + + type log = undo ref + let force f x = match !x with - Done x -> x - | Raise e -> raise e - | Thunk e -> - try - let y = f e in - x := Done y; - y - with e -> - x := Raise e; - raise e + | Done x -> x + | Raise e -> raise e + | Thunk e -> + match f e with + | y -> + x := Done y; + y + | exception e -> + x := Raise e; + raise e let get_arg x = match !x with Thunk a -> Some a | _ -> None @@ -104,6 +119,35 @@ end = struct let create x = ref (Thunk x) + let log () = + ref Nil + + let force_logged log f x = + match !x with + | Done x -> x + | Raise e -> raise e + | Thunk e -> + match f e with + | None -> + x := Done None; + log := Cons(x, e, !log); + None + | Some _ as y -> + x := Done y; + y + | exception e -> + x := Raise e; + raise e + + let backtrack log = + let rec loop = function + | Nil -> () + | Cons(x, e, rest) -> + x := Thunk e; + loop rest + in + loop !log + end module PathMap = Map.Make(Path) @@ -417,8 +461,9 @@ and module_components = { deprecated: string option; loc: Location.t; - comps: (t * Subst.t * Path.t * Types.module_type, module_components_repr) - EnvLazy.t; + comps: + (t * Subst.t * Path.t * Types.module_type, module_components_repr option) + EnvLazy.t; } and module_components_repr = @@ -523,6 +568,22 @@ let diff env1 env2 = IdTbl.diff_keys env1.modules env2.modules @ IdTbl.diff_keys env1.classes env2.classes +type can_load_cmis = + | Can_load_cmis + | Cannot_load_cmis of EnvLazy.log + +let can_load_cmis = ref Can_load_cmis + +let without_cmis f x = + let log = EnvLazy.log () in + let res = + Misc.(protect_refs + [R (can_load_cmis, Cannot_load_cmis log)] + (fun () -> f x)) + in + EnvLazy.backtrack log; + res + (* Forward declarations *) let components_of_module' = @@ -532,7 +593,7 @@ let components_of_module' = module_components) let components_of_module_maker' = ref ((fun (_env, _sub, _path, _mty) -> assert false) : - t * Subst.t * Path.t * module_type -> module_components_repr) + t * Subst.t * Path.t * module_type -> module_components_repr option) let components_of_functor_appl' = ref ((fun _f _env _p1 _p2 -> assert false) : functor_components -> t -> Path.t -> Path.t -> module_components) @@ -548,9 +609,27 @@ let strengthen = let md md_type = {md_type; md_attributes=[]; md_loc=Location.none} -let get_components c = - EnvLazy.force !components_of_module_maker' c.comps +let get_components_opt c = + match !can_load_cmis with + | Can_load_cmis -> + EnvLazy.force !components_of_module_maker' c.comps + | Cannot_load_cmis log -> + EnvLazy.force_logged log !components_of_module_maker' c.comps + +let empty_structure = + Structure_comps { + comp_values = Tbl.empty; + comp_constrs = Tbl.empty; + comp_labels = Tbl.empty; + comp_types = Tbl.empty; + comp_modules = Tbl.empty; comp_modtypes = Tbl.empty; + comp_components = Tbl.empty; comp_classes = Tbl.empty; + comp_cltypes = Tbl.empty } +let get_components c = + match get_components_opt c with + | None -> empty_structure + | Some c -> c (* The name of the compilation unit currently compiled. "" if outside a compilation unit. *) @@ -678,25 +757,24 @@ let read_pers_struct check modname filename = acknowledge_pers_struct check modname { Persistent_signature.filename; cmi } -let can_load_cmis = ref true -let without_cmis f x = - Misc.(protect_refs [R (can_load_cmis, false)] (fun () -> f x)) - let find_pers_struct check name = if name = "*predef*" then raise Not_found; match Hashtbl.find persistent_structures name with | Some ps -> ps | None -> raise Not_found - | exception Not_found when !can_load_cmis -> - let ps = - match !Persistent_signature.load ~unit_name:name with - | Some ps -> ps - | None -> - Hashtbl.add persistent_structures name None; - raise Not_found - in - add_import name; - acknowledge_pers_struct check name ps + | exception Not_found -> + match !can_load_cmis with + | Cannot_load_cmis _ -> raise Not_found + | Can_load_cmis -> + let ps = + match !Persistent_signature.load ~unit_name:name with + | Some ps -> ps + | None -> + Hashtbl.add persistent_structures name None; + raise Not_found + in + add_import name; + acknowledge_pers_struct check name ps (* Emits a warning if there is no valid cmi for name *) let check_pers_struct name = @@ -1591,7 +1669,7 @@ let rec components_of_module ~deprecated ~loc env sub path mty = } and components_of_module_maker (env, sub, path, mty) = - (match scrape_alias env mty with + match scrape_alias env mty with Mty_signature sg -> let c = { comp_values = Tbl.empty; @@ -1669,26 +1747,18 @@ and components_of_module_maker (env, sub, path, mty) = c.comp_cltypes <- Tbl.add (Ident.name id) (decl', !pos) c.comp_cltypes) sg pl; - Structure_comps c + Some (Structure_comps c) | Mty_functor(param, ty_arg, ty_res) -> - Functor_comps { + Some (Functor_comps { fcomp_param = param; (* fcomp_arg and fcomp_res must be prefixed eagerly, because they are interpreted in the outer environment *) fcomp_arg = may_map (Subst.modtype sub) ty_arg; fcomp_res = Subst.modtype sub ty_res; fcomp_cache = Hashtbl.create 17; - fcomp_subst_cache = Hashtbl.create 17 } + fcomp_subst_cache = Hashtbl.create 17 }) | Mty_ident _ - | Mty_alias _ -> - Structure_comps { - comp_values = Tbl.empty; - comp_constrs = Tbl.empty; - comp_labels = Tbl.empty; - comp_types = Tbl.empty; - comp_modules = Tbl.empty; comp_modtypes = Tbl.empty; - comp_components = Tbl.empty; comp_classes = Tbl.empty; - comp_cltypes = Tbl.empty }) + | Mty_alias _ -> None (* Insertion of bindings by identifier + path *) @@ -2008,17 +2078,21 @@ let open_pers_signature name env = | Some env -> env | None -> assert false (* a compilation unit cannot refer to a functor *) -let open_signature ?(loc = Location.none) ?(toplevel = false) ovf root env = +let open_signature + ?(used_slot = ref false) + ?(loc = Location.none) ?(toplevel = false) ovf root env = if not toplevel && ovf = Asttypes.Fresh && not loc.Location.loc_ghost && (Warnings.is_active (Warnings.Unused_open "") || Warnings.is_active (Warnings.Open_shadow_identifier ("", "")) || Warnings.is_active (Warnings.Open_shadow_label_constructor ("",""))) then begin - let used = ref false in + let used = used_slot in !add_delayed_check_forward (fun () -> - if not !used then - Location.prerr_warning loc (Warnings.Unused_open (Path.name root)) + if not !used then begin + used := true; + Location.prerr_warning loc (Warnings.Unused_open (Path.name root)) + end ); let shadowed = ref [] in let slot s b = diff --git a/typing/env.mli b/typing/env.mli index ff737e3e89..f96c76b7c1 100644 --- a/typing/env.mli +++ b/typing/env.mli @@ -156,6 +156,7 @@ val add_signature: signature -> t -> t Used to implement open. Returns None if the path refers to a functor, not a structure. *) val open_signature: + ?used_slot:bool ref -> ?loc:Location.t -> ?toplevel:bool -> Asttypes.override_flag -> Path.t -> t -> t option diff --git a/typing/printtyp.ml b/typing/printtyp.ml index 43d450f9c6..a8fb4860c5 100644 --- a/typing/printtyp.ml +++ b/typing/printtyp.ml @@ -238,10 +238,13 @@ let compose l1 = function | Nth n -> Nth (List.nth l1 n) let apply_subst s1 tyl = - match s1 with - Nth n1 -> [List.nth tyl n1] - | Map l1 -> List.map (List.nth tyl) l1 - | Id -> tyl + if tyl = [] then [] + (* cf. PR#7543: Typemod.type_package doesn't respect type constructor arity *) + else + match s1 with + Nth n1 -> [List.nth tyl n1] + | Map l1 -> List.map (List.nth tyl) l1 + | Id -> tyl type best_path = Paths of Path.t list | Best of Path.t @@ -398,6 +401,10 @@ let names = ref ([] : (type_expr * string) list) let name_counter = ref 0 let named_vars = ref ([] : string list) +let weak_counter = ref 1 +let weak_var_map = ref TypeMap.empty +let named_weak_vars = ref StringSet.empty + let reset_names () = names := []; name_counter := 0; named_vars := [] let add_named_var ty = match ty.desc with @@ -406,6 +413,11 @@ let add_named_var ty = named_vars := name :: !named_vars | _ -> () +let name_is_already_used name = + List.mem name !named_vars + || List.exists (fun (_, name') -> name = name') !names + || StringSet.mem name !named_weak_vars + let rec new_name () = let name = if !name_counter < 26 @@ -413,15 +425,23 @@ let rec new_name () = else String.make 1 (Char.chr(97 + !name_counter mod 26)) ^ string_of_int(!name_counter / 26) in incr name_counter; - if List.mem name !named_vars - || List.exists (fun (_, name') -> name = name') !names - then new_name () - else name + if name_is_already_used name then new_name () else name + +let rec new_weak_name ty () = + let name = "weak" ^ string_of_int !weak_counter in + incr weak_counter; + if name_is_already_used name then new_weak_name ty () + else begin + named_weak_vars := StringSet.add name !named_weak_vars; + weak_var_map := TypeMap.add ty name !weak_var_map; + name + end -let name_of_type t = +let name_of_type name_generator t = (* We've already been through repr at this stage, so t is our representative of the union-find class. *) try List.assq t !names with Not_found -> + try TypeMap.find t !weak_var_map with Not_found -> let name = match t.desc with Tvar (Some name) | Tunivar (Some name) -> @@ -437,13 +457,13 @@ let name_of_type t = !current_name | _ -> (* No name available, create a new one *) - new_name () + name_generator () in (* Exception for type declarations *) if name <> "_" then names := (t, name) :: !names; name -let check_name_of_type t = ignore(name_of_type t) +let check_name_of_type t = ignore(name_of_type new_name t) let remove_names tyl = let tyl = List.map repr tyl in @@ -561,14 +581,17 @@ let rec tree_of_typexp sch ty = let px = proxy ty in if List.mem_assq px !names && not (List.memq px !delayed) then let mark = is_non_gen sch ty in - Otyp_var (mark, name_of_type px) else + let name = name_of_type (if mark then new_weak_name ty else new_name) px in + Otyp_var (mark, name) else let pr_typ () = match ty.desc with | Tvar _ -> (*let lev = if is_non_gen sch ty then "/" ^ string_of_int ty.level else "" in*) - Otyp_var (is_non_gen sch ty, name_of_type ty) + let non_gen = is_non_gen sch ty in + let name_gen = if non_gen then new_weak_name ty else new_name in + Otyp_var (non_gen, name_of_type name_gen ty) | Tarrow(l, ty1, ty2, _) -> let pr_arrow l ty1 ty2 = let lab = @@ -589,7 +612,7 @@ let rec tree_of_typexp sch ty = | Tconstr(p, tyl, _abbrev) -> let p', s = best_type_path p in let tyl' = apply_subst s tyl in - if is_nth s then tree_of_typexp sch (List.hd tyl') else + if is_nth s && not (tyl'=[]) then tree_of_typexp sch (List.hd tyl') else Otyp_constr (tree_of_path p', tree_of_typlist sch tyl') | Tvariant row -> let row = row_repr row in @@ -648,14 +671,14 @@ let rec tree_of_typexp sch ty = (* Make the names delayed, so that the real type is printed once when used as proxy *) List.iter add_delayed tyl; - let tl = List.map name_of_type tyl in + let tl = List.map (name_of_type new_name) tyl in let tr = Otyp_poly (tl, tree_of_typexp sch ty) in (* Forget names when we leave scope *) remove_names tyl; delayed := old_delayed; tr end | Tunivar _ -> - Otyp_var (false, name_of_type ty) + Otyp_var (false, name_of_type new_name ty) | Tpackage (p, n, tyl) -> let n = List.map (fun li -> String.concat "." (Longident.flatten li)) n in @@ -664,7 +687,7 @@ let rec tree_of_typexp sch ty = if List.memq px !delayed then delayed := List.filter ((!=) px) !delayed; if is_aliased px && aliasable ty then begin check_name_of_type px; - Otyp_alias (pr_typ (), name_of_type px) end + Otyp_alias (pr_typ (), name_of_type new_name px) end else pr_typ () and tree_of_row_field sch (l, f) = @@ -1043,7 +1066,7 @@ let rec tree_of_class_type sch params = let sty = repr sign.csig_self in let self_ty = if is_aliased sty then - Some (Otyp_var (false, name_of_type (proxy sty))) + Some (Otyp_var (false, name_of_type new_name (proxy sty))) else None in let (fields, _) = @@ -1270,14 +1293,32 @@ let modtype_declaration id ppf decl = !Oprint.out_sig_item ppf (tree_of_modtype_declaration id decl) (* For the toplevel: merge with tree_of_signature? *) -let rec print_items showval env = function + +(* Refresh weak variable map in the toplevel *) +let refresh_weak () = + let refresh t name (m,s) = + if is_non_gen true (repr t) then + begin + TypeMap.add t name m, + StringSet.add name s + end + else m, s in + let m, s = + TypeMap.fold refresh !weak_var_map (TypeMap.empty ,StringSet.empty) in + named_weak_vars := s; + weak_var_map := m + +let print_items showval env x = + refresh_weak(); + let rec print showval env = function | [] -> [] | item :: rem as items -> let (_sg, rem) = filter_rem_sig item rem in hide_rec_items items; let trees = trees_of_sigitem item in List.map (fun d -> (d, showval env item)) trees @ - print_items showval env rem + print showval env rem in + print showval env x (* Print a signature body (used by -i when compiling a .ml) *) @@ -1330,7 +1371,8 @@ let rec filter_trace keep_last = function [] | (t1, t1') :: (t2, t2') :: rem -> let rem' = filter_trace keep_last rem in - if is_constr_row t1' || is_constr_row t2' + if is_constr_row ~allow_ident:true t1' + || is_constr_row ~allow_ident:true t2' || same_path t1 t1' && same_path t2 t2' && not (keep_last && rem' = []) then rem' else (t1, t1') :: (t2, t2') :: rem' diff --git a/typing/printtyped.ml b/typing/printtyped.ml index 7936bcbbfd..88961d04d1 100644 --- a/typing/printtyped.ml +++ b/typing/printtyped.ml @@ -481,6 +481,9 @@ and class_type i ppf x = arg_label i ppf l; core_type i ppf co; class_type i ppf cl; + | Tcty_open (ovf, m, _, _, e) -> + line i ppf "Tcty_open %a \"%a\"\n" fmt_override_flag ovf fmt_path m; + class_type i ppf e and class_signature i ppf { csig_self = ct; csig_fields = l } = line i ppf "class_signature\n"; @@ -562,6 +565,9 @@ and class_expr i ppf x = class_expr i ppf ce; class_type i ppf ct | Tcl_constraint (ce, None, _, _, _) -> class_expr i ppf ce + | Tcl_open (ovf, m, _, _, e) -> + line i ppf "Tcty_open %a \"%a\"\n" fmt_override_flag ovf fmt_path m; + class_expr i ppf e and class_structure i ppf { cstr_self = p; cstr_fields = l } = line i ppf "class_structure\n"; diff --git a/typing/subst.ml b/typing/subst.ml index 960b647d2b..e6fc9e3de0 100644 --- a/typing/subst.ml +++ b/typing/subst.ml @@ -139,11 +139,20 @@ let rec typexp s ty = | _ -> let desc = ty.desc in save_desc ty desc; + let tm = row_of_type ty in + let has_fixed_row = + not (is_Tconstr ty) && is_constr_row ~allow_ident:false tm in (* Make a stub *) let ty' = if s.for_saving then newpersty (Tvar None) else newgenvar () in ty.desc <- Tsubst ty'; ty'.desc <- - begin match desc with + begin if has_fixed_row then + match tm.desc with (* PR#7348 *) + Tconstr (Pdot(m,i,pos), tl, _abbrev) -> + let i' = String.sub i 0 (String.length i - 4) in + Tconstr(type_path s (Pdot(m,i',pos)), tl, ref Mnil) + | _ -> assert false + else match desc with | Tconstr(p, tl, _abbrev) -> Tconstr(type_path s p, List.map (typexp s) tl, ref Mnil) | Tpackage(p, n, tl) -> diff --git a/typing/tast_mapper.ml b/typing/tast_mapper.ml index b8d1988322..36e33e3f2f 100644 --- a/typing/tast_mapper.ml +++ b/typing/tast_mapper.ml @@ -522,6 +522,8 @@ let class_expr sub x = ) | Tcl_ident (path, lid, tyl) -> Tcl_ident (path, lid, List.map (sub.typ sub) tyl) + | Tcl_open (ovf, p, lid, env, e) -> + Tcl_open (ovf, p, lid, sub.env sub env, sub.class_expr sub e) in {x with cl_desc; cl_env} @@ -542,6 +544,8 @@ let class_type sub x = sub.typ sub ct, sub.class_type sub cl ) + | Tcty_open (ovf, p, lid, env, e) -> + Tcty_open (ovf, p, lid, sub.env sub env, sub.class_type sub e) in {x with cltyp_desc; cltyp_env} diff --git a/typing/typeclass.ml b/typing/typeclass.ml index 51f8a256dc..f3b10dd75f 100644 --- a/typing/typeclass.ml +++ b/typing/typeclass.ml @@ -540,6 +540,12 @@ and class_type env scty = let clty = class_type env scty in let typ = Cty_arrow (l, ty, clty.cltyp_type) in cltyp (Tcty_arrow (l, cty, clty)) typ + + | Pcty_open (ovf, lid, e) -> + let (path, newenv) = !Typecore.type_open ovf env scty.pcty_loc lid in + let clty = class_type newenv e in + cltyp (Tcty_open (ovf, path, lid, newenv, clty)) clty.cltyp_type + | Pcty_extension ext -> raise (Error_forward (Builtin_attributes.error_of_extension ext)) @@ -1191,6 +1197,17 @@ and class_expr cl_num val_env met_env scl = cl_env = val_env; cl_attributes = scl.pcl_attributes; } + | Pcl_open (ovf, lid, e) -> + let used_slot = ref false in + let (path, new_val_env) = !Typecore.type_open ~used_slot ovf val_env scl.pcl_loc lid in + let (_path, new_met_env) = !Typecore.type_open ~used_slot ovf met_env scl.pcl_loc lid in + let cl = class_expr cl_num new_val_env new_met_env e in + rc {cl_desc = Tcl_open (ovf, path, lid, new_val_env, cl); + cl_loc = scl.pcl_loc; + cl_type = cl.cl_type; + cl_env = val_env; + cl_attributes = scl.pcl_attributes; + } | Pcl_extension ext -> raise (Error_forward (Builtin_attributes.error_of_extension ext)) @@ -1704,6 +1721,7 @@ let rec unify_parents env ty cl = | _exn -> assert false end | Tcl_structure st -> unify_parents_struct env ty st + | Tcl_open (_, _, _, _, cl) | Tcl_fun (_, _, _, cl, _) | Tcl_apply (cl, _) | Tcl_let (_, _, _, cl) diff --git a/typing/typecore.ml b/typing/typecore.ml index a06b8c283d..a1e47a10e6 100644 --- a/typing/typecore.ml +++ b/typing/typecore.ml @@ -89,8 +89,11 @@ let type_module = (* Forward declaration, to be filled in by Typemod.type_open *) -let type_open = - ref (fun _ -> assert false) +let type_open : + (?used_slot:bool ref -> override_flag -> Env.t -> Location.t -> + Longident.t loc -> Path.t * Env.t) + ref = + ref (fun ?used_slot:_ _ -> assert false) (* Forward declaration, to be filled in by Typemod.type_package *) @@ -220,6 +223,7 @@ let iter_expression f e = class_expr ce; List.iter (fun (_, e) -> expr e) lel | Pcl_let (_, pel, ce) -> List.iter binding pel; class_expr ce + | Pcl_open (_, _, ce) | Pcl_constraint (ce, _) -> class_expr ce | Pcl_extension _ -> () @@ -1616,6 +1620,16 @@ let rec is_nonexpansive exp = is_nonexpansive_mod mexp && is_nonexpansive e | Texp_pack mexp -> is_nonexpansive_mod mexp + (* Computations which raise exceptions are nonexpansive, since (raise e) is equivalent + to (raise e; diverge), and a nonexpansive "diverge" can be produced using lazy values + or the relaxed value restriction. See GPR#1142 *) + | Texp_assert exp -> + is_nonexpansive exp + | Texp_apply ( + { exp_desc = Texp_ident (_, _, {val_kind = + Val_prim {Primitive.prim_name = "%raise"}}) }, + [Nolabel, Some e]) -> + is_nonexpansive e | _ -> false and is_nonexpansive_mod mexp = diff --git a/typing/typecore.mli b/typing/typecore.mli index 7b64ee343c..b9ad77bff9 100644 --- a/typing/typecore.mli +++ b/typing/typecore.mli @@ -135,7 +135,8 @@ val report_error: Env.t -> formatter -> error -> unit val type_module: (Env.t -> Parsetree.module_expr -> Typedtree.module_expr) ref (* Forward declaration, to be filled in by Typemod.type_open *) val type_open: - (override_flag -> Env.t -> Location.t -> Longident.t loc -> Path.t * Env.t) + (?used_slot:bool ref -> override_flag -> Env.t -> Location.t -> + Longident.t loc -> Path.t * Env.t) ref (* Forward declaration, to be filled in by Typeclass.class_structure *) val type_object: diff --git a/typing/typedecl.ml b/typing/typedecl.ml index 3491679dcb..0fb5b2bd0e 100644 --- a/typing/typedecl.ml +++ b/typing/typedecl.ml @@ -285,13 +285,63 @@ let make_constructor env type_path type_params sargs sret_type = widen z; targs, Some tret_type, args, Some ret_type +(* Check that the variable [id] is present in the [univ] list. *) +let check_type_var loc univ id = + let f t = (Btype.repr t).id = id in + if not (List.exists f univ) then raise (Error (loc, Wrong_unboxed_type_float)) + +(* Check that all the variables found in [ty] are in [univ]. + Because [ty] is the argument to an abstract type, the representation + of that abstract type could be any subexpression of [ty], in particular + any type variable present in [ty]. +*) +let rec check_unboxed_abstract_arg loc univ ty = + match ty.desc with + | Tvar _ -> check_type_var loc univ ty.id + | Tarrow (_, t1, t2, _) + | Tfield (_, _, t1, t2) -> + check_unboxed_abstract_arg loc univ t1; + check_unboxed_abstract_arg loc univ t2 + | Ttuple args + | Tconstr (_, args, _) + | Tpackage (_, _, args) -> + List.iter (check_unboxed_abstract_arg loc univ) args + | Tobject (fields, r) -> + check_unboxed_abstract_arg loc univ fields; + begin match !r with + | None -> () + | Some (_, args) -> List.iter (check_unboxed_abstract_arg loc univ) args + end + | Tnil + | Tunivar _ -> () + | Tlink e -> check_unboxed_abstract_arg loc univ e + | Tsubst _ -> assert false + | Tvariant { row_fields; row_more; row_name } -> + List.iter (check_unboxed_abstract_row_field loc univ) row_fields; + check_unboxed_abstract_arg loc univ row_more; + begin match row_name with + | None -> () + | Some (_, args) -> List.iter (check_unboxed_abstract_arg loc univ) args + end + | Tpoly (t, _) -> check_unboxed_abstract_arg loc univ t + +and check_unboxed_abstract_row_field loc univ (_, field) = + match field with + | Rpresent (Some ty) -> check_unboxed_abstract_arg loc univ ty + | Reither (_, args, _, r) -> + List.iter (check_unboxed_abstract_arg loc univ) args; + begin match !r with + | None -> () + | Some f -> check_unboxed_abstract_row_field loc univ ("", f) + end + | Rabsent + | Rpresent None -> () + (* Check that the argument to a GADT constructor is compatible with unboxing - the type, given the existential variables introduced by this constructor. *) -let rec check_unboxed_gadt_arg loc ex env ty = + the type, given the universal parameters of the type. *) +let rec check_unboxed_gadt_arg loc univ env ty = match get_unboxed_type_representation env ty with - | Some {desc = Tvar _; id} -> - let f t = (Btype.repr t).id = id in - if List.exists f ex then raise(Error(loc, Wrong_unboxed_type_float)) + | Some {desc = Tvar _; id} -> check_type_var loc univ id | Some {desc = Tarrow _ | Ttuple _ | Tpackage _ | Tobject _ | Tnil | Tvariant _; _} -> () @@ -301,10 +351,10 @@ let rec check_unboxed_gadt_arg loc ex env ty = let tydecl = Env.find_type p env in assert (not tydecl.type_unboxed.unboxed); if tydecl.type_kind = Type_abstract then - List.iter (check_unboxed_gadt_arg loc ex env) args + List.iter (check_unboxed_abstract_arg loc univ) args | Some {desc = Tfield _ | Tlink _ | Tsubst _; _} -> assert false | Some {desc = Tunivar _; _} -> () - | Some {desc = Tpoly (t2, _); _} -> check_unboxed_gadt_arg loc ex env t2 + | Some {desc = Tpoly (t2, _); _} -> check_unboxed_gadt_arg loc univ env t2 | None -> () (* This case is tricky: the argument is another (or the same) type in the same recursive definition. In this case we don't have to @@ -403,10 +453,14 @@ let transl_declaration env sdecl id = unboxed (or abstract) type constructor applied to some existential type variable. Of course we also have to rule out any abstract type constructor applied to anything that - might be an existential type variable. *) + might be an existential type variable. + There is a difficulty with existential variables created + out of thin air (rather than bound by the declaration). + See PR#7511 and GPR#1133 for details. *) match Datarepr.constructor_existentials args ret_type with | _, [] -> () - | [argty], ex -> check_unboxed_gadt_arg sdecl.ptype_loc ex env argty + | [argty], _ex -> + check_unboxed_gadt_arg sdecl.ptype_loc params env argty | _ -> assert false end; let tcstr = diff --git a/typing/typedtree.ml b/typing/typedtree.ml index c72d39d95f..4f4fcd7a4f 100644 --- a/typing/typedtree.ml +++ b/typing/typedtree.ml @@ -153,6 +153,7 @@ and class_expr_desc = | Tcl_constraint of class_expr * class_type option * string list * string list * Concr.t (* Visible instance variables, methods and concretes methods *) + | Tcl_open of override_flag * Path.t * Longident.t loc * Env.t * class_expr and class_structure = { @@ -482,6 +483,7 @@ and class_type_desc = Tcty_constr of Path.t * Longident.t loc * core_type list | Tcty_signature of class_signature | Tcty_arrow of arg_label * core_type * class_type + | Tcty_open of override_flag * Path.t * Longident.t loc * Env.t * class_type and class_signature = { csig_self: core_type; diff --git a/typing/typedtree.mli b/typing/typedtree.mli index 5ceccc9160..62f7b1bb9f 100644 --- a/typing/typedtree.mli +++ b/typing/typedtree.mli @@ -267,7 +267,8 @@ and class_expr_desc = (Ident.t * string loc * expression) list * class_expr | Tcl_constraint of class_expr * class_type option * string list * string list * Concr.t - (* Visible instance variables, methods and concretes methods *) + (* Visible instance variables, methods and concretes methods *) + | Tcl_open of override_flag * Path.t * Longident.t loc * Env.t * class_expr and class_structure = { @@ -604,6 +605,7 @@ and class_type_desc = Tcty_constr of Path.t * Longident.t loc * core_type list | Tcty_signature of class_signature | Tcty_arrow of arg_label * core_type * class_type + | Tcty_open of override_flag * Path.t * Longident.t loc * Env.t * class_type and class_signature = { csig_self : core_type; diff --git a/typing/typedtreeIter.ml b/typing/typedtreeIter.ml index a6bdc07083..a3be8d3be5 100644 --- a/typing/typedtreeIter.ml +++ b/typing/typedtreeIter.ml @@ -511,6 +511,9 @@ module MakeIterator(Iter : IteratorArgument) : sig | Tcl_ident (_, _, tyl) -> List.iter iter_core_type tyl + + | Tcl_open (_, _, _, _, e) -> + iter_class_expr e end; Iter.leave_class_expr cexpr; @@ -524,6 +527,8 @@ module MakeIterator(Iter : IteratorArgument) : sig | Tcty_arrow (_label, ct, cl) -> iter_core_type ct; iter_class_type cl + | Tcty_open (_, _, _, _, e) -> + iter_class_type e end; Iter.leave_class_type ct; diff --git a/typing/typedtreeMap.ml b/typing/typedtreeMap.ml index b057ffdf0b..ccde8c03a4 100644 --- a/typing/typedtreeMap.ml +++ b/typing/typedtreeMap.ml @@ -566,7 +566,9 @@ module MakeMap(Map : MapArgument) = struct Some (map_class_type clty), vals, meths, concrs) | Tcl_ident (id, name, tyl) -> - Tcl_ident (id, name, List.map map_core_type tyl) + Tcl_ident (id, name, List.map map_core_type tyl) + | Tcl_open (ovf, p, lid, env, e) -> + Tcl_open (ovf, p, lid, env, map_class_expr e) in Map.leave_class_expr { cexpr with cl_desc = cl_desc } @@ -579,6 +581,8 @@ module MakeMap(Map : MapArgument) = struct Tcty_constr (path, lid, List.map map_core_type list) | Tcty_arrow (label, ct, cl) -> Tcty_arrow (label, map_core_type ct, map_class_type cl) + | Tcty_open (ovf, p, lid, env, e) -> + Tcty_open (ovf, p, lid, env, map_class_type e) in Map.leave_class_type { ct with cltyp_desc = cltyp_desc } diff --git a/typing/typemod.ml b/typing/typemod.ml index 7a61bba844..175442869d 100644 --- a/typing/typemod.ml +++ b/typing/typemod.ml @@ -82,9 +82,9 @@ let extract_sig_open env loc mty = (* Compute the environment after opening a module *) -let type_open_ ?toplevel ovf env loc lid = +let type_open_ ?used_slot ?toplevel ovf env loc lid = let path = Typetexp.lookup_module ~load:true env lid.loc lid.txt in - match Env.open_signature ~loc ?toplevel ovf path env with + match Env.open_signature ~loc ?used_slot ?toplevel ovf path env with | Some env -> path, env | None -> let md = Env.find_module path env in @@ -1565,6 +1565,8 @@ let type_package env m p nl = let tl' = List.map (fun name -> Btype.newgenty (Tconstr (mkpath mp name,[],ref Mnil))) + (* beware of interactions with Printtyp and short-path: + mp.name may have an arity > 0, cf. PR#7534 *) nl in (* go back to original level *) Ctype.end_def (); diff --git a/typing/typemod.mli b/typing/typemod.mli index fab7cdae53..b975eb2ac0 100644 --- a/typing/typemod.mli +++ b/typing/typemod.mli @@ -13,7 +13,7 @@ (* *) (**************************************************************************) -(* Type-checking of the module language *) +(** Type-checking of the module language and typed ast plugin hooks *) open Types open Format @@ -36,7 +36,7 @@ val transl_signature: val check_nongen_schemes: Env.t -> Types.signature -> unit val type_open_: - ?toplevel:bool -> Asttypes.override_flag -> + ?used_slot:bool ref -> ?toplevel:bool -> Asttypes.override_flag -> Env.t -> Location.t -> Longident.t Asttypes.loc -> Path.t * Env.t val modtype_of_package: Env.t -> Location.t -> diff --git a/typing/untypeast.ml b/typing/untypeast.ml index 6e98622154..5ba23fcc75 100644 --- a/typing/untypeast.ml +++ b/typing/untypeast.ml @@ -635,6 +635,9 @@ let class_expr sub cexpr = | Tcl_constraint (cl, Some clty, _vals, _meths, _concrs) -> Pcl_constraint (sub.class_expr sub cl, sub.class_type sub clty) + | Tcl_open (ovf, _p, lid, _env, e) -> + Pcl_open (ovf, lid, sub.class_expr sub e) + | Tcl_ident _ -> assert false | Tcl_constraint (_, None, _, _, _) -> assert false in @@ -649,6 +652,8 @@ let class_type sub ct = Pcty_constr (map_loc sub lid, List.map (sub.typ sub) list) | Tcty_arrow (label, ct, cl) -> Pcty_arrow (label, sub.typ sub ct, sub.class_type sub cl) + | Tcty_open (ovf, _p, lid, _env, e) -> + Pcty_open (ovf, lid, sub.class_type sub e) in Cty.mk ~loc ~attrs desc diff --git a/utils/clflags.ml b/utils/clflags.ml index 3a17315816..c82974a839 100644 --- a/utils/clflags.ml +++ b/utils/clflags.ml @@ -124,7 +124,7 @@ let dump_linear = ref false (* -dlinear *) let dump_interval = ref false (* -dinterval *) let keep_startup_file = ref false (* -dstartup *) let dump_combine = ref false (* -dcombine *) -let print_timings = ref false (* -dtimings *) +let profile_columns : Profile.column list ref = ref [] (* -dprofile/-dtimings *) let native_code = ref false (* set to true under ocamlopt *) @@ -154,7 +154,7 @@ let pic_code = ref (match Config.architecture with (* -fPIC *) let runtime_variant = ref "";; (* -runtime-variant *) let keep_docs = ref false (* -keep-docs *) -let keep_locs = ref false (* -keep-locs *) +let keep_locs = ref true (* -keep-locs *) let unsafe_string = ref (not Config.safe_string) (* -safe-string / -unsafe-string *) @@ -366,6 +366,11 @@ let unboxed_types = ref false let arg_spec = ref [] let arg_names = ref Misc.StringMap.empty + +let reset_arguments () = + arg_spec := []; + arg_names := Misc.StringMap.empty + let add_arguments loc args = List.iter (function (arg_name, _, _) as arg -> try diff --git a/utils/clflags.mli b/utils/clflags.mli index 6110c3f5cc..7f9b127ffc 100644 --- a/utils/clflags.mli +++ b/utils/clflags.mli @@ -13,6 +13,8 @@ (* *) (**************************************************************************) +(** Command line flags *) + (** Optimization parameters represented as ints indexed by round number. *) module Int_arg_helper : sig type parsed @@ -182,7 +184,7 @@ val keep_docs : bool ref val keep_locs : bool ref val unsafe_string : bool ref val opaque : bool ref -val print_timings : bool ref +val profile_columns : Profile.column list ref val flambda_invariant_checks : bool ref val unbox_closures : bool ref val unbox_closures_factor : int ref @@ -222,4 +224,8 @@ val add_arguments : string -> (string * Arg.spec * string) list -> unit *) val parse_arguments : Arg.anon_fun -> string -> unit +(* [print_arguments usage] print the standard usage message *) val print_arguments : string -> unit + +(* [reset_arguments ()] clear all declared arguments *) +val reset_arguments : unit -> unit diff --git a/utils/config.mli b/utils/config.mli index 0717de2965..aed5471489 100644 --- a/utils/config.mli +++ b/utils/config.mli @@ -151,6 +151,8 @@ val flambda : bool val spacetime : bool (* Whether the compiler was configured for Spacetime profiling *) +val spacetime_call_counts : bool + (* Whether call counts are to be available when Spacetime profiling *) val profinfo : bool (* Whether the compiler was configured for profiling *) val profinfo_width : int diff --git a/utils/config.mlp b/utils/config.mlp index c23a860abc..59da8e5e7c 100644 --- a/utils/config.mlp +++ b/utils/config.mlp @@ -107,6 +107,7 @@ let asm = "%%ASM%%" let asm_cfi_supported = %%ASM_CFI_SUPPORTED%% let with_frame_pointers = %%WITH_FRAME_POINTERS%% let spacetime = %%WITH_SPACETIME%% +let spacetime_call_counts = %%WITH_SPACETIME_CALL_COUNTS%% let libunwind_available = %%LIBUNWIND_AVAILABLE%% let libunwind_link_flags = "%%LIBUNWIND_LINK_FLAGS%%" let profinfo = %%WITH_PROFINFO%% diff --git a/utils/misc.mli b/utils/misc.mli index 0cd23baabc..119e98a50b 100644 --- a/utils/misc.mli +++ b/utils/misc.mli @@ -298,9 +298,9 @@ val delete_eol_spaces : string -> string -(** {2 Hook machinery} *) +(** {2 Hook machinery} -(* Hooks machinery: + Hooks machinery: [add_hook name f] will register a function that will be called on the argument of a later call to [apply_hooks]. Hooks are applied in the lexicographical order of their names. diff --git a/utils/profile.ml b/utils/profile.ml new file mode 100644 index 0000000000..59d67a124f --- /dev/null +++ b/utils/profile.ml @@ -0,0 +1,334 @@ +(**************************************************************************) +(* *) +(* OCaml *) +(* *) +(* Pierre Chambart, OCamlPro *) +(* *) +(* Copyright 2015 Institut National de Recherche en Informatique et *) +(* en Automatique. *) +(* *) +(* All rights reserved. This file is distributed under the terms of *) +(* the GNU Lesser General Public License version 2.1, with the *) +(* special exception on linking described in the file LICENSE. *) +(* *) +(**************************************************************************) + +[@@@ocaml.warning "+a-18-40-42-48"] + +type file = string + +external time_include_children: bool -> float = "caml_sys_time_include_children" +let cpu_time () = time_include_children true + +module Measure = struct + type t = { + time : float; + allocated_words : float; + top_heap_words : int; + } + let create () = + let stat = Gc.quick_stat () in + { + time = cpu_time (); + allocated_words = stat.minor_words +. stat.major_words; + top_heap_words = stat.top_heap_words; + } + let zero = { time = 0.; allocated_words = 0.; top_heap_words = 0 } +end + +module Measure_diff = struct + let timestamp = let r = ref (-1) in fun () -> incr r; !r + type t = { + timestamp : int; + duration : float; + allocated_words : float; + top_heap_words_increase : int; + } + let zero () = { + timestamp = timestamp (); + duration = 0.; + allocated_words = 0.; + top_heap_words_increase = 0; + } + let accumulate t (m1 : Measure.t) (m2 : Measure.t) = { + timestamp = t.timestamp; + duration = t.duration +. (m2.time -. m1.time); + allocated_words = + t.allocated_words +. (m2.allocated_words -. m1.allocated_words); + top_heap_words_increase = + t.top_heap_words_increase + (m2.top_heap_words - m1.top_heap_words); + } + let of_diff m1 m2 = + accumulate (zero ()) m1 m2 +end + +type hierarchy = + | E of (string, Measure_diff.t * hierarchy) Hashtbl.t +[@@unboxed] + +let create () = E (Hashtbl.create 2) +let hierarchy = ref (create ()) +let initial_measure = ref None +let reset () = hierarchy := create (); initial_measure := None + +let record_call ?(accumulate = false) name f = + let E prev_hierarchy = !hierarchy in + let start_measure = Measure.create () in + if !initial_measure = None then initial_measure := Some start_measure; + let this_measure_diff, this_table = + (* We allow the recording of multiple categories by the same name, for tools + like ocamldoc that use the compiler libs but don't care about profile + information, and so may record, say, "parsing" multiple times. *) + if accumulate + then + match Hashtbl.find prev_hierarchy name with + | exception Not_found -> Measure_diff.zero (), Hashtbl.create 2 + | measure_diff, E table -> + Hashtbl.remove prev_hierarchy name; + measure_diff, table + else Measure_diff.zero (), Hashtbl.create 2 + in + hierarchy := E this_table; + Misc.try_finally f + (fun () -> + hierarchy := E prev_hierarchy; + let end_measure = Measure.create () in + let measure_diff = + Measure_diff.accumulate this_measure_diff start_measure end_measure in + Hashtbl.add prev_hierarchy name (measure_diff, E this_table)) + +let record ?accumulate pass f x = record_call ?accumulate pass (fun () -> f x) + +type display = { + to_string : max:float -> width:int -> string; + worth_displaying : max:float -> bool; +} + +let time_display v : display = + (* Because indentation is meaningful, and because the durations are + the first element of each row, we can't pad them with spaces. *) + let to_string_without_unit v ~width = Printf.sprintf "%0*.03f" width v in + let to_string ~max:_ ~width = + to_string_without_unit v ~width:(width - 1) ^ "s" in + let worth_displaying ~max:_ = + float_of_string (to_string_without_unit v ~width:0) <> 0. in + { to_string; worth_displaying } + +let memory_word_display = + (* To make memory numbers easily comparable across rows, we choose a single + scale for an entire column. To keep the display compact and not overly + precise (no one cares about the exact number of bytes), we pick the largest + scale we can and we only show 3 digits. Avoiding showing tiny numbers also + allows us to avoid displaying passes that barely allocate compared to the + rest of the compiler. *) + let bytes_of_words words = words *. float_of_int (Sys.word_size / 8) in + let to_string_without_unit v ~width scale = + let precision = 3 and precision_power = 1e3 in + let v_rescaled = bytes_of_words v /. scale in + let v_rounded = + floor (v_rescaled *. precision_power +. 0.5) /. precision_power in + let v_str = Printf.sprintf "%.*f" precision v_rounded in + let index_of_dot = String.index v_str '.' in + let v_str_truncated = + String.sub v_str 0 + (if index_of_dot >= precision + then index_of_dot + else precision + 1) + in + Printf.sprintf "%*s" width v_str_truncated + in + let choose_memory_scale = + let units = [|"B"; "kB"; "MB"; "GB"|] in + fun words -> + let bytes = bytes_of_words words in + let scale = ref (Array.length units - 1) in + while !scale > 0 && bytes < 1024. ** float_of_int !scale do + decr scale + done; + 1024. ** float_of_int !scale, units.(!scale) + in + fun ?previous v : display -> + let to_string ~max ~width = + let scale, scale_str = choose_memory_scale max in + let width = width - String.length scale_str in + to_string_without_unit v ~width scale ^ scale_str + in + let worth_displaying ~max = + let scale, _ = choose_memory_scale max in + float_of_string (to_string_without_unit v ~width:0 scale) <> 0. + && match previous with + | None -> true + | Some p -> + (* This branch is for numbers that represent absolute quantity, rather + than differences. It allows us to skip displaying the same absolute + quantity many times in a row. *) + to_string_without_unit p ~width:0 scale + <> to_string_without_unit v ~width:0 scale + in + { to_string; worth_displaying } + +let profile_list (E table) = + let l = Hashtbl.fold (fun k d l -> (k, d) :: l) table [] in + List.sort (fun (_, (p1, _)) (_, (p2, _)) -> + compare p1.Measure_diff.timestamp p2.Measure_diff.timestamp) l + +let compute_other_category (E table : hierarchy) (total : Measure_diff.t) = + let r = ref total in + Hashtbl.iter (fun _pass ((p2 : Measure_diff.t), _) -> + let p1 = !r in + r := { + timestamp = p1.timestamp; + duration = p1.duration -. p2.duration; + allocated_words = p1.allocated_words -. p2.allocated_words; + top_heap_words_increase = + p1.top_heap_words_increase - p2.top_heap_words_increase; + } + ) table; + !r + +type row = R of string * (float * display) list * row list +type column = [ `Time | `Alloc | `Top_heap | `Abs_top_heap ] + +let rec rows_of_hierarchy ~nesting make_row name measure_diff hierarchy env = + let rows = + rows_of_hierarchy_list + ~nesting:(nesting + 1) make_row hierarchy measure_diff env in + let values, env = + make_row env measure_diff ~toplevel_other:(nesting = 0 && name = "other") in + R (name, values, rows), env + +and rows_of_hierarchy_list ~nesting make_row hierarchy total env = + let list = profile_list hierarchy in + let list = + if list <> [] || nesting = 0 + then list @ [ "other", (compute_other_category hierarchy total, create ()) ] + else [] + in + let env = ref env in + List.map (fun (name, (measure_diff, hierarchy)) -> + let a, env' = + rows_of_hierarchy ~nesting make_row name measure_diff hierarchy !env in + env := env'; + a + ) list + +let rows_of_hierarchy hierarchy measure_diff initial_measure columns = + (* Computing top heap size is a bit complicated: if the compiler applies a + list of passes n times (rather than applying pass1 n times, then pass2 n + times etc), we only show one row for that pass but what does "top heap + size at the end of that pass" even mean? + It seems the only sensible answer is to pretend the compiler applied pass1 + n times, pass2 n times by accumulating all the heap size increases that + happened during each pass, and then compute what the heap size would have + been. So that's what we do. + There's a bit of extra complication, which is that the heap can increase in + between measurements. So the heap sizes can be a bit off until the "other" + rows account for what's missing. We special case the toplevel "other" row + so that any increases that happened before the start of the compilation is + correctly reported, as a lot of code may run before the start of the + compilation (eg functor applications). *) + let make_row prev_top_heap_words (p : Measure_diff.t) ~toplevel_other = + let top_heap_words = + prev_top_heap_words + + p.top_heap_words_increase + - if toplevel_other + then initial_measure.Measure.top_heap_words + else 0 + in + let make value ~f = value, f value in + List.map (function + | `Time -> + make p.duration ~f:time_display + | `Alloc -> + make p.allocated_words ~f:memory_word_display + | `Top_heap -> + make (float_of_int p.top_heap_words_increase) ~f:memory_word_display + | `Abs_top_heap -> + make (float_of_int top_heap_words) + ~f:(memory_word_display ~previous:(float_of_int prev_top_heap_words)) + ) columns, + top_heap_words + in + rows_of_hierarchy_list ~nesting:0 make_row hierarchy measure_diff + initial_measure.top_heap_words + +let max_by_column ~n_columns rows = + let a = Array.make n_columns 0. in + let rec loop (R (_, values, rows)) = + List.iteri (fun i (v, _) -> a.(i) <- max a.(i) v) values; + List.iter loop rows + in + List.iter loop rows; + a + +let width_by_column ~n_columns ~display_cell rows = + let a = Array.make n_columns 1 in + let rec loop (R (_, values, rows)) = + List.iteri (fun i cell -> + let _, str = display_cell i cell ~width:0 in + a.(i) <- max a.(i) (String.length str) + ) values; + List.iter loop rows; + in + List.iter loop rows; + a + +let display_rows ppf rows = + let n_columns = + match rows with + | [] -> 0 + | R (_, values, _) :: _ -> List.length values + in + let maxs = max_by_column ~n_columns rows in + let display_cell i (_, c) ~width = + let display_cell = c.worth_displaying ~max:maxs.(i) in + display_cell, if display_cell + then c.to_string ~max:maxs.(i) ~width + else String.make width '-' + in + let widths = width_by_column ~n_columns ~display_cell rows in + let rec loop (R (name, values, rows)) ~indentation = + let worth_displaying, cell_strings = + values + |> List.mapi (fun i cell -> display_cell i cell ~width:widths.(i)) + |> List.split + in + if List.exists (fun b -> b) worth_displaying then + Format.fprintf ppf "%s%s %s@\n" + indentation (String.concat " " cell_strings) name; + List.iter (loop ~indentation:(" " ^ indentation)) rows; + in + List.iter (loop ~indentation:"") rows + +let print ppf columns = + match columns with + | [] -> () + | _ :: _ -> + let initial_measure = + match !initial_measure with + | Some v -> v + | None -> Measure.zero + in + let total = Measure_diff.of_diff Measure.zero (Measure.create ()) in + display_rows ppf (rows_of_hierarchy !hierarchy total initial_measure columns) + +let column_mapping = [ + "time", `Time; + "alloc", `Alloc; + "top-heap", `Top_heap; + "absolute-top-heap", `Abs_top_heap; +] + +let column_names = List.map fst column_mapping + +let options_doc = + Printf.sprintf + " Print performance information for each pass\ + \n The columns are: %s." + (String.concat " " column_names) + +let all_columns = List.map snd column_mapping + +let generate = "generate" +let transl = "transl" +let typing = "typing" diff --git a/utils/timings.mli b/utils/profile.mli index 9de510e67a..83a8252412 100644 --- a/utils/timings.mli +++ b/utils/profile.mli @@ -17,19 +17,24 @@ type file = string -val cpu_time : unit -> float - val reset : unit -> unit -(** erase all recorded times *) +(** erase all recorded profile information *) + +val record_call : ?accumulate:bool -> string -> (unit -> 'a) -> 'a +(** [record_call pass f] calls [f] and records its profile information. *) + +val record : ?accumulate:bool -> string -> ('a -> 'b) -> 'a -> 'b +(** [record pass f arg] records the profile information of [f arg] *) + +type column = [ `Time | `Alloc | `Top_heap | `Abs_top_heap ] -val time_call : ?accumulate:bool -> string -> (unit -> 'a) -> 'a -(** [time_call pass f] calls [f] and records its runtime. *) +val print : Format.formatter -> column list -> unit +(** Prints the selected recorded profiling information to the formatter. *) -val time : ?accumulate:bool -> string -> ('a -> 'b) -> 'a -> 'b -(** [time pass f arg] records the runtime of [f arg] *) +(** Command line flags *) -val print : ?total:float -> Format.formatter -> unit -(** Prints all recorded timings to the formatter. *) +val options_doc : string +val all_columns : column list (** A few pass names that are needed in several places, and shared to avoid typos. *) diff --git a/utils/timings.ml b/utils/timings.ml deleted file mode 100644 index fac2896ce2..0000000000 --- a/utils/timings.ml +++ /dev/null @@ -1,99 +0,0 @@ -(**************************************************************************) -(* *) -(* OCaml *) -(* *) -(* Pierre Chambart, OCamlPro *) -(* *) -(* Copyright 2015 Institut National de Recherche en Informatique et *) -(* en Automatique. *) -(* *) -(* All rights reserved. This file is distributed under the terms of *) -(* the GNU Lesser General Public License version 2.1, with the *) -(* special exception on linking described in the file LICENSE. *) -(* *) -(**************************************************************************) - -type file = string - -external time_include_children: bool -> float = "caml_sys_time_include_children" -let cpu_time () = time_include_children true - -type times = { start : float; duration : float } -type hierarchy = - | E of (string, times * hierarchy) Hashtbl.t -[@@unboxed] - -let hierarchy = ref (E (Hashtbl.create 2)) -let reset () = hierarchy := E (Hashtbl.create 2) - -let time_call ?(accumulate = false) name f = - let E prev_hierarchy = !hierarchy in - let this_times, this_table = - (* We allow the recording of multiple categories by the same name, for tools like - ocamldoc that use the compiler libs but don't care about timings information, - and so may record, say, "parsing" multiple times. *) - if accumulate - then - match Hashtbl.find prev_hierarchy name with - | exception Not_found -> None, Hashtbl.create 2 - | times, E table -> - Hashtbl.remove prev_hierarchy name; - Some times, table - else None, Hashtbl.create 2 - in - hierarchy := E this_table; - let start = cpu_time () in - Misc.try_finally f - (fun () -> - hierarchy := E prev_hierarchy; - let end_ = cpu_time () in - let times = - match this_times with - | None -> { start; duration = end_ -. start } - | Some { start = initial_start; duration } -> - { start = initial_start; duration = duration +. end_ -. start } - in - Hashtbl.add prev_hierarchy name (times, E this_table)) - -let time ?accumulate pass f x = time_call ?accumulate pass (fun () -> f x) - -let timings_list (E table) = - let l = Hashtbl.fold (fun k d l -> (k, d) :: l) table [] in - List.sort (fun (pass1, (start1, _)) (pass2, (start2, _)) -> - compare (start1, pass1) (start2, pass2)) l - -(* Because indentation is meaningful, and because the durations are - the first element of each row, we can't pad them with spaces. *) -let duration_as_string ~pad duration = Printf.sprintf "%0*.03f" pad duration - -let rec print ppf hierarchy ~total ~nesting = - let total_of_children = ref 0. in - let list = timings_list hierarchy in - let max_duration_width = - List.fold_left - (fun acc (_, (times, _)) -> - max acc (String.length (duration_as_string ~pad:0 times.duration))) - 0 list - in - let print_pass ~duration ~pass = - let duration_as_string = - duration_as_string ~pad:max_duration_width duration in - if float_of_string duration_as_string <> 0. then - Format.fprintf ppf "%s%ss %s@\n" - (String.make (nesting * 2) ' ') duration_as_string pass - in - List.iter (fun (pass, ({ start = _; duration }, sub_hierarchy)) -> - print_pass ~duration ~pass; - print ppf sub_hierarchy ~total:duration ~nesting:(nesting + 1); - total_of_children := !total_of_children +. duration; - ) list; - if list <> [] || nesting = 0 then - print_pass ~duration:(total -. !total_of_children) ~pass:"other"; -;; - -let print ?(total = cpu_time ()) ppf = - print ppf !hierarchy ~total ~nesting:0 - -let generate = "generate" -let transl = "transl" -let typing = "typing" diff --git a/utils/warnings.ml b/utils/warnings.ml index d7eafb9933..3a21a616f5 100644 --- a/utils/warnings.ml +++ b/utils/warnings.ml @@ -566,9 +566,7 @@ let descriptions = 23, "Useless record \"with\" clause."; 24, "Bad module name: the source file name is not a valid OCaml module \ name."; - (* 25, "Pattern-matching with all clauses guarded. Exhaustiveness cannot \ - be\n\ - \ checked."; (* Now part of warning 8 *) *) + 25, "Deprecated: now part of warning 8."; 26, "Suspicious unused variable: unused variable that is bound\n\ \ with \"let\" or \"as\", and doesn't start with an underscore (\"_\")\n\ \ character."; diff --git a/utils/warnings.mli b/utils/warnings.mli index a6ed2514ed..56fad3695c 100644 --- a/utils/warnings.mli +++ b/utils/warnings.mli @@ -44,7 +44,7 @@ type t = | Preprocessor of string (* 22 *) | Useless_record_with (* 23 *) | Bad_module_name of string (* 24 *) - | All_clauses_guarded (* 25 *) + | All_clauses_guarded (* 8, used to be 25 *) | Unused_var of string (* 26 *) | Unused_var_strict of string (* 27 *) | Wildcard_arg_to_constant_constr (* 28 *) |