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

Use layout histories to produce better errors #1340

Merged
merged 2 commits into from May 31, 2023
Merged

Conversation

goldfirere
Copy link
Collaborator

This is still a work in progress, but I want to get performance feedback on this, as perf is the big worry with this direction of exploration.

@goldfirere goldfirere marked this pull request as draft May 1, 2023 20:57
@goldfirere goldfirere force-pushed the rae/layout-histories branch 5 times, most recently from bf5bdf5 to a0acd08 Compare May 13, 2023 20:50
@goldfirere goldfirere added the to upstream PR should be sent to upstream OCaml label May 13, 2023
@goldfirere goldfirere marked this pull request as ready for review May 13, 2023 20:51
@goldfirere
Copy link
Collaborator Author

goldfirere commented May 13, 2023

This is now ready for review. @ccasin is the best whole-PR reviewer, though @antalsz may be interested in some of the restructuring in layouts.ml.

I recommend reviewing individual commits. (Individual commits might plausibly build, but don't count on it.)

Commit: Layout histories commit

The first commit actually adds the layout histories. However, the patch does not change many error messages, because I decided to prioritize other activities over carefully crafting beautiful errors with the new infrastructure. I did get far enough to convince myself that turning the new feature on is a good idea, but it's not quite ready yet. The behavior is toggled with Layout.Format_history.display_histories: turning that on adds detail to error messages. Another toggle is Layout.Format_history.flatten_histories: turning that off prints out the full history tree instead of a truncated version. I think this full tree is not very useful to users, but it's quite helpful while debugging! So you might want to use it in the future. We might, in the end, just build the truncated history (instead of truncating during printing) to save space.

Most of this patch is quite boring, with little ~why:Some_reason_or_other added to many lines. (Some lines remove ~reasons, because reasons are now tracked in different places.) Do not spend any time trying to check the reasons or the text printed for correctness. When we enable layout histories in printing, we'll have to go over all of this carefully -- no use investing that time now, without seeing the error messages.

This commit also introduce a new Layout.Violation constructor to track missing cmi files. It thus can remove the flag used for this purpose and thus change Layout.Violation.violation back to Layout.Violation.t.

layout_bound_of_{record,variant}_representation have more allocations than necessary, but these functions are removed in a later commit.

This commit removes the commoning-up of Tvar None nodes during cmi generation, but this did not to make much of a difference.

During this work, I discovered a bug, which now appears at the end of basics_alpha.ml. I think it will be easy to fix, but I did not do so in this patch.

Commit: Commoning up layouts in cmi files

This commit commons up layouts during writing to a cmi file, and also replaces their history with a boring Imported. Ideally, the Imported would carry information about where the layout was imported from. But my first attempt to do this failed, and we can revisit when we actually start printing histories.

This commit surprisingly made a <1% difference in allocations in a memory consumption test. I did not look at build product size.

Commit: Memoizing V1_safety_check

This made a significant improvement to the number of allocations.

Performance impact

In a simple test (compiling one moderate sized file and measuring allocations) this has a negligible impact. This PR is registered to get nightly performance tests, and so we'll see what news that delivers.

It would be sensible to, say, simply not store histories until we want to print them. That will save even more allocations. However, I think we'll want to turn this on someday, and so keeping the histories around will force us to reckon with any performance impacts. So my thought is to keep the histories as they are in this patch, but I could be argued away from this opinion.

@ccasin
Copy link
Contributor

ccasin commented May 14, 2023

I'll look at this in detail this week, but one quick observation is that the last commit here should really be its own PR. This undoes a key design decision from Stephen's immediacy rework (which moved immediacy from the decl to the kind, see 10041 and 11841), and seems orthogonal to error messages, so it surely merits a separate conversation. (Though it's certainly possible it's an improvement - I was initially surprised to hear it works, but I guess the question about when to trust the stored immediacy information is separate from where to store it).

You mention this commit saves allocations in value_kind, but looking quickly those must come from skipping the call to layout_bound_of_kind, which as you note elsewhere is written suboptimally and can easily be reworked not to allocate. So I think this is just a question about design and correctness, not efficiency.

@goldfirere goldfirere changed the base branch from main to rae/layout-in-type-decl May 15, 2023 16:35
@goldfirere
Copy link
Collaborator Author

I've broken out the Type_abstract commit into its own PR: #1384. This is now based on that PR. The reason that the change to Type_abstract is so important is that, with histories, every query of a layout has to allocate a new layout. The change in Type_abstract effectively caches the layout so that a new one isn't allocated each time. So it's not that layout_bound_of_kind is slow, but rather that it needs to allocate.

@ccasin
Copy link
Contributor

ccasin commented May 15, 2023

The reason that the change to Type_abstract is so important is that, with histories, every query of a layout has to allocate a new layout. The change in Type_abstract effectively caches the layout so that a new one isn't allocated each time. So it's not that layout_bound_of_kind is slow, but rather that it needs to allocate.

I am probably just being slow, but I don't understand this remark.

Here's types.ml in the commit that used to come before the one with the Type_abstract change. It looks to me like the only allocations in layout_bound_of_* are the calls to Layout.value and Layout.immediate. These seem to construct a layout without any mutable state in it, so can't we just do something like:

let ext_variant_bound = Layout.value ~why:Extensible_variant

let layout_bound_of_kind : _ type_kind -> _ = function
  | Type_abstract { layout } -> layout
  | Type_open -> ext_variant_bound
  | Type_record (_,rep) -> layout_bound_of_record_representation rep
  | Type_variant (_, rep) -> layout_bound_of_variant_representation rep

To share the values and avoid allocating? (And similarly for the other functions)

@goldfirere
Copy link
Collaborator Author

Chris is right, above, of course. I'm worried about a future where we'll want the reasons to e.g. mention the name of the type it is the reason for, and so the commoning up Chris shows isn't exactly what I'm looking for. In any case, the particular improvement there is now in #1384 and this PR can be reviewed separately. (Perf is still a worry; that is being tracked using Jane-Street-internal mechanisms, and we'll be able to verify that perf is OK before merging.)

@goldfirere
Copy link
Collaborator Author

Just to give an example, here is an error that we currently report:

type s4 = s5 t4
and 'a [@immediate] t4
and s5 = string;;

[%%expect{|
Line 3, characters 0-15:
3 | and s5 = string;;
    ^^^^^^^^^^^^^^^
Error:
       s5 has layout value, which is not a sublayout of immediate.
|}]

That's hard to untangle. With display_histories = true, we get

type s4 = s5 t4
and 'a [@immediate] t4
and s5 = string;;

[%%expect{|
Line 3, characters 0-15:
3 | and s5 = string;;
    ^^^^^^^^^^^^^^^
Error:
       The layout of s5 is value, because
         it equals the primitive value type string.
       But the layout of s5 must be a sublayout of immediate, because
         of the annotation on 'a in the declaration of the type t4.
|}]

Much better!

@goldfirere goldfirere changed the base branch from rae/layout-in-type-decl to main May 23, 2023 14:07
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.

This looks nice. It's clear it will be a big improvement to error messages and debugging. I added a bunch of questions and comments.

I remain worried about the impact on performance and artifact sizes, for the obvious reasons. Hopefully we will get a good picture of that from the test run.

ocaml/typing/layouts.mli Outdated Show resolved Hide resolved
ocaml/typing/layouts.mli Outdated Show resolved Hide resolved
ocaml/typing/layouts.mli Show resolved Hide resolved
ocaml/typing/layouts.ml Outdated Show resolved Hide resolved
ocaml/typing/layouts.ml Outdated Show resolved Hide resolved
ocaml/typing/typetexp.ml Outdated Show resolved Hide resolved
ocaml/typing/typetexp.ml Outdated Show resolved Hide resolved
ocaml/typing/typetexp.ml Show resolved Hide resolved
ocaml/typing/typetexp.ml Outdated Show resolved Hide resolved
ocaml/typing/typetexp.ml Outdated Show resolved Hide resolved
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.

This looks nice. It's clear it will be a big improvement to error messages and debugging. I added a bunch of questions and comments.

I remain worried about the impact on performance and artifact sizes, for the obvious reasons. Hopefully we will get a good picture of that from the test run.

@goldfirere goldfirere requested a review from riaqn as a code owner May 23, 2023 20:37
@goldfirere
Copy link
Collaborator Author

OK. I've addressed all the comments. Thanks for the review, @ccasin!

@ccasin
Copy link
Contributor

ccasin commented May 24, 2023

Thanks! I think all that remains is to look at the perf. It looks like it hasn't run again since your push to that branch, but should soon.

@goldfirere
Copy link
Collaborator Author

I've now updated this PR and #1385 so that we can get updated perf numbers soon.

While disabled for now, these histories will allow
for us to include nice information in error messages.

This commit also includes code to common up layouts
when saving a cmi.
@goldfirere
Copy link
Collaborator Author

OK. If CI is green, I'd like to merge. @ccasin and I agree that the performance is acceptable. @ccasin, are you ready to Approve?

@ccasin
Copy link
Contributor

ccasin commented May 31, 2023

Done.

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 owned by me

@goldfirere goldfirere merged commit e2ba30a into main May 31, 2023
34 checks passed
@goldfirere goldfirere deleted the rae/layout-histories branch June 28, 2023 17:59
mshinwell added a commit that referenced this pull request Oct 18, 2023
df70400e9d flambda-backend: Fix interface differences in Printtyp (#1918)
e7b5ebf414 flambda-backend: Fix breaking of tail recursion in classic mode (#1915)
cbb72d82ca flambda-backend: Improve debuginfo for for-loops (and conditionals) (#1870)
19133b6911 flambda-backend: Replace thread save/restore API with switch (#1869)
882b067b30 flambda-backend: Add test showing how `max_arity` affects function splitting (#1904)
f1f7da4b0c flambda-backend: Abbreviate module types when printing error messages (#1895)
e4566ddafa flambda-backend: Add four missing attributes to the `builtin_attrs` table. (#1898)
4bb4c708ef flambda-backend: Undo sort changes during snapshot backtrack (#1885)
87c857a1d6 flambda-backend: Add a missing check for jane syntax (#1891)
070d57f4b3 flambda-backend: Remove mode from Texp_send (#1893)
7d9ef469c8 flambda-backend: Remove Jkind.of_sort (#1890)
5ad95913d6 flambda-backend: ocamlformat in Jane-Street only files in typing (#1881)
5e50edff5e flambda-backend: Remove var_constraint (#1880)
b1962fad75 flambda-backend: Rename "layout" to "jkind" (#1875)
f74b0903fb flambda-backend: Rename layouts.ml to jkind.ml (#1886)
cf32778484 flambda-backend: Enable ocamlformat for Jane Syntax / language extensions code (#1876)
20b32a005e flambda-backend: Better error when using a float64 library without extension (#1859)
64e883d8a3 flambda-backend: Add hint for `#float` (#1864)
ab42aac285 flambda-backend: Port upstream #12368 about abstract environments (#1759)
bbc5173847 flambda-backend: Support for unboxed products in the middle-end and backend (#1433)
6149a5ff39 flambda-backend: Simplify integer comparisons that use "compare" (#1851)
a05adcebd0 flambda-backend: Ask user to add `exclave_` instead of `local_` (#1853)
cdd7f6a9f8 flambda-backend: Bump magic numbers for 4.14.1-19
96ec26a538 flambda-backend: Manually applied changes from PR #11782 (#1732)
ea484d0a5f flambda-backend: Zero alloc annotation: assume a function never returns normally (#1831)
387893ced0 flambda-backend: All-`float#` records (#1769)
c3f9983a7a flambda-backend: Expose `Pprintast.tyvar` (#1848)
37821527ae flambda-backend: Don't allocate a closure unnecessarily (#1836)
a8f6aae1c0 flambda-backend: Fix bug in `Clambda_primitives.result_layout`. (#1833)
4b2a6f6e92 flambda-backend: Add dune target for `dumpobj` (#1773)
2089ec0e35 flambda-backend: tmc: Remove close-on-apply flag when producing a call in non-tail position (#1827)
9f304d8f97 flambda-backend: Adjust the location on `as` pattern vars for better errors/warnings (#1835)
b9cf1067f7 flambda-backend: Zero alloc: assume that works with inlining - propagate via Scoped_location (#1762)
263fa26436 flambda-backend: Make -extension immutable_arrays on by default (#1829)
9cca7d2b41 flambda-backend: Support mode crossing at identifiers (#1811)
7942fed47d flambda-backend: Finish moving `any` to `layouts_beta` (#1821)
44cd2fc897 flambda-backend: Fix uncaught Unify exception in filter_arrow (#1820)
3552db6c7a flambda-backend: Factor out duplicated code in `cmm_helpers` (#1822)
caf938faaf flambda-backend: Fix AFL test in flambda2 (#1824)
ddd765ad40 flambda-backend: Move `float64` to `layouts_beta` (#1812)
3b579d7bf9 flambda-backend: Fixed ISO C99 warning introduced in #1705 (#1787)
df927f0cae flambda-backend: Add a test for an interaction between omitted mli and overeager heap allocation of argument (#1816)
92ddf14959 flambda-backend: Fix incorrect sort assumption in lambda for `bop_exp`s in letops (#1793)
1a91f16eb5 flambda-backend: Merging of Debuginfo.t across CSEd occurrences (#1767)
f7cd48ff96 flambda-backend: Backport #10364 (#1788)
5740ebdf98 flambda-backend: Enable warnings-as-errors (#1796)
374a2fb2e7 flambda-backend: Build Jane Syntax with upstream OCaml in CI (#1780)
1d6471f420 flambda-backend: A more consistent first-to-last order for `-w53` (unused attributes) (#1658)
6210ee4650 flambda-backend: Make sure the Jane syntax extensions don't depend on our compiler changes (#1777)
963bfbccb5 flambda-backend: Add [Obj.uniquely_reachable_words] (#1705)
4cd24bd28a flambda-backend: mode crossing of LHS of arrow types by coercing (#1701)
910914de35 flambda-backend: `Pprintast` prints Jane syntax unconditionally (#1770)
46dad5bc0c flambda-backend: Regulate access to [Language_extension] from within Jane Syntax (#1768)
a0f8d0c8dd flambda-backend: Lazy strengthening (#1337)
85b5c54fc8 flambda-backend: Small improvement to layout inference for mutually recursive type decl parameters (#1766)
0c573826a7 flambda-backend: Syntactic function arity parsing (#1548)
e8edd13227 flambda-backend: Fix modes annotation ghost location (#1761)
a669c0093d flambda-backend: Refactor Debuginfo.t (#1724)
91ab70a521 flambda-backend: Basic uniqueness extension (#1552)
5be3cb82b5 flambda-backend: add the `%get_header` primitive (#1539)
0006b3ed93 flambda-backend: Fix arrow printing when closing over unknown mode (#1744)
226d6ac245 flambda-backend: Add some checks that the minor GC does not recurse (#1743)
f3e7c0a919 flambda-backend: Bump magic numbers for 4.14.1-18
30cbf0abcd flambda-backend: Add `Jane_syntax` `Pprintast` tests (#1727)
126957129d flambda-backend: Expose a couple more functions from `Pprintast` (#1731)
159adbe672 flambda-backend: Propagate the label names of optional parameters (#1723)
4f70f0b9d3 flambda-backend: Further refine our debugging infrastructure (#1650)
a440f6d3f5 flambda-backend: Add mode to `int_as_pointer` (#1648)
0cc53569c7 flambda-backend: Update `jane-street-merlin-setup.sh` for this repo (#1663)
71879dc228 flambda-backend: Add code path to read .cmi without adding to environment  (#1674)
539435276a flambda-backend: Only substitute once in `Env.read_sign_of_cmi` (#1670)
2a7f0153f5 flambda-backend: Pass `-f` when `rm`ing file during install (#1700)
ddaf752e30 flambda-backend: Set location on topmost Jane Syntax attribute (#1696)
5205836267 flambda-backend: Support layout annotations (#1417)
455887f882 flambda-backend: Simplifications following PR #1667 (#1668)
6c0a9e81a3 flambda-backend: Don't add a module to the environment when saving it (#1667)
562eb7b7c3 flambda-backend: Flambda 2 changes for DWARF variables (#1678)
f1352edcab flambda-backend: Add modes on parameters and a framework for attributes on them (#1257)
3d23db5986 flambda-backend: 128-bit vector primitive types (#1568)
06a3bdc802 flambda-backend: Bump magic numbers for 4.14.1-16 (#1657)
37c5ea0157 flambda-backend: Remove/comment new uses of `not_expecting` in the parser (#1517)
8bbe82d4de flambda-backend: Float_u stdlib module (#1572)
f4075a4426 flambda-backend: Add a `float64` layout and `float#` type. (#1528)
43f02af305 flambda-backend: Test fix in #1457 (#1458)
c896a97341 flambda-backend: Swap simd flag to language extension (#1569)
e6c44d431b flambda-backend: mkuplus and mkuminus must preserve attributes (#1575)
906cfc5804 flambda-backend: Make environment lazy in preparation for simd extension (#1570)
a222bfc454 flambda-backend: pattern match local iarray gives local elements(#1574)
d3c14133b9 flambda-backend: 128-bit SIMD vector primitive type (#1499)
bcc0a0941b flambda-backend: exclave_ implies strictly local (#1554)
e3deedbcf2 flambda-backend: Factor out kernel of `Language_extension` used by Jane Syntax (#1509)
eea51500e4 flambda-backend: Fix incorrect sort in transl (#1547)
d2b44d8c5d flambda-backend: A + sign usually means Positive (#1536)
d1644f92ae flambda-backend: Restore #1455: Communicate layouts to middle end (#1511)
5e6524d126 flambda-backend: Tail-calling local-returning functions should make the current function local-returning as well (#1498)
fa71f6bb5d flambda-backend: Increase local stack limit (#1513)
c1eecf6102 flambda-backend: Generalize `deep_occur` to `deep_occur_list` (#1503)
1a17a8be84 flambda-backend: Bump magic numbers for 4.14.1-15
a3d1953dac flambda-backend: Fix Translcore to look for allocations in exclaves (#1495)
0ea8b04635 flambda-backend: Revert "Communicate frontend layouts to lambda" (#1507)
383e15882b flambda-backend: Disable `sockets.ml` on macOS (#1505)
3b73a8db42 flambda-backend: Communicate frontend layouts to lambda (#1455)
f94a067be0 flambda-backend: Allow `make debug` with dune-based build (#1480)
1880d422ab flambda-backend: Disable `beat.ml` on macOS (#1496)
4b2e620fc0 flambda-backend: Check that layout variables aren't unconstrained when writing `cmi`s (#1474)
284889c144 flambda-backend: Add flambda2 -O3 and -Oclassic CI jobs, third attempt (#1493)
ef161b98fc flambda-backend: Prepare translation of primitives in lambda_to_flambda for unboxed products (#1465)
bc1d15ae6a flambda-backend: Remove ast_desc and ast_info from jane-syntax (#1488)
be57ed6a80 flambda-backend: Local immutable arrays (#1420)
3a5d06a12a flambda-backend: Unboxed literal jane syntax (#1487)
cc61a3a116 flambda-backend: Ensure that all [val]s are [value]s. (#1481)
aba14c2e19 flambda-backend: Check for value in polymorphic variant argument (#1482)
0a20dfb54e flambda-backend: Jane-syntax support for extension constructors (#1479)
697519a9f3 flambda-backend: Remove `nonlocal_` modality (#1452)
0bf6a17a2a flambda-backend: Use exported modules in Jane_syntax_parsing (#1477)
aa6d00f792 flambda-backend: Flambda1: Simplify `Region (Exclave e)` to `e` (#1473)
e472be02a0 flambda-backend: Remove the `type float# = float` hack (#1478)
ebe702d90f flambda-backend: Fix a typo in language extension parsing/serializing (#1456)
40f0e8cce4 flambda-backend: Lex unboxed float and int literals as single lexemes (#1469)
22f170a470 flambda-backend: Unboxed float type parsing in `layouts_alpha` (#1467)
740de2a83d flambda-backend: Revert "Add flambda2 -Oclassic and -O3 CI jobs" (#1462)
6ec73edc41 flambda-backend: Zero alloc remove annotation from stdlib (#1434)
f4164973df flambda-backend: Don't pass (unnecessary?) -L flags to `gcc -shared` from opttoplevel (#1363)
416a714c3c flambda-backend: sync dynlink/dune compiler flags (#1461)
d3e555f531 flambda-backend: Add flambda2 -Oclassic and -O3 CI jobs (#1459)
e5eca6182b flambda-backend: Add documentation for testing targets to HACKING docs (#1436)
f1835c4ca8 flambda-backend: New extensions API, supporting maturity levels (#1454)
1deb5af1a6 flambda-backend: Add Make/Dune target for debug printers (#1289)
324f32e993 flambda-backend: Bugfix for application mode crossing (#1451)
7ac42ab92a flambda-backend: Don't substitute into exclaves in `simplif.ml` (#1448)
a03de205d3 flambda-backend: Parse unboxed literals, treating them as boxed (#1437)
5283047f84 flambda-backend: support native `exclave_` syntax (#1338)
a1fe4cf7f2 flambda-backend: Default layout variables in gadt constructors (#1424)
f4c96fffcd flambda-backend: Fix programmatically enabling and disabling the same layouts extension (#1446)
cc58003613 flambda-backend: Erasability namespace for Jane Syntax attributes/extensions (#1421)
ae9099aceb flambda-backend: Use layout histories to produce better errors (#1340)
385ada9965 flambda-backend: Fix swapgil test C warnings (#1430)
ff9a0d13c6 flambda-backend: Bugfix for caml_switch_runtime_locking_scheme (#1429)
df41daecc5 flambda-backend: Remove layout variables from [val]s (#1423)
2e1a05a054 flambda-backend: Bugfix for GC backlog tracking (#1387)
8bc3fd758a flambda-backend: Allow more function argument / returns to be non-value (#1422)
f2a5b936a0 flambda-backend: Convert Jane Syntax to use attributes for many syntactic categories (#1412)
1e2d5c5cec flambda-backend: zero alloc: warning 198 about assume (#1409)
9270fee01e flambda-backend: Allow non-value function args and returns (#1405)
5319dfe041 flambda-backend: Bump magic numbers for 4.14.1-13
31fb926539 flambda-backend: Fix issue with layout any and Tstr_eval in the native toplevel (#1402)
dff434617c flambda-backend: Extend caml_locking_scheme with callbacks for thread start/stop (#1411)
674a335783 flambda-backend: Introduce an API to swap the runtime lock for a different lock. (#1365)
1ce68db13b flambda-backend: Modular syntax for types (#1401)
9f55adea6e flambda-backend: Missing changes around the renaming to "Jane syntax" (#1400)
cf8eaa8e5d flambda-backend: Move `include functor` over to the modular extensions machinery (#1377)
da4e02ddda flambda-backend: Statically enabled probes (#1388)
093e6388a6 flambda-backend: Bump magic numbers for 4.14.1-12
e7e0bf161b flambda-backend: Move layout from Type_abstract to type_declaration (#1384)
9c53ca7356 flambda-backend: Rename `tests/jst-modular-extensions` to `tests/jane-modular-syntax` (#1397)
6881566428 flambda-backend: Rename "modular extensions" to "Jane syntax"/"modular syntax" (#1395)
bfec906be2 flambda-backend: Add autocompletion for test-one/promote-one (#1393)
9fc4aac93d flambda-backend: Fix a bug that -no-rebuild introduced in test-one (#1394)
301b683fa6 flambda-backend: Add -no-rebuild options for test-one and promote-one (#1391)
1e090acdd9 flambda-backend: zero alloc check: ignore functors and entry functions (#1370)
9d3b5a1e9e flambda-backend: Provide an AST-like view of modular extension extension node names (#1362)
7a92219ffc flambda-backend: Ltail for lambda and use in dissect_letrec (#1313)
7a7e6392e4 flambda-backend: Add emacs hacking commands (#1372)
8dd6eaeb0f flambda-backend: Remove closure from Array.for_all (#1354)
a4c4d03b2e flambda-backend: Fix ghost locations for modular extensions (#1348)
ca5a008f06 flambda-backend: Bump magic numbers for 4.14.1-10 (#1360)
a24d2ec44b flambda-backend: Inline a variable to save 2%+ in allocations (#1353)
96f8f00754 flambda-backend: Probe name too long: warning instead of error (#1352)
cd3468536e flambda-backend: Typedtree module unpacks: Incorporate upstream feedback (#1288)
c0482d3690 flambda-backend: Add dedicated printline-debugging support (#1308)
7b295b0610 flambda-backend: Fix try region closure for "match with exception" under Flambda 2 (#1339)
db6552a52c flambda-backend: Revert ocaml/toplevel/ changes that are duplicative
132f8bac7a flambda-backend: Revert ocaml/driver/ changes that are duplicative
3d7f37fb26 flambda-backend: Merge ocaml-jst
4646c2e31c flambda-backend: Merge ocaml-jst
e62f2b1845 flambda-backend: Bump magic numbers for 4.14.1-8
f617a06b55 flambda-backend: Revert ocaml/toplevel/ changes that are duplicative
79f91e9897 flambda-backend: Revert ocaml/driver/ changes that are duplicative

git-subtree-dir: ocaml
git-subtree-split: df70400e9d35aecd51af6ede4137310e68509e6c
mshinwell added a commit that referenced this pull request Oct 31, 2023
7da89ee53c flambda-backend: Error message: add hint for unboxed types (#1960)
559870dde9 flambda-backend: More precise layout for array patterns (#1968)
097204ae83 flambda-backend: Fix boolean functions tail call position bug (#1957)
8bd0b809a0 flambda-backend: Fix result layout of combined applications (#1963)
91d3de7556 flambda-backend: Change error message for non-value class lets (#1953)
27e58ec9e2 flambda-backend: Handle empty cases (fixes bug from #1899) (#1955)
aafeeda886 flambda-backend: Zero alloc: add payload "opt" and "-zero-alloc-check {default|all|none|opt}" flag (#1936)
e65faaeb77 flambda-backend: Make `assert false` behave as local_ or not, depending on what's better (+ 2 bugfixes) (#1899)
0706cec349 flambda-backend: Install simd.h with other runtime headers (#1935)
82364c9bf8 flambda-backend: Allow parameter modes to be relaxed in type_argument (#1756)
cb9fa49879 flambda-backend: Add missing iarrayLabels module from stdlib dune file (#1930)
40ddf54c41 flambda-backend: Runtime helpers for 128-bit vectors (#1897)
a336b70f16 flambda-backend: Update magic numbers for 4.14.1-22 (and add tools/bump_magic_numbers.sh)
a1239f0458 flambda-backend: 128-bit Array Load/Store (#1682)
c3297fcca7 flambda-backend: Fix uncaught exception for non-representable type statements (#1928)
65af444887 flambda-backend: Add `Is_stack` for C-stub  (#1914)
df70400e9d flambda-backend: Fix interface differences in Printtyp (#1918)
e7b5ebf414 flambda-backend: Fix breaking of tail recursion in classic mode (#1915)
cbb72d82ca flambda-backend: Improve debuginfo for for-loops (and conditionals) (#1870)
19133b6911 flambda-backend: Replace thread save/restore API with switch (#1869)
882b067b30 flambda-backend: Add test showing how `max_arity` affects function splitting (#1904)
f1f7da4b0c flambda-backend: Abbreviate module types when printing error messages (#1895)
e4566ddafa flambda-backend: Add four missing attributes to the `builtin_attrs` table. (#1898)
4bb4c708ef flambda-backend: Undo sort changes during snapshot backtrack (#1885)
87c857a1d6 flambda-backend: Add a missing check for jane syntax (#1891)
070d57f4b3 flambda-backend: Remove mode from Texp_send (#1893)
7d9ef469c8 flambda-backend: Remove Jkind.of_sort (#1890)
5ad95913d6 flambda-backend: ocamlformat in Jane-Street only files in typing (#1881)
5e50edff5e flambda-backend: Remove var_constraint (#1880)
b1962fad75 flambda-backend: Rename "layout" to "jkind" (#1875)
f74b0903fb flambda-backend: Rename layouts.ml to jkind.ml (#1886)
cf32778484 flambda-backend: Enable ocamlformat for Jane Syntax / language extensions code (#1876)
20b32a005e flambda-backend: Better error when using a float64 library without extension (#1859)
64e883d8a3 flambda-backend: Add hint for `#float` (#1864)
ab42aac285 flambda-backend: Port upstream #12368 about abstract environments (#1759)
bbc5173847 flambda-backend: Support for unboxed products in the middle-end and backend (#1433)
6149a5ff39 flambda-backend: Simplify integer comparisons that use "compare" (#1851)
a05adcebd0 flambda-backend: Ask user to add `exclave_` instead of `local_` (#1853)
cdd7f6a9f8 flambda-backend: Bump magic numbers for 4.14.1-19
96ec26a538 flambda-backend: Manually applied changes from PR #11782 (#1732)
ea484d0a5f flambda-backend: Zero alloc annotation: assume a function never returns normally (#1831)
387893ced0 flambda-backend: All-`float#` records (#1769)
c3f9983a7a flambda-backend: Expose `Pprintast.tyvar` (#1848)
37821527ae flambda-backend: Don't allocate a closure unnecessarily (#1836)
a8f6aae1c0 flambda-backend: Fix bug in `Clambda_primitives.result_layout`. (#1833)
4b2a6f6e92 flambda-backend: Add dune target for `dumpobj` (#1773)
2089ec0e35 flambda-backend: tmc: Remove close-on-apply flag when producing a call in non-tail position (#1827)
9f304d8f97 flambda-backend: Adjust the location on `as` pattern vars for better errors/warnings (#1835)
b9cf1067f7 flambda-backend: Zero alloc: assume that works with inlining - propagate via Scoped_location (#1762)
263fa26436 flambda-backend: Make -extension immutable_arrays on by default (#1829)
9cca7d2b41 flambda-backend: Support mode crossing at identifiers (#1811)
7942fed47d flambda-backend: Finish moving `any` to `layouts_beta` (#1821)
44cd2fc897 flambda-backend: Fix uncaught Unify exception in filter_arrow (#1820)
3552db6c7a flambda-backend: Factor out duplicated code in `cmm_helpers` (#1822)
caf938faaf flambda-backend: Fix AFL test in flambda2 (#1824)
ddd765ad40 flambda-backend: Move `float64` to `layouts_beta` (#1812)
3b579d7bf9 flambda-backend: Fixed ISO C99 warning introduced in #1705 (#1787)
df927f0cae flambda-backend: Add a test for an interaction between omitted mli and overeager heap allocation of argument (#1816)
92ddf14959 flambda-backend: Fix incorrect sort assumption in lambda for `bop_exp`s in letops (#1793)
1a91f16eb5 flambda-backend: Merging of Debuginfo.t across CSEd occurrences (#1767)
f7cd48ff96 flambda-backend: Backport #10364 (#1788)
5740ebdf98 flambda-backend: Enable warnings-as-errors (#1796)
374a2fb2e7 flambda-backend: Build Jane Syntax with upstream OCaml in CI (#1780)
1d6471f420 flambda-backend: A more consistent first-to-last order for `-w53` (unused attributes) (#1658)
6210ee4650 flambda-backend: Make sure the Jane syntax extensions don't depend on our compiler changes (#1777)
963bfbccb5 flambda-backend: Add [Obj.uniquely_reachable_words] (#1705)
4cd24bd28a flambda-backend: mode crossing of LHS of arrow types by coercing (#1701)
910914de35 flambda-backend: `Pprintast` prints Jane syntax unconditionally (#1770)
46dad5bc0c flambda-backend: Regulate access to [Language_extension] from within Jane Syntax (#1768)
a0f8d0c8dd flambda-backend: Lazy strengthening (#1337)
85b5c54fc8 flambda-backend: Small improvement to layout inference for mutually recursive type decl parameters (#1766)
0c573826a7 flambda-backend: Syntactic function arity parsing (#1548)
e8edd13227 flambda-backend: Fix modes annotation ghost location (#1761)
a669c0093d flambda-backend: Refactor Debuginfo.t (#1724)
91ab70a521 flambda-backend: Basic uniqueness extension (#1552)
5be3cb82b5 flambda-backend: add the `%get_header` primitive (#1539)
0006b3ed93 flambda-backend: Fix arrow printing when closing over unknown mode (#1744)
226d6ac245 flambda-backend: Add some checks that the minor GC does not recurse (#1743)
f3e7c0a919 flambda-backend: Bump magic numbers for 4.14.1-18
30cbf0abcd flambda-backend: Add `Jane_syntax` `Pprintast` tests (#1727)
126957129d flambda-backend: Expose a couple more functions from `Pprintast` (#1731)
159adbe672 flambda-backend: Propagate the label names of optional parameters (#1723)
4f70f0b9d3 flambda-backend: Further refine our debugging infrastructure (#1650)
a440f6d3f5 flambda-backend: Add mode to `int_as_pointer` (#1648)
0cc53569c7 flambda-backend: Update `jane-street-merlin-setup.sh` for this repo (#1663)
71879dc228 flambda-backend: Add code path to read .cmi without adding to environment  (#1674)
539435276a flambda-backend: Only substitute once in `Env.read_sign_of_cmi` (#1670)
2a7f0153f5 flambda-backend: Pass `-f` when `rm`ing file during install (#1700)
ddaf752e30 flambda-backend: Set location on topmost Jane Syntax attribute (#1696)
5205836267 flambda-backend: Support layout annotations (#1417)
455887f882 flambda-backend: Simplifications following PR #1667 (#1668)
6c0a9e81a3 flambda-backend: Don't add a module to the environment when saving it (#1667)
562eb7b7c3 flambda-backend: Flambda 2 changes for DWARF variables (#1678)
f1352edcab flambda-backend: Add modes on parameters and a framework for attributes on them (#1257)
3d23db5986 flambda-backend: 128-bit vector primitive types (#1568)
06a3bdc802 flambda-backend: Bump magic numbers for 4.14.1-16 (#1657)
37c5ea0157 flambda-backend: Remove/comment new uses of `not_expecting` in the parser (#1517)
8bbe82d4de flambda-backend: Float_u stdlib module (#1572)
f4075a4426 flambda-backend: Add a `float64` layout and `float#` type. (#1528)
43f02af305 flambda-backend: Test fix in #1457 (#1458)
c896a97341 flambda-backend: Swap simd flag to language extension (#1569)
e6c44d431b flambda-backend: mkuplus and mkuminus must preserve attributes (#1575)
906cfc5804 flambda-backend: Make environment lazy in preparation for simd extension (#1570)
a222bfc454 flambda-backend: pattern match local iarray gives local elements(#1574)
d3c14133b9 flambda-backend: 128-bit SIMD vector primitive type (#1499)
bcc0a0941b flambda-backend: exclave_ implies strictly local (#1554)
e3deedbcf2 flambda-backend: Factor out kernel of `Language_extension` used by Jane Syntax (#1509)
eea51500e4 flambda-backend: Fix incorrect sort in transl (#1547)
d2b44d8c5d flambda-backend: A + sign usually means Positive (#1536)
d1644f92ae flambda-backend: Restore #1455: Communicate layouts to middle end (#1511)
5e6524d126 flambda-backend: Tail-calling local-returning functions should make the current function local-returning as well (#1498)
fa71f6bb5d flambda-backend: Increase local stack limit (#1513)
c1eecf6102 flambda-backend: Generalize `deep_occur` to `deep_occur_list` (#1503)
1a17a8be84 flambda-backend: Bump magic numbers for 4.14.1-15
a3d1953dac flambda-backend: Fix Translcore to look for allocations in exclaves (#1495)
0ea8b04635 flambda-backend: Revert "Communicate frontend layouts to lambda" (#1507)
383e15882b flambda-backend: Disable `sockets.ml` on macOS (#1505)
3b73a8db42 flambda-backend: Communicate frontend layouts to lambda (#1455)
f94a067be0 flambda-backend: Allow `make debug` with dune-based build (#1480)
1880d422ab flambda-backend: Disable `beat.ml` on macOS (#1496)
4b2e620fc0 flambda-backend: Check that layout variables aren't unconstrained when writing `cmi`s (#1474)
284889c144 flambda-backend: Add flambda2 -O3 and -Oclassic CI jobs, third attempt (#1493)
ef161b98fc flambda-backend: Prepare translation of primitives in lambda_to_flambda for unboxed products (#1465)
bc1d15ae6a flambda-backend: Remove ast_desc and ast_info from jane-syntax (#1488)
be57ed6a80 flambda-backend: Local immutable arrays (#1420)
3a5d06a12a flambda-backend: Unboxed literal jane syntax (#1487)
cc61a3a116 flambda-backend: Ensure that all [val]s are [value]s. (#1481)
aba14c2e19 flambda-backend: Check for value in polymorphic variant argument (#1482)
0a20dfb54e flambda-backend: Jane-syntax support for extension constructors (#1479)
697519a9f3 flambda-backend: Remove `nonlocal_` modality (#1452)
0bf6a17a2a flambda-backend: Use exported modules in Jane_syntax_parsing (#1477)
aa6d00f792 flambda-backend: Flambda1: Simplify `Region (Exclave e)` to `e` (#1473)
e472be02a0 flambda-backend: Remove the `type float# = float` hack (#1478)
ebe702d90f flambda-backend: Fix a typo in language extension parsing/serializing (#1456)
40f0e8cce4 flambda-backend: Lex unboxed float and int literals as single lexemes (#1469)
22f170a470 flambda-backend: Unboxed float type parsing in `layouts_alpha` (#1467)
740de2a83d flambda-backend: Revert "Add flambda2 -Oclassic and -O3 CI jobs" (#1462)
6ec73edc41 flambda-backend: Zero alloc remove annotation from stdlib (#1434)
f4164973df flambda-backend: Don't pass (unnecessary?) -L flags to `gcc -shared` from opttoplevel (#1363)
416a714c3c flambda-backend: sync dynlink/dune compiler flags (#1461)
d3e555f531 flambda-backend: Add flambda2 -Oclassic and -O3 CI jobs (#1459)
e5eca6182b flambda-backend: Add documentation for testing targets to HACKING docs (#1436)
f1835c4ca8 flambda-backend: New extensions API, supporting maturity levels (#1454)
1deb5af1a6 flambda-backend: Add Make/Dune target for debug printers (#1289)
324f32e993 flambda-backend: Bugfix for application mode crossing (#1451)
7ac42ab92a flambda-backend: Don't substitute into exclaves in `simplif.ml` (#1448)
a03de205d3 flambda-backend: Parse unboxed literals, treating them as boxed (#1437)
5283047f84 flambda-backend: support native `exclave_` syntax (#1338)
a1fe4cf7f2 flambda-backend: Default layout variables in gadt constructors (#1424)
f4c96fffcd flambda-backend: Fix programmatically enabling and disabling the same layouts extension (#1446)
cc58003613 flambda-backend: Erasability namespace for Jane Syntax attributes/extensions (#1421)
ae9099aceb flambda-backend: Use layout histories to produce better errors (#1340)
385ada9965 flambda-backend: Fix swapgil test C warnings (#1430)
ff9a0d13c6 flambda-backend: Bugfix for caml_switch_runtime_locking_scheme (#1429)
df41daecc5 flambda-backend: Remove layout variables from [val]s (#1423)
2e1a05a054 flambda-backend: Bugfix for GC backlog tracking (#1387)
8bc3fd758a flambda-backend: Allow more function argument / returns to be non-value (#1422)
f2a5b936a0 flambda-backend: Convert Jane Syntax to use attributes for many syntactic categories (#1412)
1e2d5c5cec flambda-backend: zero alloc: warning 198 about assume (#1409)
9270fee01e flambda-backend: Allow non-value function args and returns (#1405)
5319dfe041 flambda-backend: Bump magic numbers for 4.14.1-13
31fb926539 flambda-backend: Fix issue with layout any and Tstr_eval in the native toplevel (#1402)
dff434617c flambda-backend: Extend caml_locking_scheme with callbacks for thread start/stop (#1411)
674a335783 flambda-backend: Introduce an API to swap the runtime lock for a different lock. (#1365)
1ce68db13b flambda-backend: Modular syntax for types (#1401)
9f55adea6e flambda-backend: Missing changes around the renaming to "Jane syntax" (#1400)
cf8eaa8e5d flambda-backend: Move `include functor` over to the modular extensions machinery (#1377)
da4e02ddda flambda-backend: Statically enabled probes (#1388)
093e6388a6 flambda-backend: Bump magic numbers for 4.14.1-12
e7e0bf161b flambda-backend: Move layout from Type_abstract to type_declaration (#1384)
9c53ca7356 flambda-backend: Rename `tests/jst-modular-extensions` to `tests/jane-modular-syntax` (#1397)
6881566428 flambda-backend: Rename "modular extensions" to "Jane syntax"/"modular syntax" (#1395)
bfec906be2 flambda-backend: Add autocompletion for test-one/promote-one (#1393)
9fc4aac93d flambda-backend: Fix a bug that -no-rebuild introduced in test-one (#1394)
301b683fa6 flambda-backend: Add -no-rebuild options for test-one and promote-one (#1391)
1e090acdd9 flambda-backend: zero alloc check: ignore functors and entry functions (#1370)
9d3b5a1e9e flambda-backend: Provide an AST-like view of modular extension extension node names (#1362)
7a92219ffc flambda-backend: Ltail for lambda and use in dissect_letrec (#1313)
7a7e6392e4 flambda-backend: Add emacs hacking commands (#1372)
8dd6eaeb0f flambda-backend: Remove closure from Array.for_all (#1354)
a4c4d03b2e flambda-backend: Fix ghost locations for modular extensions (#1348)
ca5a008f06 flambda-backend: Bump magic numbers for 4.14.1-10 (#1360)
a24d2ec44b flambda-backend: Inline a variable to save 2%+ in allocations (#1353)
96f8f00754 flambda-backend: Probe name too long: warning instead of error (#1352)
cd3468536e flambda-backend: Typedtree module unpacks: Incorporate upstream feedback (#1288)
c0482d3690 flambda-backend: Add dedicated printline-debugging support (#1308)
7b295b0610 flambda-backend: Fix try region closure for "match with exception" under Flambda 2 (#1339)
db6552a52c flambda-backend: Revert ocaml/toplevel/ changes that are duplicative
132f8bac7a flambda-backend: Revert ocaml/driver/ changes that are duplicative
3d7f37fb26 flambda-backend: Merge ocaml-jst
4646c2e31c flambda-backend: Merge ocaml-jst
e62f2b1845 flambda-backend: Bump magic numbers for 4.14.1-8
f617a06b55 flambda-backend: Revert ocaml/toplevel/ changes that are duplicative
79f91e9897 flambda-backend: Revert ocaml/driver/ changes that are duplicative

git-subtree-dir: ocaml
git-subtree-split: 7da89ee53c1b163224c2ab49afe87892dd5f9ee4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to upstream PR should be sent to upstream OCaml typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants