diff options
author | Guido van Rossum <guido@python.org> | 2024-03-22 01:27:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 01:27:48 (GMT) |
commit | 97ba910e47ad298114800587979ce7beb0a705a3 (patch) | |
tree | 014b435629574bc919bde0519a635e465445f8b3 /Objects/codeobject.c | |
parent | b3d25df8d38b79310587da54dbd88b06a16d4904 (diff) | |
download | cpython-97ba910e47ad298114800587979ce7beb0a705a3.zip cpython-97ba910e47ad298114800587979ce7beb0a705a3.tar.gz cpython-97ba910e47ad298114800587979ce7beb0a705a3.tar.bz2 |
gh-108716:: Remove _PyStaticCode_Init/Fini (#117141)
More deepfreeze cleanup.
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r-- | Objects/codeobject.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c index bdde12d..f14ff73 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -2349,49 +2349,3 @@ _PyCode_ConstantKey(PyObject *op) } return key; } - -void -_PyStaticCode_Fini(PyCodeObject *co) -{ - if (co->co_executors != NULL) { - clear_executors(co); - } - deopt_code(co, _PyCode_CODE(co)); - PyMem_Free(co->co_extra); - if (co->_co_cached != NULL) { - Py_CLEAR(co->_co_cached->_co_code); - Py_CLEAR(co->_co_cached->_co_cellvars); - Py_CLEAR(co->_co_cached->_co_freevars); - Py_CLEAR(co->_co_cached->_co_varnames); - PyMem_Free(co->_co_cached); - co->_co_cached = NULL; - } - co->co_extra = NULL; - if (co->co_weakreflist != NULL) { - PyObject_ClearWeakRefs((PyObject *)co); - co->co_weakreflist = NULL; - } - free_monitoring_data(co->_co_monitoring); - co->_co_monitoring = NULL; -} - -int -_PyStaticCode_Init(PyCodeObject *co) -{ - int res = intern_strings(co->co_names); - if (res < 0) { - return -1; - } - res = intern_string_constants(co->co_consts, NULL); - if (res < 0) { - return -1; - } - res = intern_strings(co->co_localsplusnames); - if (res < 0) { - return -1; - } - _PyCode_Quicken(co); - return 0; -} - -#define MAX_CODE_UNITS_PER_LOC_ENTRY 8 |