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

fix[venom]: fix return opcode handling in mem2var #4011

Merged
merged 3 commits into from
May 9, 2024

Conversation

harkal
Copy link
Collaborator

@harkal harkal commented May 9, 2024

What I did

I fixed mem2var that was creating a bogus instruction in certain cases of returning values.

How I did it

How to verify it

Commit message

the `mem2var` venom pass was creating an `mstore` instruction with a
bogus output variable when promoting a variable to memory for `RETURN`s.

Description for the changelog

Cute Animal Picture

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

@harkal harkal marked this pull request as ready for review May 9, 2024 18:39
@harkal harkal requested a review from charles-cooper May 9, 2024 18:40
@charles-cooper
Copy link
Member

do you have an example of source code where this change makes a difference?

@harkal
Copy link
Collaborator Author

harkal commented May 9, 2024

do you have an example of source code where this change makes a difference?

No code currently will trigger an issue, but with upcoming changes I am making it does. Regardless a mstore instruction does not have outputs, so it needs fixing.

@charles-cooper charles-cooper changed the title fix[venom]: fix function return handling for mem2var fix[venom]: fix return opcode handling in mem2var May 9, 2024
@charles-cooper charles-cooper enabled auto-merge (squash) May 9, 2024 21:35
@charles-cooper charles-cooper merged commit 4a0305a into vyperlang:master May 9, 2024
153 checks passed
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.

None yet

2 participants