Skip to content

Commit

Permalink
Update vyper/venom/analysis/available_expression.py - better hash method
Browse files Browse the repository at this point in the history
Co-authored-by: Charles Cooper <cooper.charles.m@gmail.com>
  • Loading branch information
HodanPlodky and charles-cooper authored Sep 16, 2024
1 parent 2d7e1a4 commit 4b62958
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions vyper/venom/analysis/available_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ def __eq__(self, other):
return self.first_inst == other.first_inst

def __hash__(self) -> int:
res : int = hash(self.opcode)
for op in self.operands:
res ^= hash(op)
return res
return hash((self.opcode, *self.operands))

def __repr__(self) -> str:
if self.opcode == "store":
Expand Down

0 comments on commit 4b62958

Please sign in to comment.