Skip to content

Commit

Permalink
added frozen on _Expression class
Browse files Browse the repository at this point in the history
  • Loading branch information
HodanPlodky committed Feb 3, 2025
1 parent 1cc93db commit 42e15a4
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions vyper/venom/analysis/available_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
IMMUTABLE_ENV_QUERIES = frozenset(["calldatasize", "gaslimit", "address", "codesize"])


@dataclass
@dataclass(frozen=True)
class _Expression:
inst: IRInstruction
opcode: str
Expand All @@ -38,18 +38,6 @@ class _Expression:
operands: list["IROperand | _Expression"]
ignore_msize: bool

def __init__(
self,
inst: IRInstruction,
opcode: str,
operands: list["IROperand | _Expression"],
ignore_msize: bool,
):
self.inst = inst
self.opcode = opcode
self.operands = operands
self.ignore_msize = ignore_msize

# equality for lattices only based on original instruction
def __eq__(self, other) -> bool:
if not isinstance(other, _Expression):
Expand Down

0 comments on commit 42e15a4

Please sign in to comment.