diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2022-03-07 19:45:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-07 19:45:00 (GMT) |
commit | f193631387bfee99a812e39b05d5b7e6384b57f5 (patch) | |
tree | 31f161bd1e2f6469f32be8333705c82992486485 /Objects/codeobject.c | |
parent | 105b9ac00174d7bcc653f9e9dc5052215e197c77 (diff) | |
download | cpython-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.c | 5 |
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); |