Skip to content

Commit 375425a

Browse files
Cases generator: Remove type_prop and passthrough (#117614)
1 parent 733e56e commit 375425a

File tree

3 files changed

+22
-33
lines changed

3 files changed

+22
-33
lines changed

Include/internal/pycore_uop_metadata.h

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/cases_generator/analyzer.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class Properties:
2424
has_free: bool
2525
side_exit: bool
2626
pure: bool
27-
passthrough: bool
2827
tier: int | None = None
2928
oparg_and_1: bool = False
3029
const_oparg: int = -1
@@ -54,7 +53,6 @@ def from_list(properties: list["Properties"]) -> "Properties":
5453
has_free=any(p.has_free for p in properties),
5554
side_exit=any(p.side_exit for p in properties),
5655
pure=all(p.pure for p in properties),
57-
passthrough=all(p.passthrough for p in properties),
5856
)
5957

6058
@property
@@ -81,7 +79,6 @@ def infallible(self) -> bool:
8179
has_free=False,
8280
side_exit=False,
8381
pure=False,
84-
passthrough=False,
8582
)
8683

8784

@@ -106,9 +103,6 @@ class StackItem:
106103
condition: str | None
107104
size: str
108105
peek: bool = False
109-
type_prop: None | tuple[str, None | str] = field(
110-
default_factory=lambda: None, init=True, compare=False, hash=False
111-
)
112106

113107
def __str__(self) -> str:
114108
cond = f" if ({self.condition})" if self.condition else ""
@@ -536,8 +530,6 @@ def compute_properties(op: parser.InstDef) -> Properties:
536530
)
537531
error_with_pop = has_error_with_pop(op)
538532
error_without_pop = has_error_without_pop(op)
539-
infallible = not error_with_pop and not error_without_pop
540-
passthrough = stack_effect_only_peeks(op) and infallible
541533
return Properties(
542534
escapes=makes_escaping_api_call(op),
543535
error_with_pop=error_with_pop,
@@ -557,7 +549,6 @@ def compute_properties(op: parser.InstDef) -> Properties:
557549
and not has_free,
558550
has_free=has_free,
559551
pure="pure" in op.annotations,
560-
passthrough=passthrough,
561552
tier=tier_variable(op),
562553
)
563554

Tools/cases_generator/generators_common.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@ def cflags(p: Properties) -> str:
234234
flags.append("HAS_ESCAPES_FLAG")
235235
if p.pure:
236236
flags.append("HAS_PURE_FLAG")
237-
if p.passthrough:
238-
flags.append("HAS_PASSTHROUGH_FLAG")
239237
if p.oparg_and_1:
240238
flags.append("HAS_OPARG_AND_1_FLAG")
241239
if flags:

0 commit comments

Comments
 (0)