-
Notifications
You must be signed in to change notification settings - Fork 581
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
Allow renaming a variable twice as it might happen in some cases. #4967
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.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-lowering/src/optimizations/cancel_ops.rs
line 41 at r1 (raw file):
// Remove no-longer needed statements. stmts_to_remove.sort_by_key(|(block_id, stmt_id)| (block_id.0, *stmt_id)); for (block_id, stmt_id) in stmts_to_remove.into_iter().rev().dedup() {
how do you know the problematic ones would be consecutive?
doc how you know it, and why these might exist.
Code quote:
for (block_id, stmt_id) in stmts_to_remove.into_iter().rev().dedup() {
Previously, orizi wrote…
because of the sorting. |
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 2 files reviewed, 1 unresolved discussion (waiting on @ilyalesokhin-starkware)
crates/cairo-lang-lowering/src/optimizations/cancel_ops.rs
line 41 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
because of the sorting.
oh - right - but still doc the need for dedup.
6f20e51
to
eb58d17
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 2 files reviewed, 1 unresolved discussion (waiting on @orizi)
crates/cairo-lang-lowering/src/optimizations/cancel_ops.rs
line 41 at r1 (raw file):
Previously, orizi wrote…
oh - right - but still doc the need for dedup.
Done.
I couldn't put the .dedup() before the .rev().
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 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ilyalesokhin-starkware)
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)