mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
[3.12] GH-109052: Use the base opcode when comparing code objects (GH-112329)
This commit is contained in:
parent
bfc6d91c78
commit
3210e3c6cc
3 changed files with 22 additions and 2 deletions
|
@ -1800,8 +1800,8 @@ code_richcompare(PyObject *self, PyObject *other, int op)
|
|||
for (int i = 0; i < Py_SIZE(co); i++) {
|
||||
_Py_CODEUNIT co_instr = _PyCode_CODE(co)[i];
|
||||
_Py_CODEUNIT cp_instr = _PyCode_CODE(cp)[i];
|
||||
co_instr.op.code = _PyOpcode_Deopt[co_instr.op.code];
|
||||
cp_instr.op.code = _PyOpcode_Deopt[cp_instr.op.code];
|
||||
co_instr.op.code = _Py_GetBaseOpcode(co, i);
|
||||
cp_instr.op.code = _Py_GetBaseOpcode(cp, i);
|
||||
eq = co_instr.cache == cp_instr.cache;
|
||||
if (!eq) {
|
||||
goto unequal;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue