Skip to content

Commit

Permalink
Merge commit 'dbd717e817307dc6a527dd54cc1c9765b30cfad2' into parallel…
Browse files Browse the repository at this point in the history
…_minor_gc_4_10
  • Loading branch information
ctk21 committed Apr 29, 2020
2 parents 9e27c29 + dbd717e commit 6314f52
Show file tree
Hide file tree
Showing 27 changed files with 3,907 additions and 2,722 deletions.
95 changes: 84 additions & 11 deletions .depend
Original file line number Diff line number Diff line change
Expand Up @@ -1965,6 +1965,7 @@ asmcomp/asmgen.cmo : \
asmcomp/comballoc.cmi \
asmcomp/coloring.cmi \
asmcomp/cmmgen.cmi \
asmcomp/cmm_helpers.cmi \
asmcomp/cmm.cmi \
utils/clflags.cmi \
middle_end/clambda.cmi \
Expand Down Expand Up @@ -2005,6 +2006,7 @@ asmcomp/asmgen.cmx : \
asmcomp/comballoc.cmx \
asmcomp/coloring.cmx \
asmcomp/cmmgen.cmx \
asmcomp/cmm_helpers.cmx \
asmcomp/cmm.cmx \
utils/clflags.cmx \
middle_end/clambda.cmx \
Expand Down Expand Up @@ -2056,7 +2058,7 @@ asmcomp/asmlink.cmo : \
utils/config.cmi \
middle_end/compilenv.cmi \
file_formats/cmx_format.cmi \
asmcomp/cmmgen.cmi \
asmcomp/cmm_helpers.cmi \
asmcomp/cmm.cmi \
utils/clflags.cmi \
utils/ccomp.cmi \
Expand All @@ -2074,7 +2076,7 @@ asmcomp/asmlink.cmx : \
utils/config.cmx \
middle_end/compilenv.cmx \
file_formats/cmx_format.cmi \
asmcomp/cmmgen.cmx \
asmcomp/cmm_helpers.cmx \
asmcomp/cmm.cmx \
utils/clflags.cmx \
utils/ccomp.cmx \
Expand Down Expand Up @@ -2179,13 +2181,11 @@ asmcomp/cmm.cmi : \
lambda/debuginfo.cmi \
middle_end/backend_var.cmi \
parsing/asttypes.cmi
asmcomp/cmmgen.cmo : \
typing/types.cmi \
asmcomp/cmm_helpers.cmo : \
utils/targetint.cmi \
lambda/switch.cmi \
asmcomp/strmatch.cmi \
asmcomp/proc.cmi \
middle_end/printclambda_primitives.cmi \
typing/primitive.cmi \
utils/numbers.cmi \
utils/misc.cmi \
Expand All @@ -2203,15 +2203,12 @@ asmcomp/cmmgen.cmo : \
middle_end/backend_var.cmi \
parsing/asttypes.cmi \
asmcomp/arch.cmo \
asmcomp/afl_instrument.cmi \
asmcomp/cmmgen.cmi
asmcomp/cmmgen.cmx : \
typing/types.cmx \
asmcomp/cmm_helpers.cmi
asmcomp/cmm_helpers.cmx : \
utils/targetint.cmx \
lambda/switch.cmx \
asmcomp/strmatch.cmx \
asmcomp/proc.cmx \
middle_end/printclambda_primitives.cmx \
typing/primitive.cmx \
utils/numbers.cmx \
utils/misc.cmx \
Expand All @@ -2229,19 +2226,71 @@ asmcomp/cmmgen.cmx : \
middle_end/backend_var.cmx \
parsing/asttypes.cmi \
asmcomp/arch.cmx \
asmcomp/cmm_helpers.cmi
asmcomp/cmm_helpers.cmi : \
utils/targetint.cmi \
typing/primitive.cmi \
parsing/location.cmi \
lambda/lambda.cmi \
lambda/debuginfo.cmi \
file_formats/cmx_format.cmi \
asmcomp/cmmgen_state.cmi \
asmcomp/cmm.cmi \
middle_end/clambda_primitives.cmi \
middle_end/clambda.cmi \
parsing/asttypes.cmi
asmcomp/cmmgen.cmo : \
typing/types.cmi \
middle_end/printclambda_primitives.cmi \
typing/primitive.cmi \
utils/misc.cmi \
lambda/lambda.cmi \
lambda/debuginfo.cmi \
utils/config.cmi \
middle_end/compilenv.cmi \
asmcomp/cmmgen_state.cmi \
asmcomp/cmm_helpers.cmi \
asmcomp/cmm.cmi \
utils/clflags.cmi \
middle_end/clambda_primitives.cmi \
middle_end/clambda.cmi \
middle_end/backend_var.cmi \
parsing/asttypes.cmi \
asmcomp/arch.cmo \
asmcomp/afl_instrument.cmi \
asmcomp/cmmgen.cmi
asmcomp/cmmgen.cmx : \
typing/types.cmx \
middle_end/printclambda_primitives.cmx \
typing/primitive.cmx \
utils/misc.cmx \
lambda/lambda.cmx \
lambda/debuginfo.cmx \
utils/config.cmx \
middle_end/compilenv.cmx \
asmcomp/cmmgen_state.cmx \
asmcomp/cmm_helpers.cmx \
asmcomp/cmm.cmx \
utils/clflags.cmx \
middle_end/clambda_primitives.cmx \
middle_end/clambda.cmx \
middle_end/backend_var.cmx \
parsing/asttypes.cmi \
asmcomp/arch.cmx \
asmcomp/afl_instrument.cmx \
asmcomp/cmmgen.cmi
asmcomp/cmmgen.cmi : \
file_formats/cmx_format.cmi \
asmcomp/cmm.cmi \
middle_end/clambda.cmi
asmcomp/cmmgen_state.cmo : \
utils/misc.cmi \
middle_end/compilenv.cmi \
asmcomp/cmm.cmi \
middle_end/clambda.cmi \
asmcomp/cmmgen_state.cmi
asmcomp/cmmgen_state.cmx : \
utils/misc.cmx \
middle_end/compilenv.cmx \
asmcomp/cmm.cmx \
middle_end/clambda.cmx \
asmcomp/cmmgen_state.cmi
Expand Down Expand Up @@ -5564,6 +5613,30 @@ asmcomp/debug/reg_with_debug_info.cmx : \
asmcomp/debug/reg_with_debug_info.cmi : \
asmcomp/reg.cmi \
middle_end/backend_var.cmi
driver/compdynlink.cmi :
driver/compdynlink_common.cmo : \
driver/compdynlink_types.cmi \
driver/compdynlink_platform_intf.cmi \
driver/compdynlink_common.cmi
driver/compdynlink_common.cmx : \
driver/compdynlink_types.cmx \
driver/compdynlink_platform_intf.cmx \
driver/compdynlink_common.cmi
driver/compdynlink_common.cmi : \
driver/compdynlink_platform_intf.cmi
driver/compdynlink_platform_intf.cmo : \
driver/compdynlink_types.cmi \
driver/compdynlink_platform_intf.cmi
driver/compdynlink_platform_intf.cmx : \
driver/compdynlink_types.cmx \
driver/compdynlink_platform_intf.cmi
driver/compdynlink_platform_intf.cmi : \
driver/compdynlink_types.cmi
driver/compdynlink_types.cmo : \
driver/compdynlink_types.cmi
driver/compdynlink_types.cmx : \
driver/compdynlink_types.cmi
driver/compdynlink_types.cmi :
driver/compenv.cmo : \
utils/warnings.cmi \
utils/profile.cmi \
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ _build
/autom4te.cache
/ocamlc
/config.cache
/ocaml-*.cache
/config.log
/config.status
/libtool
Expand Down
20 changes: 20 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Working version
- #7927, #8527: Replace long tuples into records in typeclass.ml
(Ulugbek Abdullaev, review by David Allsopp and Gabriel Scherer)

- #1963: split cmmgen into generic Cmm helpers and clambda transformations
(Vincent Laviron, review by Mark Shinwell)

- #1901: Fix lexing of character literals in comments
(Pieter Goetschalckx, review by Damien Doligez)

Expand Down Expand Up @@ -85,6 +88,9 @@ Working version
- #8992: share argument implementations between executables
(Florian Angeletti, review by Gabriel Scherer)

- #9015: fix fatal error in pprint_ast (#8789)
(Damien Doligez, review by ...)

### Code generation and optimizations:

- #8990: amd64: Emit 32bit registers for Iconst_int when we can
Expand Down Expand Up @@ -244,6 +250,10 @@ Working version
(Stephen Dolan, review by Gabriel Scherer, Sébastien Hinderer and
Thomas Refis)

- #8835: new configure option --disable-stdlib-manpages to disable building
and installation of the library manpages.
(David Allsopp, review by Florian Angeletti and Gabriel Scherer)

- #8837: build manpages using ocamldoc.opt when available
cuts the manpages build time from 14s to 4s
(Gabriel Scherer, review by David Allsopp and Sébastien Hinderer,
Expand All @@ -262,6 +272,12 @@ Working version
incompatible with C.
(David Allsopp, review by Nicolás Ojeda Bär, report by Sebastian Rasmussen)

- #8995: allow developers to specify frequently-used configure options in
Git (ocaml.configure option) and a directory for host-specific, shareable
config.cache files (ocaml.configure-cache option). See HACKING.adoc for
further details.
(David Allsopp, review by Gabriel Scherer)

### Compiler user-interface and warnings:

- #8702, #8777: improved error messages for fixed row polymorphic variants
Expand Down Expand Up @@ -293,6 +309,10 @@ Working version
(Gabriel Scherer and Florian Angeletti,
review by Florian Angeletti and Gabriel Radanne)

- #8792, #9018: Possible (latent) bug in Ctype.normalize_type
removed incrimined Btype.log_type, replaced by Btype.set_type
(Jacques Garrigue, report by Alain Frisch, review by Thomas Refis)

- #8855, #8858: Links for tools not created when installing with
--disable-installing-byecode-programs (e.g. ocamldep.opt installed, but
ocamldep link not created)
Expand Down
33 changes: 33 additions & 0 deletions HACKING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,39 @@ Additionally, there are some developer specific targets in link:Makefile.dev[].
These targets are automatically available when working in a Git clone of the
repository, but are not available from a tarball.

=== Automatic configure options

If you have options to `configure` which you always (or at least frequently)
use, it's possible to store them in Git, and `configure` will automatically add
them. For example, you may wish to avoid building the debug runtime by default
while developing, in which case you can issue
`git config --global ocaml.configure '--disable-debug-runtime'`. The `configure`
script will alert you that it has picked up this option and added it _before_
any options you specified for `configure`.

Options are added before those passed on the command line, so it's possible to
override them, for example `./configure --enable-debug-runtime` will build the
debug runtime, since the enable flag appears after the disable flag. You can
also use the full power of Git's `config` command and have options specific to
particular clone or worktree.

=== Speeding up configure

`configure` includes the standard `-C` option which caches various test results
in the file `config.cache` and can use those results to avoid running tests in
subsequent invocations. This mechanism works fine, except that it is easy to
clean the cache by mistake (e.g. with `git clean -dfX`). The cache is also
host-specific which means the file has to be deleted if you run `configure` with
a new `--host` value (this is quite common on Windows, where `configure` is
also quite slow to run).

You can elect to have host-specific cache files by issuing
`git config --global ocaml.configure-cache .`. The `configure` script will now
automatically create `ocaml-host.cache` (e.g. `ocaml-x86_64-pc-windows.cache`,
or `ocaml-default.cache`). If you work with multiple worktrees, you can share
these cache files by issuing `git config --global ocaml.configure-cache ..`. The
directory is interpreted _relative_ to the `configure` script.

=== Bootstrapping

The OCaml compiler is bootstrapped. This means that
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ ASMCOMP=\
asmcomp/afl_instrument.cmo \
asmcomp/strmatch.cmo \
asmcomp/cmmgen_state.cmo \
asmcomp/cmm_helpers.cmo \
asmcomp/cmmgen.cmo \
asmcomp/interval.cmo \
asmcomp/printmach.cmo asmcomp/selectgen.cmo \
Expand Down Expand Up @@ -326,7 +327,7 @@ utils/config.ml: utils/config.mlp Makefile.config utils/Makefile

.PHONY: reconfigure
reconfigure:
./configure $(CONFIGURE_ARGS)
ac_read_git_config=true ./configure $(CONFIGURE_ARGS)

utils/domainstate.ml: utils/domainstate.ml.c runtime/caml/domain_state.tbl
$(CPP) -I runtime/caml $< > $@
Expand Down
1 change: 1 addition & 0 deletions Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ MAX_TESTSUITE_DIR_RETRIES=@max_testsuite_dir_retries@
FLAT_FLOAT_ARRAY=@flat_float_array@
FUNCTION_SECTIONS=@function_sections@
AWK=@AWK@
STDLIB_MANPAGES=@stdlib_manpages@


### Native command to build ocamlrun.exe
Expand Down
4 changes: 2 additions & 2 deletions asmcomp/asmgen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ let compile_genfuns ~ppf_dump f =
| (Cfunction {fun_name = name}) as ph when f name ->
compile_phrase ~ppf_dump ph
| _ -> ())
(Cmmgen.generic_functions true [Compilenv.current_unit_infos ()])
(Cmm_helpers.generic_functions true [Compilenv.current_unit_infos ()])

