Skip to content

Commit df13a18

Browse files
authored
GH-118095: Add tier two support for BINARY_SUBSCR_GETITEM (GH-120793)
1 parent fda6bd8 commit df13a18

10 files changed

+317
-207
lines changed

Include/internal/pycore_opcode_metadata.h

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_optimizer.h

+10
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,16 @@ PyAPI_FUNC(PyObject *) _Py_uop_symbols_test(PyObject *self, PyObject *ignored);
259259

260260
PyAPI_FUNC(int) _PyOptimizer_Optimize(struct _PyInterpreterFrame *frame, _Py_CODEUNIT *start, _PyStackRef *stack_pointer, _PyExecutorObject **exec_ptr);
261261

262+
static inline int is_terminator(const _PyUOpInstruction *uop)
263+
{
264+
int opcode = uop->opcode;
265+
return (
266+
opcode == _EXIT_TRACE ||
267+
opcode == _JUMP_TO_TOP ||
268+
opcode == _DYNAMIC_EXIT
269+
);
270+
}
271+
262272
#ifdef __cplusplus
263273
}
264274
#endif

0 commit comments

Comments
 (0)