mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
GH-122390: Replace _Py_GetbaseOpcode
with _Py_GetBaseCodeUnit
(GH-122942)
This commit is contained in:
parent
fe23f8ed97
commit
7a65439b93
16 changed files with 299 additions and 326 deletions
|
@ -428,9 +428,9 @@ _PyCode_Quicken(PyCodeObject *code)
|
|||
#if ENABLE_SPECIALIZATION
|
||||
int opcode = 0;
|
||||
_Py_CODEUNIT *instructions = _PyCode_CODE(code);
|
||||
for (int i = 0; i < Py_SIZE(code); i++) {
|
||||
opcode = _Py_GetBaseOpcode(code, i);
|
||||
assert(opcode < MIN_INSTRUMENTED_OPCODE);
|
||||
/* The last code unit cannot have a cache, so we don't need to check it */
|
||||
for (int i = 0; i < Py_SIZE(code)-1; i++) {
|
||||
opcode = instructions[i].op.code;
|
||||
int caches = _PyOpcode_Caches[opcode];
|
||||
if (caches) {
|
||||
// The initial value depends on the opcode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue