* remove the unused is_native_tail_call_heuristic forward reference
This forward-reference from Lambda to Asmcomp was used to generate
machine-specific tailcall information in -annot output; this only use
was removed in 57d329e07b, so we can now
remove it to simplify the codebase.
The logic was non-trivial and might be useful again in the future.
* [minor] testsuite: convert warnings/w51.ml to an expect-test
* [minor] translattribute: refactor attribute payload deconstruction
* [@tailcall false]: warn if the call *is* a tailcall
(+ constructor renaming suggested by Nicolás during review)
* Changes
* testsuite: add an example with the 'invalid payload' exception
(suggested by Nicolás during review)
The Spacetime memory profiler is not going to be supported in Multicore OCaml, and is already broken by some of the related changes in OCaml 4.12. The core development team decided to remove Spacetime support from OCaml 4.12.
Introduce the type Cmm.exttype to precisely describe arguments to
external C functions, especially unboxed numerical arguments.
Annotate Cmm.Cextcall with the types of the arguments (Cmm.exttype list).
An empty list means "all arguments have default type XInt".
Annotate Mach.Iextcall with the type of the result (Cmm.machtype)
and the types of the arguments (Cmm.exttype list).
Change (slightly) the API for describing calling conventions in Proc:
- loc_external_arguments now takes a Cmm.exttype list,
in order to know more precisely the types of the arguments.
- loc_arguments, loc_parameters, loc_results, loc_external_results
now take a Cmm.machype instead of an array of pseudoregisters.
(Only the types of the pseudoregisters mattered anyway.)
Update the implementations of module Proc accordingly, in every port.
Introduce a new overridable method in Selectgen, insert_move_extcall_arg,
to produce the code that moves an argument of an external C function
to the locations returned by Proc.loc_external_arguments.
Revise the selection of external calls accordingly
(method emit_extcall_args in Selectgen).
Implement (in utils/binutils.ml) a simple parser for ELF, Mach-O and PE shared object files. Use it to get rid of libbfd in ocamlobjinfo and to improve the checking of external primitives during linking in ocamlc.
This commit introduces a quantity Lambda.max_arity that is the maximal
number of parameters that a Lambda function can have.
Uncurrying is throttled so that, for example, assuming the limit is 10,
a 15-argument curried function fun x1 ... x15 -> e
becomes a 10-argument function (x1...x10) that returns a 5-argument
function (x11...x15).
Concerning untupling, a function that takes a N-tuple of arguments,
where N is above the limit, remains a function that takes a single
argument that is a tuple.
Currently, max_arity is set to 126 in native-code, to match the new
representation of closures implemented by #9619. A signed 8-bit field
is used to store the arity. 126 instead of 127 to account for the
extra "environment" argument.
In bytecode the limit is infinity (max_int) because there are no needs
yet for a limit on the number of parameters.
The aim is to also move the Simple/Half_simple/General stuff from
matching, but we need to split in those modules the part that are
purely structural (they go in Patterns) and the parts that are
actually compilation logic (Half_simple.of_clause), those stay in
Matching.
* Move driver code from Cmt2annot to Read_cmt
* Move cmt2annot.ml into typing/
* make depend
* Use standard error handling
* Move specific logic to read_cmt
* Do not pass full cmt record as argument
* Better locations
* Emit .annot files produced from cmt data
* Remove direct calls to Stypes
* Deprecate -annot
* Changes
* make depend
* Adapt doc
* make -C tools depend
Moves the alloc_dbginfo type to Debuginfo, to avoid a circular
dependency on architectures that use Branch_relaxation.
This commit generates frame tables with allocation sizes on all
architectures, but does not yet update the allocation code for
non-amd64 backends.
This commit defines five default argument modules in
Main_args.default. Those modules provide a default implementation
for the argument of ocaml, ocamlnat, ocamlc, ocamlopt, ocamldoc,
ocamlcp, ocamloptp, and expect_test.
Grouping together those implementations allow to share as much as
possible similar implementation across executables. It should make
easier to keep synchronized the various implementation, or reuse
those implementation in alternative drivers.
Separate the description of the IR from the transformations
performed on it by moving type declarations from linearize.ml
into their own file, called linear.ml.
The domain state structure (caml_domain_state) uses certaing field names
(young_start, young_limit, etc.) that conflict with the macro
definitions in compatibility.h that use the same names. These macro
definitions are made only when CAML_NAME_SPACE is not defined. To avoid
conflict, when CAML_NAME_SPACE is not defined, we prefix the field names
in caml_domain_state with an underscore.
Update .depend files.
* Various file moves in the middle end: this is the first stage of improving separation between the middle end and backend.
* Creation of file_formats/ directory (with associated file moves) to hold the definitions of compilation artifact formats.
* Creation of lambda/ directory (with associated file moves) to hold Lambda language definition files, transformation passes and construction passes from Typedtree.
* Disable (hopefully temporarily) dynlink, debugger and ocamldoc for the dune build.