mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Inline PyEval_EvalFrameEx() in callers
The PEP 523 modified PyEval_EvalFrameEx(): it's now an indirection to interp->eval_frame(). Inline the call in performance critical code. Leave PyEval_EvalFrame() unchanged, this function is only kept for backward compatibility.
This commit is contained in:
parent
14e6d09547
commit
0ca246c5e7
2 changed files with 3 additions and 3 deletions
|
@ -4069,7 +4069,7 @@ _PyEval_EvalCodeWithName(PyObject *_co, PyObject *globals, PyObject *locals,
|
|||
return gen;
|
||||
}
|
||||
|
||||
retval = PyEval_EvalFrameEx(f,0);
|
||||
retval = tstate->interp->eval_frame(f, 0);
|
||||
|
||||
fail: /* Jump here from prelude on failure */
|
||||
|
||||
|
@ -4822,7 +4822,7 @@ _PyFunction_FastCall(PyCodeObject *co, PyObject **args, Py_ssize_t nargs,
|
|||
Py_INCREF(*args);
|
||||
fastlocals[i] = *args++;
|
||||
}
|
||||
result = PyEval_EvalFrameEx(f,0);
|
||||
result = tstate->interp->eval_frame(f,0);
|
||||
|
||||
++tstate->recursion_depth;
|
||||
Py_DECREF(f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue