mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Fix Pyston speedups (#281)
We remove (i.e. hide behind a debug ifdef) the recursion checking methods, and the memory hooks and memory allocator methods. ASAN mode has no PYMALLOC, so we need a macro. Fix build break with des.c stack allocation.
This commit is contained in:
parent
2fe8571010
commit
57f0eed382
42 changed files with 260 additions and 63 deletions
5
third_party/python/Include/ceval.h
vendored
5
third_party/python/Include/ceval.h
vendored
|
@ -77,6 +77,7 @@ int Py_MakePendingCalls(void);
|
|||
void Py_SetRecursionLimit(int);
|
||||
int Py_GetRecursionLimit(void);
|
||||
|
||||
#if IsModeDbg()
|
||||
#define Py_EnterRecursiveCall(where) \
|
||||
(_Py_MakeRecCheck(PyThreadState_GET()->recursion_depth) && \
|
||||
_Py_CheckRecursiveCall(where))
|
||||
|
@ -84,6 +85,10 @@ int Py_GetRecursionLimit(void);
|
|||
do{ if(_Py_MakeEndRecCheck(PyThreadState_GET()->recursion_depth)) \
|
||||
PyThreadState_GET()->overflowed = 0; \
|
||||
} while(0)
|
||||
#else
|
||||
#define Py_EnterRecursiveCall(where) (0)
|
||||
#define Py_LeaveRecursiveCall(where) ((void)0)
|
||||
#endif
|
||||
int _Py_CheckRecursiveCall(const char *where);
|
||||
extern int _Py_CheckRecursionLimit;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue