mirror of
https://github.com/python/cpython.git
synced 2026-06-05 01:10:53 +00:00
gh-149481: skip FOR_ITER inline specialization for Python __next__ (#149491)
Co-authored-by: Savannah Ostrowski <savannah@python.org> Co-authored-by: Stan Ulbrych <stan@python.org>
This commit is contained in:
parent
b142878db1
commit
49918f5b0c
5 changed files with 15 additions and 3 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include "pycore_long.h"
|
||||
#include "pycore_opcode_utils.h"
|
||||
#include "pycore_optimizer.h"
|
||||
#include "pycore_typeobject.h"
|
||||
#include "pycore_uops.h"
|
||||
#include "pycore_uop_ids.h"
|
||||
#include "internal/pycore_moduleobject.h"
|
||||
|
|
@ -1459,7 +1460,8 @@ dummy_func(void) {
|
|||
type = sym_get_probable_type(iter);
|
||||
definite = false;
|
||||
}
|
||||
if (type != NULL && type != &PyGen_Type && type->tp_iternext != NULL) {
|
||||
if (type != NULL && type != &PyGen_Type && type->tp_iternext != NULL
|
||||
&& !_PyType_HasSlotTpIternext(type)) {
|
||||
PyType_Watch(TYPE_WATCHER_ID, (PyObject *)type);
|
||||
_Py_BloomFilter_Add(dependencies, type);
|
||||
if (!definite) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue