gh-131798: split recursion check to _CHECK_RECURSION_LIMIT and combine checks (GH-148070)

This commit is contained in:
Kumar Aditya 2026-04-04 14:53:03 +05:30 committed by GitHub
parent 113038f940
commit e7bf8eac0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 1393 additions and 1271 deletions

View file

@ -1397,6 +1397,13 @@ dummy_func(void) {
}
}
op(_CHECK_RECURSION_LIMIT, ( -- )) {
if (ctx->frame->is_c_recursion_checked) {
ADD_OP(_NOP, 0, 0);
}
ctx->frame->is_c_recursion_checked = true;
}
op(_CALL_METHOD_DESCRIPTOR_NOARGS, (callable, self_or_null, args[oparg] -- res)) {
PyObject *callable_o = sym_get_const(ctx, callable);
if (callable_o && Py_IS_TYPE(callable_o, &PyMethodDescr_Type)