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

Enabled manual gas handling. #4880

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

orizi
Copy link
Collaborator

@orizi orizi commented Jan 23, 2024

This change is Reviewable

Copy link
Contributor

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 4 files at r1, all commit messages.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @orizi)


crates/cairo-lang-lowering/src/db.rs line 484 at r1 (raw file):

                    }
                }
                stack.extend(info.arms().iter().map(|arm| arm.block_id));

I think this may be more readable.

Suggestion:

                let arms = info.arms().iter();
                if let MatchInfo::Extern(s) = info {
                    direct_callees.push(s.function);
                    if DependencyType::Cost == dependency_type
                        && withdraw_gas_fns.contains(&s.function)
                    {
                        // Not following the option when successfully fetched gas.
                        arms.next();
                    }
                }
                stack.extend(arms.map(|arm| arm.block_id));

@orizi orizi force-pushed the orizi/enable-manual-gas-handling branch from 44e3214 to 18ce323 Compare January 24, 2024 09:55
Copy link
Contributor

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @orizi)

@orizi orizi force-pushed the orizi/enable-manual-gas-handling branch from 18ce323 to 59c2372 Compare January 24, 2024 09:57
@orizi orizi enabled auto-merge January 24, 2024 09:57
@orizi orizi added this pull request to the merge queue Jan 24, 2024
Merged via the queue into sierra-minor-update with commit 54fd178 Jan 24, 2024
42 checks passed
@orizi orizi deleted the orizi/enable-manual-gas-handling branch February 4, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants