| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3765,13 +3765,15 @@ dummy_func( | |||
| 3765 | 3765 | DEOPT_IF(!PyType_Check(callable_o)); | |
| 3766 | 3766 | PyTypeObject *tp = (PyTypeObject *)callable_o; | |
| 3767 | 3767 | DEOPT_IF(FT_ATOMIC_LOAD_UINT32_RELAXED(tp->tp_version_tag) != type_version); | |
| 3768 | - assert(tp->tp_flags & Py_TPFLAGS_INLINE_VALUES); | ||
| 3768 | + assert(tp->tp_new == PyBaseObject_Type.tp_new); | ||
| 3769 | + assert(tp->tp_flags & Py_TPFLAGS_HEAPTYPE); | ||
| 3770 | + assert(tp->tp_alloc == PyType_GenericAlloc); | ||
| 3769 | 3771 | PyHeapTypeObject *cls = (PyHeapTypeObject *)callable_o; | |
| 3770 | 3772 | PyFunctionObject *init_func = (PyFunctionObject *)FT_ATOMIC_LOAD_PTR_ACQUIRE(cls->_spec_cache.init); | |
| 3771 | 3773 | PyCodeObject *code = (PyCodeObject *)init_func->func_code; | |
| 3772 | 3774 | DEOPT_IF(!_PyThreadState_HasStackSpace(tstate, code->co_framesize + _Py_InitCleanup.co_framesize)); | |
| 3773 | 3775 | STAT_INC(CALL, hit); | |
| 3774 | - PyObject *self_o = _PyType_NewManagedObject(tp); | ||
| 3776 | + PyObject *self_o = PyType_GenericAlloc(tp, 0); | ||
| 3775 | 3777 | if (self_o == NULL) { | |
| 3776 | 3778 | ERROR_NO_POP(); | |
| 3777 | 3779 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2002,10 +2002,6 @@ get_init_for_simple_managed_python_class(PyTypeObject *tp, unsigned int *tp_vers | |||
| 2002 | 2002 | return NULL; | |
| 2003 | 2003 | } | |
| 2004 | 2004 | unsigned long tp_flags = PyType_GetFlags(tp); | |
| 2005 | - if ((tp_flags & Py_TPFLAGS_INLINE_VALUES) == 0) { | ||
| 2006 | - SPECIALIZATION_FAIL(CALL, SPEC_FAIL_CALL_INIT_NOT_INLINE_VALUES); | ||
| 2007 | - return NULL; | ||
| 2008 | - } | ||
| 2009 | 2005 | if (!(tp_flags & Py_TPFLAGS_HEAPTYPE)) { | |
| 2010 | 2006 | /* Is this possible? */ | |
| 2011 | 2007 | SPECIALIZATION_FAIL(CALL, SPEC_FAIL_EXPECTED_ERROR); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments