mirror of
https://github.com/python/cpython
synced 2024-09-05 00:05:39 +00:00
GH-108614: Unbreak emscripten build (GH-109132)
This commit is contained in:
parent
ccd48623d4
commit
501f2dc527
|
@ -18,6 +18,7 @@ _Py_CheckEmscriptenSignalsPeriodically(void);
|
||||||
#define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() _Py_CheckEmscriptenSignalsPeriodically()
|
#define _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY() _Py_CheckEmscriptenSignalsPeriodically()
|
||||||
|
|
||||||
extern int Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
extern int Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||||
|
extern int _Py_emscripten_signal_clock;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
@ -154,8 +154,8 @@ dummy_func(
|
||||||
|
|
||||||
inst(RESUME_CHECK, (--)) {
|
inst(RESUME_CHECK, (--)) {
|
||||||
#if defined(__EMSCRIPTEN__)
|
#if defined(__EMSCRIPTEN__)
|
||||||
DEOPT_IF(emscripten_signal_clock == 0, RESUME);
|
DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME);
|
||||||
emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||||
#endif
|
#endif
|
||||||
/* Possibly combine these two checks */
|
/* Possibly combine these two checks */
|
||||||
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version
|
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version
|
||||||
|
|
|
@ -39,16 +39,16 @@ _Py_CheckEmscriptenSignals(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PY_EMSCRIPTEN_SIGNAL_INTERVAL 50
|
#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
|
void
|
||||||
_Py_CheckEmscriptenSignalsPeriodically(void)
|
_Py_CheckEmscriptenSignalsPeriodically(void)
|
||||||
{
|
{
|
||||||
if (emscripten_signal_clock == 0) {
|
if (_Py_emscripten_signal_clock == 0) {
|
||||||
emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL;
|
_Py_emscripten_signal_clock = PY_EMSCRIPTEN_SIGNAL_INTERVAL;
|
||||||
_Py_CheckEmscriptenSignals();
|
_Py_CheckEmscriptenSignals();
|
||||||
}
|
}
|
||||||
else if (Py_EMSCRIPTEN_SIGNAL_HANDLING) {
|
else if (Py_EMSCRIPTEN_SIGNAL_HANDLING) {
|
||||||
emscripten_signal_clock--;
|
_Py_emscripten_signal_clock--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
Python/executor_cases.c.h
generated
4
Python/executor_cases.c.h
generated
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
case RESUME_CHECK: {
|
case RESUME_CHECK: {
|
||||||
#if defined(__EMSCRIPTEN__)
|
#if defined(__EMSCRIPTEN__)
|
||||||
DEOPT_IF(emscripten_signal_clock == 0, RESUME);
|
DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME);
|
||||||
emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||||
#endif
|
#endif
|
||||||
/* Possibly combine these two checks */
|
/* Possibly combine these two checks */
|
||||||
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version
|
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version
|
||||||
|
|
4
Python/generated_cases.c.h
generated
4
Python/generated_cases.c.h
generated
|
@ -28,8 +28,8 @@
|
||||||
|
|
||||||
TARGET(RESUME_CHECK) {
|
TARGET(RESUME_CHECK) {
|
||||||
#if defined(__EMSCRIPTEN__)
|
#if defined(__EMSCRIPTEN__)
|
||||||
DEOPT_IF(emscripten_signal_clock == 0, RESUME);
|
DEOPT_IF(_Py_emscripten_signal_clock == 0, RESUME);
|
||||||
emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
_Py_emscripten_signal_clock -= Py_EMSCRIPTEN_SIGNAL_HANDLING;
|
||||||
#endif
|
#endif
|
||||||
/* Possibly combine these two checks */
|
/* Possibly combine these two checks */
|
||||||
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version
|
DEOPT_IF(_PyFrame_GetCode(frame)->_co_instrumentation_version
|
||||||
|
|
Loading…
Reference in a new issue