Skip to content

Commit

Permalink
Merge pull request python#8 from paulmon/win-arm32-optimizer
Browse files Browse the repository at this point in the history
workaround optimizer problem
  • Loading branch information
paulmon authored Sep 29, 2018
2 parents d1c8af4 + 3bc2c04 commit 6657d0d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
return tstate->interp->eval_frame(f, throwflag);
}

#ifdef _M_ARM
#pragma optimize ("", off)
#endif // _M_ARM

PyObject* _Py_HOT_FUNCTION
_PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
{
Expand Down Expand Up @@ -1629,6 +1625,14 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
exc = POP(); /* exc */
/* fall through */
case 0:
#ifdef _M_ARM
// work around optimizer problem on windows arm32
if (oparg == 2)
{
exc = stack_pointer[0];
cause = stack_pointer[1];
}
#endif
if (do_raise(exc, cause)) {
why = WHY_EXCEPTION;
goto fast_block_end;
Expand Down Expand Up @@ -3504,10 +3508,6 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
return _Py_CheckFunctionResult(NULL, retval, "PyEval_EvalFrameEx");
}

#ifdef _M_ARM
#pragma optimize ("", on)
#endif // _M_ARM

static void
format_missing(const char *kind, PyCodeObject *co, PyObject *names)
{
Expand Down

0 comments on commit 6657d0d

Please sign in to comment.