-
Notifications
You must be signed in to change notification settings - Fork 604
DRY implementation of group_match_arms and surrounding utilities #7747
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
Conversation
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.
Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 3 unresolved discussions
crates/cairo-lang-lowering/src/lower/lower_match.rs
line 1037 at r1 (raw file):
arms: vec![], location, });
seems like it should move into the new
function.
Code quote:
let empty_match_info = MatchInfo::Enum(MatchEnumInfo {
concrete_enum_id,
input: match_input,
arms: vec![],
location,
});
crates/cairo-lang-lowering/src/lower/lower_match.rs
line 1410 at r1 (raw file):
} fn collect_match_arms(self, concrete_variants: &[ConcreteVariant]) -> Vec<MatchArm> {
doc.
crates/cairo-lang-lowering/src/lower/lower_match.rs
line 1517 at r1 (raw file):
.collect(); fn lower_arm_expr(
doc
fb4cd21
to
a61be96
Compare
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.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @orizi)
crates/cairo-lang-lowering/src/lower/lower_match.rs
line 1037 at r1 (raw file):
Previously, orizi wrote…
seems like it should move into the
new
function.
This is different between Extern and Concrete so I left it outside. Maybe a bit further on I will remove this duplication (the extern/concrete difference also affects the final match_info for finishing the lowering of the match)
crates/cairo-lang-lowering/src/lower/lower_match.rs
line 1410 at r1 (raw file):
Previously, orizi wrote…
doc.
Done.
crates/cairo-lang-lowering/src/lower/lower_match.rs
line 1517 at r1 (raw file):
Previously, orizi wrote…
doc
Done.
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.
Reviewed 1 of 1 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @eytan-starkware)
crates/cairo-lang-lowering/src/lower/lower_match.rs
line 329 at r3 (raw file):
/// Builds a variant match tree from the arms of a match statement. /// The tree is used to check for unreachable patterns and represent for each variant it's .
Suggestion:
/// The tree is used to check for unreachable patterns and represent for each variant it's ????.
commit-id:5d520ca7
a61be96
to
040a7f5
Compare
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.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @orizi)
crates/cairo-lang-lowering/src/lower/lower_match.rs
line 329 at r3 (raw file):
/// Builds a variant match tree from the arms of a match statement. /// The tree is used to check for unreachable patterns and represent for each variant it's .
Done.
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.
Reviewed 4 of 4 files at r4, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @eytan-starkware)
Stack: