mirror of
https://github.com/python/cpython.git
synced 2026-05-09 06:01:08 -04: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:
+2
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user