mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
GH-118095: Add tier two support for BINARY_SUBSCR_GETITEM (GH-120793)
This commit is contained in:
parent
fda6bd842a
commit
df13a1821a
10 changed files with 317 additions and 207 deletions
|
@ -52,14 +52,6 @@
|
|||
#define DPRINTF(level, ...)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static inline bool
|
||||
op_is_end(uint32_t opcode)
|
||||
{
|
||||
return opcode == _EXIT_TRACE || opcode == _JUMP_TO_TOP;
|
||||
}
|
||||
|
||||
static int
|
||||
get_mutations(PyObject* dict) {
|
||||
assert(PyDict_CheckExact(dict));
|
||||
|
@ -288,7 +280,7 @@ remove_globals(_PyInterpreterFrame *frame, _PyUOpInstruction *buffer,
|
|||
prechecked_function_version = (uint32_t)buffer[pc].operand;
|
||||
break;
|
||||
default:
|
||||
if (op_is_end(opcode)) {
|
||||
if (is_terminator(inst)) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
@ -552,6 +544,7 @@ remove_unneeded_uops(_PyUOpInstruction *buffer, int buffer_size)
|
|||
}
|
||||
case _JUMP_TO_TOP:
|
||||
case _EXIT_TRACE:
|
||||
case _DYNAMIC_EXIT:
|
||||
return pc + 1;
|
||||
default:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue