Skip to content

Commit 45199ae

Browse files
committed
Remove redundant attribute
1 parent ef06508 commit 45199ae

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Tools/cases_generator/stack.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def var_size(var: StackItem) -> str:
3232
@dataclass
3333
class Local:
3434
item: StackItem
35-
cached: bool
3635
in_memory: bool
3736
defined: bool
3837

@@ -47,21 +46,21 @@ def compact_str(self) -> str:
4746

4847
@staticmethod
4948
def unused(defn: StackItem) -> "Local":
50-
return Local(defn, False, defn.is_array(), False)
49+
return Local(defn, defn.is_array(), False)
5150

5251
@staticmethod
5352
def undefined(defn: StackItem) -> "Local":
5453
array = defn.is_array()
55-
return Local(defn, not array, array, False)
54+
return Local(defn, array, False)
5655

5756
@staticmethod
5857
def redefinition(var: StackItem, prev: "Local") -> "Local":
5958
assert var.is_array() == prev.is_array()
60-
return Local(var, prev.cached, prev.in_memory, True)
59+
return Local(var, prev.in_memory, True)
6160

6261
@staticmethod
6362
def from_memory(defn: StackItem) -> "Local":
64-
return Local(defn, True, True, True)
63+
return Local(defn, True, True)
6564

6665
def kill(self) -> None:
6766
self.defined = False
@@ -70,7 +69,6 @@ def kill(self) -> None:
7069
def copy(self) -> "Local":
7170
return Local(
7271
self.item,
73-
self.cached,
7472
self.in_memory,
7573
self.defined
7674
)
@@ -91,7 +89,6 @@ def __eq__(self, other: object) -> bool:
9189
return NotImplemented
9290
return (
9391
self.item is other.item
94-
and self.cached is other.cached
9592
and self.in_memory is other.in_memory
9693
and self.defined is other.defined
9794
)

0 commit comments

Comments
 (0)