mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
GH-113710: Add a tier 2 peephole optimization pass. (GH-114487)
* Convert _LOAD_CONST to inline versions * Remove PEP 523 checks
This commit is contained in:
parent
1e4f00ebd8
commit
384429d1c0
7 changed files with 66 additions and 6 deletions
|
|
@ -2608,11 +2608,15 @@ _PyInterpreterState_SetEvalFrameFunc(PyInterpreterState *interp,
|
|||
_PyFrameEvalFunction eval_frame)
|
||||
{
|
||||
if (eval_frame == _PyEval_EvalFrameDefault) {
|
||||
interp->eval_frame = NULL;
|
||||
eval_frame = NULL;
|
||||
}
|
||||
else {
|
||||
interp->eval_frame = eval_frame;
|
||||
if (eval_frame == interp->eval_frame) {
|
||||
return;
|
||||
}
|
||||
if (eval_frame != NULL) {
|
||||
_Py_Executors_InvalidateAll(interp);
|
||||
}
|
||||
interp->eval_frame = eval_frame;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue