Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cases generator: Remove type_prop and passthrough #117614

Merged
merged 1 commit into from Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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
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