summaryrefslogtreecommitdiff
path: root/Python/specialize.c
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-03-28 01:23:25 +0530
committerGitHub <noreply@github.com>2022-03-28 03:53:25 +0800
commit58448cbd96f77ebc6fca1f8030bedc7744eb66ef (patch)
treed00882c7385f994ebe49d0a0d240dcd8de1927f3 /Python/specialize.c
parent785cc6770588de087d09e89a69110af2542be208 (diff)
downloadcpython-git-58448cbd96f77ebc6fca1f8030bedc7744eb66ef.tar.gz
bpo-47127: Specialize calls for fastcall c methods with keywords (GH-32125)
* add PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS
Diffstat (limited to 'Python/specialize.c')
-rw-r--r--Python/specialize.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/specialize.c b/Python/specialize.c
index 720bc7f241..5839d76294 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -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;