mirror of
https://github.com/python/cpython.git
synced 2026-06-28 13:50:17 -04:00
[3.15] gh-149481: skip FOR_ITER inline specialization for Python __next__ (GH-149491) (#149523)
gh-149481: skip `FOR_ITER` inline specialization for Python `__next__` (GH-149491)
(cherry picked from commit 49918f5b0c)
Co-authored-by: Neko Asakura <neko.asakura@outlook.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Stan Ulbrych <stan@python.org>
This commit is contained in:
committed by
GitHub
parent
b311ea8691
commit
5cb915da44
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user