let compile_unit asm_filename keep_asm obj_filename gen =
let create_asm = keep_asm || not !Emitaux.binary_backend_available in
Expand Down Expand Up @@ -147,7 +147,7 @@ let end_gen_implementation ?toplevel ~ppf_dump
This is important if a module that uses such a symbol is later
dynlinked. *)
compile_phrase ~ppf_dump
(Cmmgen.reference_symbols
(Cmm_helpers.reference_symbols
(List.filter_map (fun prim ->
if not (Primitive.native_name_is_external prim) then None
else Some (Primitive.native_name prim))
Expand Down
27 changes: 14 additions & 13 deletions asmcomp/asmlink.ml
Original file line number Diff line number Diff line change
Expand Up @@ -230,24 +230,25 @@ let make_startup_file ~ppf_dump units_list ~crc_interfaces =
Emit.begin_assembly ();
let name_list =
List.flatten (List.map (fun (info,_,_) -> info.ui_defines) units_list) in
compile_phrase (Cmmgen.entry_point name_list);
compile_phrase (Cmm_helpers.entry_point name_list);
let units = List.map (fun (info,_,_) -> info) units_list in
List.iter compile_phrase (Cmmgen.generic_functions false units);
List.iter compile_phrase (Cmm_helpers.generic_functions false units);
Array.iteri
(fun i name -> compile_phrase (Cmmgen.predef_exception i name))
(fun i name -> compile_phrase (Cmm_helpers.predef_exception i name))
Runtimedef.builtin_exceptions;
compile_phrase (Cmmgen.global_table name_list);
compile_phrase (Cmm_helpers.global_table name_list);
let globals_map = make_globals_map units_list ~crc_interfaces in
compile_phrase (Cmmgen.globals_map globals_map);
compile_phrase(Cmmgen.data_segment_table ("_startup" :: name_list));
compile_phrase (Cmm_helpers.globals_map globals_map);
compile_phrase(Cmm_helpers.data_segment_table ("_startup" :: name_list));
if !Clflags.function_sections then
compile_phrase(Cmmgen.code_segment_table("_hot" :: "_startup" :: name_list))
compile_phrase
(Cmm_helpers.code_segment_table("_hot" :: "_startup" :: name_list))
else
compile_phrase(Cmmgen.code_segment_table("_startup" :: name_list));
compile_phrase(Cmm_helpers.code_segment_table("_startup" :: name_list));
let all_names = "_startup" :: "_system" :: name_list in
compile_phrase (Cmmgen.frame_table all_names);
compile_phrase (Cmm_helpers.frame_table all_names);
if Config.spacetime then begin
compile_phrase (Cmmgen.spacetime_shapes all_names);
compile_phrase (Cmm_helpers.spacetime_shapes all_names);
end;
if !Clflags.output_complete_object then
force_linking_of_startup ~ppf_dump;
Expand All @@ -259,10 +260,10 @@ let make_shared_startup_file ~ppf_dump units =
Compilenv.reset "_shared_startup";
Emit.begin_assembly ();
List.iter compile_phrase
(Cmmgen.generic_functions true (List.map fst units));
compile_phrase (Cmmgen.plugin_header units);
(Cmm_helpers.generic_functions true (List.map fst units));
compile_phrase (Cmm_helpers.plugin_header units);
compile_phrase
(Cmmgen.global_table
(Cmm_helpers.global_table
(List.map (fun (ui,_) -> ui.ui_symbol) units));
if !Clflags.output_complete_object then
force_linking_of_startup ~ppf_dump;
Expand Down
5 changes: 4 additions & 1 deletion asmcomp/cmm.mli
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ and operation =
| Cfloatofint | Cintoffloat
| Ccmpf of float_comparison
| Craise of Lambda.raise_kind
| Ccheckbound
| Ccheckbound (* Takes two arguments : first the bound to check against,
then the index.
It results in a bounds error if the index is greater than
or equal to the bound. *)
| Cpoll

(** Every basic block should have a corresponding [Debuginfo.t] for its
Expand Down
Loading

0 comments on commit 6314f52

Please sign in to comment.