GH-108614: Unbreak emscripten build (GH-109132)

This commit is contained in:
Mark Shannon 2023-09-08 17:54:45 +01:00 committed by GitHub
parent ccd48623d4
commit 501f2dc527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 10 deletions

View File

@ -18,6 +18,7 @@ _Py_CheckEmscriptenSignalsPeriodically(void);
#define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() _Py_CheckEmscriptenSignalsPeriodically()
extern int Py_EMSCRIPTEN_SIGNAL_HANDLING;
extern int _Py_emscripten_signal_clock;
#else

View File

@ -154,8 +154,8 @@ dummy_func(
inst(RESUME_CHECK, (--)) {
#if defined(__EMSCRIPTEN__)
DEOPT_IF(emscripten_signal_clock == 0, RESUME);
emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME);
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
#endif
/* Possibly combine these two checks */
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version

View File

@ -39,16 +39,16 @@ _Py_CheckEmscriptenSignals(void)
}
#define PY_EMSCRIPTEN_SIGNAL_INTERVAL 50
static int emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL;
int _Py_emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL;
void
_Py_CheckEmscriptenSignalsPeriodically(void)
{
if (emscripten_signal_clock == 0) {
emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL;
if (_Py_emscripten_signal_clock == 0) {
_Py_emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL;
_Py_CheckEmscriptenSignals();
}
else if (Py_EMSCRIPTEN_SIGNAL_HANDLING) {
emscripten_signal_clock--;
_Py_emscripten_signal_clock--;
}
}

View File

@ -9,8 +9,8 @@
case RESUME_CHECK: {
#if defined(__EMSCRIPTEN__)
DEOPT_IF(emscripten_signal_clock == 0, RESUME);
emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME);
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
#endif
/* Possibly combine these two checks */
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version

View File

@ -28,8 +28,8 @@
TARGET(RESUME_CHECK) {
#if defined(__EMSCRIPTEN__)
DEOPT_IF(emscripten_signal_clock == 0, RESUME);
emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME);
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
#endif
/* Possibly combine these two checks */
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version