Skip to content

Commit

Permalink
Move CHECK_EVAL_BREAKER in ENTER_EXECUTOR
Browse files Browse the repository at this point in the history
  • Loading branch information
DinoV committed Mar 29, 2024
1 parent 83315d6 commit 773e016
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ dummy_func(
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
#endif
uintptr_t eval_breaker = _Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker);
uintptr_t version = _PyFrame_GetCode(frame)->_co_instrumentation_version;
uintptr_t version = FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version);
assert((version & _PY_EVAL_EVENTS_MASK) == 0);
DEOPT_IF(eval_breaker != version);
}
Expand Down Expand Up @@ -2391,7 +2391,6 @@ dummy_func(
};

tier1 inst(ENTER_EXECUTOR, (--)) {
CHECK_EVAL_BREAKER();
PyCodeObject *code = _PyFrame_GetCode(frame);
_PyExecutorObject *executor = code->co_executors->executors[oparg & 255];
assert(executor->vm_data.index == INSTR_OFFSET() - 1);
Expand All @@ -2400,6 +2399,7 @@ dummy_func(
assert(tstate->previous_executor == NULL);
tstate->previous_executor = Py_None;
Py_INCREF(executor);
CHECK_EVAL_BREAKER();
GOTO_TIER_TWO(executor);
}

Expand Down
2 changes: 1 addition & 1 deletion Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 773e016

Please sign in to comment.