[pypy-svn] r18423 - in pypy/dist/pypy/translator/c: src test

afa at codespeak.net afa at codespeak.net
Tue Oct 11 18:25:03 CEST 2005


Author: afa
Date: Tue Oct 11 18:25:01 2005
New Revision: 18423

Modified:
   pypy/dist/pypy/translator/c/src/ll_stackless.h
   pypy/dist/pypy/translator/c/test/test_standalone.py
Log:
(afa, valentino): more on stackless:
- reduce MAX_STACK_SIZE on Windows
- correct tests



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:25:01 2005
@@ -6,7 +6,11 @@
 #endif
 
 #ifndef MAX_STACK_SIZE
-#define MAX_STACK_SIZE (1 << (20-1))
+#  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

Modified: pypy/dist/pypy/translator/c/test/test_standalone.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_standalone.py	(original)
+++ pypy/dist/pypy/translator/c/test/test_standalone.py	Tue Oct 11 18:25:01 2005
@@ -95,7 +95,7 @@
         return "[" + str(count10 - count0) + ", " + str(d) + ", " + str(t[0]) + ", " + str(t[1]) + "]"
 
     data = wrap_stackless_function(fn)
-    assert eval(data) == [10, 5.500000, 1, 2]
+    assert eval(data) == [10, 5.5, 1, 2]
 
 
 def test_stack_too_big():
@@ -125,7 +125,7 @@
     cbuilder.generate_source()
     cbuilder.compile() 
     data = cbuilder.cmdexec('')
-    assert data.strip() == '10'
+    return data
 
 def test_stack_unwind():
     def entry_point(argv):



More information about the Pypy-commit mailing list