bpo-47127: Specialize calls for fastcall c methods with keywords (GH-32125)

* add PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS
This commit is contained in:
Kumar Aditya 2022-03-28 01:23:25 +05:30 committed by GitHub
parent 785cc67705
commit 58448cbd96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 77 additions and 37 deletions

View file

@ -1446,6 +1446,10 @@ specialize_method_descriptor(PyMethodDescrObject *descr, _Py_CODEUNIT *instr,
_Py_SET_OPCODE(*instr, PRECALL_NO_KW_METHOD_DESCRIPTOR_FAST);
return 0;
}
case METH_FASTCALL|METH_KEYWORDS: {
_Py_SET_OPCODE(*instr, PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS);
return 0;
}
}
SPECIALIZATION_FAIL(PRECALL, builtin_call_fail_kind(descr->d_method->ml_flags));
return -1;