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

Refactor integer range handling in the usefulness algorithm #66326

Merged
merged 29 commits into from
Nov 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c75685b
Note link between apply/specialize/arity functions
Nadrieril Nov 7, 2019
8f7ba7a
Clarify conditions for exhaustive integer range matching
Nadrieril Nov 7, 2019
3531c52
Factor out range construction in `all_constructors`
Nadrieril Nov 7, 2019
34ad52e
`pat_constructor` does not need `pcx` anymore
Nadrieril Nov 7, 2019
8c1835d
IntRange::from_pat is redundant with pat_constructors
Nadrieril Nov 7, 2019
f3752ee
Cleanup `constructor_covered_by_range`
Nadrieril Nov 7, 2019
81db2ee
Special-case range inclusion when the range is integral but non-exhau…
Nadrieril Nov 7, 2019
0a18610
Move range exhaustiveness check to IntRange::intersection
Nadrieril Nov 7, 2019
6de7afd
Prefer IntRange::into_ctor to range_to_ctor
Nadrieril Nov 7, 2019
c6c8625
Special-case subtracting from a range if that range is not an IntRange
Nadrieril Nov 9, 2019
75a5088
Avoid converting through Constructor when subtracting ranges
Nadrieril Nov 9, 2019
1909e3f
`Constructor::display` was only needed for displaying `IntRange`
Nadrieril Nov 9, 2019
f93a700
Introduce IntRange constructor
Nadrieril Nov 15, 2019
4232816
formatting
Nadrieril Nov 15, 2019
6b8bfef
Add `IntRange::to_pat` and use it instead of custom `display()`
Nadrieril Nov 9, 2019
84784dd
Eagerly convert ranges to IntRange
Nadrieril Nov 9, 2019
aadd5e5
Factor out getting the boundaries of an `IntRange`
Nadrieril Nov 9, 2019
d1642f1
Inline now-trivial IntRange::from_ctor
Nadrieril Nov 9, 2019
0192124
Make should_treat_range_exhaustively a method
Nadrieril Nov 9, 2019
f674f89
Store Const directly in ConstantRange
Nadrieril Nov 9, 2019
3e5aadc
Remove unnecessary data from ConstantValue/ConstantRange
Nadrieril Nov 9, 2019
e47d631
Malformed range patterns can't happen thanks to E0030
Nadrieril Nov 9, 2019
d31b4c3
Remove fishy condition
Nadrieril Nov 9, 2019
c38aad4
Add test for failing `try_eval_bits`
Nadrieril Nov 12, 2019
9165dd0
Apply suggestions from code review
Nadrieril Nov 12, 2019
b679e77
Factor out IntRange::is_subrange
Nadrieril Nov 12, 2019
addd8a9
Apply suggestions from code review
Nadrieril Nov 12, 2019
cde9808
Add regression test
Nadrieril Nov 12, 2019
694a511
Apply suggestions from code review
Nadrieril Nov 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading