mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
GH-104584: Assorted fixes for the optimizer API. (GH-105683)
* Add test for long loops * Clear ENTER_EXECUTOR when deopting code objects.
This commit is contained in:
parent
4426279a43
commit
581619941e
6 changed files with 298 additions and 204 deletions
|
@ -2157,6 +2157,7 @@ dummy_func(
|
|||
frame = cframe.current_frame;
|
||||
goto error;
|
||||
}
|
||||
assert(frame == cframe.current_frame);
|
||||
here[1].cache &= ((1 << OPTIMIZER_BITS_IN_COUNTER) -1);
|
||||
goto resume_frame;
|
||||
}
|
||||
|
@ -2176,7 +2177,7 @@ dummy_func(
|
|||
|
||||
inst(ENTER_EXECUTOR, (--)) {
|
||||
PyCodeObject *code = _PyFrame_GetCode(frame);
|
||||
_PyExecutorObject *executor = (_PyExecutorObject *)code->co_executors->executors[oparg];
|
||||
_PyExecutorObject *executor = (_PyExecutorObject *)code->co_executors->executors[oparg&255];
|
||||
Py_INCREF(executor);
|
||||
frame = executor->execute(executor, frame, stack_pointer);
|
||||
if (frame == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue