Skip to content

Move layout from Type_abstract to type_declaration #1384

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

Merged
merged 7 commits into from
May 19, 2023

Conversation

goldfirere
Copy link
Collaborator

This was extracted from #1340, but it's quite separate and makes more sense as its own PR.

This takes the layout of a type out from the Type_abstract node and puts it right in the type_declaration. I think it's a little cleaner this way, but the real motivation for this is to fix performance problems that arose in #1340.

@goldfirere goldfirere marked this pull request as draft May 15, 2023 18:31
@goldfirere
Copy link
Collaborator Author

Don't review yet. I have some improvements in the works.

@goldfirere goldfirere marked this pull request as ready for review May 16, 2023 13:17
@goldfirere
Copy link
Collaborator Author

The "improvements" might be controversial (though I like them), so I pushed them off to #1386. This is ready for review.

@goldfirere
Copy link
Collaborator Author

@ccasin observed that the layout in Type_abstract is very like the layout in Record_unboxed and Variant_unboxed, so I removed those, too, in the commits above.

Copy link
Contributor

@ccasin ccasin left a comment

Choose a reason for hiding this comment

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

I agree this is cleaner - I've left some comments and questions throughout.

However, I'm wondering about this program:

type t_void [@@void]

type ('a : any) t = A of 'a

type s = t_void t [@@immediate]

Obviously, we don't allow the any parameter today, but we plan to. s should check, because 'a t is immediate just if 'a is void.

I don't actually think either the old code or the new code gets this quite right (even if we imagine they allowed the ('a : any)). The new approach is wrong because we just trust the stored layout on the decl of t. The old approach was wrong because layout_bound_of_kind trusted the stored layout in the variant_representation - it didn't consider parameter instantiations.

One can imagine a few approaches to this. We could soup up layout_bound_of_kind to really recompute the thing but with parameters instantiated (probably sharing code with typedecl). We could record dependencies on parameter layouts, either in the variant and record representations or in the overall decl (or both).

Maybe it would be more productive to talk through this example, but for the moment I'm less convinced about dropping layout_bound_of_kind (whether or not we move the layout for abstract types from the kind to the decl).

@goldfirere
Copy link
Collaborator Author

@ccasin:

However, I'm wondering about this program:

...

Maybe it would be more productive to talk through this example, but for the moment I'm less convinced about dropping layout_bound_of_kind (whether or not we move the layout for abstract types from the kind to the decl).

Yes, I've been worried about such programs, too. My very-sketchy plan was to actually make type_layout : layout list -> layout in the glorious future, where the input list comprises the layouts of the type arguments. That's not quite right, because most decl layouts are constant, so we'd ideally want layout Lazy.t list -> layout but more realistically probably some other more inspectable structure that says which argument layouts it really needs. Maybe the lazy one would work? Not sure how expensive making thunks is. I think this general plan would work, and would pay other dividends, too, in that (I think) we'd never have to expand in order to get a more precise layout (but I've gotten that interaction wrong before).

As you say, I think the problem you highlight here is orthogonal to this patch (but definitely a problem).

I don't think we can keep layout_bound_of_kind and also move the layout out from Type_abstract. Essentially, the action of layout_bound_of_kind would be closed over in my layout Lazy.t list -> layout.

@ccasin
Copy link
Contributor

ccasin commented May 18, 2023

I'm not sure the example is entirely orthogonal.

Here's a different example (which we've already been talking about) that maybe illustrates why I think the problems are related. Consider projecting x from a record like:

type ('a : any) t = { x : 'a; y : int }

To compile the projection, at some point we'll need to get the sort of whatever type 'a has been instantiated with. How to implement this?

My guess at the moment is that the right thing is to enhance record_representation to record the dependencies of each field on the parameters (similarly to what we are discussing for type_decl). But since we definitely have to do something like this for the individual fields, it feels cleanest to solve the problem of the immediacy check in the original example with the same mechanism. That is, we should keep layout_bound_of_kind and have it use this recorded dependency information if needed, rather than duplicating this in both the record_representation and the type decl, which feels finicky and error-prone (can they get out of sync? which one do we check when?).

I think keeping layout_bound_of_kind is compatible with moving the type_abstract layout from the kind to the decl if you also make the decl's layout bound an argument to layout_bound_of_kind. Though maybe the move feels less well motivated then.

@goldfirere
Copy link
Collaborator Author

Consider projecting x from a record like:

type ('a : any) t = { x : 'a; y : int }

To compile the projection, at some point we'll need to get the sort of whatever type 'a has been instantiated with. How to implement this?

So you're worried about e.g. let f (t : string t) = t.x, t.y, right? I've put in a type annotation here because of course we can't proceed without fixing the layout of x. This looks fine to me: we'll have to determine the type of t.x in order to compile the expression t.x. Then the sort of the type of t.x is apparent from the type. Am I missing something?

Maybe more interesting is projecting t.y. The type-checker will just say that t.y is an int and carry on. But the code generator will need to know x's layout in order to get to y. So (in my formulation) we'd probably need some kind of layout Lazy.t list -> layout array that gives the layouts of the components of a record from the layouts of the type arguments to that record. (This might not want to be lazy, because it seems quite likely that all the input layouts will be needed.) Maybe you're saying that we should then compute the overall layout of the record from the output of this other function? Plausibly, but I think it would be less efficient to do so. Almost all records will be values, irrespective of the layouts of arguments. So computing the record layout by first computing the layouts of the components seems like more work than necessary. I suppose we could store that the overall record layout is always value separately.

Bottom line for me: I see your point about keeping things in sync. I think it's valid. But I still don't see how this concern should stop us from merging this patch, mostly because the concerns you're bringing up are just as valid before this patch as afterwards. (Well, not quite: if we always compute a type's layout by computing the layouts of all of its fields -- as is currently the case -- then I see how keeping things in sync is guaranteed. But in the glorious future with any fields, doing so will be even more expensive than it is today.) And figuring out the answers now is unnecessary (though we will have to figure these out soonish).

The thing I care most about in this patch is including the layout in the type_declaration. That means we can just grab it, instead of recomputing it every time. Doing this simplifies the algorithm in type_decl (to my eyes) and is more efficient. We can also keep layout information elsewhere, too. I don't think we should, but I don't care about that too much.

@goldfirere
Copy link
Collaborator Author

OK. I've pushed some updates, including a big new comment in Typedecl. That comment ends describing an infelicity of the current design -- but I claim that the infelicity predates this patch.

@ccasin
Copy link
Contributor

ccasin commented May 18, 2023

This thread now has a lot of text - let me know if it would be easier to have a discussion, but I've tried to explain myself below. The short version is that I'm fine with putting the layout in the type decl, it's certainly an optimization (but I think a small one even in the scary future of the examples). But eliminating layout_bound_of_kind seems like a mistake because we're going to want it in that scary future.

So you're worried about e.g. let f (t : string t) = t.x, t.y, right? I've put in a type annotation here because of course we can't proceed without fixing the layout of x. This looks fine to me: we'll have to determine the type of t.x in order to compile the expression t.x. Then the sort of the type of t.x is apparent from the type. Am I missing something?

Right, I'm concerned about examples like that. Or, not concerned, but I think the right solution provides motivation to keep layout_bound_of_kind.

I do not think we want to check this by first computing the type and then computing the layout of the type. That sounds expensive (e.g., if the type is an alias, we will have to do expansion). We want a fast path where we just look up the layout for a projection in the record representation, and a fallback path where we do something more expensive (but hopefully still less expensive than a full type -> layout calculation).

That fallback path could compute the layout from the (fully instantiated) type. But we're already discussing that rather than doing that in the case of type_layout, we want some smarter thing that records dependencies on layouts of type parameters. I'm proposing that smarter thing goes in the record and variant representations, and then we have a uniform solution for dealing with both examples (the projection example and the [@@immediate] example) - both compute the information they need from the kind, which knows about dependencies on the layouts of type parameters.

Maybe more interesting is projecting t.y. The type-checker will just say that t.y is an int and carry on. But the code generator will need to know x's layout in order to get to y. So (in my formulation) we'd probably need some kind of layout Lazy.t list -> layout array that gives the layouts of the components of a record from the layouts of the type arguments to that record.

I agree we want something like that. One option is for the record representation, in addition to storing a layout for each field (optionally parameterized by the layouts of each parameter), to also store an offset for each field (optionally parameterized by the layouts of each parameter, as well). I agree some use of laziness here may work well.

Maybe you're saying that we should then compute the overall layout of the record from the output of this other function? Plausibly, but I think it would be less efficient to do so. Almost all records will be values, irrespective of the layouts of arguments. So computing the record layout by first computing the layouts of the components seems like more work than necessary. I suppose we could store that the overall record layout is always value separately.

I think what I'm proposing is mainly a way of doing this computation, when it's necessary, cheaply and using the same system we use to deal with the projection example. I think it would be fine to still stick a layout in the decl, and not stick one on Type_abstract. Today that layout will be completely accurate if we have a record or variant kind, but the observation of the [@@immediate] example is that soon that won't be true and we'll need some strategy for falling back to a more complicated check when necessary.

I agree that when we have to do the fallback in the case of my first example, having the parameter-dependent computation in the decl would be marginally cheaper than having the parameter dependent computation in the record-representation. But one key observation of Stephen's original approach to immediacy is that crawling the kind isn't what's expensive, expansions are what's expensive.

So: the second example shows we're going to need complex record_representations and variant_representations that record dependencies on the layouts of type parameters. Further, the performance difference between the two cases is (a) small and (b) only hit in the uncommon case of non-abstract types with parameter-dependent layouts (if we also store a layout bound in the decl). So let's just have that dependency system in one place (the record/variant representations).

Bottom line for me: I see your point about keeping things in sync. I think it's valid. But I still don't see how this concern should stop us from merging this patch, mostly because the concerns you're bringing up are just as valid before this patch as afterwards. (Well, not quite: if we always compute a type's layout by computing the layouts of all of its fields -- as is currently the case -- then I see how keeping things in sync is guaranteed. But in the glorious future with any fields, doing so will be even more expensive than it is today.) And figuring out the answers now is unnecessary (though we will have to figure these out soonish).

The thing I care most about in this patch is including the layout in the type_declaration. That means we can just grab it, instead of recomputing it every time. Doing this simplifies the algorithm in type_decl (to my eyes) and is more efficient. We can also keep layout information elsewhere, too. I don't think we should, but I don't care about that too much.

I'm concretely proposing that the part of this patch that eliminates layout_bound_of_kind is a mistake. We're going to need complex machinery in record and variant representations to deal with the projection case, and we should plan to reuse it for (the hard cases of) computing declaration layouts.

I think it's fine to move the layout into the decl, but I think ultimately the performance impact here is small. layout_bound_of_kind is very cheap today (or at least was before the histories stuff, and is easily made cheap again as discussed). It can continue to be very cheap even in the scary future, using laziness as you've suggested (or some similar mechanism) - the common case will be that we don't have to consider parameter layouts at all.

That said, caching a layout bound in the type_decl is fine, and is certainly an optimization. I'd suggest we change this PR so that, when doing a layout check, we first check the cached layout and then fall back on layout_bound_of_kind if it fails. At the moment, that fall back case will always fail if it is reached. But this fallback behavior will be needed in the future. Alternatively, leave a comment at the places where you've removed the calls to layout_bound_of_kind mentioning that it will likely come back.

@ccasin
Copy link
Contributor

ccasin commented May 18, 2023

