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[codegen]: fix double eval in dynarray append/pop #4030

Merged
merged 2 commits into from
May 18, 2024

Conversation

charles-cooper
Copy link
Member

append/pop does not have an eval once fence for the cases where it is in memory. add a fence.

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-->

append/pop does not have an eval once fence for the cases where it is in
memory. add a fence.
vyper/codegen/core.py Fixed Show fixed Hide fixed
vyper/codegen/core.py Fixed Show fixed Hide fixed
@cyberthirst
Copy link
Collaborator

d:DynArray[DynArray[uint256,1],1]

@external
def foo() -> DynArray[uint256, 2]:
    self.d = [[0]]
    x:DynArray[uint256, 2] = [0,0]
    self.d[x.pop()] = [1]
    return x

now crashes with AssertionError: non-unique symbols {'pop_dynarray4'}

@charles-cooper charles-cooper merged commit 1cfdfda into vyperlang:master May 18, 2024
153 checks passed
@charles-cooper charles-cooper deleted the fix/append-pop-eval branch May 18, 2024 20:40
This pull request was closed.
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.

3 participants