Skip to content

feat[venom]: cleanup variable version handling#4404

Merged
charles-cooper merged 11 commits intovyperlang:masterfrom
harkal:feat/cleanup_variable_versions
Dec 18, 2024
Merged

feat[venom]: cleanup variable version handling#4404
charles-cooper merged 11 commits intovyperlang:masterfrom
harkal:feat/cleanup_variable_versions

Conversation

@harkal
Copy link
Copy Markdown
Collaborator

@harkal harkal commented Dec 17, 2024

What I did

How I did it

How to verify it

Commit message

refactor `IRVariable` so that parsing cannot result in a nonzero
`.version` (it should only be modified by internal passes).

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 December 17, 2024 17:27
@charles-cooper
Copy link
Copy Markdown
Member

slight performance regression here (200-300ms for full size contract)

Copy link
Copy Markdown
Member

@charles-cooper charles-cooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, altho that performance regression makes me a bit nervous. @harkal i pushed a fix for variable printing, there were some variables like %%1 being printed out.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.67%. Comparing base (b0ea1b3) to head (4690836).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4404      +/-   ##
==========================================
- Coverage   90.33%   88.67%   -1.67%     
==========================================
  Files         115      115              
  Lines       16236    16236              
  Branches     2733     2732       -1     
==========================================
- Hits        14667    14397     -270     
- Misses       1109     1319     +210     
- Partials      460      520      +60     

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

@charles-cooper charles-cooper enabled auto-merge (squash) December 18, 2024 13:58

def __hash__(self) -> int:
return hash(self.value)
if self._hash is None:

Check warning

Code scanning / CodeQL

`__eq__` not overridden when adding attributes

The class 'IRVariable' does not override ['__eq__'](1), but adds the new attribute [offset](2).
if version > 0:
self.value = f"{name}:{version}"
else:
self.value = name

Check warning

Code scanning / CodeQL

Overwriting attribute in super-class or sub-class

Assignment overwrites attribute value, which was previously defined in superclass [IROperand](1).
else:
self.value = name

@property

Check warning

Code scanning / CodeQL

Overwriting attribute in super-class or sub-class

Assignment overwrites attribute value, which was previously defined in superclass [IROperand](1).
@charles-cooper charles-cooper merged commit 296a071 into vyperlang:master Dec 18, 2024
@harkal harkal deleted the feat/cleanup_variable_versions branch December 18, 2024 14:14
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