Skip to content

Commit

Permalink
Cases generator: Remove type_prop and passthrough (#117614)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fidget-Spinner committed Apr 7, 2024
1 parent 733e56e commit 375425a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 33 deletions.
44 changes: 22 additions & 22 deletions Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 0 additions & 9 deletions Tools/cases_generator/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class Properties:
has_free: bool
side_exit: bool
pure: bool
passthrough: bool
tier: int | None = None
oparg_and_1: bool = False
const_oparg: int = -1
Expand Down Expand Up @@ -54,7 +53,6 @@ def from_list(properties: list["Properties"]) -> "Properties":
has_free=any(p.has_free for p in properties),
side_exit=any(p.side_exit for p in properties),
pure=all(p.pure for p in properties),
passthrough=all(p.passthrough for p in properties),
)

@property
Expand All @@ -81,7 +79,6 @@ def infallible(self) -> bool:
has_free=False,
side_exit=False,
pure=False,
passthrough=False,
)


Expand All @@ -106,9 +103,6 @@ class StackItem:
condition: str | None
size: str
peek: bool = False
type_prop: None | tuple[str, None | str] = field(
default_factory=lambda: None, init=True, compare=False, hash=False
)

def __str__(self) -> str:
cond = f" if ({self.condition})" if self.condition else ""
Expand Down Expand Up @@ -536,8 +530,6 @@ def compute_properties(op: parser.InstDef) -> Properties:
)
error_with_pop = has_error_with_pop(op)
error_without_pop = has_error_without_pop(op)
infallible = not error_with_pop and not error_without_pop
passthrough = stack_effect_only_peeks(op) and infallible
return Properties(
escapes=makes_escaping_api_call(op),
error_with_pop=error_with_pop,
Expand All @@ -557,7 +549,6 @@ def compute_properties(op: parser.InstDef) -> Properties:
and not has_free,
has_free=has_free,
pure="pure" in op.annotations,
passthrough=passthrough,
tier=tier_variable(op),
)

Expand Down
2 changes: 0 additions & 2 deletions Tools/cases_generator/generators_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,6 @@ def cflags(p: Properties) -> str:
flags.append("HAS_ESCAPES_FLAG")
if p.pure:
flags.append("HAS_PURE_FLAG")
if p.passthrough:
flags.append("HAS_PASSTHROUGH_FLAG")
if p.oparg_and_1:
flags.append("HAS_OPARG_AND_1_FLAG")
if flags:
Expand Down

0 comments on commit 375425a

Please sign in to comment.