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

tismer at codespeak.net tismer at codespeak.net
Thu Feb 23 02:48:34 CET 2006


Author: tismer
Date: Thu Feb 23 02:48:31 2006
New Revision: 23609

Modified:
   pypy/dist/pypy/translator/c/src/ll_stackless.h
Log:
had to disable Eric's stackless optimization. The fifth test on test_stackless.py crashes after utilizing all memory.   This error should have been caught by running tests. How comes?

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	Thu Feb 23 02:48:31 2006
@@ -15,6 +15,8 @@
 #define slp_free(p)free(p)
 #endif
 
+#undef USE_OPTIMIZED_STACKLESS_UNWIND
+/* XXX we seem to be missing something */
 
 #ifdef USE_OPTIMIZED_STACKLESS_UNWIND
 
@@ -26,32 +28,25 @@
 
 #define RPyExceptionClear()       rpython_exc_type = NULL
 
-/*
+#if 0
 #define StacklessUnwindAndRPyExceptionHandling(unwind_label, resume_label, exception_label) \
             if (RPyExceptionOccurred()) {   \
                 if (slp_frame_stack_bottom) \
                     goto unwind_label;      \
-          resume_label:                   \
+            resume_label:                   \
                 if (RPyExceptionOccurred()) \
                     FAIL(exception_label);  \
             }
-
-    Following code was supposed to compiler to shorter machine code, but on windows it doesn't.
-    Probably some other code folding is prevented, and there is a tiny increase of 20 kb.
-    I'm leaving the change in here, anyway. Richards is getting a bit slower, PySone
-    is getting faster, all in all speed is slightly increased.
-    We should further investigate and try to use Eric's suggestion of checking certain
-    return values to get even shorter code paths.
-    In any case, these optimizations are still flaky, because we are probably in a high
-    noise level of caching effects and random decisions of the compiler.
-*/
+#else
 #define StacklessUnwindAndRPyExceptionHandling(unwind_label, resume_label, exception_label) \
-          resume_label:                   \
+            resume_label:                   \
             if (RPyExceptionOccurred()) {   \
                 if (slp_frame_stack_bottom) \
                     goto unwind_label;      \
                 FAIL(exception_label);      \
             }
+#endif
+
 #else
 
 #define RPyRaisePseudoException()



More information about the Pypy-commit mailing list