mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
GH-115816: Make tier2 optimizer symbols testable, and add a few tests. (GH-115953)
This commit is contained in:
parent
af5f9d682c
commit
10fbcd6c5d
15 changed files with 720 additions and 607 deletions
|
@ -87,14 +87,14 @@ def emit_default(out: CWriter, uop: Uop) -> None:
|
|||
if var.name != "unused" and not var.peek:
|
||||
if var.is_array():
|
||||
out.emit(f"for (int _i = {var.size}; --_i >= 0;) {{\n")
|
||||
out.emit(f"{var.name}[_i] = sym_new_unknown(ctx);\n")
|
||||
out.emit(f"{var.name}[_i] = _Py_uop_sym_new_unknown(ctx);\n")
|
||||
out.emit(f"if ({var.name}[_i] == NULL) goto out_of_space;\n")
|
||||
out.emit("}\n")
|
||||
elif var.name == "null":
|
||||
out.emit(f"{var.name} = sym_new_null(ctx);\n")
|
||||
out.emit(f"{var.name} = _Py_uop_sym_new_null(ctx);\n")
|
||||
out.emit(f"if ({var.name} == NULL) goto out_of_space;\n")
|
||||
else:
|
||||
out.emit(f"{var.name} = sym_new_unknown(ctx);\n")
|
||||
out.emit(f"{var.name} = _Py_uop_sym_new_unknown(ctx);\n")
|
||||
out.emit(f"if ({var.name} == NULL) goto out_of_space;\n")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue