Skip to content

fix[venom]: fix inliner return items #4614

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

charles-cooper
Copy link
Member

this fixes the function inliner returning items. currently in vyper, functions do not return stack items, so there was an assumption that ret had no arguments besides the return pc. this commit adds the store instructions so that the return items are set properly.

it also fixes a bug in InstUpdater, which is that invoke can have no outputs.

What I did

How I did it

How to verify it

Commit message

Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

this fixes the function inliner returning items. currently in vyper,
functions do not return stack items, so there was an assumption that
`ret` had no arguments besides the return pc. this commit adds the store
instructions so that the return items are set properly.

it also fixes a bug in InstUpdater, which is that invoke can have no
outputs.
@charles-cooper charles-cooper marked this pull request as ready for review April 27, 2025 14:19
@charles-cooper charles-cooper requested a review from harkal April 27, 2025 14:20
Copy link

codecov bot commented Apr 27, 2025

Codecov Report

Attention: Patch coverage is 40.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 92.50%. Comparing base (68b68c4) to head (87877ff).

Files with missing lines Patch % Lines
vyper/venom/passes/function_inliner.py 0.00% 4 Missing and 1 partial ⚠️
vyper/venom/basicblock.py 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4614      +/-   ##
==========================================
- Coverage   92.53%   92.50%   -0.03%     
==========================================
  Files         129      129              
  Lines       18593    18601       +8     
  Branches     3225     3227       +2     
==========================================
+ Hits        17205    17207       +2     
- Misses        942      946       +4     
- Partials      446      448       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant