mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +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
|
@ -246,7 +246,7 @@ class Emitter:
|
|||
if var.name == "null":
|
||||
continue
|
||||
close = "PyStackRef_CLOSE"
|
||||
if "null" in var.name or var.condition and var.condition != "1":
|
||||
if "null" in var.name:
|
||||
close = "PyStackRef_XCLOSE"
|
||||
if var.size:
|
||||
if var.size == "1":
|
||||
|
@ -255,9 +255,6 @@ class Emitter:
|
|||
self.out.emit(f"for (int _i = {var.size}; --_i >= 0;) {{\n")
|
||||
self.out.emit(f"{close}({var.name}[_i]);\n")
|
||||
self.out.emit("}\n")
|
||||
elif var.condition:
|
||||
if var.condition != "0":
|
||||
self.out.emit(f"{close}({var.name});\n")
|
||||
else:
|
||||
self.out.emit(f"{close}({var.name});\n")
|
||||
for input in storage.inputs:
|
||||
|
@ -668,8 +665,6 @@ def cflags(p: Properties) -> str:
|
|||
flags.append("HAS_PURE_FLAG")
|
||||
if p.no_save_ip:
|
||||
flags.append("HAS_NO_SAVE_IP_FLAG")
|
||||
if p.oparg_and_1:
|
||||
flags.append("HAS_OPARG_AND_1_FLAG")
|
||||
if flags:
|
||||
return " | ".join(flags)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue