Skip to content

Commit e6c76b9

Browse files
WolframAlphEclips4
andauthored
GH-128872: Remove unused argument from _PyCode_Quicken (GH-128873)
Co-authored-by: Kirill Podoprigora <[email protected]>
1 parent ecd2f84 commit e6c76b9

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Objects/codeobject.c

+4-6
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,7 @@ _PyCode_Validate(struct _PyCodeConstructor *con)
459459
}
460460

461461
extern void
462-
_PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, PyObject *consts,
463-
int enable_counters);
462+
_PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, int enable_counters);
464463

465464
#ifdef Py_GIL_DISABLED
466465
static _PyCodeArray * _PyCodeArray_New(Py_ssize_t size);
@@ -543,10 +542,9 @@ init_code(PyCodeObject *co, struct _PyCodeConstructor *con)
543542
}
544543
co->_co_firsttraceable = entry_point;
545544
#ifdef Py_GIL_DISABLED
546-
_PyCode_Quicken(_PyCode_CODE(co), Py_SIZE(co), co->co_consts,
547-
interp->config.tlbc_enabled);
545+
_PyCode_Quicken(_PyCode_CODE(co), Py_SIZE(co), interp->config.tlbc_enabled);
548546
#else
549-
_PyCode_Quicken(_PyCode_CODE(co), Py_SIZE(co), co->co_consts, 1);
547+
_PyCode_Quicken(_PyCode_CODE(co), Py_SIZE(co), 1);
550548
#endif
551549
notify_code_watchers(PY_CODE_EVENT_CREATE, co);
552550
return 0;
@@ -2819,7 +2817,7 @@ copy_code(_Py_CODEUNIT *dst, PyCodeObject *co)
28192817
for (int i = 0; i < code_len; i += _PyInstruction_GetLength(co, i)) {
28202818
dst[i] = _Py_GetBaseCodeUnit(co, i);
28212819
}
2822-
_PyCode_Quicken(dst, code_len, co->co_consts, 1);
2820+
_PyCode_Quicken(dst, code_len, 1);
28232821
}
28242822

28252823
static Py_ssize_t

Python/specialize.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,7 @@ do { \
441441

442442
// Initialize warmup counters and optimize instructions. This cannot fail.
443443
void
444-
_PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, PyObject *consts,
445-
int enable_counters)
444+
_PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, int enable_counters)
446445
{
447446
#if ENABLE_SPECIALIZATION_FT
448447
_Py_BackoffCounter jump_counter, adaptive_counter;

0 commit comments

Comments
 (0)