mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-104615: don't make unsafe swaps in apply_static_swaps (#104620)
This commit is contained in:
parent
dcdc90d384
commit
0589c6a4d3
14 changed files with 95 additions and 20 deletions
|
@ -7996,7 +7996,7 @@ finally:
|
|||
}
|
||||
|
||||
PyObject *
|
||||
_PyCompile_OptimizeCfg(PyObject *instructions, PyObject *consts)
|
||||
_PyCompile_OptimizeCfg(PyObject *instructions, PyObject *consts, int nlocals)
|
||||
{
|
||||
PyObject *res = NULL;
|
||||
PyObject *const_cache = PyDict_New();
|
||||
|
@ -8008,7 +8008,7 @@ _PyCompile_OptimizeCfg(PyObject *instructions, PyObject *consts)
|
|||
if (instructions_to_cfg(instructions, &g) < 0) {
|
||||
goto error;
|
||||
}
|
||||
int code_flags = 0, nlocals = 0, nparams = 0, firstlineno = 1;
|
||||
int code_flags = 0, nparams = 0, firstlineno = 1;
|
||||
if (_PyCfg_OptimizeCodeUnit(&g, consts, const_cache, code_flags, nlocals,
|
||||
nparams, firstlineno) < 0) {
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue