diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-12-09 16:12:17 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-12-09 16:12:17 (GMT) |
commit | 0ca246c5e7bc9a8c1886519f313a41334a60e011 (patch) | |
tree | c6e48bf118b362626590193e13c69499571d34b8 /Python | |
parent | 14e6d0954736a4d7231d1004847a7467c8464c36 (diff) | |
download | cpython-0ca246c5e7bc9a8c1886519f313a41334a60e011.zip cpython-0ca246c5e7bc9a8c1886519f313a41334a60e011.tar.gz cpython-0ca246c5e7bc9a8c1886519f313a41334a60e011.tar.bz2 |
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.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index c6c6e05..c4507fb 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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); |