-
Notifications
You must be signed in to change notification settings - Fork 85
Overwriting tests #3123
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
Overwriting tests #3123
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
goldfirere
reviewed
Oct 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some good tests in here! But I want more. :) I'm OK with deferring writing these until we can actually run them, but then perhaps make a big CR note with the list of things to add.
…he lift constants test
goldfirere
reviewed
Oct 15, 2024
ocaml/testsuite/tests/typing-unique/overwriting_lift_constants.ml
Outdated
Show resolved
Hide resolved
ocaml/testsuite/tests/typing-unique/overwriting_lift_constants.ml
Outdated
Show resolved
Hide resolved
ocaml/testsuite/tests/typing-unique/overwriting_lift_constants_bug.ml
Outdated
Show resolved
Hide resolved
ocaml/testsuite/tests/typing-unique/overwriting_lift_constants_expect.ml
Outdated
Show resolved
Hide resolved
goldfirere
approved these changes
Oct 16, 2024
anfelor
added a commit
to anfelor/flambda-backend
that referenced
this pull request
Nov 1, 2024
* Tests for overwriting * Remove old tests for unique overwrites and fix typos * Add overwriting tests back * Add tests for lifting out constants * Update tests * Use extension universe alpha * Test all cases for gc soundness bug * Review feedback: add more CRs and clarify overwriting_map.ml * Review feedback: Add allocation counter to rbtree * Review feedback: also test mixed blocks and unboxed float blocks in the lift constants test * Review feedback: as discussed in meeting * Review feedback
anfelor
added a commit
to anfelor/flambda-backend
that referenced
this pull request
Nov 25, 2024
* Tests for overwriting * Remove old tests for unique overwrites and fix typos * Add overwriting tests back * Add tests for lifting out constants * Update tests * Use extension universe alpha * Test all cases for gc soundness bug * Review feedback: add more CRs and clarify overwriting_map.ml * Review feedback: Add allocation counter to rbtree * Review feedback: also test mixed blocks and unboxed float blocks in the lift constants test * Review feedback: as discussed in meeting * Review feedback
anfelor
added a commit
to anfelor/flambda-backend
that referenced
this pull request
Dec 3, 2024
* Tests for overwriting * Remove old tests for unique overwrites and fix typos * Add overwriting tests back * Add tests for lifting out constants * Update tests * Use extension universe alpha * Test all cases for gc soundness bug * Review feedback: add more CRs and clarify overwriting_map.ml * Review feedback: Add allocation counter to rbtree * Review feedback: also test mixed blocks and unboxed float blocks in the lift constants test * Review feedback: as discussed in meeting * Review feedback
anfelor
added a commit
to anfelor/flambda-backend
that referenced
this pull request
Dec 5, 2024
* Tests for overwriting * Remove old tests for unique overwrites and fix typos * Add overwriting tests back * Add tests for lifting out constants * Update tests * Use extension universe alpha * Test all cases for gc soundness bug * Review feedback: add more CRs and clarify overwriting_map.ml * Review feedback: Add allocation counter to rbtree * Review feedback: also test mixed blocks and unboxed float blocks in the lift constants test * Review feedback: as discussed in meeting * Review feedback
anfelor
added a commit
that referenced
this pull request
Dec 6, 2024
* Basic overwriting syntax (#3089) * Basic overwriting syntax * Update line numbers in expect tests after cherry-pick * Implement suggestions * Update tests * Implement suggestions * Remove nested quotes * Revert "Remove nested quotes" This reverts commit 72eaa04. * Overwriting tests (#3123) * Tests for overwriting * Remove old tests for unique overwrites and fix typos * Add overwriting tests back * Add tests for lifting out constants * Update tests * Use extension universe alpha * Test all cases for gc soundness bug * Review feedback: add more CRs and clarify overwriting_map.ml * Review feedback: Add allocation counter to rbtree * Review feedback: also test mixed blocks and unboxed float blocks in the lift constants test * Review feedback: as discussed in meeting * Review feedback * Overwriting typing (#3157) * First draft of type checking * Check in uniqueness analysis that tags stay the same during overwriting * Report a syntax error on overwriting anything except an allocation * Full type-checking for tuples and records * Type checking fully implemented * Clean up type-checking and add ability to overwrite arbitrary expressions * Fix checking of tags * Test (labeled) tuples * Final tests and allow overwrite of inlined records * Review suggestion Co-authored-by: Richard Eisenberg <rae@richarde.dev> * Review suggestion Co-authored-by: Richard Eisenberg <rae@richarde.dev> * Review feedback: add more tests * Uniqueness analysis: Change grammar of error message to indicate parallel evaluation * Review feedback: Fix typo Co-authored-by: Richard Eisenberg <rae@richarde.dev> * Review feedback: add comments and tests * Prevent nested allocations in overwrite * Review feedback: Fix comment and improve readability * Review feedback: add comments, tests and nicer error messages * Fix nested record bug * Improve code quality * Disallow overwriting of unboxed records * Review feedback * Clarify the overwriting state for type_label_exp * Add debugging printers for uniqueness Sadly this doesn't actually work in the debugger. * Temporarily allow unique mutable fields for better tests of overwriting tags (to be reverted) * New scheme for checking that overwrite does not change tags * Refactor: split up Learned_tags and Overwrites and use match_with_learned_tags instead of seq * Add comment about fold_left1 and zero of semiring * Fix submode error attribution in records * Tune errors in tag checker * Don't record tags that have been overwritten and matched with a learned tag * Review feedback: comments and small improvements * Review feedback: tune comments --------- Co-authored-by: Richard Eisenberg <rae@richarde.dev> Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com> * Revert c29a7bb to disable unique mutable fields again * Remove out-of-date CRs --------- Co-authored-by: Richard Eisenberg <rae@richarde.dev> Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a few testcases from the old prototype. They parse in the new syntax but obviously don't typecheck yet. I have made them expect-tests for this reason, but also included the reference that contains the result we would expect once overwriting is fully implemented.
In the future, we might also want to port unique_sort which relies on borrowing.
Cherry-picked from #3114.