Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Feb 27, 2024

Follows suggestions by @gvanrossum on #115953.

  • Renames two structs _Py_UOpsSymType to _Py_UopsSymbol and _Py_UOpsAbstractInterpContext to _Py_UOpsContext
  • Adds macros defining sym... as _Py_uop_sym_... so we can use the short form in optimizer_bytecodes.c, improving readability.
  • A few minor formating fixes
  • Rename bottom to contradiction.

@markshannon markshannon merged commit 6ecfcfe into python:main Feb 27, 2024
59 checks passed
@markshannon markshannon deleted the symbols-cleanup branch February 27, 2024 15:14
@@ -28,7 +28,7 @@ extern PyTypeObject _PyUOpOptimizer_Type;

/* Symbols */

struct _Py_UOpsSymType {
struct _Py_UopsSymbol {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, the new name uses the incorrect capitalization, Uops, instead of UOps.

gvanrossum added a commit that referenced this pull request Feb 29, 2024
…fix (#116077)

This was left behind by GH-115987. Basically a lot of diffs like this:
```
-            res = _Py_uop_sym_new_unknown(ctx);
+            res = sym_new_unknown(ctx);
```
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
…intainability. (pythonGH-115987)

* Rename _Py_UOpsAbstractInterpContext to _Py_UOpsContext and _Py_UOpsSymType to _Py_UopsSymbol.

* #define shortened form of _Py_uop_... names for improved readability.
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
…op prefix (python#116077)

This was left behind by pythonGH-115987. Basically a lot of diffs like this:
```
-            res = _Py_uop_sym_new_unknown(ctx);
+            res = sym_new_unknown(ctx);
```
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
…intainability. (pythonGH-115987)

* Rename _Py_UOpsAbstractInterpContext to _Py_UOpsContext and _Py_UOpsSymType to _Py_UopsSymbol.

* #define shortened form of _Py_uop_... names for improved readability.
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
…op prefix (python#116077)

This was left behind by pythonGH-115987. Basically a lot of diffs like this:
```
-            res = _Py_uop_sym_new_unknown(ctx);
+            res = sym_new_unknown(ctx);
```
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…intainability. (pythonGH-115987)

* Rename _Py_UOpsAbstractInterpContext to _Py_UOpsContext and _Py_UOpsSymType to _Py_UopsSymbol.

* #define shortened form of _Py_uop_... names for improved readability.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…op prefix (python#116077)

This was left behind by pythonGH-115987. Basically a lot of diffs like this:
```
-            res = _Py_uop_sym_new_unknown(ctx);
+            res = sym_new_unknown(ctx);
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants