mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
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:
parent
10fbcd6c5d
commit
6ecfcfe894
8 changed files with 495 additions and 473 deletions
|
@ -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])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue