-
-
Notifications
You must be signed in to change notification settings - Fork 789
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
fix[venom]: stack reorder rework #4220
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4220 +/- ##
===========================================
- Coverage 59.40% 46.03% -13.37%
===========================================
Files 109 109
Lines 15635 15651 +16
Branches 3443 3448 +5
===========================================
- Hits 9288 7205 -2083
- Misses 5680 7892 +2212
+ Partials 667 554 -113 ☔ View full report in Codecov by Sentry. |
vyper/venom/venom_to_assembly.py
Outdated
cost += self.swap(assembly, stack, depth) | ||
if final_stack_depth in positions[stack.peek(final_stack_depth)]: |
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.
i think the positions[stack.peek(final_stack_depth)]
can be factored out into a variable
What I did
Fixed the issue that was manifested in the snekmate test. This bug is reported in #4215
How I did it
The bug was caused by error in
stack_reorder
function. The function depends on the order of each operand but since the order changes there is the possibility to move same stack operand twice. To fix this issue I kept the information where necessary operands on stack.How to verify it
The example from the issue does compile now.
Commit message
fix[venom]: stack reorder fix
Description for the changelog
Cute Animal Picture