On reflection, I don't feel super strongly about keeping layout_bound_of_kind, if we're going to put a layout in type declarations. I think what I said above is true, but keeping the dead code because we're going to want it in the future is not the right solution. We can evaluate whether we want to add back something like it when we deal with those complicated cases. Maybe the comments explaining that the type_layout in decls is exact in the case of record and variant kinds should be updated to indicate this may not always be true.

Having thought about these future cases where we're going to need to deal with substitutions, I appreciate Stephen's original design more. Having the layouts in the places where they matter and only there is parsimonious, and has minimal performance impact. In a vacuum, I'd keep the way it's done now, but I don't feel strongly about it and you clearly do, so I think this PR is fine (I'll approve after I look through your responses to my comments).

This PR will make some of the info in record and variant representations dead code, as your subsequent PR shows. But it's clear after having thought through these examples that we can't get rid of that info permanently. And in fact I'm pretty sure we're going to want them sooner than that - even just for unboxed floats (at least, when we allow unboxed floats in structures). So we should put that subsequent PR on hold - we can reevaluate after shipping the unboxed float stuff, in case I'm wrong about wanting this info there.

@goldfirere
Copy link
Collaborator Author

We seem to be converging here. As I said above, I'm not specifically against keeping layout_bound_of_kind, though -- as you say -- it would be dead code for a little while. And so I advocate removing it -- it's not very complicated. My suspicion is that when we get to the point of restoring the functionality in some way, things will look quite different than they do today, and we'll just solve the problem before us. One step at a time!

Part of that suspicion is informed by my suspicion that we can get rid of the need for expansion in layout calculations altogether, with the layout Lazy.t list -> layout approach. But I haven't worked that out and don't need to today. All in good time.

Copy link
Contributor

@ccasin ccasin left a comment

Choose a reason for hiding this comment

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

OK. I think we're agreed. I have some suggestions about your nice new comment, but this can be merged once you're happy with that comment.

Copy link
Contributor

@gretay-js gretay-js left a comment

Choose a reason for hiding this comment

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

for files owned by me.

Copy link
Collaborator

@mshinwell mshinwell left a comment

Choose a reason for hiding this comment

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

Only files I review

@ccasin ccasin merged commit 4464897 into main May 19, 2023
@goldfirere goldfirere deleted the rae/layout-in-type-decl branch June 28, 2023 17:59
mshinwell added a commit that referenced this pull request Oct 18, 2023
df70400 flambda-backend: Fix interface differences in Printtyp (#1918)
e7b5ebf flambda-backend: Fix breaking of tail recursion in classic mode (#1915)
cbb72d8 flambda-backend: Improve debuginfo for for-loops (and conditionals) (#1870)
19133b6 flambda-backend: Replace thread save/restore API with switch (#1869)
882b067 flambda-backend: Add test showing how `max_arity` affects function splitting (#1904)
f1f7da4 flambda-backend: Abbreviate module types when printing error messages (#1895)
e4566dd flambda-backend: Add four missing attributes to the `builtin_attrs` table. (#1898)
4bb4c70 flambda-backend: Undo sort changes during snapshot backtrack (#1885)
87c857a flambda-backend: Add a missing check for jane syntax (#1891)
070d57f flambda-backend: Remove mode from Texp_send (#1893)
7d9ef46 flambda-backend: Remove Jkind.of_sort (#1890)
5ad9591 flambda-backend: ocamlformat in Jane-Street only files in typing (#1881)
5e50edf flambda-backend: Remove var_constraint (#1880)
b1962fa flambda-backend: Rename "layout" to "jkind" (#1875)
f74b090 flambda-backend: Rename layouts.ml to jkind.ml (#1886)
cf32778 flambda-backend: Enable ocamlformat for Jane Syntax / language extensions code (#1876)
20b32a0 flambda-backend: Better error when using a float64 library without extension (#1859)
64e883d flambda-backend: Add hint for `#float` (#1864)
ab42aac flambda-backend: Port upstream #12368 about abstract environments (#1759)
bbc5173 flambda-backend: Support for unboxed products in the middle-end and backend (#1433)
6149a5f flambda-backend: Simplify integer comparisons that use "compare" (#1851)
a05adce flambda-backend: Ask user to add `exclave_` instead of `local_` (#1853)
cdd7f6a flambda-backend: Bump magic numbers for 4.14.1-19
96ec26a flambda-backend: Manually applied changes from PR #11782 (#1732)
ea484d0 flambda-backend: Zero alloc annotation: assume a function never returns normally (#1831)
387893c flambda-backend: All-`float#` records (#1769)
c3f9983 flambda-backend: Expose `Pprintast.tyvar` (#1848)
3782152 flambda-backend: Don't allocate a closure unnecessarily (#1836)
a8f6aae flambda-backend: Fix bug in `Clambda_primitives.result_layout`. (#1833)
4b2a6f6 flambda-backend: Add dune target for `dumpobj` (#1773)
2089ec0 flambda-backend: tmc: Remove close-on-apply flag when producing a call in non-tail position (#1827)
9f304d8 flambda-backend: Adjust the location on `as` pattern vars for better errors/warnings (#1835)
b9cf106 flambda-backend: Zero alloc: assume that works with inlining - propagate via Scoped_location (#1762)
263fa26 flambda-backend: Make -extension immutable_arrays on by default (#1829)
9cca7d2 flambda-backend: Support mode crossing at identifiers (#1811)
7942fed flambda-backend: Finish moving `any` to `layouts_beta` (#1821)
44cd2fc flambda-backend: Fix uncaught Unify exception in filter_arrow (#1820)
3552db6 flambda-backend: Factor out duplicated code in `cmm_helpers` (#1822)
caf938f flambda-backend: Fix AFL test in flambda2 (#1824)
ddd765a flambda-backend: Move `float64` to `layouts_beta` (#1812)
3b579d7 flambda-backend: Fixed ISO C99 warning introduced in #1705 (#1787)
df927f0 flambda-backend: Add a test for an interaction between omitted mli and overeager heap allocation of argument (#1816)
92ddf14 flambda-backend: Fix incorrect sort assumption in lambda for `bop_exp`s in letops (#1793)
1a91f16 flambda-backend: Merging of Debuginfo.t across CSEd occurrences (#1767)
f7cd48f flambda-backend: Backport #10364 (#1788)
5740ebd flambda-backend: Enable warnings-as-errors (#1796)
374a2fb flambda-backend: Build Jane Syntax with upstream OCaml in CI (#1780)
1d6471f flambda-backend: A more consistent first-to-last order for `-w53` (unused attributes) (#1658)
6210ee4 flambda-backend: Make sure the Jane syntax extensions don't depend on our compiler changes (#1777)
963bfbc flambda-backend: Add [Obj.uniquely_reachable_words] (#1705)
4cd24bd flambda-backend: mode crossing of LHS of arrow types by coercing (#1701)
910914d flambda-backend: `Pprintast` prints Jane syntax unconditionally (#1770)
46dad5b flambda-backend: Regulate access to [Language_extension] from within Jane Syntax (#1768)
a0f8d0c flambda-backend: Lazy strengthening (#1337)
85b5c54 flambda-backend: Small improvement to layout inference for mutually recursive type decl parameters (#1766)
0c57382 flambda-backend: Syntactic function arity parsing (#1548)
e8edd13 flambda-backend: Fix modes annotation ghost location (#1761)
a669c00 flambda-backend: Refactor Debuginfo.t (#1724)
91ab70a flambda-backend: Basic uniqueness extension (#1552)
5be3cb8 flambda-backend: add the `%get_header` primitive (#1539)
0006b3e flambda-backend: Fix arrow printing when closing over unknown mode (#1744)
226d6ac flambda-backend: Add some checks that the minor GC does not recurse (#1743)
f3e7c0a flambda-backend: Bump magic numbers for 4.14.1-18
30cbf0a flambda-backend: Add `Jane_syntax` `Pprintast` tests (#1727)
1269571 flambda-backend: Expose a couple more functions from `Pprintast` (#1731)
159adbe flambda-backend: Propagate the label names of optional parameters (#1723)
4f70f0b flambda-backend: Further refine our debugging infrastructure (#1650)
a440f6d flambda-backend: Add mode to `int_as_pointer` (#1648)
0cc5356 flambda-backend: Update `jane-street-merlin-setup.sh` for this repo (#1663)
71879dc flambda-backend: Add code path to read .cmi without adding to environment  (#1674)
5394352 flambda-backend: Only substitute once in `Env.read_sign_of_cmi` (#1670)
2a7f015 flambda-backend: Pass `-f` when `rm`ing file during install (#1700)
ddaf752 flambda-backend: Set location on topmost Jane Syntax attribute (#1696)
5205836 flambda-backend: Support layout annotations (#1417)
455887f flambda-backend: Simplifications following PR #1667 (#1668)
6c0a9e8 flambda-backend: Don't add a module to the environment when saving it (#1667)
562eb7b flambda-backend: Flambda 2 changes for DWARF variables (#1678)
f1352ed flambda-backend: Add modes on parameters and a framework for attributes on them (#1257)
3d23db5 flambda-backend: 128-bit vector primitive types (#1568)
06a3bdc flambda-backend: Bump magic numbers for 4.14.1-16 (#1657)
37c5ea0 flambda-backend: Remove/comment new uses of `not_expecting` in the parser (#1517)
8bbe82d flambda-backend: Float_u stdlib module (#1572)
f4075a4 flambda-backend: Add a `float64` layout and `float#` type. (#1528)
43f02af flambda-backend: Test fix in #1457 (#1458)
c896a97 flambda-backend: Swap simd flag to language extension (#1569)
e6c44d4 flambda-backend: mkuplus and mkuminus must preserve attributes (#1575)
906cfc5 flambda-backend: Make environment lazy in preparation for simd extension (#1570)
a222bfc flambda-backend: pattern match local iarray gives local elements(#1574)
d3c1413 flambda-backend: 128-bit SIMD vector primitive type (#1499)
bcc0a09 flambda-backend: exclave_ implies strictly local (#1554)
e3deedb flambda-backend: Factor out kernel of `Language_extension` used by Jane Syntax (#1509)
eea5150 flambda-backend: Fix incorrect sort in transl (#1547)
d2b44d8 flambda-backend: A + sign usually means Positive (#1536)
d1644f9 flambda-backend: Restore #1455: Communicate layouts to middle end (#1511)
5e6524d flambda-backend: Tail-calling local-returning functions should make the current function local-returning as well (#1498)
fa71f6b flambda-backend: Increase local stack limit (#1513)
c1eecf6 flambda-backend: Generalize `deep_occur` to `deep_occur_list` (#1503)
1a17a8b flambda-backend: Bump magic numbers for 4.14.1-15
a3d1953 flambda-backend: Fix Translcore to look for allocations in exclaves (#1495)
0ea8b04 flambda-backend: Revert "Communicate frontend layouts to lambda" (#1507)
383e158 flambda-backend: Disable `sockets.ml` on macOS (#1505)
3b73a8d flambda-backend: Communicate frontend layouts to lambda (#1455)
f94a067 flambda-backend: Allow `make debug` with dune-based build (#1480)
1880d42 flambda-backend: Disable `beat.ml` on macOS (#1496)
4b2e620 flambda-backend: Check that layout variables aren't unconstrained when writing `cmi`s (#1474)
284889c flambda-backend: Add flambda2 -O3 and -Oclassic CI jobs, third attempt (#1493)
ef161b9 flambda-backend: Prepare translation of primitives in lambda_to_flambda for unboxed products (#1465)
bc1d15a flambda-backend: Remove ast_desc and ast_info from jane-syntax (#1488)
be57ed6 flambda-backend: Local immutable arrays (#1420)
3a5d06a flambda-backend: Unboxed literal jane syntax (#1487)
cc61a3a flambda-backend: Ensure that all [val]s are [value]s. (#1481)
aba14c2 flambda-backend: Check for value in polymorphic variant argument (#1482)
0a20dfb flambda-backend: Jane-syntax support for extension constructors (#1479)
697519a flambda-backend: Remove `nonlocal_` modality (#1452)
0bf6a17 flambda-backend: Use exported modules in Jane_syntax_parsing (#1477)
aa6d00f flambda-backend: Flambda1: Simplify `Region (Exclave e)` to `e` (#1473)
e472be0 flambda-backend: Remove the `type float# = float` hack (#1478)
ebe702d flambda-backend: Fix a typo in language extension parsing/serializing (#1456)
40f0e8c flambda-backend: Lex unboxed float and int literals as single lexemes (#1469)
22f170a flambda-backend: Unboxed float type parsing in `layouts_alpha` (#1467)
740de2a flambda-backend: Revert "Add flambda2 -Oclassic and -O3 CI jobs" (#1462)
6ec73ed flambda-backend: Zero alloc remove annotation from stdlib (#1434)
f416497 flambda-backend: Don't pass (unnecessary?) -L flags to `gcc -shared` from opttoplevel (#1363)
416a714 flambda-backend: sync dynlink/dune compiler flags (#1461)
d3e555f flambda-backend: Add flambda2 -Oclassic and -O3 CI jobs (#1459)
e5eca61 flambda-backend: Add documentation for testing targets to HACKING docs (#1436)
f1835c4 flambda-backend: New extensions API, supporting maturity levels (#1454)
1deb5af flambda-backend: Add Make/Dune target for debug printers (#1289)
324f32e flambda-backend: Bugfix for application mode crossing (#1451)
7ac42ab flambda-backend: Don't substitute into exclaves in `simplif.ml` (#1448)
a03de20 flambda-backend: Parse unboxed literals, treating them as boxed (#1437)
5283047 flambda-backend: support native `exclave_` syntax (#1338)
a1fe4cf flambda-backend: Default layout variables in gadt constructors (#1424)
f4c96ff flambda-backend: Fix programmatically enabling and disabling the same layouts extension (#1446)
cc58003 flambda-backend: Erasability namespace for Jane Syntax attributes/extensions (#1421)
ae9099a flambda-backend: Use layout histories to produce better errors (#1340)
385ada9 flambda-backend: Fix swapgil test C warnings (#1430)
ff9a0d1 flambda-backend: Bugfix for caml_switch_runtime_locking_scheme (#1429)
df41dae flambda-backend: Remove layout variables from [val]s (#1423)
2e1a05a flambda-backend: Bugfix for GC backlog tracking (#1387)
8bc3fd7 flambda-backend: Allow more function argument / returns to be non-value (#1422)
f2a5b93 flambda-backend: Convert Jane Syntax to use attributes for many syntactic categories (#1412)
1e2d5c5 flambda-backend: zero alloc: warning 198 about assume (#1409)
9270fee flambda-backend: Allow non-value function args and returns (#1405)
5319dfe flambda-backend: Bump magic numbers for 4.14.1-13
31fb926 flambda-backend: Fix issue with layout any and Tstr_eval in the native toplevel (#1402)
dff4346 flambda-backend: Extend caml_locking_scheme with callbacks for thread start/stop (#1411)
674a335 flambda-backend: Introduce an API to swap the runtime lock for a different lock. (#1365)
1ce68db flambda-backend: Modular syntax for types (#1401)
9f55ade flambda-backend: Missing changes around the renaming to "Jane syntax" (#1400)
cf8eaa8 flambda-backend: Move `include functor` over to the modular extensions machinery (#1377)
da4e02d flambda-backend: Statically enabled probes (#1388)
093e638 flambda-backend: Bump magic numbers for 4.14.1-12
e7e0bf1 flambda-backend: Move layout from Type_abstract to type_declaration (#1384)
9c53ca7 flambda-backend: Rename `tests/jst-modular-extensions` to `tests/jane-modular-syntax` (#1397)
6881566 flambda-backend: Rename "modular extensions" to "Jane syntax"/"modular syntax" (#1395)
bfec906 flambda-backend: Add autocompletion for test-one/promote-one (#1393)
9fc4aac flambda-backend: Fix a bug that -no-rebuild introduced in test-one (#1394)
301b683 flambda-backend: Add -no-rebuild options for test-one and promote-one (#1391)
1e090ac flambda-backend: zero alloc check: ignore functors and entry functions (#1370)
9d3b5a1 flambda-backend: Provide an AST-like view of modular extension extension node names (#1362)
7a92219 flambda-backend: Ltail for lambda and use in dissect_letrec (#1313)
7a7e639 flambda-backend: Add emacs hacking commands (#1372)
8dd6eae flambda-backend: Remove closure from Array.for_all (#1354)
a4c4d03 flambda-backend: Fix ghost locations for modular extensions (#1348)
ca5a008 flambda-backend: Bump magic numbers for 4.14.1-10 (#1360)
a24d2ec flambda-backend: Inline a variable to save 2%+ in allocations (#1353)
96f8f00 flambda-backend: Probe name too long: warning instead of error (#1352)
cd34685 flambda-backend: Typedtree module unpacks: Incorporate upstream feedback (#1288)
c0482d3 flambda-backend: Add dedicated printline-debugging support (#1308)
7b295b0 flambda-backend: Fix try region closure for "match with exception" under Flambda 2 (#1339)
db6552a flambda-backend: Revert ocaml/toplevel/ changes that are duplicative
132f8ba flambda-backend: Revert ocaml/driver/ changes that are duplicative
3d7f37f flambda-backend: Merge ocaml-jst
4646c2e flambda-backend: Merge ocaml-jst
e62f2b1 flambda-backend: Bump magic numbers for 4.14.1-8
f617a06 flambda-backend: Revert ocaml/toplevel/ changes that are duplicative
79f91e9 flambda-backend: Revert ocaml/driver/ changes that are duplicative

git-subtree-dir: ocaml
git-subtree-split: df70400
mshinwell added a commit that referenced this pull request Oct 31, 2023
7da89ee flambda-backend: Error message: add hint for unboxed types (#1960)
559870d flambda-backend: More precise layout for array patterns (#1968)
097204a flambda-backend: Fix boolean functions tail call position bug (#1957)
8bd0b80 flambda-backend: Fix result layout of combined applications (#1963)
91d3de7 flambda-backend: Change error message for non-value class lets (#1953)
27e58ec flambda-backend: Handle empty cases (fixes bug from #1899) (#1955)
aafeeda flambda-backend: Zero alloc: add payload "opt" and "-zero-alloc-check {default|all|none|opt}" flag (#1936)
e65faae flambda-backend: Make `assert false` behave as local_ or not, depending on what's better (+ 2 bugfixes) (#1899)
0706cec flambda-backend: Install simd.h with other runtime headers (#1935)
82364c9 flambda-backend: Allow parameter modes to be relaxed in type_argument (#1756)
cb9fa49 flambda-backend: Add missing iarrayLabels module from stdlib dune file (#1930)
40ddf54 flambda-backend: Runtime helpers for 128-bit vectors (#1897)
a336b70 flambda-backend: Update magic numbers for 4.14.1-22 (and add tools/bump_magic_numbers.sh)
a1239f0 flambda-backend: 128-bit Array Load/Store (#1682)
c3297fc flambda-backend: Fix uncaught exception for non-representable type statements (#1928)
65af444 flambda-backend: Add `Is_stack` for C-stub  (#1914)
df70400 flambda-backend: Fix interface differences in Printtyp (#1918)
e7b5ebf flambda-backend: Fix breaking of tail recursion in classic mode (#1915)
cbb72d8 flambda-backend: Improve debuginfo for for-loops (and conditionals) (#1870)
19133b6 flambda-backend: Replace thread save/restore API with switch (#1869)
882b067 flambda-backend: Add test showing how `max_arity` affects function splitting (#1904)
f1f7da4 flambda-backend: Abbreviate module types when printing error messages (#1895)
e4566dd flambda-backend: Add four missing attributes to the `builtin_attrs` table. (#1898)
4bb4c70 flambda-backend: Undo sort changes during snapshot backtrack (#1885)
87c857a flambda-backend: Add a missing check for jane syntax (#1891)
070d57f flambda-backend: Remove mode from Texp_send (#1893)
7d9ef46 flambda-backend: Remove Jkind.of_sort (#1890)
5ad9591 flambda-backend: ocamlformat in Jane-Street only files in typing (#1881)
5e50edf flambda-backend: Remove var_constraint (#1880)
b1962fa flambda-backend: Rename "layout" to "jkind" (#1875)
f74b090 flambda-backend: Rename layouts.ml to jkind.ml (#1886)
cf32778 flambda-backend: Enable ocamlformat for Jane Syntax / language extensions code (#1876)
20b32a0 flambda-backend: Better error when using a float64 library without extension (#1859)
64e883d flambda-backend: Add hint for `#float` (#1864)
ab42aac flambda-backend: Port upstream #12368 about abstract environments (#1759)
bbc5173 flambda-backend: Support for unboxed products in the middle-end and backend (#1433)
6149a5f flambda-backend: Simplify integer comparisons that use "compare" (#1851)
a05adce flambda-backend: Ask user to add `exclave_` instead of `local_` (#1853)
cdd7f6a flambda-backend: Bump magic numbers for 4.14.1-19
96ec26a flambda-backend: Manually applied changes from PR #11782 (#1732)
ea484d0 flambda-backend: Zero alloc annotation: assume a function never returns normally (#1831)
387893c flambda-backend: All-`float#` records (#1769)
c3f9983 flambda-backend: Expose `Pprintast.tyvar` (#1848)
3782152 flambda-backend: Don't allocate a closure unnecessarily (#1836)
a8f6aae flambda-backend: Fix bug in `Clambda_primitives.result_layout`. (#1833)
4b2a6f6 flambda-backend: Add dune target for `dumpobj` (#1773)
2089ec0 flambda-backend: tmc: Remove close-on-apply flag when producing a call in non-tail position (#1827)
9f304d8 flambda-backend: Adjust the location on `as` pattern vars for better errors/warnings (#1835)
b9cf106 flambda-backend: Zero alloc: assume that works with inlining - propagate via Scoped_location (#1762)
263fa26 flambda-backend: Make -extension immutable_arrays on by default (#1829)
9cca7d2 flambda-backend: Support mode crossing at identifiers (#1811)
7942fed flambda-backend: Finish moving `any` to `layouts_beta` (#1821)
44cd2fc flambda-backend: Fix uncaught Unify exception in filter_arrow (#1820)
3552db6 flambda-backend: Factor out duplicated code in `cmm_helpers` (#1822)
caf938f flambda-backend: Fix AFL test in flambda2 (#1824)
ddd765a flambda-backend: Move `float64` to `layouts_beta` (#1812)
3b579d7 flambda-backend: Fixed ISO C99 warning introduced in #1705 (#1787)
df927f0 flambda-backend: Add a test for an interaction between omitted mli and overeager heap allocation of argument (#1816)
92ddf14 flambda-backend: Fix incorrect sort assumption in lambda for `bop_exp`s in letops (#1793)
1a91f16 flambda-backend: Merging of Debuginfo.t across CSEd occurrences (#1767)
f7cd48f flambda-backend: Backport #10364 (#1788)
5740ebd flambda-backend: Enable warnings-as-errors (#1796)
374a2fb flambda-backend: Build Jane Syntax with upstream OCaml in CI (#1780)
1d6471f flambda-backend: A more consistent first-to-last order for `-w53` (unused attributes) (#1658)
6210ee4 flambda-backend: Make sure the Jane syntax extensions don't depend on our compiler changes (#1777)
963bfbc flambda-backend: Add [Obj.uniquely_reachable_words] (#1705)
4cd24bd flambda-backend: mode crossing of LHS of arrow types by coercing (#1701)
910914d flambda-backend: `Pprintast` prints Jane syntax unconditionally (#1770)
46dad5b flambda-backend: Regulate access to [Language_extension] from within Jane Syntax (#1768)
a0f8d0c flambda-backend: Lazy strengthening (#1337)
85b5c54 flambda-backend: Small improvement to layout inference for mutually recursive type decl parameters (#1766)
0c57382 flambda-backend: Syntactic function arity parsing (#1548)
e8edd13 flambda-backend: Fix modes annotation ghost location (#1761)
a669c00 flambda-backend: Refactor Debuginfo.t (#1724)
91ab70a flambda-backend: Basic uniqueness extension (#1552)
5be3cb8 flambda-backend: add the `%get_header` primitive (#1539)
0006b3e flambda-backend: Fix arrow printing when closing over unknown mode (#1744)
226d6ac flambda-backend: Add some checks that the minor GC does not recurse (#1743)
f3e7c0a flambda-backend: Bump magic numbers for 4.14.1-18
30cbf0a flambda-backend: Add `Jane_syntax` `Pprintast` tests (#1727)
1269571 flambda-backend: Expose a couple more functions from `Pprintast` (#1731)
159adbe flambda-backend: Propagate the label names of optional parameters (#1723)
4f70f0b flambda-backend: Further refine our debugging infrastructure (#1650)
a440f6d flambda-backend: Add mode to `int_as_pointer` (#1648)
0cc5356 flambda-backend: Update `jane-street-merlin-setup.sh` for this repo (#1663)
71879dc flambda-backend: Add code path to read .cmi without adding to environment  (#1674)
5394352 flambda-backend: Only substitute once in `Env.read_sign_of_cmi` (#1670)
2a7f015 flambda-backend: Pass `-f` when `rm`ing file during install (#1700)
ddaf752 flambda-backend: Set location on topmost Jane Syntax attribute (#1696)
5205836 flambda-backend: Support layout annotations (#1417)
455887f flambda-backend: Simplifications following PR #1667 (#1668)
6c0a9e8 flambda-backend: Don't add a module to the environment when saving it (#1667)
562eb7b flambda-backend: Flambda 2 changes for DWARF variables (#1678)
f1352ed flambda-backend: Add modes on parameters and a framework for attributes on them (#1257)
3d23db5 flambda-backend: 128-bit vector primitive types (#1568)
06a3bdc flambda-backend: Bump magic numbers for 4.14.1-16 (#1657)
37c5ea0 flambda-backend: Remove/comment new uses of `not_expecting` in the parser (#1517)
8bbe82d flambda-backend: Float_u stdlib module (#1572)
f4075a4 flambda-backend: Add a `float64` layout and `float#` type. (#1528)
43f02af flambda-backend: Test fix in #1457 (#1458)
c896a97 flambda-backend: Swap simd flag to language extension (#1569)
e6c44d4 flambda-backend: mkuplus and mkuminus must preserve attributes (#1575)
906cfc5 flambda-backend: Make environment lazy in preparation for simd extension (#1570)
a222bfc flambda-backend: pattern match local iarray gives local elements(#1574)
d3c1413 flambda-backend: 128-bit SIMD vector primitive type (#1499)
bcc0a09 flambda-backend: exclave_ implies strictly local (#1554)
e3deedb flambda-backend: Factor out kernel of `Language_extension` used by Jane Syntax (#1509)
eea5150 flambda-backend: Fix incorrect sort in transl (#1547)
d2b44d8 flambda-backend: A + sign usually means Positive (#1536)
d1644f9 flambda-backend: Restore #1455: Communicate layouts to middle end (#1511)
5e6524d flambda-backend: Tail-calling local-returning functions should make the current function local-returning as well (#1498)
fa71f6b flambda-backend: Increase local stack limit (#1513)
c1eecf6 flambda-backend: Generalize `deep_occur` to `deep_occur_list` (#1503)
1a17a8b flambda-backend: Bump magic numbers for 4.14.1-15
a3d1953 flambda-backend: Fix Translcore to look for allocations in exclaves (#1495)
0ea8b04 flambda-backend: Revert "Communicate frontend layouts to lambda" (#1507)
383e158 flambda-backend: Disable `sockets.ml` on macOS (#1505)
3b73a8d flambda-backend: Communicate frontend layouts to lambda (#1455)
f94a067 flambda-backend: Allow `make debug` with dune-based build (#1480)
1880d42 flambda-backend: Disable `beat.ml` on macOS (#1496)
4b2e620 flambda-backend: Check that layout variables aren't unconstrained when writing `cmi`s (#1474)
284889c flambda-backend: Add flambda2 -O3 and -Oclassic CI jobs, third attempt (#1493)
ef161b9 flambda-backend: Prepare translation of primitives in lambda_to_flambda for unboxed products (#1465)
bc1d15a flambda-backend: Remove ast_desc and ast_info from jane-syntax (#1488)
be57ed6 flambda-backend: Local immutable arrays (#1420)
3a5d06a flambda-backend: Unboxed literal jane syntax (#1487)
cc61a3a flambda-backend: Ensure that all [val]s are [value]s. (#1481)
aba14c2 flambda-backend: Check for value in polymorphic variant argument (#1482)
0a20dfb flambda-backend: Jane-syntax support for extension constructors (#1479)
697519a flambda-backend: Remove `nonlocal_` modality (#1452)
0bf6a17 flambda-backend: Use exported modules in Jane_syntax_parsing (#1477)
aa6d00f flambda-backend: Flambda1: Simplify `Region (Exclave e)` to `e` (#1473)
e472be0 flambda-backend: Remove the `type float# = float` hack (#1478)
ebe702d flambda-backend: Fix a typo in language extension parsing/serializing (#1456)
40f0e8c flambda-backend: Lex unboxed float and int literals as single lexemes (#1469)
22f170a flambda-backend: Unboxed float type parsing in `layouts_alpha` (#1467)
740de2a flambda-backend: Revert "Add flambda2 -Oclassic and -O3 CI jobs" (#1462)
6ec73ed flambda-backend: Zero alloc remove annotation from stdlib (#1434)
f416497 flambda-backend: Don't pass (unnecessary?) -L flags to `gcc -shared` from opttoplevel (#1363)
416a714 flambda-backend: sync dynlink/dune compiler flags (#1461)
d3e555f flambda-backend: Add flambda2 -Oclassic and -O3 CI jobs (#1459)
e5eca61 flambda-backend: Add documentation for testing targets to HACKING docs (#1436)
f1835c4 flambda-backend: New extensions API, supporting maturity levels (#1454)
1deb5af flambda-backend: Add Make/Dune target for debug printers (#1289)
324f32e flambda-backend: Bugfix for application mode crossing (#1451)
7ac42ab flambda-backend: Don't substitute into exclaves in `simplif.ml` (#1448)
a03de20 flambda-backend: Parse unboxed literals, treating them as boxed (#1437)
5283047 flambda-backend: support native `exclave_` syntax (#1338)
a1fe4cf flambda-backend: Default layout variables in gadt constructors (#1424)
f4c96ff flambda-backend: Fix programmatically enabling and disabling the same layouts extension (#1446)
cc58003 flambda-backend: Erasability namespace for Jane Syntax attributes/extensions (#1421)
ae9099a flambda-backend: Use layout histories to produce better errors (#1340)
385ada9 flambda-backend: Fix swapgil test C warnings (#1430)
ff9a0d1 flambda-backend: Bugfix for caml_switch_runtime_locking_scheme (#1429)
df41dae flambda-backend: Remove layout variables from [val]s (#1423)
2e1a05a flambda-backend: Bugfix for GC backlog tracking (#1387)
8bc3fd7 flambda-backend: Allow more function argument / returns to be non-value (#1422)
f2a5b93 flambda-backend: Convert Jane Syntax to use attributes for many syntactic categories (#1412)
1e2d5c5 flambda-backend: zero alloc: warning 198 about assume (#1409)
9270fee flambda-backend: Allow non-value function args and returns (#1405)
5319dfe flambda-backend: Bump magic numbers for 4.14.1-13
31fb926 flambda-backend: Fix issue with layout any and Tstr_eval in the native toplevel (#1402)
dff4346 flambda-backend: Extend caml_locking_scheme with callbacks for thread start/stop (#1411)
674a335 flambda-backend: Introduce an API to swap the runtime lock for a different lock. (#1365)
1ce68db flambda-backend: Modular syntax for types (#1401)
9f55ade flambda-backend: Missing changes around the renaming to "Jane syntax" (#1400)
cf8eaa8 flambda-backend: Move `include functor` over to the modular extensions machinery (#1377)
da4e02d flambda-backend: Statically enabled probes (#1388)
093e638 flambda-backend: Bump magic numbers for 4.14.1-12
e7e0bf1 flambda-backend: Move layout from Type_abstract to type_declaration (#1384)
9c53ca7 flambda-backend: Rename `tests/jst-modular-extensions` to `tests/jane-modular-syntax` (#1397)
6881566 flambda-backend: Rename "modular extensions" to "Jane syntax"/"modular syntax" (#1395)
bfec906 flambda-backend: Add autocompletion for test-one/promote-one (#1393)
9fc4aac flambda-backend: Fix a bug that -no-rebuild introduced in test-one (#1394)
301b683 flambda-backend: Add -no-rebuild options for test-one and promote-one (#1391)
1e090ac flambda-backend: zero alloc check: ignore functors and entry functions (#1370)
9d3b5a1 flambda-backend: Provide an AST-like view of modular extension extension node names (#1362)
7a92219 flambda-backend: Ltail for lambda and use in dissect_letrec (#1313)
7a7e639 flambda-backend: Add emacs hacking commands (#1372)
8dd6eae flambda-backend: Remove closure from Array.for_all (#1354)
a4c4d03 flambda-backend: Fix ghost locations for modular extensions (#1348)
ca5a008 flambda-backend: Bump magic numbers for 4.14.1-10 (#1360)
a24d2ec flambda-backend: Inline a variable to save 2%+ in allocations (#1353)
96f8f00 flambda-backend: Probe name too long: warning instead of error (#1352)
cd34685 flambda-backend: Typedtree module unpacks: Incorporate upstream feedback (#1288)
c0482d3 flambda-backend: Add dedicated printline-debugging support (#1308)
7b295b0 flambda-backend: Fix try region closure for "match with exception" under Flambda 2 (#1339)
db6552a flambda-backend: Revert ocaml/toplevel/ changes that are duplicative
132f8ba flambda-backend: Revert ocaml/driver/ changes that are duplicative
3d7f37f flambda-backend: Merge ocaml-jst
4646c2e flambda-backend: Merge ocaml-jst
e62f2b1 flambda-backend: Bump magic numbers for 4.14.1-8
f617a06 flambda-backend: Revert ocaml/toplevel/ changes that are duplicative
79f91e9 flambda-backend: Revert ocaml/driver/ changes that are duplicative

git-subtree-dir: ocaml
git-subtree-split: 7da89ee
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.

4 participants