mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Revert "GH-128914: Remove conditional stack effects from bytecodes.c
and the code generators (GH-128918)" (GH-129202)
The commit introduced a ~2.5-3% regression in the free threading build.
This reverts commit ab61d3f430
.
This commit is contained in:
parent
d7d066c3ab
commit
a10f99375e
44 changed files with 1679 additions and 1460 deletions
|
@ -48,13 +48,19 @@ def declare_variables(uop: Uop, out: CWriter, skip_inputs: bool) -> None:
|
|||
for var in reversed(uop.stack.inputs):
|
||||
if var.used and var.name not in variables:
|
||||
variables.add(var.name)
|
||||
out.emit(f"{type_name(var)}{var.name};\n")
|
||||
if var.condition:
|
||||
out.emit(f"{type_name(var)}{var.name} = NULL;\n")
|
||||
else:
|
||||
out.emit(f"{type_name(var)}{var.name};\n")
|
||||
for var in uop.stack.outputs:
|
||||
if var.peek:
|
||||
continue
|
||||
if var.name not in variables:
|
||||
variables.add(var.name)
|
||||
out.emit(f"{type_name(var)}{var.name};\n")
|
||||
if var.condition:
|
||||
out.emit(f"{type_name(var)}{var.name} = NULL;\n")
|
||||
else:
|
||||
out.emit(f"{type_name(var)}{var.name};\n")
|
||||
|
||||
|
||||
def decref_inputs(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue