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

refactor[venom]: refactor venom operand classes #3915

Merged
merged 11 commits into from
Apr 6, 2024

Conversation

harkal
Copy link
Collaborator

@harkal harkal commented Apr 6, 2024

What I did

How I did it

How to verify it

Commit message

the original `IRValue`, `IRVariable`, `IRLabel` and `IROperand`
hierarchy got convoluted after several refactors. this commit refactors
the hierarchy so that the relationship between the classes is clearer.

Description for the changelog

Cute Animal Picture

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

vyper/venom/passes/dft.py Fixed Show fixed Hide fixed
@codecov-commenter
Copy link

codecov-commenter commented Apr 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.87%. Comparing base (7485cea) to head (82a423a).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3915      +/-   ##
==========================================
- Coverage   90.92%   90.87%   -0.05%     
==========================================
  Files          95       95              
  Lines       14411    14395      -16     
  Branches     3189     3187       -2     
==========================================
- Hits        13103    13082      -21     
- Misses        908      912       +4     
- Partials      400      401       +1     

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

vyper/venom/basicblock.py Fixed Show fixed Hide fixed
@charles-cooper
Copy link
Member

charles-cooper commented Apr 6, 2024

seems fine. i think we should have explicit __eq__() implementations, and as a style thing i personally prefer explicit isinstance checks (friendlier to mypy) instead of the utility functions, but it is OK either way tbh.

@harkal
Copy link
Collaborator Author

harkal commented Apr 6, 2024

seems fine. i think we should have explicit __eq__() implementations, and as a style thing i personally prefer explicit isinstance checks (friendlier to mypy) instead of the utility functions, but it is OK either way tbh.

I reverted the utility functions, isinstance is the way everywhere now. Code check complaining about __eq__() is immaterial, the methods will be exactly the same in all subclasses.

@charles-cooper charles-cooper changed the title refactor[venom]: venom operand classes hierarchy refactoring refactor[venom]: refactor venom operand classes Apr 6, 2024
@charles-cooper charles-cooper enabled auto-merge (squash) April 6, 2024 20:07
@charles-cooper charles-cooper merged commit 9d0d147 into vyperlang:master Apr 6, 2024
151 checks passed
@harkal harkal deleted the refactor/venom_classes branch April 6, 2024 22:08
electriclilies pushed a commit to electriclilies/vyper that referenced this pull request Apr 27, 2024
the original `IRValue`, `IRVariable`, `IRLabel` and `IROperand`
hierarchy got convoluted after several refactors. this commit refactors
the hierarchy so that the relationship between the classes is clearer.
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