summaryrefslogtreecommitdiffstats
path: root/Objects/codeobject.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2022-03-07 19:45:00 (GMT)
committerGitHub <noreply@github.com>2022-03-07 19:45:00 (GMT)
commitf193631387bfee99a812e39b05d5b7e6384b57f5 (patch)
tree31f161bd1e2f6469f32be8333705c82992486485 /Objects/codeobject.c
parent105b9ac00174d7bcc653f9e9dc5052215e197c77 (diff)
downloadcpython-f193631387bfee99a812e39b05d5b7e6384b57f5.zip
cpython-f193631387bfee99a812e39b05d5b7e6384b57f5.tar.gz
cpython-f193631387bfee99a812e39b05d5b7e6384b57f5.tar.bz2
bpo-46841: Use inline caching for calls (GH-31709)
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 5a87e6c..5279f6c 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -1571,10 +1571,7 @@ code_sizeof(PyCodeObject *co, PyObject *Py_UNUSED(args))
}
if (co->co_quickened != NULL) {
- Py_ssize_t count = co->co_quickened[0].entry.zero.cache_count;
- count += (PyBytes_GET_SIZE(co->co_code)+sizeof(SpecializedCacheEntry)-1)/
- sizeof(SpecializedCacheEntry);
- res += count * sizeof(SpecializedCacheEntry);
+ res += PyBytes_GET_SIZE(co->co_code);
}
return PyLong_FromSsize_t(res);