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

Venom fixes #3

Draft
wants to merge 11 commits into
base: feature/venom_updates
Choose a base branch
from

Conversation

charles-cooper
Copy link
Collaborator

@charles-cooper charles-cooper commented Mar 20, 2024

What I did

  • fix dft pass (maybe)
  • issue variables for literals so they can be reordered via dftpass
  • add a heuristic to swap the top of the stack if it's not the next thing to be consumed

How I did it

How to verify it

compile this contract

#pragma experimental-codegen
@external
def foo(x: uint256, y: uint256) -> uint256:
    return x * y

output should include DUP2 DUP2 MUL SWAP1 DUP3 DUP3 DIV EQ SWAP2 ISZERO SWAP1 SWAP2 OR ISZERO which shows that the output of MUL is getting swapped out after it is produced

also, a bunch of things like CALLDATASIZE PUSH1 0x44 SWAP1 LT get reordered so the swaps are removed.

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

@charles-cooper charles-cooper marked this pull request as draft March 22, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant