diff options
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 7932433..b9444b2 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4854,6 +4854,41 @@ check_eval_breaker: goto start_frame; } + TARGET(CALL_NO_KW_TYPE_1) { + assert(STACK_ADJUST_IS_RESET); + assert(GET_CACHE()->adaptive.original_oparg == 1); + PyObject *obj = TOP(); + PyObject *callable = SECOND(); + DEOPT_IF(callable != (PyObject *)&PyType_Type, CALL_NO_KW); + PyObject *res = Py_NewRef(Py_TYPE(obj)); + STACK_SHRINK(1); + Py_DECREF(callable); + Py_DECREF(obj); + SET_TOP(res); + DISPATCH(); + } + + TARGET(CALL_NO_KW_BUILTIN_CLASS_1) { + assert(STACK_ADJUST_IS_RESET); + SpecializedCacheEntry *caches = GET_CACHE(); + _PyAdaptiveEntry *cache0 = &caches[0].adaptive; + assert(cache0->original_oparg == 1); + PyObject *callable = SECOND(); + PyObject *arg = TOP(); + DEOPT_IF(!PyType_Check(callable), CALL_NO_KW); + PyTypeObject *tp = (PyTypeObject *)callable; + DEOPT_IF(tp->tp_version_tag != cache0->version, CALL_NO_KW); + STACK_SHRINK(1); + PyObject *res = tp->tp_vectorcall((PyObject *)tp, stack_pointer, 1, NULL); + SET_TOP(res); + Py_DECREF(tp); + Py_DECREF(arg); + if (res == NULL) { + goto error; + } + DISPATCH(); + } + TARGET(CALL_NO_KW_BUILTIN_O) { assert(cframe.use_tracing == 0); assert(STACK_ADJUST_IS_RESET); |