Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRMC, reloaded #9760

Merged
merged 32 commits into from Nov 2, 2021
Merged

TRMC, reloaded #9760

merged 32 commits into from Nov 2, 2021

Conversation

gasche
Copy link
Member

@gasche gasche commented Jul 13, 2020

This PR is a reboot of @let-def's RFC #181, which implements Tail Recursion Modulo Cons (TRMC) for the OCaml compiler through an opt-in [@tailrec_mod_constr] attribute. It is a near-complete reimplementation of the original prototype, coming out of user-interface discussions with @let-def and a different implementation approach (more science, more fun!). It is joint work with @let-def, of course, and also @ksromanov who helped with testing, benchmarks and motivation.

TRMC in a hurry

Today you have to choose between writing

let rec map f = function
| [] -> []
| x :: xs ->
  let y = f x in
  y :: map f xs

which is fast, but fails on large inputs (Stack Overflow), and

let map f xs =
  let rec map f acc xs = function
  | [] -> List.rev acc
  | x :: xs -> map f (f x :: acc) xs
  in map f [] xs

which is tail-recursive, but slower as it allocates twice as many cons cells.

With this PR you can just write

let[@tailrec_mod_constr] rec map f = function
| [] -> []
| x :: xs -> f x :: map f xs

and be done with it: you have a version of map that is almost as fast as the non-tail-recursive map (and allocates exactly as much), yet is tail-recursive.

This solves a tension we have in stdlib design (the compiler stdlib goes for "fast and incorrect", most other stdlibs use sensibly more complex code to try to be tail-recursive at a smaller price than List.rev), and it can also apply to many other functions (not just on lists, any constructor application will do), including in user code. Note that TRMC is not an implicit/automatic optimization, it is an explicitly-requested transformation -- in particular, it duplicates code and changes evaluation order (the TRMC call is evaluated last).

Performance summary for List.map ((+) 1) on my machine:

  • On lists of size 3, the naive-tailrec version is 55% slower than the non-tailrec version, TRMC is only 12% slower.

  • The TRMC and stdlib start having indinstinguishable performance starting at size 15 or so, until size 3000 or so.
    TRMC starts again being 10% slower on larger lists (5000 or more) due to promotion effects (much more on this below), but this is also the range at which many systems will start to Stack Overflow on the non-tailrec implementation.
    At size 10_000, the naive tail-recursive version is 63% slower than the TRMC version.

Alternative stdlibs also perform manual unrolling of List.map, which is an independent/orthogonal optimization: if you TRMC-transform an unrolled version, you get an implementation that is both faster and noticeably simpler than the List.map of Base and Containers (of course, complexity moved into the compiler).

Plan for the rest of this document:

  • Summary of the PR discussion so far.
  • What TRMC does precisely.
  • Design choices in the current PR.
  • PR structure (for reviewing).
  • Remaining TODOs.
  • Benchmarking details.

Summary of the PR discussion so far

  • We discussed the naming of the attribute; the original proposal
    [@trmc] is judged too obscure. The consensus was to go for
    [@tailrec_mod_constr] instead.

What TRMC does precisely

If you consider a simple functional language with function application and pattern-matching, a function call is in tail-call position with respect to an expression if occurs within a hole of the following family of "tail contexts" (those that correspond to an empty continuation):

  • let x = t in □
  • match t with ... | p → □ | ...

The TRMC code transformation adds the following contexts to the grammar of tail-position contexts, where K is a datatype constructor:

  • K(..., □, ...)

More precisely, TRMC is a destination-passing-style translation such that contexts in this extended family in the source program are in tail-recursive position in the transformed program.

For example:

let[@tailrec_mod_constr] rec map f = function
| [] -> []
| x :: xs -> f x :: map f xs

is transformed roughly as follows. This is not well-typed OCaml code (we use in-place mutation on a constructor block), the transformation actually happens on the Lambda intermediate representation rather at source level.

let rec map f = function
| [] -> []
| x :: xs ->
  let block = f x ::{mutable} Uninitialized in
  map_trmc block 1 f xs;
  block

and map_trmc dst offset f = function
| [] -> dst.(offset) <-{initialize} []
| x :: xs ->
  let block = f x ::{mutable} Unitialized in
  dst.(offset) <-{initialize} block;
  map_trmc block 1 f xs

A call to map f xs will now perform exactly one non-tail-recursive call (the first call to map_trmc in the map body), and then all following recursive calls are in tail-position.

The proper use of "mutable" blocks and "initializing" writes in the generated code makes the TRMC transformation perfectly compatible with Flambda (and Flambda 2, 3, etc.) and Multicore.

Note: the "destination" of the TRMC call is a couple (dst, offset) of a mutable block and an offset into the block, passed as separate arguments. In #181, @let-def implemented a version where offset is not a dynamic argument: one DPS version of the function is generated for each static offset used in the code. This static-offset version is more complex, generates more code, cannot be extended higher-order or cross-module TRMC (we don't support it but we could), and our performance testing showed that it is not noticeably faster.

Design choices in the current PR

[@tailrec_mod_constr] is opt-in: only functions that are explicitly marked are transformed (this is good because, as you can see in the example, the transformation duplicates code).

More generally, @let-def and myself wanted to have something very explicit, where programmers have to indicate their intent if something is undetermined or subtle.

The current PR warns if a [@tailrec_mod_constr]-annotated function does not actually benefit from TRMC (no additional tail-calls). It warns in two additional situations.

If several calls under a constructor could be optimized, the implementation will not make an arbitrary choice but request that the user be explicit, either marking the call to be optimized with [@tailcall], or the other calls with [@tailcall false]. For example, the first version below is rejected with an error, while the three following versions are accepted:

let rec map f = function
| Leaf v -> Leaf (f v)
| Node (left, right) -> Node (map f left, map f right)

let rec map f = function
| Leaf v -> Leaf (f v)
| Node (left, right) -> Node (map f left, (map [@tailcall]) f right)

let rec map f = function
| Leaf v -> Leaf (f v)
| Node (left, right) -> Node ((map [@tailcall false]) f left, map f right)

let rec map f = function
| Leaf v -> Leaf (f v)
| Node (left, right) ->
  let left = map f left in
  Node (left, map f right)

If a function call appears in tail-call position in the source definition, but the function itself is not marked [@tailrec_mod_constr] (it does not expose a destination-passing-style version), the TRMC translation will not preserve tail-callness. In this case a warning is emitted, the user has to use [@tailcall false] to explicit mark this intent, or mark the called function with [@tailrec_mod_constr] as well.

TRMC only applies to let-rec blocks (not simple let-bindings), and calls to mutually-recursive functions can be optimized (if all relevant functions are marked [@tailrec_mod_constr]). On the other hand, this is a first-order transformation: uses of the function that are not direct applications are not transformed. In particular, a [@tailrec_mod_constr]-transformed function may still have non-constant stack usage, due to direct self-calls that are not in TRMC-tailcall position, higher-order usage, or calling another function that consumes stack space. (We discussed emitting more warnings if we cannot guarantee that stack usage is constant, but this is mildly annoying to implement and also irritating to use, so I do not plan to implement it for now.)

Finally, in this PR, the "scope" of the TRMC declaration on a definition is local to its block of mutually-recursive definitions: when you write

let rec f1 = e1 and ... and[@tailrec_mod_constr] fi = ei and ... in body

then only calls to fi in one of the e1, ... may be turned into destination-passing-style calls. In particular, body and the rest of the program only call the direct version of fi, even under data constructors. (In particular, there is no point in cross-module TRMC information.) Note that, except for higher-order use-cases, such "outer" calls will only call the function a constant number of time, so optimizing them would not change call-stack-usage asymptotics.

PR structure (for reviewing)

The PR is designed to be reviewed commit-by-commit, starting at the commit "preliminary implementation of TRMC". The previous commits correspond to merges of buildup PRs that are to reviewed independently, or testing code that we left for now but need not be part of the final implementation.

The current PR implements a very compositional approach to TRMC: the translation of a term depends only the translation of its subterms. The first versions are very simple, but produce disappointing code when the source program nests data constructor, for example:

let[@tailrec_mod_constr] rec dup = function
| [] -> []
| x :: xs -> x :: x :: dup xs

(Nested TRMC constructors are very common when in recursive traversals of ASTs, for desugaring for example, and nesting depth can be relatively high in this case.)

Further commits add more sophistication which result in nice code being produced. The final result is more complex than #181 but more principled (it optimizes a more general class of functions; #181 only supports a tail-context followed by constructor applications, instead of arbitrary composition of tail-contexts and constructors; not that the difference matters terribly in practice), and is free of any quadratic compile-time behavior in the implementation.

Finally, the end of the PR implements the various errors and warnings, which are also a source of implementation complexity.

Remaining TODOs

The PR is already ready for review, and starting review sooner rather than later would be very helpful. But some aspects are not complete yet:

  • The PR does not yet include documentation in the manual. (blocker)

  • The PR does not change standard library functions to use [@tailrec_mod_constr] attributes. (It can come as a later PR.)

  • For some [@tailrec_mod_constr] functions, only the destination-style version is used, not the direct-style version. We make no attempt to avoid generating the direct-style version in this case (this is something that RFC: tail recursion modulo constructors #181 did). (No immediate plans to do it.)

  • One could decide to rewrite TRMC calls in a more global way, outside the mutually-recursive block; to do this in a modular way, one should use a [@tailrec_mod_constr] attribute on function declarations. (No immediate plans to do it.)

  • One could consider a higher-order TRMC transformation, where a function argument can be marked [@tailrec_mod_constr] to indicates that it supports the destination-passing-style protocol (this would be desugared into two arguments, for the direct-style and DPS versions). (No plans to do it.)

  • The TRMC transformation breaks usages of non-linear continuations; TRMC-annotated code will change semantics when using the delimcc library in a way that duplicates continuations, in particular the HANSEI probabilistic-programming library.

    The approach we recommend to solve this problem is to implement a fallback mode for TRMC that uses (a restricted form of) a general continuation-passing-style transformation, instead of destination-passing-style with mutation. (No immediate plans to do it.)

Benchmarking details

Note: all performance measurements were produced with a version on this PR rebased on the 4.10 release branch, which may be of interest to others for testing purposes:

https://github.com/gasche/ocaml/tree/4.10-new-trmc

Here are good-looking performance graphs produced by the faster-map benchmarks ( https://github.com/aantron/faster-map/ , adapted by @ksromanov as https://github.com/ksromanov/faster-map/ ) for various graph functions, including TRMC maps. In these tests, the result of List.map lives long after the call (more details on this below).

map ((+) 1) input, result long-lived

All graphs are shown relative to the naive tail-recursion line, the flat gray at 100%. There are two TRMC functions:

  • The "trmc map" (orange) which is the example above, which should be compared to the "stdlib map" which is the non-recursive version (using ulimit -s unlimited to test on larger stack size), and Batteries' List.map which use a simple implementation in destination-passing-style (using Obj.magic).

  • The "trmc unrolled 4x" (yellow) which is the trmc version of a map function unrolled four times. It competes with "stdlib unrolled 5x" (I only did 4x as I was too bored to unroll a last time), and the Base and Containers map that use unrolling (plus some extra logic to start being tail-recursive after some cutoff).

You can see that "trmc" has mostly the same performance as (non-tail-recursive) List.map, except on very small lists (they get even at n=17), where List.map is somewhat faster, and on very large lists, where trmc is much faster.

The "trmc unrolled 4x" version is faster than all other implementations, which is nice as its implementation is sensibly simpler than the competition. Note: we are not specifically advertising for unrolling, but demonstrating that applying this independent optimization makes trmc-map competitive with highly-tuned implementations.

Note: these graphs correspond to benchmark runs without Flambda, but I also ran benchmarks with Flambda and the result look very similar -- no qualitative difference.

Details

On very small lists, I believe that the difference comes from the cost of the write, which calls the non-GC C function 'caml_initialize'; trmc map has a noticeably higher instruction count than standard map, which is in large part compensated by a higher instruction-per-cycles ratio.

On very large lists, the call stack of the standard List.map trashes the cache, traversing the a large portion of memory twice. This explains why the performance get closer to the naive tail-recursive version (which has the same behavior, except it traverses a large heap region rather than a large stack region).

Batteries' implementation (also in destination-passing style) has the same performance as trmc map on large enough inputs. It is noticeably slower on very small inputs, because it always allocates a word as the initial location. Our implementation of TRMC does not allocate on empty lists, at the cost of code duplication. (We could change easily this to use Batteries' approach of always allocating an initial word.)

Promotion

When the mapped function has very little compute and no allocation (here ((+) 1)), the performance of List.map is dominated by allocation costs and GC behaviors, and locality effects on very large inputs.

The promotion behavior of a micro-benchmark depends on whether the result of List.map is long-lived or short-lived. When it is very short-lived (typically, in benchmarks where it is computed and immediately ignored), the numbers are less good for TRMC in a "middle regime" where input lists are close to the minor-heap size (between 10^4 and 10^5 elements on my machine).

This comes from a subtle difference in the way the output is constructed. With a non-tail-recursive implementation, the output list is constructed from the end to the beginning. If a minor GC happens in the middle of the computation, the suffix of the output that is already built is promoted, but the prefix remains in the minor heap. With a TRMC implementation, the output list is constructed from the beginning to the end (by mutation). If a minor GC happens in the middle, the prefix of the output is promoted; the next write creates a pointer from the major heap to the minor heap, which results in the whole output being eventually promoted to the major heap.

For example, if the amount of allocation in one List.map call exactly fills the minor heap, a minor collection will happen at some arbitrary point (depending on what happened before in the program) during the List.map call. On average it happens in the middle of the list; with the non-tail-recursive version, half the output will get promoted; with the TRMC version, the full output will be promoted, so we see 100% more promotion to the major heap, making the TRMC version noticeably slower -- I call this the "promotion effect". Of course, if the output is used afterwards, and another collection happens before it becomes dead, the whole output gets promoted in both cases and there is no difference.

Discaring the result of List.map right after it was computed happens exactly never in real-world scenarios, but almost always is benchmarking code, so you will see this effect in microbenchmarks. One scenario in real-world code that is somewhat similar is data pipelines where the output of List.map is only traversed once -- it will exhibit those promotion effects.

Here is a graph of the same benchmark where the result of List.map is ignored, instead of being long-lived:

map ((+) 1) input, result ignored

There are three different performance regimes:

  • on small lists (smaller than minor-heap size, up to 10^3 here), promotion almost never happens so promotion effects are neglectible.

  • on lists of the order of the minor-heap size (10^4 to 10^5 here), promotion effects can result in 100% more promotion, so TRMC versions are noticeably slower than their non-tail-recursive counterparts

  • on lists much larger than the minor-heap size (10^6), promotion happens K times per List.map call, so only 1/K of the list cells remain in the minor heap in the non-tail-recursive version: promotion effects become neglectible again.

Promotion effects can be observed in the core_bench output. For example, on lists of size 1000, when the List.map result is ignored, we see

With lists of size 1000
  Name                   Time/Run   mWd/Run   mjWd/Run   Prom/Run   Percentage  
 ---------------------- ---------- --------- ---------- ---------- ------------ 
  naive-tail-recursive    10.07us    6.01kw     51.63w     51.63w       99.78%  
  base                     6.43us    3.01kw     17.01w     17.01w       63.71%  
  batteries                7.50us    3.01kw     34.53w     34.53w       74.29%  
  containers               6.66us    3.00kw     17.10w     17.10w       65.95%  
  trmc                     8.07us    3.00kw     34.23w     34.23w       79.99%  
  trmc_unrolled4           5.93us    3.00kw     34.02w     34.02w       58.71%  
  stdlib                   7.96us    3.00kw     17.13w     17.13w       78.88%  
  unrolled5                6.45us    3.00kw     16.96w     16.96w       63.92%  

We see that the naive tail-recursive implementation allocates twice as much as all other solutions. TRMC solutions allocate as much as non-TRMC solutions, but they promote twice as much to the major heap on average -- this is the promotion effect. On the other hand, the amount of promotion is very small (34 words promoted for 3000 words allocated), so the performance impact is neglectible; in particular, "trmc" and "stdlib" have the same performance.

With lists of size around 5.10^5, promotion happens on most function calls (but at most once per call), so promotion effects are at their strongest (when the result is short-lived):

With lists of size 56234
  Name                   Time/Run    mWd/Run   mjWd/Run   Prom/Run   Percentage  
 ---------------------- ---------- ---------- ---------- ---------- ------------ 
  naive-tail-recursive     3.94ms   337.41kw   159.60kw   159.60kw       99.90%  
  base                     3.64ms   322.38kw   144.33kw   144.33kw       92.34%  
  batteries                2.69ms   168.71kw   109.83kw   109.83kw       68.24%  
  containers               2.22ms   244.15kw    87.07kw    87.07kw       56.15%  
  trmc                     2.73ms   168.71kw   110.52kw   110.52kw       69.16%  
  trmc_unrolled4           2.64ms   168.71kw   110.24kw   110.24kw       66.93%  
  stdlib                   2.06ms   168.71kw    54.77kw    54.77kw       52.32%  
  unrolled5                1.68ms   168.71kw    55.50kw    55.50kw       42.66%  

The TRMC versions still promote twice as much as the non-tail-recursive versions, but now a large portion of the allocated cons cells end up promoted, so the performance impact is large: indeed, trmc (2.73ms) is noticeably slower than naive List.map (2.06ms) at this size. Notice that optimized implementations (base, containers) are out of their "short lists" regime, so they start behaving less like List.map and more like manual tail-recursive versions.

Finally, for very large lists, most allocated cells are promoted for all versions, so the performance impact becomes small again, dominated by locality effects.

With lists of size 1000000
  Name                   Time/Run   mWd/Run   mjWd/Run   Prom/Run   Percentage  
 ---------------------- ---------- --------- ---------- ---------- ------------ 
  naive-tail-recursive   132.50ms    6.00Mw     5.79Mw     5.79Mw       95.69%  
  base                   135.66ms    5.98Mw     5.74Mw     5.74Mw       97.97%  
  batteries               69.11ms    3.00Mw     3.01Mw     3.01Mw       49.91%  
  containers              88.12ms    4.44Mw     4.27Mw     4.27Mw       63.64%  
  trmc                    71.23ms    3.00Mw     3.00Mw     3.00Mw       51.44%  
  trmc_unrolled4          68.02ms    3.00Mw     3.01Mw     3.01Mw       49.12%  
  stdlib                 138.47ms    3.00Mw     2.85Mw     2.85Mw      100.00%  
  unrolled5               86.85ms    3.00Mw     2.85Mw     2.85Mw       62.72%  

@gasche gasche changed the title New trmc TRMC, reloaded Jul 13, 2020
@lpw25
Copy link
Contributor

lpw25 commented Jul 13, 2020

This all looks great, but can I request that the bike-shed not be luminous pink: please can we find a less cryptic annotation than [@trmc].

@gasche
Copy link
Member Author

gasche commented Jul 13, 2020

What's a better name? Users have to know of the feature to use it, and know when it applies (the structure of optimizable functions). "Tail-recursion modulo constructor" is the canonical name for this feature. Personally I think that @trmc is fine.

With @let-def we discussed having a generic attribute [@tailcall] on declarations that would perform a CPS transformation to make the function tail-recursive, or use the more efficient TRMC transformation when we are in the optimizable subset. This could make sense, but we haven't implemented the general CPS transformation (and it is not completely clear how to specify first-order CPS and whether it's a really good idea to restrict oneself to first-order uses), so we can't do this right now.

@lpw25
Copy link
Contributor

lpw25 commented Jul 13, 2020

Anything which uses words would be fine. Even just [@tailrec_mod_cons] would be an improvement. It would be a bit easier if the annotation ensured some property of the function rather than just transforming it. For example, if it checked that all recursive calls were in tail-position, optimised, or marked [@tailcall false] then you could simply use [@tailrec] since the annotation would ensure that the function was tail recursive.

@xavierleroy
Copy link
Contributor

Lovely bikeshedding discussion, I feel compelled to participate!

@TRMC would be better than @trmc because it's an acronym and it is pronounced letter by letter (Tee-Are-Em-Cee).

A Web search for "TRMC" doesn't find "tail-recursion modulo cons". The best it finds is https://acronyms.thefreedictionary.com/TRMC (in English) or "taux de réjection du mode commun" (in French).

@tail_rec_mod_cons is a bit verbose, but at least it is clear that it's about tail recursion optimization.

@gasche
Copy link
Member Author

gasche commented Jul 13, 2020

Ok, let's go for @tailrec_mod_cons.

Note: Leo's [@tailrec] suggestion is something we discussed with @let-def (and I think in #181 ?). I mentioned it briefly above, it works well if we consider TRMC as an implicit transformation that is obtained to obtain "fully tail-recursive functions" (whatever that means) in certain cases where functions are not naturally so. This is a distinct feature from having an explicit attribute to say "I know what TRMC is and I want it here". This PR implements the "explicit transformation" approach, not the "implicit optimization" approach. I think that we can provide both features, but that it is important to consider the two separately (the implicit way, in a separate PR!). In particular:

  1. [@tailrec] only makes sense for a subset of the functions we accept to TRMC (see the examples above for map on binary trees).
  2. the [@trmc] transformation changes evaluation order, so seeing it as a more neutral optimization is going to face design challenges.

@dbuenzli
Copy link
Contributor

Two other non-serious proposal: @jump_the_cons and @guarded_tailrec (by analogy with guarded variables on the right hand-size of lazy values).

@hcarty
Copy link
Member

hcarty commented Jul 13, 2020

I was going to suggest @tailrec.mod_cons since . is used elsewhere in attribute names but tailrec_mod_cons might be more search engine friendly when an unsuspecting user comes across this attribute in the wild.

@gasche
Copy link
Member Author

gasche commented Jul 14, 2020

I renamed the attribute to [@tailrec_mod_constr] in the PR description, and I am in the process of updating the implementation as well. I added a section "Summary of the PR discussion" to the original post that I will update to keep a synthesis of the PR discussion.

(I like "constr" better than "cons" to avoid the misunderstanding that this feature is limited to list "cons" cells, which was the original idea when the feature was proposed in LISP implementations.)

@Elarnon
Copy link
Contributor

Elarnon commented Jul 23, 2020

@gasche suggested I look at this PR as a first foray into the compiler's internal, which I am doing now. As stated I am not familiar with the compiler, so I might make remarks which should be obvious or show a lack of understanding, please be forgiving :)

Here are some general remarks after reading only the description of the PR:

  • This is a well-written PR with lots of explanations and context, very pleasant to read 👍
  • In the documentation I would remind the reader that, if TRMC changes the evaluation order, said order was unspecified to begin with and should not be relied upon
  • I will remark that (unless I am mistaken) the Batteries-style version with an extra allocation can be implemented today (and would synergise well with the ability to not generate unused direct versions, especially re: compile times):
type 'a box = Box of 'a

let map =
  let rec box_map f xs =
    Box (map f xs)
  and[@tailcall_mod_constr] map f = function
  | [] -> []
  | x :: xs -> f x :: map f xs
  in fun f xs -> match box_map f xs with Box ys -> ys

It might be worth mentioning in the documentation as a trick to avoid code duplication, if that is ever implemented.

  • The PR talks multiple times about unrolling and the boredom of doing so manually. I will admit this is something I am incredibly reluctant to do myself, because it is tedious and leads to code that is hard to maintain, but is sometimes necessary for performance. This is a bit of a tangent and not directly related to the PR but it makes me think about the usefulness of an [@unroll n] annotation, to unroll recursive calls (inline up to n nested calls but only inside the defining let rec block). Does something like this exist?

utils/warnings.ml Outdated Show resolved Hide resolved
lambda/trmc.ml Outdated
@@ -0,0 +1,515 @@
open Lambda

open struct
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, is this used to define functions local to the module which will not be exported even though there is no .mli? If so that is a neat trick I haven't seen used yet.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's a recent idiom given that open M didn't accept struct .. end module expressions before 4.08.

lambda/trmc.ml Outdated Show resolved Hide resolved
lambda/trmc.ml Outdated Show resolved Hide resolved
@gasche
Copy link
Member Author

gasche commented Jul 23, 2020

Thanks for the comments!

In the documentation I would remind the reader that, if TRMC changes the evaluation order, said order was unspecified to begin with and should not be relied upon.

I had scenarios in mind such as K1(left1, K2(left2, trmc_call e, right2), right1), where I had the impression that we could get the evaluation order left1; left2; right2; right1; trmc_call e in the transformed program -- note that this order is invalid for the source program according to my understanding of what is specified of the evaluation order (each argument is evaluated entirely, in some order). But in fact I think that the implementation is careful to always evaluate (left1, right1) first (in some unspecified order) before (left2, right2) and then trmc_call e, so the order we can observe is a valid order for the original source program.

the Batteries-style version with an extra allocation can be implemented today

Yes, but I think that it is a bit too much sophistication for the user to write this version "just" to avoid code duplication. We could of course also use this strategy in the code generator, which eliminates the code duplication, but at the cost of an extra allocation in the empty-list case, which we thought could be fairly controversial.

I don't expect code duplication to be an issue in practice, given that TRMC is opt-in: you would only convert a handful of functions in your program, so code blowup is extremely limited. And if you compare to the code people write today to get fast tail-recursion equivalent, we probably generate less code.

(One aspect that I find mildly irritating is the idea of nested TRMC definitions leading to 2^n versions of the inner functions laying around. I think that in many case the "usage analysis" I mentioned would remove the direct version completely, removing the exponential aspect of TRMC nesting. But then again, nested TRMC annotations would be fairly rare in actual code.)

This is a bit of a tangent and not directly related to the PR but it makes me think about the usefulness of an [@unroll n] annotation, to unroll recursive calls (inline up to n nested calls but only inside the defining let rec block). Does something like this exist?

I believe that flambda does some unrolling. This could also be exposed to users as a (predictable) manually-controlled transformation, as we do here for TRMC. I prefer to keep it out of the scope of the current PR, because it's easy for discussions to be side-tracked by those tangents.

@gasche
Copy link
Member Author

gasche commented Jul 23, 2020

Note: The PR description mentions that the scope of TRMC is "local" in the sense that only calls in mutually-recursive definition bodies are transformed. This is in fact, I realized afterwards, not correct with the current implementation, and I am not sure that we want to keep this locality guarantee. I like the simple reasoning model it offers, and I used to think that it would never worsen stack-consumption complexity (if you neglect potential-TRMC calls that are outside the recursive body, they will not be part of the recursive loop so they only occur a constant number of time); but in fact this is not true in presence of nested TRMC defintions:

let[@tailrec_mod_constr] rec flatten xss = function
| [] -> []
| xs :: xss ->
  let[@tailrec_mod_constr] rec append_flatten xs xss =
    match xs with
    | [] -> flatten xss
    | x :: xs -> x :: append_flatten xs xss
  in append_flatten xs xss

In this example, the implementation will TRMC-optimize the call to append_flatten on the last line, while it is outside the "local" scope mentioned from the point of view of let rec append_flatten. This transformation is necessary to get constant-stack behavior for flatten.

The function could be rewritten this way by the user, and then the local-scope discipline would suffice, but I find the code less pleasant:

let[@tailrec_mod_constr] rec flatten xss = function
| [] -> []
| xs :: xss -> append_flatten xs xss

and[@tailrec_mod_constr] append_flatten xs xss =
    match xs with
    | [] -> flatten xss
    | x :: xs -> x :: append_flatten xs xss

I'm not completely sure whether I want to stick to the local-scope property, give up and implement a global (but not cross-module) transformation, or do a compromise where the scope is "global within @TRMC definition themselves but not outside" (meh).

lambda/trmc.ml Outdated
| Set settable -> settable.direct ()

let trmc_placeholder = Lconst (Const_base (Const_int 0))
(* TODO consider using a more magical constant like 42, for debugging? *)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a good practice.

lambda/trmc.ml Outdated Show resolved Hide resolved
lambda/trmc.ml Outdated
Comment on lines 482 to 794
let ctx, bindings = traverse_letrec ctx bindings in
Lletrec (bindings, traverse ctx body)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like by reusing the ctx from traverse_letrec in traverse ctx body you allow performing destination-passing-style calls in the body of the let rec block. The text of the PR claims this is forbidden, so one of the code, the PR, or my understanding must be wrong.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this does not allow destination-passing-style calls in the body of the let rec block (because traverse is called, not traverse_binding) but by reusing the context I believe in the following code:

let[@tailcall_mod_constr] rec f x = fdef in
let[@tailcall_mod_constr] rec g y = gdef in
body

you allow destination-passing-style calls to f inside gdef, which is still a violation of the "only in the defining let rec bindings".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: traverse is actually called for code outside tail position, so this piece of code is responsible of destination-passing-style calls to f inside gdef if the example code is not in tail position. Destination-passing-style calls to f inside both gdef and body are allowed by the similar behavior in choice I also pointed out.

See also this note from @gasche, which questions whether the locality specification is actually what we want, or if the behavior of the current implementation is better (if harder to describe).

Copy link
Member Author

@gasche gasche Jul 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, currently I believe the description of the PR does not match the implementation, which implements the "global" scope by propagating the transformation context along the lexical scope.

I am thinking of relaxing the "local scope" specification into an "attribute scope" specification: a TRMC attribute scope over the recursive definitions, and calls are rewritten if they are within the scope of at least one TRMC attribute. This allows the flatten example, but it still provides a principled explanation for a strategy that does not require cross-module information for TRMC.

Once this aspect has been decided (I am starting to think that the "attribute scope" proposal is a good compromise, but other people may chime in with suggestions) is will push a separate commit to implement the consensual scoping strategy.

lambda/trmc.ml Outdated
match find_candidate def with
| None -> [(var, traverse ctx def)]
| Some lfun ->
let cand = Ident.Map.find var ctx.candidates in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what is the local opinion on that sort of thing, but I would justify by a comment (if not an assertion), either here or at the definition of traverse_binding, why this find can not fail (because all the bindings which are traversed must have been declared beforehand).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will do.

lambda/trmc.ml Outdated Show resolved Hide resolved
lambda/trmc.ml Outdated Show resolved Hide resolved
lambda/trmc.ml Outdated Show resolved Hide resolved
lambda/trmc.ml Outdated Show resolved Hide resolved
@lthls
Copy link
Contributor

lthls commented Jul 23, 2020

This is a bit of a tangent and not directly related to the PR but it makes me think about the usefulness of an [@unroll n] annotation, to unroll recursive calls (inline up to n nested calls but only inside the defining let rec block). Does something like this exist?

I believe that flambda does some unrolling. This could also be exposed to users as a (predictable) manually-controlled transformation, as we do here for TRMC. I prefer to keep it out of the scope of the current PR, because it's easy for discussions to be side-tracked by those tangents.

The [@unrolled n] attribute is documented in section 21.6 of the manual. It is specific to flambda.

lambda/trmc.ml Outdated Show resolved Hide resolved
Comment on lines 21 to 28
Warning 70: This call is in tail-position in a TRMC function, but
the function called is not itself specialized for TRMC,
so the call will not be in tail position in the transformed
version.
Please either mark the called function with the
[@tailrec_mod_constr] attribute, or mark this call with the
[@tailcall false] attribute to make its non-tailness explicit.
Lines 1-3, characters 39-40:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This warning is a bit surprising, because append is actually marked @tailrec_mod_constr. I would add a remark that both functions also need to be in the same TRMC "scope", whatever that ends up meaning.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I think that seeing this warning is an artifact of using toplevel-style tests (with the current implementation, if the whole file was processed at once there would be no warning).

The actual warning we want to see is that this [@tailrec_mod_constr] definition is useless and wrong since the call to flatten itself is not TRMC-optimized. But in fact the current implementation does not provide this warning (in the case where the call to append itself is correctly TRMC-ed), as it only expects calls in TRMC position.

I don't know whether I want to have a warning on non-TRMC-position self-and-mutual calls that are not marked [@tailcall false] (this sounds potentially useful in some cases, including this one, but also annoying in other cases and also annoying to implement), or accept that we don't give a very useful warning in this example.

@lpw25
Copy link
Contributor

lpw25 commented Jul 23, 2020

On the design side: I think that it is worth considering the variation of this proposal that only extend the "tail contexts" with:

K(v, v, v... , □, ...)

i.e. the tail call must only be followed by values, not arbitrary expressions. The benefit here is that the transformation does not alter the evaluation order. Obviously the expressivity is the same, it just makes the user have their source code match the actual evaluation order.

@gasche
Copy link
Member Author

gasche commented Jul 23, 2020

But why would we require using A-normal forms for these specific definitions and not other parts of the source programs?

I think that the evaluation order resulting from the TRMC transformation is easy to specify, and to understand for users who already understand when TRMC can be used: in a constructor application, at most one argument is in TRMC position, and this argument will always be evaluated last.

Copy link
Member Author

@gasche gasche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(answering some inline comments)

@lthls
Copy link
Contributor

lthls commented Jul 23, 2020

But why would we require using A-normal forms for these specific definitions and not other parts of the source programs?

This is not exactly A-normal form, as we need the last block to contain a function call that we can turn into a tailrec call.
More importantly, the reason we can require a specific form here is that this optimisation only works if the recursive call is the last thing you evaluate, so it seems reasonable to ask programmers to make sure that it is their intent rather than magically transform their program.
This would also solve the problem of multiple recursive calls: you don't need a special warning for cases where you don't know which call should be turned into a TRMC call, because you've already required that the programmer makes it explicit.

Since you're already planning to make this feature opt-in, it won't be a major inconvenience if programmers have to change their code slightly to make sure the optimisation triggers. And you won't get strange bugs due to changes in the evaluation order if you start trying to apply it automatically either.

@gasche
Copy link
Member Author

gasche commented Jul 23, 2020

@lpw25 and @lthls : I'm willing to go ahead and implement your suggestion, but it's some amount of work and I expect that you will feel a moral duty to consider reviewing the PR in return :-)

@gasche
Copy link
Member Author

gasche commented Jul 24, 2020

I am only somewhat convinced by the proposal; I don't like the fact of making harder to convert a function to TRMC in the common case (where the code is robust to the unspecified order of argument evaluation), but I do agree that it is an improvement in that it removes the need for one of the warnings I implemented. One idea is to go look at the compiler codebase and see whether some interesting functions can be marked TRMC, to have more examples in mind before making these kind of user-interface decision.

On the other hand, I am starting to be convinced that implementing the analysis of which variants of each function (direct or TRMC) is actually used in the code would be useful. This gives the opportunity to not include unused variants in the generated code (eliminating code duplication in some cases), but it could also be useful to provide warnings (warn if the TRMC variant of a specialized function is never used).

@gasche
Copy link
Member Author

gasche commented Nov 2, 2021

Thanks @ksromanov for your eagle eyes again. I fixed the leftover 'trmc' -- and removed the force-trmc commit.

This PR is tickling my sense of "this could be more perfect": it was a lot of work to get it to this point, but I can't help feeling that it could be improved in various ways¹, and I've been hesitant to inflict it onto the world in its current state. However, it is ready by our usual standards, and I doubt that it would be able to improve without feedback from actual users, so I think it does need to get released.

I'm planning to wait for another round of CI, give a last opportunity for feedback, and merge late today or tomorrow if there are no objections.

¹ Some potential improvements:

  1. With @Elarnon we discussed changing the code-generation strategy slightly to pass 3 parameters instead of 2, with the benefit that calls from non-DPS functions to DPS functions would then preserve tail-call-ness (currently they don't). This would be mostly invisible to users (now that there is not practical limit on tail-call parameter count anymore).
  2. I think that the attribute-based control of the feature could still be refined, but this probably needs experience in real codebases before we decide to go one way or another.
  3. There is no "force-tmc" mode to apply the transformation whenever beneficial (what that means is not completely clear), and implementing it well (I did a quick attempt yesterday) would require some refactoring in the treatment of warnings and errors.
  4. Some warnings are produced after the TMC transformation, and will thus occur twice as TMC can duplicate code. I've only seen this happen for @tailcall-related warnings, and this is a minor UI glitch, but it's not obvious how to fix it.
  5. The "driver" logic could get better at not generating the direct-style or DPS version of a function when it is not used, to reduce issues with code duplication in nested specialized let-bindings.

I believe that none of this is a problem for many beneficial uses of the transformation in practice, but some of those will show up as limitations if it gets used more heavily.

Note: I experimented with using the attribute in the compiler codebase (for example in CSEgen; it works), but this was not included in the present PR as it would require a bootstrap, which we prefer to avoid.

@dbuenzli
Copy link
Contributor

dbuenzli commented Nov 2, 2021

@gasche congratulations ! Do you have an idea of which functions of List automagically become T.R. ? Ready to kill some List.{rev,rev_map} applications and rewire the brain for not using them.

@gasche gasche merged commit 2bcef4b into ocaml:trunk Nov 2, 2021
@pmetzger
Copy link
Member

pmetzger commented Nov 3, 2021

This is cool enough to be worth a public announcement on Discuss, IMHO.

@hhugo
Copy link
Contributor

hhugo commented Nov 3, 2021

@gasche, Have you tried to test this with jsoo by any chance ?

@gasche
Copy link
Member Author

gasche commented Nov 3, 2021

@pmetzger I have a long TODO list of urgent stuff, but I'll try to get to that, thanks for the suggestion.

@hhugo: no, because I didn't expect particular issues with it. (But then I'm not sure what assumptions jsoo is making about the incoming bytecode.) It's "almost" a source-to-source transformation, "almost" is that it creates mutable blocks that inhabit immutable types (eg. y ::{mutable} Hole that later gets written to to become a valid list cell), and uses the Psetfieldcomputed operation on these blocks. This is close in spirit to what some OCaml libraries are already doing with Obj tricks (Batteries and Extlib have versions of this), that I suppose jsoo already supports.
If you let me know of any issue, I would of course assist in finding a solution that works for jsoo as well.

@gasche
Copy link
Member Author

gasche commented Nov 3, 2021

@dbuenzli for now, we are not using the annotation in the stdlib or the compiler codebase. I think that we could eventually, but after the 5.0 transition. In the meantime, I would think of the feature as more experimental (it exists to be used, and we welcome feedback, but its usage may remain rare for a while.)

@xavierleroy
Copy link
Contributor

@dbuenzli for now, we are not using the annotation in the stdlib or the compiler codebase. I think that we could eventually, but after the 5.0 transition.

Wise words. But if some brave soul wanted to experiment with using the "tmc" annotation in the standard library or the compiler code base, we'd be very interested in the results.

@gasche
Copy link
Member Author

gasche commented Jan 25, 2022

For the record, I tried to look at whether TMC is still useful with the Multicore runtime, where OCaml calls do not use the system stack, and which could thus free itself of the dreaded Stack_Overflow error. My experiments show that currently the Multicore runtime becomes very slow if the call stack grows very large; see #10947.

@hhugo
Copy link
Contributor

hhugo commented Jan 25, 2022

TMC is still useful for jsoo which rely on the (small) Js stack

@yminsky
Copy link

yminsky commented Jan 26, 2022

This is a big deal for us too. We basically wouldn't be able to get rid of our carefully written, stack-avoiding list manipulation functions in the absence of TRMC, because those functions would then cease to function reasonably when compiling to Javascript.

@gasche gasche mentioned this pull request Jan 3, 2023
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Mar 21, 2023
5bf2820278 Merge OCaml 4.14 (#55)
34432bedff Set VERSION to 4.14.0+jst
4e1d21c0cb Re-enable probes (amd64 only, as yet untested)
70840805f7 Regenerate .depend for upstream build system
16cb75b6c2 Fix upstream build system after merge (+Bootstrap)
b635e3c4f9 Enable debug runtime in CI
5029967055 Apply ocaml-flambda/flambda-backend#916
7640f4bcd5 Ensure that tail recursion modulo cons is not used with local allocations
d3b6161b03 Resolve merge conflicts in asmcomp/i386
09ac6e11cc Testsuite fix for Fortran tests
9f04dc41da Avoid having scope side-effects in loosen_ret_modes
c32a0b754e Bugfix for error messages in Includecore (see records_errors_test.ml)
ec525635eb Resolve merge conflicts in testsuite
48e13dabb7 Resolve merge conflicts in tools, debugger, toplevel, etc.
942760fbb6 Bugfix: take an instance before typing Pexp_constraint
4ede4874f6 Resolve merge conflicts in stdlib/ runtime/
df43e0282a Resolve merge conflicts in middle_end/ driver/ asmcomp/ (amd64 only)
b7b12b25a9 Resolve merge conflicts in bytecomp/ driver/ so that ocamlc builds
2fa00c13d3 Resolve merge conflicts in lambda/
627d504f22 Resolve merge conflicts in typing/
2bf19bf270 Resolve conflicts in parsing/ & utils/, and regenerate the parser.
05e2ed4cdd Add [@tail hint] annotation to select default behaviour explicitly (#43)
159d8df6d7 Merge remote-tracking branch 'ocaml/4.14' into ocaml-jst
56818c4c9b jst.dune build fix (after flambda-backend merge)
567b95591a Merge flambda-backend changes
409bdce6c6 Support building with dune (#49)
839c1ccdd8 Merge flambda-backend changes
ab34788a5c Merge flambda-backend changes
baf31dfd04 New uniform treatment for misplaced attribute warnings (#44)
679b5001e3 This test requires systhreads to be available
ba9c5ea7b1 Add ability to bootstrap flexdll on Jenkins CI (#11567)
a73ef7a49c Merge pull request #11556 from FardaleM/doc_typo
adcf2cb2c6 Fix [@deprecated_mutable], which couldn't be triggered. (#11524)
040f05bdf0 Fixup Changes
7bfcdc30b6 Merge pull request #11487 from purplearmadillo77/fma_test
9fac589c2f More prudent deallocation of alternate signal stack (#11496)
5d5c5b61b6 Merge pull request #11468 from dra27/i686-mingw-ipv6
7c16b4b0d9 Merge pull request #11373 from dra27/flexlink-detect
a691ba7f78 Do not elide the whole module type error message (#11416)
ec8dea9a81 Merge pull request #11417 from lpw25/fix-virtual-class-type-constrs
b2c7990ac8 tests/lib-bigarray-2/has-gfortran.sh: don't print anything on stdout
757e0a718a Stop calling ranlib on created / installed libraries (#11184)
9acf32acf8 Document limitation on `caml_callbackN` (#11409)
397925772e Merge pull request #11396 from gasche/fix11392
888e84365c Merge pull request #11397 from Octachron/tast_mapper_fix_for_with_modtype
d2689fced7 Refactor the initialization of bytecode threading (#11378)
ed346d06d5 Merge pull request #11380 from damiendoligez/fix-fortran-test-on-macos
0731e8c81f Better documentation for [string_of_float]. (#11353)
2c2e99049a Merge pull request #11267 from dra27/more-_MSC_VER
ef960fb5f9 Guard more instances of undefined _MSC_VER
b6602b11f7 Changes
70c5a7d3df misc.h: fix preprocessor conditional on _MSC_VER
98fedc5cd2 Merge pull request #11236 from Nymphium/missing-since2
66b63e2f24 Do not trigger warning when calling virtual methods introduced by constraining "self" (#11204)
bfb4b1e608 increment version number after tagging 4.14.0
15553b7717 release 4.14.0
54c6b3fee4 last commit before tagging 4.14.0
80b20ed92c Changes: split highlights
fea7946d27 Merge pull request #11133 from Octachron/warning-man-414
4df514973d `odoc`ify the parsetree comments (#11107)
8311a408b1 Fix bigarray 32bit integer overflow of offset in C imp. (#11118)
cfee1a6f61 increment version number after tagging 4.14.0~rc2
466023cefb release 4.14.0~rc2
ab5e660a9b last commit before tagging 4.14.0~rc2
766b6283ef Fix #11101 by making `occur ty ty` succeed (#11109)
db17a8ecd5 increment version number after tagging 4.14.0~rc1
93c2a7f104 release 4.14.0~rc1
679a9504fe last commit before tagging 4.14.0~rc1
5af2478516 Merge pull request #10740 from gasche/tmc-manual-pr
25478af4e4 Do not pass `-no-pie` to the C compiler on musl/arm64 part 2 (#11036)
56c9302e8e Merge pull request #11031 from fabbing/fp_exn_handler
849218e01b Merge pull request #10850 from dra27/flexdll-0.40
a6369a2e8a Merge branch '4.14' into fp_exn_handler
31ca227f92 With frame-pointers entertrap restores base pointer
ddf99786f8 riscv: Generate frametable in data section to improve code relocatability (#11042)
dee5315ad1 increment version number after tagging 4.14.0~beta1
87abd773d5 release 4.14.0~beta1
2ca77b9c33 last commit before tagging 4.14.0~beta1
cc7de730d4 Merge pull request #10900 from kostikbel/printf
b53c79e59b update Change for #10397
cc606b8cf7 Merge pull request #10835 from hannesm/fix-32bit-relocations
113d1e5b68 Merge pull request #10914 from sanette/search
b9ad032486 Merge pull request #10815 from Julow/odoc-200-fixes
716c17c08d Merge pull request #10397 from mjambon/unsupported-on-windows
433f3f5548 Merge pull request #10794 from wiktorkuchta/warn-57
d480c0c4df Merge pull request #10719 from stedolan/arityfix
99dadf22cc Merge pull request #10828 from madroach/aarch64_openbsd
85039e70ad Env: clear uid_to_loc (#11012)
c8c51a735d Merge pull request #11000 from gasche/translattribute-fix
6aa8b021be Merge pull request #10998 from thierry-martinez/fix.doc.seq_fold_lefti
ea7af37703 fix a minor regression from #10462
f9b3a4edc5 increment version number after tagging 4.14.0~alpha2
e1bcd25f9a release 4.14.0~alpha2
aafa87e87d last commit before tagging 4.14.0~alpha2
0c16ba6740 #10836: recognize unrecoverable errors in the signature inclusion check (#10952)
4d3c53688f Merge pull request #10959 from COCTI/fix10907
35158b280e add reviewer and remove comment closing
b5973cd266 add PR number, start CI
1eb55f575a Enable native code on aarch64-*-openbsd*
98453445b4 In_channel.input_all: fix bug (#10978)
5cc897c5be Merge pull request #10968 from nrolland/patch-1
4a3f29d57a Recommend using quoted string literals for regexes (#10946)
fe1b2183c2 Fix #10907: Wrong type inferred from existential types
ae1a31b019 Merge pull request #10839 from Et7f3/fix_show_regression
3ff3fcc0c7 Introduce the Thread.Exit exception (#10951)
db915bd895 Do not put deprecation warnings on int8, uint8, int16, uint16 (#10937)
15a457bde5 Document exception raised by read_line (#10948)
b2fe7590f3 Merge pull request #10846 from voodoos/objinfo-optional-shape
00ab75652e Merge pull request #10932 from wiktorkuchta/empty-anchors-css
683d80e264 increment version number after tagging 4.14.0~alpha1
7c420e8375 release 4.14.0~alpha1
f4b50329cc last commit before tagging 4.14.0~alpha1
fd39912851 [4.14] Add deprecation warnings on {Int32,Int64,Nativeint}.format (#10922)
7705e92064 Merge pull request #10825 from gasche/shape-strong-call-by-need
36f04706eb Shape.decompose_abs
1dbedf0052 shape: never erase unknown variables into anonymous leaves
9f9017fed3 Changes
6080fbf901 shape: a remark on memoization with non-canonical data structures
d9c5dc87a0 replace the wrapped lazy thunks by pre-memoization inputs
c1ff336cdc typing/shape.ml: memoized, strong call-by-need
5c1f723715 [minor] shape: refactor the printing of shape items
3b7dbe2c31 use an environment instead of repeated substitutions
7038d473ff Shape: nicer handling of fuel
d406f47470 reduce the shapes after type-checking
4f980723bf shape: disable all reductions
8b7d2a04d5 shapes: more sharing in includemod
fff88af334 shape: only refresh vars when necessary
445db99496 Free the alternate signal stack if sigaltstack fails (#10891)
71fd0fbfc4 change manual to include a subsection about 'let exception' (#10848)
29b933a831 add @since on Atomic (#10841)
5798e801e1 fix #show regression in 4.14
b6163a49ee Fix a crash in `Obj.reachable_words` (#10853)
0b6f4b390d Fix more display differences between ocamlnat/ocaml (#10849)
61eeefec00 Merge pull request #10712 from NathanReb/fix-type-var-naming
08eac16563 Merge pull request #10797 from dra27/fix-volatile
2a6df5eb69 Fix #10822: Bad interaction between ambivalent types and subtyping coercions (#10823)
0fdbf79351 Ensure right-to-left evaluation of arguments in cmm_helpers (#10732)
18944505af Merge pull request #10589 from wiktorkuchta/manual-spaces
150874b85c Merge pull request #10820 from Octachron/fix-10781
451cb76c0d Merge pull request #10813 from wiktorkuchta/manual-numbers
c764a35f2e Merge pull request #10726 from xavierleroy/free-alt-sig-stack
3370799429 Merge pull request #10575 from Octachron/dump-dir
9886564f47 Merge pull request #10806 from gasche/ocamlopt-dshape
76040803f6 Merge pull request #10799 from Octachron/yet_another_missing_cmi_error
49e28143a4 Revert "Merge pull request #10736 from xavierleroy/bigger-stack"
b0fb4ab86b Merge pull request #10739 from shindere/fix-install
17275714a6 Merge pull request #10764 from alainfrisch/afrisch_fix_oo_compil
0f152a868f Merge pull request #10783 from MisterDA/unix-create-process-doc-use-unix-stdout-instead-of-stdlib-stdout
3f170f317e Merge pull request #10771 from Octachron/abstract_row_repr_bug
9c247a8c9a change entry for #9444
ae1f37cf76 Merge pull request #9444 from let-def/printtyped-extra
3a2a1415dc Add [@poll error] attribute (#10462)
2a11a0a98c Merge pull request #10718 from voodoos/shapes
e8d560740b Merge pull request #10736 from xavierleroy/bigger-stack
cd2089784d first commit on branch 4.14
5000b93cad last commit before branching 4.14
11cdd82e6f Fix white spaces in Changes
f310f749bd Update magic numbers for 4.14
096ab9cdd3 Some more documentation on C compilers in file INSTALL
db47011e45 More detailed recommendations about C compilers in INSTALL file (#10685)
d0e6520f38 Merge pull request #10642 from MisterDA/win32unix-posix-Sys.remove-Unix.unlink
c5f4866038 Merge branch 'trunk' into win32unix-posix-Sys.remove-Unix.unlink
ed7876a8bf Merge pull request #10752 from wiktorkuchta/common.ml.in-open
e23ec809c3 new ephemeron API, implemented on top of old ephemerons (#10737)
8170460a0d Merge pull request #10751 from stedolan/add-ocamlnat-dlambda
284af7de6e Fix compile error due to unused open
ac1aabd3f7 Add -dlambda to ocamlnat options
718e646cc0 Merge pull request #10746 from Octachron/more_lax_nesting_rule_for_camltex
8d1990b499 caml-tex: allow to nest warnings and errors within an example
2bcef4bc17 Merge pull request #9760 from gasche/new-trmc
35b86df0ae Additions to the module Seq (#10583)
0891d8e819 bow to check-typo
0d80ae3dac [minor] complete the renaming of 'TRMC' into 'TMC'
a862307634 [review] move the main TMC comment to tmc.mli
4a338a825f [review] improve code readability within TMC disambiguation
1b10dd9aef TMC: much thinking about which @tailcall annotations to preserve where
e6fbcc8857 [WIP] TMC: Changes
d2a2dc9a26 [review]: in TMC ambiguity errors, print the ambiguous callsites
955528b22a [review] copyright headers and .mli file
2dcd81886a TMC: do not warn on ambiguous sub-terms of non-ambiguous programs
9725d90cd7 TMC testsuite: ambiguities with many arguments
67251d9295 [review] new TMC test
333806b419 TMC: implement [@tail_mod_cons] for non-recursive lets
9306f658ae [review] TMC: make 'offset' distinct from 'lambda' for clarity
d92ef9898b [review] tmc: use a placeholder value that is better for debugging
9c9952012a [review] interface for Tmc.Constr
7c17ea641e [review] TMC: rename 'return' to 'lambda'
f881fc435a [review] rename 'con' into 'constr'
9242408e05 TMC: support Tupled functions and partial applications
1daea333b6 [refactoring] move Simplif.exact_application to Lambda
41b9afcf1c TMC: some semantic preservation tests
640f24643d TMC: testsuite
1b8771ed6b TMC: warn when a tail-call is broken by the TMC transformation.
0e04aa1b29 TMC: warn if there is no optimization opportunity
7dc0d86d78 TMC: error if several different calls could be optimized
10d756bccf TMC: Constructor composition in direct style: [benefits_from_dps : bool].
e30d162ea8 TMC: [minor] improve dummy name generation for let-bound arguments
4d2d0b0dfa TMC: optimize constructor composition
e9397f6605 TMC: generalize `Choice.t` to use binding operators
90dd724a3e TMC: code-generation tests
e0df0a1517 TMC: product representation of choices
35dff8cacf preliminary implementation of TMC (tail modulo cons)
a84b25b222 prepare for TMC (tail modulo cons) transformation
443be9c2af Buffer: reimplement UTF encoders with the new UTF Bytes encoders. (#10733)
6116cd5798 Fix #10735 as suggested by @lpw25 (#10738)
2d91196a66 Update Changes
7274e23659 Merge pull request #10743 from dra27/be-quiet
d44caf421b Don't display prune information for .gitignore
996dc40113 Merge pull request #10697 from MisterDA/win32unix-WSADuplicateSocket-or-DuplicateHandle
cab43ad3b6 Merge pull request #10715 from dra27/ocamlnat-hooks
d0129e2914 Fix Changes entry for 10717.
d9cfda1e1a Windows: Sys.remove, Unix.unlink now remove symlinks to directories
78e59967d8 Test Sys.remove, Unix.unlink behavior on symlinks and directories
d1d4352a1b Merge win32unix/dup2.c into win32unix/dup.c and factor code
2ecf1ecb20 win32unix: use WSADuplicateSocket in bindings of dup and dup2
7997b65fdc Merge pull request #10710 from dbuenzli/utf-support
910849911b Update changes file.
1df0d3bbee String: add UTF decoders and validations.
230f9c60f9 Bytes: add UTF codecs and validations.
b71489f03e Ensure that functions are evaluated after their arguments (#10728)
d564b171ad Eliminate Topeval.phrase_name entirely
18c4d16b3b Fix performance bug in Obj.reachable_words (#10731)
1067f77656 Merge pull request #10714 from dra27/x86-assembler-hook
60de0907c8 Add X86_proc.with_internal_assembler
4c52549642 Merge pull request #10722 from Octachron/fix_unused_functor_warning
5a80188d5b Merge pull request #10720 from dra27/autoconf-tweak
fe9b014c95 fix the marking of unused values in module type definitions
5915a72545 Fix typos in Changes
0e50ef1029 Merge pull request #10717 from shindere/simplify-man-pages-installation
2250fd8a22 abstract row_field (#10627)
577ccbf11d Fix AC_CONFIG_HEADERS on CRLF-checkouts
304abe94c2 Uchar: add UTF codec tools.
0684867f70 Merge pull request #10672 from wiktorkuchta/webman-disc
54e10a5c7a Merge pull request #10527 from wiktorkuchta/toploop
f8dc1ef370 Merge pull request #10681 from lthls/boolean-lifthenelse
9587b17a97 Merge pull request #10713 from Octachron/babylonian_manual
05faf05a10 Changes
a58ec8866f Add comment on Simplif.split_default_wrapper's pattern matching
848304c9dd Review: Document Switch.Make parameters
ff41359014 Enable if-then-else elimination in Cmmgen
37298b0b9f Enforce boolean Lifthenelse in native mode
5a44941190 Mention the help directive on toplevel startup
bf0859daec webman: Use li::marker for coloring bullets
cd418bfcbd Use babel to allow underscore in labels
e2c2611f53 Simplify the installation of man pages
7fb10211f6 Merge pull request #10541 from COCTI/abstract_fk_and_commu
89e4e1eca0 dune: disable some warnings
cc9ae80bb1 Wrong unmarshaling of function pointers in debugger mode (#10709)
ec872d1f6c add reviewer
056783366a comments
07eddeb6b1 use internal GADTs to ensure that Cunknown and FKprivate do not leak
024007974f make field_kind and commutable abstract types
f44236171d specify that caml_alloc_custom_mem is available since 4.08 (#10704)
a7bf9cbaf3 Improve type variable name generation and recursive type detection when printing type errors (#10488)
d17f6f1a19 Merge pull request #10706 from dra27/changes-needed
87b02aee9d Merge pull request #10702 from MisterDA/win32unix-cast-strictly-aligned-pointer-stat
dbb60dc4ee Fix cast of more strictly aligned pointer
f1d2830b7f Disable the commit message Changes escape hatch
9417670a0d Merge pull request #10705 from wiktorkuchta/dotmerlin
7ef6094f59 Allow the native toplevel assembler to be replaced
dd042539c6 Introduce native-toplevel specific hooks module
85ba4d7494 Make Topeval.phrase_name less exposed
89b4062ac4 HACKING.adoc: Remove mention of .merlin files
542151096a Factor out load/lookup functions in native Topeval
dc90ad4944 Remove duplicated type definition in Topeval
0be3ae695b Merge pull request #10690 from dra27/build-toplevel-lib
294e717a74 Merge pull request #10693 from lpw25/fix-includemod-ident-collision
c937590071 Merge pull request #10692 from gpetiot/expose-parse-module_type
826a6b4e85 Merge pull request #10694 from MisterDA/readme-win32-cygwin-64bits
cd794ec0fb Always build ocamlnat
42aa9631f2 Add Changes entry
301ffcfd8a Add changelog entry
f1c53b8a7c On Windows, advise to build with 64-bit Cygwin
1ccade8d41 Fix ident collision in includemod
5f77554bbe Expose Parse.module_type and Parse.module_expr
0b3f8dd77d Merge pull request #10658 from shindere/ocaml-version
41cac4b5ce Add detailed information about the current version of OCaml to the Sys module
0239407657 Make the documentation of ocaml_version in stdlib/sys.mli more precise
1acc501adc Add a macro to explicitly control whether this is a dev version or not
05f1d2ef96 Move version check from tools/check-parser-uptodate-or-warn.sh to Makefile
38449ab1b0 Let manual/src/html_processing/src/common.ml be generated by configure
47e7dc8e85 Let configure rather than make generate manual/src/version.tex
b64a764a31 Add --enable-native-toplevel
9ab0d9d036 Always build the native toplevel libraries
c6a3496711 Update comment in utils/config.mlp
89b1c6efa7 Remove the reference to the VERSION file from tools/pre-commit-githook
86b9930082 ocamlyacc: rely on runtime/caml/version.h
20924c9e26 Introduce the OCAML_VERSION_EXTRA C preprocessor macro
74ad8eb2b1 Add copyright header to runtime/caml/version.h.in
c71428e7a3 Transform runtime/caml/version.h into a configured header
b9ec96722d Document where the OCaml version is defined and how to update the VERSION file
ce97e67006 Define OCaml's version in build-aux/ocaml_version.m4
e9eb2fb5f0 Restore the -native option in Inria CI'sother-configs job
45612f14af Revert "Merge pull request #10682 from gpetiot/fix-letop-binding-loc"
93c99bac88 Merge pull request #10675 from xavierleroy/runtime-macro-deprecation
f0bdb45572 Changes entry for #10675
d57a4bdf55 Remove tests/compatibility
e88608c8e8 Rename field of internal structure from `alloc` to `allocated`
b7ec62b56f Deprecation of C macros, continued
f63965c1e4 Extend CAML_DEPRECATE to VS2019
e165c285ee Deprecation of C macros
9ee7de9278 Merge pull request #10682 from gpetiot/fix-letop-binding-loc
b3b3d35f4a parser.mly: fix locations of letop-bindings
5396b14423 Merge pull request #10676 from shindere/inria-ci-test-pic
d5f5076624 Fix an overflow bug in major GC work computation (#10680)
d5cdbbb775 Documented M, m, n, w, W, t, c and H options of OCAMLRUNPARAM, Fixes #8697 (#10666)
ba2dc5342f Merge pull request #10679 from dra27/absolutely-CC
98e16f0334 Merge pull request #10659 from lpw25/fix-freshening-substs
a112ad8bd6 Add Changes entry
134a55dfee Bootstrap
10074989bb Fix freshening of identifiers
1ab49ceb58 Merge pull request #10678 from lpw25/expose-warnings-description
fc543aa54a Add Changes entry
f23e9745ad Expose descriptions in Warnings module
f1be534e3d Use $cc_basename in configure for detection
f4d6410448 Allow for gcc with prefixes in configure
667a9eb8cb Also test --with-pic in Inria's other-configs CI job
8f713c59f7 Fix script for Inria's other-configs CI job
6e053e0dbb Str library: avoid global state in RE engine (#10670)
082341c298 Do not use obsolete macro 'Modify'
3eb0ab091f Install Changes, LICENSE, and READMEs (#10669)
07dfba8594 Add {In,Out}_channel.with_open_{bin,text,gen} and In_channel.input_all (#10596)
64023f55c6 Ignore `_opam` in git and check-typo. (#10649)
537a707540 Release howto: enumerate all opam packages
adc906e67e remove comments about repr-ing (#10665)
ab0c892cfa Merge pull request #10662 from gasche/pr10661
aa8100ae2e Merge pull request #10656 from dra27/check-typo-fixes
8da8b7e028 Merge pull request #10382 from lpw25/clean-envs-check-type-decl
a20ae64440 Add Changes entry
17294adcdb Bootstrap
60c2126f1d Don't repeat environment entries in Typemod.check_type_decl
c8c3a95a97 Merge pull request #10582 from kit-ty-kate/source-highlighting-tabs
3151f1f138 Add more merge constraint tests
e93f6f8e5f Merge pull request #10504 from dra27/systhreads-configure
da4515c289 Merge pull request #10621 from dra27/simplify-shared-configure
e0d1668e27 fix indentation (#10657)
38b9d45f66 Merge pull request #10644 from wiktorkuchta/typedecl-t
8d3c2e0a18 check-typo: check for executable after pruning
8a3dee3cf0 check-typo: prune directories in .gitignore
3748449025 Merge pull request #10516 from gasche/switch-types
46b5e1d577 [minor] switch.ml: distinguish types for arguments, tests and actions
43af0f8901 [minor] make Bytegen.comp_primitive a robust matching (#10646)
b44c16eaac manual: Fix inconsistent styling in typedecl.html
74f89236ea reorder the 4.13 Changes
0a18ad2597 .mailmap update
9d537af8a8 (very important Changes cleanup)
a517a240b7 Synchronize 4.13 and trunk changes
5158c85e0f Buffer documentation tweaks (#10525)
f406684bb4 Fix a flaky test by refactoring TypePairs (#10638)
359f46f224 Add `Out_channel.{is,set}_buffered` to control buffering of output channels (#10538)
8a3347438b Merge pull request #10635 from dra27/freestanding-sak
0d4065b749 Merge pull request #10632 from dra27/fix-10630
0bcaddb887 Merge pull request #10637 from gasche/outcomdetree-constructor-record
8420375777 [refactoring] Outcometree: introduce a record type for constructors
e20fe18de4 Restore minor heap pointer after a Stack_overflow (#10633)
69ba948203 Allow the C compiler to be overidden for sak
f9fe08c9c1 Expose more Pprintast functions (#10618)
84a5813756 Ensure -fPIC doesn't get passed to an assembler
61ecb0735d add immediate attribute (#10622)
0f2cbf6d3d Merge pull request #10629 from nojb/bigarray_c_elts
531bb0400e AMD64 integer multiply immediate cannot write result to a stack location (#10628)
68cdc38ee4 manual: add missing Bigarray C element kinds
f1b9c23d18 Merge pull request #10421 from sliquister/gc-doc
7ad8c13683 Force normalization on access to `row_desc` (#10474)
7317226e4c Small refactoring in predef.ml when computing the initial environment   (#10597)
75680ff87b Fix performance regression introduced in 4.08 (#10624)
a2cef4d71b #10598, fix exponential blow-up with nested module types (#10616)
cffde3184d Merge pull request #10619 from shindere/fix-o-regression
0117428c3e Support more arguments to tail calls by passing them through the domain state (#10595)
817796733f Pack ocamldebug modules to minimize clashes (#9621)
9410b9c91a Limit CSE of integer constants (#10615)
b8efbfb0eb Fix marking of if condition as inconstant in flambda Fix #10603 (#10611)
36940c6dcd Clarify flexdll.h/flexlink warnings
87036673b4 Simplify configure for shared library support
ba4dad634b Merge pull request #10511 from dra27/cygwin-without-flexdll
c1099dff6b Fix regression introduced by #9660
de6be27675 Correctly configure Cygwin when flexdll missing
3e85887d68 Merge pull request #10602 from jmadiot/manual-errormsg-pre
1be4fa768f manual: fewer hevea-generated css classes (#10605)
fa43873b3b Merge pull request #10599 from stedolan/lazysigs
c35fc2cb02 Style changes
335cf1ace8 alldepend & whitespace
ee57207099 Bootstrap
9b1c5bca86 Changes
b7efd52b9b Lazy environment scraping in Mtype
143dadbde5 Add Env.find_strengthened_module
27f1686aa7 Optimise Subst composition with identity
b44e5fdf70 Strengthen module types to aliases
3fb495f9c3 Lazy Env.lookup_modtype and Env.lookup_module
46f803efb6 Lazy strengthening and module type declarations
397ac57f9d Lazy signature substitutions
cd105d99ba Deobfuscate ignored-partial-application and non-unit-statement check (#10606)
93b7f1c73e manual: keep white spaces in error messages
6a12ddb222 Merge pull request #10601 from Octachron/manual_separate_library_tex_files
c96ba796ab Merge pull request #10587 from dra27/remove-SRC
632cb780e0 manual: fix odoc build
e616d72866 Move #10471 to 4.13 section
cd3b2d0035 Correct Makefile include'd in manual
1a5000f418 Merge pull request #10489 from dra27/main_os
3a0b1b1e15 Merge pull request #10451 from dra27/no-scripting-for-4.13
5fe616551e manual: more explicit include of module documentation in latex mode
4e9eb755e6 Add various fast-paths in typechecking. (#10590)
5ba9e0e0d6 Merge pull request #10588 from dra27/manual-mkdir-again
dbce6c200f Merge pull request #10593 from voodoos/fix-untypeast-for-patterns
eccaa452ca Add {In,Out}_channel to Stdlib (#10545)
011e05309a Support debugging multithreaded programs until they create threads (#10594)
8d93e23625 Add Changes entry
e929691fa1 Fix untyping of patterns without named existentials
452a9e1283 Add a test illustrating wrong untyping
b4a6d23f5b Add missing reviewer
2c7c86adce Merge pull request #10586 from dra27/fix-manpages-partial
6905c8986d Clarify: it doesn't need to be that complicated
fa2e1ccf14 Remove unnecessary CAML_LD_LIBRARY_PATH
a4ac8615d9 Remove unnecessary COMPFLAGS in manual
1951ae0fbb Eliminate need for abspath
a9e71bd760 Fix incorrect pattern rule
ffee03bb71 curl quietly
e6d42ce95a Use ROOTDIR not SRC in manual build system
e517c653c9 Remove no longer used SRC from ocamldoc/Makefile
d12ddb5a12 Fix manpages build when libraries are disabled
23c8433d30 More parameter passing registers for Power and s390x (#10578)
7a40c57ed8 Merge pull request #10565 from wiktorkuchta/string-trunc
c644bdfd25 oprint: Truncate strings only after 8 bytes
97d57dedff Add a Changes entry
6711b12463 check-typo: highlight_tabs.ml contains tabs
ef16261ae4 Error source highlighting: align using tabs to match tabs in the source
c7aa1a9009 Add a test for error highlighting in presence of tabs
b5ffb01571 manual: Fix typo in GADT examples (#10581)
600733aa78 Merge pull request #10580 from Fourchaux/typos
2ba87eeb16 Typos
90c1365901 Add the missing license field to the opam file (#10579)
812436fd30 Change inlining cost of flambda switches. (#10458)
f5674ecbc5 Remove Obj.{marshal,unmarshal}. (#10568)
672965bfda Merge pull request #10549 from xavierleroy/arm64-signals
50495f632a Changes entry for #10549
12523517cf Support naked pointer checker on ARM64/Linux and ARM64/macOS
b36a5708c6 Add stack overflow detection for ARM64/Linux and ARM64/macOS
3770a8708e Add signal-handling macros for ARM64/macOS
d9519e0773 Cosmetic: reorder cases in signals_osdep.h
1bd0e663b6 Merge pull request #10558 from Octachron/apply_selective_typing_prim
70750e2038 restore %apply and %revapply for abstract types
3371e635e9 fix the dune build after #10577
091f5d4b64 Merge pull request #10577 from shindere/configure-sys
b88604d8f7 Merge pull request #10574 from wiktorkuchta/remove-htmltransf
718990c2cf Let configure generate stdlib/sys.ml
851d0ff6aa Add naked-pointers flag to `ocamlc -config` output (#10531)
172bec8073 Remove manual/tools/htmltransf
2642557895 Merge pull request #10573 from Octachron/parsetree_typo
1393ccabb1 Fix a typo in parsetree.mli
f0d61fa106 Merge pull request #10497 from wiktorkuchta/webman-css
9671c8769b Add Changes entry
7f58ef0211 Merge pull request #10567 from v0idpwn/patch-1
53659d6fbf Update IRC info
fb99b2be83 Tidy-up the testsuite/manual commands (#10411)
da44d603ab Merge pull request #10380 from dra27/cygpath-locale
1dc70d32da Merge pull request #10195 from stedolan/mark-prefetching
00c84b8a1c Add set_uncaught_exception_handler to systhreads (#10469)
6abc9727d2 Disable colors if NO_COLOR env var set (#10560)
49c81d7089 Move 10442 to 4.12 maintenance section
4b6c210dda Merge pull request #10446 from dra27/fix-10442
80482ed60b parser.mly: location fixes for type constraints and punning (#10555)
53430f21c9 Restore Toploop.use_file (#10557)
3b5812a0a0 Merge pull request #10539 from COCTI/revert_dup_kinds
a5bd913f51 fix bug of non-shared field_kind
01777771e5 Revert "right way to duplicate field kinds"
a6a071c2f8 fix pretty-print of gadt-pattern-with-type-vars (issue #10550) (#10551)
d269e04acf Restore old loop logic in prefetch GC
90f648ca07 Rebase & unbreak naked pointers checker
4a7577d430 Optimise instrumented runtime mode in marking
1a7b84dd53 Fix an off-by-one error
02c4f42efc CAML_INSTR support for mark prefetching
58a25975c2 changes
1d35b2573d typo
ba2fd8ae8a bugfix for redarkening logic
369e2ec70b changes after review
401bf4811e cleanup
3354bab3ab Speed up GC by prefetching during marking (prototype)
8949e28fa1 fix no-flat-float-array tests after #10542
44e473e6a4 Compiling for HaikuOS 64 bits  (#10546)
328b0b7ce0 Merge pull request #10542 from lpw25/fix-unboxed-immediate64
3723072576 Add Changes entry
59fae6784c Fix detection of immediate64 types through unboxed types
9c67b253f6 Fix mapping of intervals in Ast_mapper (#10543)
d53908d714 Add doc for ocamldoc's cross-ref with text (#10536)
1271f676e7 Merge pull request #10471 from AltGr/arm32-musl
ae87e89535 Merge pull request #10448 from damiendoligez/fix-bootstrap-ci-script
82755626a4 Merge pull request #10535 from nekketsuuu/nekketsuuu-subsub
d5ae88280d Merge pull request #10537 from nekketsuuu/nekketsuuu-mkdir-webdircomp
c973882e03 Remove comment about HP/UX 9
d9558baf2d Fix private polymorphic variant inclusion (#10529)
7090cc3810 minor fix: mkdir before copying CSS for webman
cc739fde51 webman: Remove chapter number on subsubsection correctly
50deeb2d87 Add explanation for shorthand representation of functor with multiple arguments (#10530)
011d316a3b Merge pull request #1599 from dra27/win-env-tests
cdc32182ae Merge pull request #10526 from xavierleroy/more-random
49b9cd3e30 webman: Center BNF syntax bars `|`
d56cbd0463 webman: Italicize command-line argument variables
27ae0f55e2 webman: Styling for Unix/Windows specific blocks
321a2279e2 webman: Add padding to .cellpadding1
cfb2545d9b webman: Add spacing to tables for aligned exprs
f6355cf1a7 webman: Fix variables being bolded, not italicized
afe24ba70b webman: Make table headers bold
e311dabeeb webman: Center tables
7c1fd96f3a webman/api: Improve constructor color contrast
cfd3c039f6 webman: Remove styling for the ordinal "th"
a50a4d42f8 webman: Set (mathematical) variables in italics
b4eb567b0d webman: Set command-line arguments in monospace
8900ac5521 webman: Use SCSS variables for font-family
61764cc647 webman: Increase heading font-weight
d5fe4293e6 webman: Make display style blocks centered
ef6d0501ae webman: Italicize grammar symbol names
a194d25e0e webman: Follow inline code styling of htmlman
f8390bc460 webman: Remove colored background for inline code
986e8329c5 gc.mli: tweak phrasing
5dc1b2f510 use the Opam way of making "sed -i" portable
5f0cbe101b Merge pull request #9424 from bobot/fix_Ephemeron_segfault_with_missing_write_barrier
4a93ebb12a Random: add functions bits32, bits64, nativebits
0ff72d96d0 Merge pull request #10524 from wiktorkuchta/directive-error
3c97584f46 Show expected and received type on directive error
c329c2c0b7 Merge pull request #10522 from xavierleroy/no-ligatures
fb1af2e229 toplevel: Move running directives to Topcommon
f203a5d45d Run the Polling pass earlier (#10523)
aededd1364 Remove `\usepackage{ae}`, redundant with `\usepackage{lmodern}`
265bba9394 Disable ligatures in typewriter fonts
9f1b1ed637 Merge pull request #10500 from gasche/comment-on-match-exn
ff86950c25 [minor] make Lambda.Not_simple local to its only user
1940cb007b [minor] remove unused exception Switch.Not_simple
1475d99119 [minor] a code comment on match-with-exception compilation
b3d2cdcbe6 Merge pull request #8516 from lpw25/simplify-type-class-structure
73b648e6db Add Changes entry
e8dd0178a2 Add helpers for warning_scope in typeclass.ml
990ea08408 Remove unused csig_inher field
964a13c31b Move method spine generalisation logic into Ctype
dbd5002427 Change warning 13 message
dc351b3c7d Rename Concr
f7e6b79738 Keep class signature row up-to-date
a7f13f9acb Merge pull request #10506 from wiktorkuchta/refman-ext
4716c8e063 [Weak] keep *set_* and *blit_* from breaking marking invariants.
6909cadc72 [Weak] Add a tests for ephemeron setting above not alive keys
a1b917ad7e Merge pull request #10400 from dra27/debian-i686
b7ef616ff7 Set object name of self type
19203f86f1 Fix warning attributes in class signatures
845ac93066 Treat class_signature more like type_expr
8f9b7667ab Remove private_self and public_self
e6aa05bf93 Track dummy methods via their scope
b43ecd16db Represent ancestor variables more directly
1aa65fa967 Give more precise errors for virtual methods
013717de96 Add dummy methods in all cases
37c5cb1d30 Bootstrap
6e5b86355a Change representation of class types
3ca0fad1ba Tweak configure for supporting arm32 archs with musl
6ad7a11a58 Revert "Remove propagation from previous branches (#9811)" in trunk (#10492)
caf5108506 Collect vars and meths without references
b28ce4ac22 Build met_env on second pass
0ca24f9d10 Relax object duplication restrictions
73c8addba2 Make the two-passes of class_field explicit
a734bc6ae5 Add more classes tests
08d93dd02d manual: Move "Private types" into its own file
c5e96ec070 manual: Fix module aliases section appearing twice
e608b7c95a Give caml_send* arguments the correct types (#10498)
a20e0a7efc Merge pull request #10502 from gasche/fix-dune-build
b1f4d7b2ad stdlib/genlex.{ml,mli}: use attributes to turn deprecation alerts off
54ce3bee52 dune: tell dune about asmcomp/polling.ml
91058bd6f3 Disable systhreads if unix isn't built
80a40377dd Use DOES_NOT_EXIST to clarify expectation
24f565bcf1 Always restore alteration to environment string
de11da3096 Use for instead of while for stepwise loops
39d29beb0f Environments.remove -> Environments.unsetenv
551af346f3 Changes
bc527fc4c1 Correct indentation of function clauses
791dd868c1 Use unset in the testsuite to harden tests
30256c0de4 Add unset directive to ocamltest
0fc19c04a4 Harden win-unicode test against putenv failure
e7161fdd1a Eliminate open Unix from testsuite
ddd9ec2a91 Deprecate the Stream and Genlex stdlib modules (#10482)
3e69d9db43 Revert "Give caml_send* arguments the correct types (#10461)"
1b3ffee3f1 Changes entry and comments for Safepoints (#10039)
758fc7ddd6 Safepoints (#10039)
6a42e42306 Give caml_send* arguments the correct types (#10461)
9209a4f757 Merge pull request #10493 from wiktorkuchta/binutils-install
ea7c8bd522 Mention binutils as installation prerequisites
7053a45357 #3959, #7202: in script mode, handle directive errors (#10476)
98a27ddf9d Merge pull request #10487 from nchataing/cstr_res_unfolding
363f8dcf07 Update change entry
1c7e469f21 Compute STDLIB_MODULES with a C auxiliary
7a529fbafa Abstract wmain/main difference with main_os
7087674e08 Update dependencies
679528770f Move function from Types to Btype
a37a7e2d87 Add Changes entry
2953c5be97 Move logic to get the type path from a constructor return type in Types
0c2eb39351 [doc] Fix: String.{starts,ends}_with introduced in 4.13 (not 4.12) (#10486)
005ba108db Add comment to amd64/emit.mlp about caml_c_call (#10481)
cbbb5e025c Allow explicit binders for type variables (#10437)
424a2f6727 Merge pull request #10472 from gasche/caml_sys_random_seed
46ec3beac7 caml_unix_random_seed: clarify fallback logic
54bedf4344 caml_sys_random_seed: split unix-specific part to its own function
e1a37e1a9e Merge pull request #10475 from xavierleroy/doc-undefined
37257fb488 st_stubs.c: fix initialization of thread ID when a thread starts (#10478)
e988cb9843 Merge pull request #10473 from edwintorok/riscv-cfi
e390e6473f Merge pull request #10361 from Octachron/semdiff_type_decl
0692959556 Changes: add entry for RISC-V CFI directives
9136587829 Changes for #10475
570721f186 Documentation of iterators and concurrent modification
e015077bf0 asmcomp/riscv: emit CFI directives
d4b73d36a3 runtime/riscv.S: add DWARF CFI directives
26cc0f65a1 runtime/riscv.S: introduce END_FUNCTION macro
650ba029a5 Remove unused cstr_normal field from the constructor_description type (#10470)
47e5a7acb6 Normalize type_expr nodes on access (#10337)
f68acd1a61 Merge pull request #10192 from MisterDA/windows-unix-domain-sockets-socketpair
11c5f76d29 Split labels and polymorphic variants tutorials; move GADTs into tutorial (#10206)
ec880ee809 Pun labelled arguments with type constraint in function applications (#10434)
fb81f86756 update Changes for #10361: add reviewers
4d5f4f2037 diffing_with_keys: switch to a record
b3d44c38fd Merge pull request #10468 from matthewelse/trunk
3cbf4fab97 Functorized diffing (with improved documentation) (#4)
69560194fc swaps and moves
16cb5722e0 diffing: adjust weight for fields and constructors
24434c4e1c update Changes
b8f0f2f569 more tests
8adc48b8b0 diffing for variant definitions
3cac9dd6c5 diffing for record definition
fe2dab7770 Emulate socketpair of Unix domain sockets of stream type on Windows
566350611b Factorize code setting cloexec/inherit flag on Windows
f40e8996aa Support Unix domain sockets on Windows
adb2dad313 diffing: define few common functions
bc0def2418 Add #10468 to Changes
9adfb96935 Correctly pretty print `Psig_typesubst`
32d25e7d97 Merge pull request #10407 from antalsz/pr-better-error-messages
0c993326e1 Respond to final round of review for #10407
2d62e825ca Make `Errortrace.*_error` only contain nonempty traces
4aacb71cb2 Add some extra periods to some new error messages for consistency
80855e2d2f Respond to more review for the structured error messages (#10407)
1820e785a5 Respond to review for the new structured error messages (#10407)
2abe3e4d3d Use the new structured errors (#10170) for better error messages
abd5490962 Add new test cases for failures of type-specific unification methods
7fad56ed20 Add more new test cases for module inclusion errors
79a60b42bc Add new test cases for module inclusion errors
7849115b07 Bug fix: `equal_private` was being used in too many places
d967318148 Remove Cmm.memory_chunk.Double_u (#10433)
70b03f9210 Filename.chop_suffix: fail cleanly when not a suffix
5bcddeb863 Document what happens on overflow in float -> int conversions
e5e9c5fed5 Merge pull request #10402 from Octachron/manual_ocamldoc_fix
12df60ccce Move #10454 change entry to 4.13 section
8b548de2e5 Merge pull request #10454 from lpw25/nondep-row-more
d5ff640550 fix Changes for #10449
dfc9f19139 fix work accounting in marking phase (#10449)
da57ec08f3 Add Changes entry
c6a50a3f58 Check row_more in nondep_type_rec
fc9a672251 Add another nondep test
aa890e2df4 Merge pull request #10328 from lpw25/better-disambiguation-error
526ea2a188 Add Changes entry
29151abc66 manual: document ocamldoc paragraph insertion
e22cbaf48f Merge pull request #10444 from Fourchaux/typos
40494f0038 Merge pull request #10447 from edwintorok/riscv
063cd86c18 asmcomp/dune: fix build on RISC-V
1768cbcfd5 Give more precise error when disambiguation could not possibly work
3ce12cb967 Fix ordering of dirs in Load_path.prepend_dir
f3d9587c30 Fix #directory in the toplevel
3d52bcad84 Rename Load_path.add to Load_path.append_dir
a741669681 Add repro case from Issue 10442
cff9abaabf Typos
0733be3c7c Changes: merge duplicated `Type system` heading for 4.13.0 (#10443)
83eca0dabc Remove unnecessary surrounding parentheses for immediate objects (#10441)
a208a29bcc Merge pull request #10438 from Zett98/runtop-eval-option
d0d877a9c3 added -e eval option for runtop and natruntop
1dce5eb240 first commit after branching 4.13
f779a50353 last commit before branching 4.13
dd7927e156 bump magic numbers for 4.13 (and trunk)
0ba253df46 stdlib: add Array.fold_left_map (#9961)
c19f9f7588 document @since for Format.stag (#10439)
f9066346fd improve documentation of live_words field of gc stats
1e15c0deaf Avoid overwriting closures while initialising recursive modules (#10205)
970407162b make CI bootstrap script compatible with Macos
da28d0e9bf inria ci: update remove-sinh-primitive.patch
7eaf05b3cf Added some missing C99 float operations (#944)
b5821db337 Add Random.full_int (#9489)
efbd3595c1 changes: fix issue number
cd65210491 Merge pull request #10430 from Drup/print_bytes
ef6b4b0c9a Add missing `Format.pp_print_bytes` function.
400540d393 Make build_other_constrs work with names instead of tags. (#10428)
1037341d8c Merge pull request #10408 from dra27/sys-time
9b0847d3e2 Merge pull request #9919 from dra27/tidy-prims-in-headers
efef92afec Fix caml_sys_time on Windows
756dd27995 Allow CSE of immutable loads across stores (#9562)
0340410346 Inria CI "main" script: do not lower priority on macOS
fd59303165 Simplify tools/Makefile (#10265)
600aad5d29 Merge pull request #10379 from lthls/remove-pidentity
fe96962fd4 Merge pull request #10252 from stedolan/unboxed-as-kind
ce2810b40a review
dc08b85b16 Remove primitives Pdirapply and Prevapply
2bc428664f Remove the Pidentity primitive
4ff6bc40bd review fixes
06ede5fdf5 Bootstrap
1820718aa1 Move type_unboxed.unboxed into type_kind
bd9ec5d198 Better compaction heuristic (#10194)
1a4fda312d dune: add asmcomp/dataflow.ml
f0ecd9b8aa Merge pull request #2245 from chambart/bytelink_order
da5fd2dd32 Improve error message for link order error in bytelink
6e3c90dfea Add %frame_pointers (#10419)
9b887df04b Spilling and reloading: avoid behavior exponential in loop nesting (#10414)
a7a5dbbb4e Merge pull request #10420 from stedolan/filter-arrow-comment
bba647eb93 Merge pull request #10416 from Octachron/detect_rec_in_show
846a2803d7 Fix typo
5eddf636c5 Merge pull request #10417 from dra27/10405-bootstrap
a3c655a00d Bootstrap
22e3e03f82 toplevel: detect recursive definitions in #show
5fbd6e15c8 Restore the tree after checking labelled modules
5e45b2e9fa Add a generic backward dataflow analyzer and use it for liveness analysis (#10404)
a6f9c4461d Merge pull request #10412 from gasche/env-store-datatype
25e376be04 Env: split store_type by adding store_{constructor,label}
9ffd97f3ee Merge pull request #10405 from trefis/subst-locs
7feef2d660 Merge pull request #10401 from Octachron/signature_group_2
8ce8bff9db Merge pull request #9809 from dra27/complete-suspicion
91285e0ad5 signature_group review: more symmetric interface
3ecc6cda20 Merge pull request #10135 from dra27/faster-flexdll
79f6c2228b Add {Int,Int32,Int64,NativeInt}.{min,max} (#10392)
e51a8a92eb review: Changes
5e7bcdb4d8 review: with_constraints delete or replace one item
b6ff5baeff signature_group review: next + unfold
4060c05ea0 Eliminate the ocamlopt not found error
08f9a8660d Use native flexlink during the build
23cae5b8a4 Use ocamlopt-compiled flexlink in testsuite
474255bb0e Control the flexdll bootstrap with configure
c555a5bd6e Allow bootstrapping flexdll for the Cygwin ports
375b7cd4bb Overhaul flexlink binary locations during build
b96040decb Always bootstrap flexdll if the code is present
731440fe59 Automatically bootstrap flexdll
5f87ca619c Bootstrap flexlink without partialclean
ea2b165323 Merge pull request #10406 from kit-ty-kate/fix-ocamldep-help
95e24f2429 Update the changelog
abb50647d2 Partially reindent Makedepend.run_main
a7e97d85ae Fix ocamldep -help
d0a466062f make depend
8fb2de19fb Changes
3b1b916a40 update test
fae4bbc0a4 update locations for destructive substitutions
09f9db599c bugfix: with constraints and #row component
49528a6944 Merge pull request #10307 from nchataing/env_refactoring
bb052b09e0 fix the dune build after #10170
5d26dfc724 Refactor type_descriptions in the typing env
099b86a046 Merge pull request #10170 from antalsz/pr-better-error-types
e48d97fed2 Merge pull request #10289 from Zett98/do_not_print_options_in_usage_message
00dfb07866 Fix formatting issues
e16653e908 Add missing copyright headers to `errortrace.ml{,i}`
7157ce2fc2 Add Changes entry for #10170
c8d8ef7ae2 Fix names of arguments to `Ctype.{,raise_}scope_escape_exn`
1d2ad7742d Replace `report_error` and `trace_format` with 3 separate functions
ee9dd52d42 Return `prepare_expansion_head` to the global scope
16564969f6 Change `Printtyp.trace_format` into a GADT and expose it
bd030c0e12 Address all the excellent reviewer suggestions
e87be39194 Maintain more structural information in type-checking errors
14ff896d91 Add tests before improving the internal type error representation
b5a5f01383 Fix minor bug in `Ctype.full_expand` and document invariant
6da9c31652 dont print options in usage msg
e0745c14e6 more documentation
72a87e1989 update Changes
c52f1d06c2 with constraint: ignore ghost components
9ce0b9b364 Signature_group: replace_in_place
206fbfa516 include shadow all items in a group:
e3af864038 Signature_group: ghost-aware iteration over signatures
2427ba7cb6 [refactoring] Typemod.simplify: use List.filter_map for readability
9107f181ca floats.c: small optim of caml_{frexp,modf}_float (#10398)
07ab35957d A little precheck environment info
c04c072537 Merge pull request #10146 from damiendoligez/ocamltest-move-test-block
c4c637d9f3 Tune i386 test to be 32-bit mode of x86-64
fb4141cb59 change keword for postponing test block
2a4aa7a324 Merge pull request #10396 from Octachron/revert_list_printing
f6edb38adc Revert "Merge pull request #9336 from Octachron/mundane_list_printing_fix"
aec3ecbfc7 Test evaluation order for for loops (#10394)
62d89c046b Merge pull request #10384 from dra27/tabular
aef2562713 Merge pull request #10390 from gretay-js/update_dune_build
fb89e81169 Merge pull request #10385 from Octachron/6985_more
4c6ff22df8 Add emitenv and cmm_invariants to dune file
5776b22b15 partially fix the dune build
257c4d88d1 mtype: remove ghost row types from strengthened signature
6275c0ccda Fix handling of exception-raising specific operations during liveness analysis (#10387)
5152c5249f Refactor Makefile.compilerlibs
265467c1b6 Harden Makefile TAB rules in check-typo
a376cbf8f1 Have update_scope_rec only recurse in principal mode (#10383)
04e9f14aec Convert erroneous tabs to whitespace
f31d422285 Don't emit tabs in prims.c
53890ca007 Refactor one ifeq not to use continuation
118b17afbf Change the configure message not to contain tabs
9280a4b456 The invariants.cmm test should be run only when the native compiler is enabled
159db72136 Merge pull request #1400 from lthls/cmm_invariants
ed17834964 Add David Allsopp as reviewer
49b3574e5f Changes
6ff3561fba ocamltest: add the codegen_exit_status variable
9818f7aaa2 Added fold_{left, right}, exists and for_all to String/Bytes (#882)
b6ef1efa2a Merge pull request #10352 from gasche/Seq.concat
88676f6db6 Use build_config.h instead of -DOCAML_STDLIB_DIR
95d5ce027a Set LC_ALL when calling cygpath in configure
5133961359 Use correct canonical name for Cygwin64
620f2cb93c use a marker at the top when the test block is at the end of the file
ebddee737b ocamltest: allow TEST block at end of file
a672887fe0 Seq.concat: 'a t t -> 'a t
85c2012021 Merge pull request #10376 from dra27/output-complete-obj-msvc
e4b6bfa06c Merge pull request #1819 from shindere/bootstrap-doc-update
90def1a36a BOOTSTRAP.adoc: mention an alternative way to test the bootstrap
60039cd4c1 Modernise Ccomp.expand_libname
0b39a30939 Merge pull request #9632 from lthls/opam-incremental-builds
ca9b5f991e Changes
34fd9d060b Update expected test
ae9555bbb1 Merge pull request #10377 from dra27/ocamltest-quoting
8b1bc01c31 Set up execution environment before launching a CI script
5260392143 Merge pull request #10366 from shindere/ocamlrun-build-variable
7c46b03e04 Update Changes
55b33ba5b3 Build system: simplify the compilation of the caml-tex tool
54a33a3781 Clarify the way `make runtop` works.
2f4f677f59 Add a Changes entry
70e21f77fc Introduce the NEW_OCAMLRUN build variable
e0c77200c3 Build system: use boot/ocamlrun rather than runtime/ocamlrun in some places
2a9c7b61c8 Build system: rename the CAMLRUN variable to OCAMLRUN
ff32380dd6 Build system: replace suffix rules by pattern rules
687a2e8d82 Merge pull request #10373 from Octachron/existence_precedes_essence
98430d1a8b Run tests/output-complete-obj/test.ml on Windows
637b9fca96 Call the partial linker correctly on msvc
d60da30752 Support both quoting styles in ocamltest
64044dd668 tweak error message for unknown constructors or fields
90d52931b5 Updates and fixes
95e55306a3 Update to take opam-custom-install into account
ddd70be4a7 Document incremental build solutions with opam
eaf2aaf96d Fix #10338: Translcore.push_defaults does not respect scoping (#10340)
36042d0623 output-complete-exe: do not generate .cds file (#10371)
f916c7b736 Merge pull request #10360 from EduardoRFS/refactor-format-of-tpackage-merge
4f4e46af44 Remove the availability analysis (#10355)
bbbe9e559b Disable manual build temporarily
c8abad8526 Merge pull request #10303 from dra27/fix-10302
24d7f3bde8 Introduce per-function environment for Emit (#8936)
430c134435 Merge pull request #10368 from dra27/bootstrap-docs
7882a4ee27 Merge pull request #8929 from Octachron/printtyp_fix_nested_recursive_definitions
a09a84f9a7 Merge pull request #10365 from shindere/build-system-cleanup
c0a233a5b5 Update BOOTSTRAP.adoc for changing primitives
b9acbd6711 Merge pull request #10363 from Octachron/ocamldoc_entities
207035bcc7 fix printing of nested recursive definitions
01b32afefa Build system: remove now useless line from Makefile.config.in
2264171349 Merge pull request #10327 from shindere/ocamltest-files-subdirectories
6422902a9c ocamldoc: escape <, > and & in html backend
94faefd5da Add convenience pretty printer for `Either.t` (added in 4.12) (#10242)
f7974c9efa unify field name and type on Tpackage
2217ed8fd5 Merge pull request #10045 from dra27/csharp-mingw
7b44b5323a Add a Changes entry
e5baa87996 Get rid of the setup-links.sh script in the tool-ocamldep-modalias test
9256944766 Use the copy action in the tool-ocamlopt-save-ir/start_from_emit.ml test
d841571cac Use the copy action in the tool-ocamldep-modalias/main.ml test
b16c2f5ff1 Use the copy action in the missing_set_of_closures test
43ede500f9 Use the copy action in the opaque/test.ml test
c5a82d9525 ocamltest: implement a copy action
c9181a1e84 no-alias-deps/aliases.ml: rename b.cmi.invalid to b.cmi
823a8e9e7f Slightly simplify the tool-ocamldep-modalias test
8b565ab16b Rewrite the typing-missing-cmi test to use ocamltest's subdirectories variable
ddd910d96a Rewrite the tool-ocamldep-shadowing test to use ocamltest's subdirectories variable
6d69290746 Rewrite the missing_set_of_closures test to use ocamltest's subdirectories variable
97198d62f7 Rewrite the opaque test to use ocamltest's subdirectories variable
e8a1b21928 Rewrite the lib-dynlink-private test to use ocamltest's subdirectories variable
66297e6d6b Put lib-dynlink-private in a correct form
3804a99a82 Slightly simplify the lib-dynlink-private test
2e5a4d02b3 Rewrite the lib-dynlink-pr4839 test to use ocamltest's subdirectories variable
ad828c2525 Rewrite the lib-dynlink-pr4229 test to use ocamltest's subdirectories variable
da1920e247 Rewrite the lib-dynlink-native test to use ocamltest's subdirectories variable
e8cee9623e ocamltest: introduce the subdirectories variable
7c0d049f85 ocamltest: rename the files variable to readonly_files
48d800cf57 Fix #8575: Surprising interaction between polymorphic variants and constructor disambiguation (#10362)
848d54d45c Merge pull request #10358 from lpw25/tbl-in-load-path
2af9bd9b48 Add Changes entry
0f83d55f25 Use hash tables for the load path
787624ac2a Fix test to avoid building manual in forks
430c60ee71 Test file (WIP)
2a969c01c9 Ensure installed stdlib artefacts have correct case (#10301)
d50339d4a1 Merge pull request #10354 from xavierleroy/specific-operations
94e74742e1 Enable Cmm invariants on some CI runs
7bac5a91f8 Add --enable-cmm-invariants configure flag
846735684f Treat Ialloc_far as not pure and susceptible to raise
15e635462b Fix handling of exception-raising specific operations during spilling
8bf201b8c7 Refactor Proc.op_is_pure and fix Mach.operation_can_raise
b7bc826e4b Merge pull request #10219 from Octachron/printtyp_explicit_syntactic_groups
f823915210 Merge pull request #10357 from dra27/testsuite-cygpath
c46389154e Merge pull request #9957 from stedolan/remove-enforce-constraints
89a489a966 review: comments and constant propagation
1ae91bb361 Add cmm-invariants to OCAMLPARAM
5a83b92072 Remove Ctype.enforce_constraints
9f29f9a67f Remove a call to enforce_constraints when checking GADT patterns
1425135c66 Remove a call to enforce_constraints when checking type declarations
da95d2863a Remove a call to enforce_constraints when constructing types
71fb042b3f Fix .depend
d504b58650 Add Changes entry
9b2c634513 Add an optional check for invariants on the Cmm representation
091bff3376 Merge pull request #10225 from EduardoRFS/fix-dune-build
3c29f13eaa dune: fix main.exe and optmain.exe build
9272ef4ad3 dune: fix main.bc and optmain.bc
8604cbe8b2 dune: fix ocamltest_config.ml
d3643c6813 remove Typecore.create_package_type unused helper (#10356)
f20c30e15d Fix testsuite MKDLL for bootstrapped flexlink
d12738a234 Merge pull request #10243 from dra27/check-configure
eed1110e6a make update_scope recursive while keeping trace_gadt_instances (#10277)
77115193cc Merge pull request #10297 from dra27/ocamltest-rm_rf
178cca1bab Don't follow symlinks in rm_rf
72f76f40b4 Merge pull request #10309 from dra27/win32unix-errno
856b7251a1 Fix ocamltest's rm_rf function w.r.t. symlinks
c0c241e073 Merge pull request #10346 from dra27/fix-makefiles
38fb9e0a94 Fix mingw-w64 DLL support with binutils 2.36+ (#10351)
6da8fd5a33 Remove slightly gratitutous make macro uses
0df6bc9e05 Correct rules in Makefile.compilerlibs
4bcd7e6d0f Merge pull request #10245 from stedolan/remove-cyclic-abbrev-check
50a7877f72 Merge pull request #10310 from dra27/restore-spacetime-option
4dca3c3c6b Merge pull request #9336 from Octachron/mundane_list_printing_fix
adcb23f298 Merge pull request #10350 from dra27/tweak-actions
7931817474 Merge pull request #10341 from gasche/manual-caml-example-in-cmds
be53454367 toplevel: identify list by their types
93a9b2dc91 Fix destroyed_at_c_call on RISC-V (#10349)
60f9d2f177 Fix #10271 using Env.remove_last_open (#10308)
3abccf87f7 Do the homework promised in #10199 (#10347)
3a42a43b15 Fetch from the correct place when deepening
422eb95503 Fetch 50 commits in the full-flambda workflow
e06ba31282 Add missing Iopaque case to Proc.op_is_pure for RISC-V (#10345)
791f8195fc Merge pull request #10217 from damiendoligez/fix-9853
2c85ab7344 warning cli: tweak single-letter warning deprecation (#10312)
b720b583a1 Keep Sys.opaque_identity in Cmm and Mach (#9412)
e3a3d3d4b7 Merge pull request #10344 from dra27/config-var-doc
bb74b8d35e Merge pull request #10336 from dra27/test-manual-in-gha
3047ad8aa9 Fix realpath test (#10326)
2fee7a8e54 Fix bytecode compilation of Lsend(Cached, _) (#10325)
06735ef77e Merge pull request #8732 from Octachron/remove_fixed_type_error_2
505d4ec926 Merge branch 'trunk' into fix-9853
75902a8713 Merge pull request #10140 from gasche/require-full-labels
b92682336d Merge pull request #10097 from gasche/lazy-map
9c28b74749 manual/src/Makefile: simplify the build of warnings-help.etex
d2e6320a24 manual: enable {caml_example} in cmds/
782f6df808 escape @ in etex files
2e25fec094 Merge pull request #10335 from shindere/remove-makefile.tools
d3f6c33059 Correct documentation of -config-var
7c379d3787 review: Typedecl.set_fixed_row -> set_private_row
7d827537fb Limit the automated build on push to ocaml/ocaml
09444ef6a0 Update Changes
08c7d829e0 Labellize Typedecl.transl_with_constraints
62c4b0a2ba explicit and rename Bad_fixed_type errror
3d93b0b3fa more documentation for map_val, suggested by Stephen Dolan
9ee6e6d829 move opportune_map into the already-forced section, rename into map_val
a93d732587 adapt the manual to discourage labels-omitted applications
b3ad2a4921 fix the testsuite
d3fc1261a7 enable warning 6 [labels-omitted] by default
57a1e33b49 Build system: provide a default value for OCAMLLEX
4784566aeb Remove Makefile.tools, now unused.
6130791b9a Stop using Makefile.tools in the makefiles used to build the manual
09c940f579 Lazy.{map,opportune_map} : ('a -> 'b) -> 'a Lazy.t -> 'b Lazy.t
812f5462a0 lazy.mli: create documentation sections, make some explanations more precise
958e2cd60e Ensure PDF manual is tested
359e1c4929 Merge pull request #10334 from stedolan/fix-32b-gc-debug-build
61722caf8b testsuite/Makefile: stop using Makefile.tools
c63cb262ed testsuite/tools/Makefile: stop using Makefile.tools
a9511cedd8 testsuite/lib/Makefile: stop using Makefile.tools
4c77dca743 Makefile.tools: remove the unused OCAML variable
05f03c9504 Makefile.tools: get rid of the unused OCOPTFLAGS variable
768e9568db Makefile.tools: remove the unused DIFF variable
980e598b31 Makefile.tools: remove the unused OCAMLMKLIB variable
2fd5c5408f Makefile.tools: remove the unused DUMPOBJ and OBJINFO variables
a4d01fd716 Makefile.tools: remove the unused UNIXLIBVAR variable
ec409d3da7 Makefile.tools & co: get rid of the TOPDIR variable
e3f567c788 Only build the entire manual if it changed
1dbeaa9033 Remove the unused CTOPDIR build variable
7d892f5893 Just test the web manual
9218345d0d Merge pull request #10333 from dra27/fix-swedish-build
2fd7ef283e distclean should also clean (manual build system)
9f68013abe Plumb in and fix manual/Makefile distclean
20f5a95be1 Missing items from manual/src/Makefile clean
98734ac2cf Fix html_processing Makefile for parallel make
0705393be8 Fix parallel build
9a4c0fad9c Test building the manual in CI
f52adb3011 Fix an assertion in gc_ctrl.c that's wrong in 32-bit builds
064f231421 Fix manual build
5f90caf6e2 Generate lambda/runtimedef.ml correctly in Swedish
44f3e7ac16 Merge pull request #10322 from COCTI/strong_trail
ef296e49b2 No longer mark Windows Unicode runtime as experimental (#10318)
69a573f15d Changes in simplif.ml - removal of try_depth ref (#9827)
2226776f13 documentation: configuration switch for an odoc documentation mode (#9997)
d4dd566e3e Semantic diffings for functor types and applications (#9331)
8f40388ffd Use s_table rather than s_ref
3699d6f8a7 replace backtracking trail by a normal ref
3ef9ce800f Wrong branch name used for deepening fetch in GHA
4764325f1b Merge pull request #10320 from emillon/doc-callbackn-clarification
2126e82e7e Doc: clarify that `caml_callbackN` takes a C array
cce52acc7c separate constraint-solving (unification) part of type_pat into solve_* (#10311)
d10908cc51 Merge pull request #10317 from UnixJunkie/patch-2
470acf6b90 typos in HACKING.adoc
f0a1be6f05 Merge pull request #9407 from Anukriti12/interface_not_found
fd247ba17b added warning for missing mli interface file
bef455a872 Merge pull request #10047 from dbuenzli/unix-realpath
152ea69612 Merge pull request #1636 from oandrieu/stdlib-exn-documentation
9321e28567 Merge pull request #10232 from lpw25/unused-labels
6462df79a8 Merge pull request #10300 from sanette/triangle
eb91b328ea Fix #10298: Incorrect propagation of type equalities in functor application (#10305)
31dcf5b5bd Merge pull request #10306 from MisterDA/sock-wsa-map-error
fcc9a2bd6e Restore the --enable-spacetime option (for error)
364ffedfed Adjust changes.
ea07e45ea6 On Windows realpath strip the \\?\ prefix.
7ca6ecf155 Allow Windows realpath to work on open files.
798f6f1770 Allow Windows realpath to work on inaccessible files (like POSIX).
03a4519c8e Windows: drop the fileapi.h header. It's not needed.
21971ba839 Fix realpathing directories on Windows as suggested by @dra27.
58955bff28 Add a test.
f8feb51992 Address a first round of comments.
62b946efae Add Unix.realpath.
23660a5cfe No system defines WSAENFILE
bb1aa15488 Correct typo in WSAENAMETOOLONG
332c0a9212 Map WSA error code to Unix errno for sockopt and getsockname functions
aa28afb11e Set errno correctly for Win32 Unix.(f)truncate
59007f708c Return EBADF on error in win_filedescr_of_channel
1a2370e333 Add Changes entry
47a14b4a36 Add warning for unused labels
3a128ca0e1 Remove unused labels
f7ae40d9f8 Add tests for unused labels
76859caa15 Make the add_ note clearer
55e2cf9a82 Use @raise
63f7876e61 Adjust documentation of (^) and add to String.cat
68fa762fb2 document some exceptions raised when array/string get too large
24876b0900 typo in the doccomment for Buffer.sub
0bc918135a document some Buffer functions that can raise Invalid_argument
970797fa38 Ensure DS-form offset is a multiple of 4
406e522d92 Revert "Fix lib-string/binary.ml test on ppc64"
414bdec9ae Fix lib-string/binary.ml test on ppc64
b30a7c66b0 Stabilise the output of bigarrcml test
1a59019bb4 Merge pull request #10285 from dra27/coldstart-harder
416100442c change entry for #10295: mention reviewers
5ab5e50a82 adjust bullet size and pos
3fb3bd7fff fix for a row-arity mismatch in pattern-matching compilation (#10295)
6f0a02034c replace triangles for items by disc or diamonds
4c484b2bc1 Merge pull request #10282 from sanette/bug#10254
6e188084b2 use preg_anyspace for detecting Chapter and Part
0d4d90b159 prepare for hevea UTF sequence 2004-202F (PR#61)
98a1212de7 remove \n
4db33fed3a Merge pull request #10207 from Octachron/deprecated_single_letter_warning
89fe8c6273 typo
27eb86f206 add more white-space regexp
619d06823a Changes
2a27200a48 warning deprecation: full normalization of parsed tokens
7cb592530d compiler interface: deprecate single letter warning
c0eea1b229 Fix caml_tex warning setting
a7f80409d6 stop using single letter in warning settings
357654891e Merge pull request #9448 from dra27/missing-bytes-string
cbe61cceef Merge pull request #10221 from dra27/ba-win
694db9d5b9 Changes fix
672f445a0a make webman compatible with Hevea 2.35
6916136563 document some types in typecore.ml (#10292)
da9791ec91 Merge pull request #10288 from maranget/bowtie-for-event
236485bdbd Manual, html, avoid warning. Slight formatting change.
ea0f9f0388 Manual, html, inactive definition for latex-only command.
171bf31825 Manual, html, replace illegible symbol by \bowtie.
b00a79adb4 Preserve evaluation order in simplify_exits (#10284)
c877ef8d02 Remove $(LIBFILES) from boot/ in coldstart
f92c0a73f1 Suppress sanitizer message for known memory leak
bcffaef30f Reflect the status of the naked pointer checker in the exit code (#10171)
fc9534746b Dynamically allocate the alternate signal stack (#10266)
7a9a8ddcee Merge pull request #10247 from johnwhitington/refman-examples
2046041d5e Merge pull request #10274 from garrigue/split-Ppat_or
cb6e79c3fe manual: unicode character declarations
21e741403c indent normally
c4a03dc86c please @gscherer
8981f8d0d7 style
ddb34f0d72 Split Ppat_or case Typecore.type_pat
9feee5b8b7 Merge pull request #10270 from dra27/fix-undefined
229a94ac54 Merge pull request #10269 from shindere/enhance-manual-readme
ba1abcebea Variation on a theme of Makefile.docfiles
b2a0f4bc86 remove assertion that is not always true
db7680db28 Do not preserve fragments when compacting. Duh.
f47a498dec add assertion
861b581894 fix for #9853
dd5455fa9e manual/tests/Makefile
abd1fb3ed5 Move the undefined make variables to other-checks
85842cd8da Detect unused Makefile variables in workflow
05787308d4 manual/README.md enhancements
cb22f293e9 Define $( ) to clear unused variable warning in make
de3a7962c6 Require Makefile.common before stdlib/StdlibModules
8b8168ee09 Typecheck x|>f and f @@ x as (f x) (#10081)
8c92f979ec manual: document unary extension operator (#10263)
297fbe90aa Fix GC message when shrinking mark stack (#10264)
a477306691 Optimise Int32.unsigned_to_int on 64-bit (#10244)
685f14c695 Merge pull request #10260 from dra27/hygiene-fixes
cb0ae7b93c Use GitHub Actions outputs instead of cookies
b2a0c6d551 Merge pull request #10227 from shindere/factorize-ocamllex-ocamlyacc-build-rules
7868f7850e Merge pull request #10213 from damiendoligez/fix-best-fit
be34be3af2 Build system: deduplicate the rules used to generate the lexers and parsers
4c3c947210 Fix computation of FETCH_HEAD in GitHub Actions
6b41eac8d3 refactor initialization code for the allocation policy
9fce0f6fc7 Makefile{,.tools}: make it possible to override ocamllex
499b1b3cb7 tools/Makefile: make it possible to override ocamllex
2f2113223e ocamldoc/Makefile: Use generic rules to generate lexers and parsers
6f647a881c {debugger,lex}/Makefile: make it possible to override lexer andparser generator
fbb18d5c0a ocamltest/Makefile: make it possible to override the lexer and parser generators
8aeb57fcf0 Build system: rename the OCAMLLEX_FLAGS to OCAMLLEXFLAGS
7f937238ba Use CAML_NAME_SPACE
34606a59e2 Add Bytes.{starts,ends}_with
8574ad463e Add binary integer decoding functions to String
011be235e8 Add Bytes.split_on_char
28dc873db7 Add String.cat as dual of Bytes.cat
d63347d248 Add String.{of,to}_bytes
50392b101d Add String.empty as dual of Bytes.empty
500d8dc829 Merge pull request #10150 from dra27/one-with-log
c51af74ad8 Fix oo examples
40caa561bf Merge pull request #10255 from MisterDA/otherlibs-use-option-macros
2ea972b151 Merge pull request #10257 from MisterDA/cloexec-unimplemented-socketpair
daa944c888 Merge pull request #10256 from MisterDA/hacking-doc-remove-travis-add-gha
3b4ae00a59 Use 4.12 convenience option macros in C stubs
041ef0f70a Replace Travis with GitHub Actions in documentation
330b36670d Update reviewers
fff6a16488 Spacing
d1e2e41e59 Add forgotten cloexec parameter to un-implemented socketpair
aced66c380 Merge pull request #10133 from Octachron/with_module_types
6a25084847 update changes
1b851235ff review: merge_constraints remove recursive knot
97e3964aaf review: lift check_modtype calls
d6c0c15732 review: add a parsetree invariant
cfce291c82 review: begin...end for a then
9bac0f1e5a review: iterator extensions
dbcea3c3ee review: error message
f44262484c review: printing parsetree
cc63969644 review: rename Pwith_module_type* to Pwith_modtype*
1cf108957f Final fixes for first round of reviews
8ea2b113ef machine epsilon, missed this one earlier
649345db65 Address some of @gasche's pattern suggestions
f23e382ecf Merge pull request #1020…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet