[pypy-svn] r18424 - pypy/dist/pypy/translator/c/src

tismer at codespeak.net tismer at codespeak.net
Tue Oct 11 18:33:06 CEST 2005


Author: tismer
Date: Tue Oct 11 18:33:05 2005
New Revision: 18424

Modified:
   pypy/dist/pypy/translator/c/src/ll_stackless.h
Log:
kept MAX_STACK_SIZE at 1 << 20, since this is true in most cases.
Used a local set to half of it to do the check.

Modified: pypy/dist/pypy/translator/c/src/ll_stackless.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/ll_stackless.h	(original)
+++ pypy/dist/pypy/translator/c/src/ll_stackless.h	Tue Oct 11 18:33:05 2005
@@ -6,11 +6,7 @@
 #endif
 
 #ifndef MAX_STACK_SIZE
-#  ifdef MS_WINDOWS
-#    define MAX_STACK_SIZE (1 << 19)
-#  else
 #    define MAX_STACK_SIZE (1 << 20)
-#  endif
 #endif
 
 #define STANDALONE_ENTRY_POINT   slp_standalone_entry_point
@@ -109,11 +105,12 @@
 {
   char local;
   long result;
+  int simple_check = MAX_STACK_SIZE / 2;
   /* compute the difference between local variable and
    * and a stack origin pointer
    */
   result = &local - slp_base_stack_pointer;
-  if (-MAX_STACK_SIZE < result && result < MAX_STACK_SIZE){
+  if (-simple_check < result && result < simple_check){
     return 0;
   }
   return 1;



More information about the Pypy-commit mailing list