GH-115816: Assorted naming and formatting changes to improve maintainability. (GH-115987)

* Rename _Py_UOpsAbstractInterpContext to _Py_UOpsContext and _Py_UOpsSymType to _Py_UopsSymbol.

* #define shortened form of _Py_uop_... names for improved readability.
This commit is contained in:
Mark Shannon 2024-02-27 13:25:02 +00:00 committed by GitHub
parent 10fbcd6c5d
commit 6ecfcfe894
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 495 additions and 473 deletions

View file

@ -41,10 +41,10 @@ def validate_uop(override: Uop, uop: Uop) -> None:
def type_name(var: StackItem) -> str:
if var.is_array():
return f"_Py_UOpsSymType **"
return f"_Py_UopsSymbol **"
if var.type:
return var.type
return f"_Py_UOpsSymType *"
return f"_Py_UopsSymbol *"
def declare_variables(uop: Uop, out: CWriter, skip_inputs: bool) -> None:
@ -148,7 +148,7 @@ def write_uop(
if not var.peek or is_override:
out.emit(stack.push(var))
out.start_line()
stack.flush(out, cast_type="_Py_UOpsSymType *")
stack.flush(out, cast_type="_Py_UopsSymbol *")
except SizeMismatch as ex:
raise analysis_error(ex.args[0], uop.body[0])