GH-111848: Convert remaining jumps to deopts into tier 2 code. (GH-112045)

This commit is contained in:
Mark Shannon 2023-11-14 15:30:33 +00:00 committed by GitHub
parent b11c443bb2
commit a519b87958
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 194 additions and 139 deletions

View file

@ -3435,22 +3435,6 @@
goto enter_tier_one;
}
TARGET(POP_JUMP_IF_FALSE) {
_Py_CODEUNIT *this_instr = frame->instr_ptr = next_instr;
next_instr += 2;
INSTRUCTION_STATS(POP_JUMP_IF_FALSE);
PyObject *cond;
cond = stack_pointer[-1];
assert(PyBool_Check(cond));
int flag = Py_IsFalse(cond);
#if ENABLE_SPECIALIZATION
this_instr[1].cache = (this_instr[1].cache << 1) | flag;
#endif
JUMPBY(oparg * flag);
STACK_SHRINK(1);
DISPATCH();
}
TARGET(POP_JUMP_IF_TRUE) {
_Py_CODEUNIT *this_instr = frame->instr_ptr = next_instr;
next_instr += 2;
@ -3467,6 +3451,22 @@
DISPATCH();
}
TARGET(POP_JUMP_IF_FALSE) {
_Py_CODEUNIT *this_instr = frame->instr_ptr = next_instr;
next_instr += 2;
INSTRUCTION_STATS(POP_JUMP_IF_FALSE);
PyObject *cond;
cond = stack_pointer[-1];
assert(PyBool_Check(cond));
int flag = Py_IsFalse(cond);
#if ENABLE_SPECIALIZATION
this_instr[1].cache = (this_instr[1].cache << 1) | flag;
#endif
JUMPBY(oparg * flag);
STACK_SHRINK(1);
DISPATCH();
}
TARGET(POP_JUMP_IF_NONE) {
_Py_CODEUNIT *this_instr = frame->instr_ptr = next_instr;
next_instr += 2;
@ -3485,7 +3485,7 @@
Py_DECREF(value);
}
}
// POP_JUMP_IF_TRUE
// _POP_JUMP_IF_TRUE
cond = b;
{
assert(PyBool_Check(cond));
@ -3517,7 +3517,7 @@
Py_DECREF(value);
}
}
// POP_JUMP_IF_FALSE
// _POP_JUMP_IF_FALSE
cond = b;
{
assert(PyBool_Check(cond));