]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-128872: Remove unused argument from _PyCode_Quicken (GH-128873)
authorYan Yanchii <yyanchiy@gmail.com>
Sun, 2 Feb 2025 23:09:30 +0000 (00:09 +0100)
committerGitHub <noreply@github.com>
Sun, 2 Feb 2025 23:09:30 +0000 (15:09 -0800)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Objects/codeobject.c
Python/specialize.c

index 7eea61968bc4d9332f2375574a7b000fb9f9e41f..a7b46aa2dfbbc0a9f2601f2fca3d7b5918eb9d05 100644 (file)
@@ -459,8 +459,7 @@ _PyCode_Validate(struct _PyCodeConstructor *con)
 }
 
 extern void
-_PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, PyObject *consts,
-                int enable_counters);
+_PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, int enable_counters);
 
 #ifdef Py_GIL_DISABLED
 static _PyCodeArray * _PyCodeArray_New(Py_ssize_t size);
@@ -543,10 +542,9 @@ init_code(PyCodeObject *co, struct _PyCodeConstructor *con)
     }
     co->_co_firsttraceable = entry_point;
 #ifdef Py_GIL_DISABLED
-    _PyCode_Quicken(_PyCode_CODE(co), Py_SIZE(co), co->co_consts,
-                    interp->config.tlbc_enabled);
+    _PyCode_Quicken(_PyCode_CODE(co), Py_SIZE(co), interp->config.tlbc_enabled);
 #else
-    _PyCode_Quicken(_PyCode_CODE(co), Py_SIZE(co), co->co_consts, 1);
+    _PyCode_Quicken(_PyCode_CODE(co), Py_SIZE(co), 1);
 #endif
     notify_code_watchers(PY_CODE_EVENT_CREATE, co);
     return 0;
@@ -2819,7 +2817,7 @@ copy_code(_Py_CODEUNIT *dst, PyCodeObject *co)
     for (int i = 0; i < code_len; i += _PyInstruction_GetLength(co, i)) {
         dst[i] = _Py_GetBaseCodeUnit(co, i);
     }
-    _PyCode_Quicken(dst, code_len, co->co_consts, 1);
+    _PyCode_Quicken(dst, code_len, 1);
 }
 
 static Py_ssize_t
index abb130d73eeebd0efc66c0f52841df5d2c9b8dea..bc251777c27d00b910d1da1d4501402b1ec698a2 100644 (file)
@@ -441,8 +441,7 @@ do { \
 
 // Initialize warmup counters and optimize instructions. This cannot fail.
 void
-_PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, PyObject *consts,
-                int enable_counters)
+_PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, int enable_counters)
 {
     #if ENABLE_SPECIALIZATION_FT
     _Py_BackoffCounter jump_counter, adaptive_counter;