-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[ty] improve complex TDD-based narrowing #23201
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
Draft
mtshiba
wants to merge
39
commits into
astral-sh:main
Choose a base branch
from
mtshiba:improve-23109
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,078
−336
Draft
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
c6ad1e8
[ty] improve #23109 TDD-based narrowing
mtshiba 989268d
cache `narrow_by_constraint_inner`
mtshiba 7f8379c
refactor
mtshiba f92287c
further `narrow_by_constraint_inner` optimization
mtshiba a0a5213
Revert "further `narrow_by_constraint_inner` optimization"
mtshiba 6909252
improve constant calculations with `resolve_to_literal`
mtshiba 0e2ca45
further `narrow_by_constraint_inner` optimization (take 2)
mtshiba ae801f7
Revert "improve constant calculations with `resolve_to_literal`"
mtshiba 8369501
Revert "further `narrow_by_constraint_inner` optimization (take 2)"
mtshiba b2e63ce
Reapply "improve constant calculations with `resolve_to_literal`"
mtshiba c9aa05b
Merge branch 'main' into improve-23109
mtshiba 946ea42
Update place_state.rs
mtshiba b45d185
`narrow_by_constraint` optimization (take 3)
mtshiba f10df50
Revert "`narrow_by_constraint` optimization (take 3)"
mtshiba de6d3c1
Reapply "`narrow_by_constraint` optimization (take 3)"
mtshiba 4eb12c8
add `PlaceVersion` to prevent the old shadowed narrowing constraint f…
mtshiba 19e63c4
`narrow_by_constraint` optimization using `PlaceVersion`
mtshiba 50fc1e9
`narrow_by_constraint` optimization using `UnionType::from_elements_w…
mtshiba cfa026c
Revert "`narrow_by_constraint` optimization using `UnionType::from_el…
mtshiba 41059e9
optimization in `PredicatePlaceVersionInfo`
mtshiba cd6c0ef
remove `ReturnsNever` special casing
mtshiba 8468a9e
remove `all_negative_narrowing_constraints_for_{expression, pattern}`
mtshiba c2fe06e
compact `PredicatePlaceVersions`
mtshiba 6da3546
Revert "compact `PredicatePlaceVersions`"
mtshiba 3c0be32
store place versions per definition in `UseDefMap`
mtshiba 9142acd
remove `latest_place_version` from `Bindings`
mtshiba b0add5e
intern `bindings_by_use`
mtshiba fd02b2b
Revert "intern `bindings_by_use`"
mtshiba 2938e78
follow review
mtshiba 986a678
Merge branch 'main' into improve-23109
mtshiba 432e7d4
Update narrow.rs
mtshiba 8bff224
fix `L/RShift` implemenation in `resolve_to_literal`
mtshiba a3eb0ab
add unit tests for `resolve_to_literal`
mtshiba 04dfb49
Revert "remove `latest_place_version` from `Bindings`"
mtshiba c002ce6
remove unnecessary code
mtshiba 99ad21f
Merge branch 'main' into improve-23109
mtshiba 65bdd1c
remove unnecessary code
mtshiba c1c0757
simplify `narrow_by_constraint_inner` logic
mtshiba 3edbfdf
reduce redundancy checks in `narrow_by_constraint`
mtshiba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
crates/ty_python_semantic/resources/mdtest/binary/integers.md
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.