Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
PyFrame_FastToLocalsWithError and PyFrame_LocalsToFast are no lon…
…ger called during profile and tracing.

 (Contributed by Fabio Zadrozny)
  • Loading branch information
markshannon committed Mar 22, 2022
commit 62be414a95d0f7981d1ec66aa9be25a1762f53e5
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
`PyFrame_FastToLocalsWithError` and `PyFrame_LocalsToFast` are no longer
called during profile nor tracing. C code that accesses the `f_locals` directly
(which is not recommended) must now call
`PyFrame_FastToLocalsWithError` to update locals and `PyFrame_LocalsToFast`
after `PyFrameObject.f_locals` are updated.
7 changes: 0 additions & 7 deletions Python/sysmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,6 @@ static PyObject *
call_trampoline(PyThreadState *tstate, PyObject* callback,
PyFrameObject *frame, int what, PyObject *arg)
{
if (PyFrame_FastToLocalsWithError(frame) < 0) {
return NULL;
}

PyObject *stack[3];
stack[0] = (PyObject *)frame;
Expand All @@ -936,10 +933,6 @@ call_trampoline(PyThreadState *tstate, PyObject* callback,
/* call the Python-level function */
PyObject *result = _PyObject_FastCallTstate(tstate, callback, stack, 3);

PyFrame_LocalsToFast(frame, 1);
if (result == NULL) {
PyTraceBack_Here(frame);
}

return result;
}
Expand Down