mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
GH-128914: Remove conditional stack effects from bytecodes.c
and the code generators (GH-128918)
This commit is contained in:
parent
0a6412f9cc
commit
ab61d3f430
44 changed files with 1460 additions and 1679 deletions
|
@ -39,14 +39,7 @@ def declare_variable(
|
|||
required.remove(var.name)
|
||||
type, null = type_and_null(var)
|
||||
space = " " if type[-1].isalnum() else ""
|
||||
if var.condition:
|
||||
out.emit(f"{type}{space}{var.name} = {null};\n")
|
||||
if uop.replicates:
|
||||
# Replicas may not use all their conditional variables
|
||||
# So avoid a compiler warning with a fake use
|
||||
out.emit(f"(void){var.name};\n")
|
||||
else:
|
||||
out.emit(f"{type}{space}{var.name};\n")
|
||||
out.emit(f"{type}{space}{var.name};\n")
|
||||
|
||||
|
||||
def declare_variables(uop: Uop, out: CWriter) -> None:
|
||||
|
@ -215,9 +208,6 @@ def generate_tier2(
|
|||
for name, uop in analysis.uops.items():
|
||||
if uop.properties.tier == 1:
|
||||
continue
|
||||
if uop.properties.oparg_and_1:
|
||||
out.emit(f"/* {uop.name} is split on (oparg & 1) */\n\n")
|
||||
continue
|
||||
if uop.is_super():
|
||||
continue
|
||||
why_not_viable = uop.why_not_viable()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue