Make the correct `call` specialization fail kind show up

penguin-wwy · GitHub

The SPEC_FAIL_KIND is not displayed correctly due to not being adequately maintained.
e.g

#ifdefPy_STATSstaticintbuiltin_call_fail_kind(intml_flags) { switch (ml_flags& (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { caseMETH_VARARGS: returnSPEC_FAIL_CALL_PYCFUNCTION; caseMETH_VARARGS | METH_KEYWORDS: returnSPEC_FAIL_CALL_PYCFUNCTION_WITH_KEYWORDS; caseMETH_FASTCALL | METH_KEYWORDS: returnSPEC_FAIL_CALL_PYCFUNCTION_FAST_WITH_KEYWORDS; According to the context, METH_FASTCALL | METH_KEYWORDS flag does not cause specialization failure.
However, the method descr fail kind will also be shown as SPEC_FAIL_CALL_PYCFUNCTION, because builtin_call_fail_kind function is called incorrectly in the specialize_method_descriptor function.

I'd like to submit a PR to fix them and make them display correctly.

Linked PRs

gh-99770: Make the correct call specialization fail kind show up #99771