Skip to content

Commit 6657d0d

Browse files
authored
Merge pull request python#8 from paulmon/win-arm32-optimizer
workaround optimizer problem
2 parents d1c8af4 + 3bc2c04 commit 6657d0d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Python/ceval.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
547547
return tstate->interp->eval_frame(f, throwflag);
548548
}
549549

550-
#ifdef _M_ARM
551-
#pragma optimize ("", off)
552-
#endif // _M_ARM
553-
554550
PyObject* _Py_HOT_FUNCTION
555551
_PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
556552
{
@@ -1629,6 +1625,14 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
16291625
exc = POP(); /* exc */
16301626
/* fall through */
16311627
case 0:
1628+
#ifdef _M_ARM
1629+
// work around optimizer problem on windows arm32
1630+
if (oparg == 2)
1631+
{
1632+
exc = stack_pointer[0];
1633+
cause = stack_pointer[1];
1634+
}
1635+
#endif
16321636
if (do_raise(exc, cause)) {
16331637
why = WHY_EXCEPTION;
16341638
goto fast_block_end;
@@ -3504,10 +3508,6 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
35043508
return _Py_CheckFunctionResult(NULL, retval, "PyEval_EvalFrameEx");
35053509
}
35063510

3507-
#ifdef _M_ARM
3508-
#pragma optimize ("", on)
3509-
#endif // _M_ARM
3510-
35113511
static void
35123512
format_missing(const char *kind, PyCodeObject *co, PyObject *names)
35133513
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy