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

Do not add signature to memory for private function calls #2058

Conversation

iamdefinitelyahuman
Copy link
Contributor

What I did

Do not write a signature to memory when preparing args for a private function call. Fixes #1695

How I did it

In vyper/parser/parser_utils.py::pack_arguments, replaced the return_placeholder kwarg with is_external_call. When False, the signature is stored in memory.

I had to adjust some memory offsets to make this work, but I think the resulting code is a bit cleaner.

How to verify it

Run the tests. I didn't add any cases, but I did confirm that we have sufficient coverage around this functionality.

Cute Animal Picture

image

@iamdefinitelyahuman iamdefinitelyahuman merged commit 12df3bc into vyperlang:master Jun 27, 2020
@iamdefinitelyahuman iamdefinitelyahuman deleted the fix-internal-call-sig branch June 27, 2020 20:35
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.

Private function calls with arguments needlessly store a function selector in memory
2 participants