[pypy-svn] r28983 - in pypy/dist/pypy: module/_stackless/test translator/c translator/c/test translator/goal

pedronis at codespeak.net pedronis at codespeak.net
Tue Jun 20 12:14:12 CEST 2006


Author: pedronis
Date: Tue Jun 20 12:14:10 2006
New Revision: 28983

Removed:
   pypy/dist/pypy/translator/c/stackless.py
Modified:
   pypy/dist/pypy/module/_stackless/test/test_interp_coroutine.py
   pypy/dist/pypy/translator/c/genc.py
   pypy/dist/pypy/translator/c/node.py
   pypy/dist/pypy/translator/c/test/test_stackless.py
   pypy/dist/pypy/translator/c/test/test_tasklets.py
   pypy/dist/pypy/translator/goal/translate.py
Log:
remove old stackless (which is broken)



Modified: pypy/dist/pypy/module/_stackless/test/test_interp_coroutine.py
==============================================================================
--- pypy/dist/pypy/module/_stackless/test/test_interp_coroutine.py	(original)
+++ pypy/dist/pypy/module/_stackless/test/test_interp_coroutine.py	Tue Jun 20 12:14:10 2006
@@ -13,8 +13,6 @@
 
 class _TestCoroutine(StacklessTest):
     backendopt = True
-    stacklessmode = True
-    gcpolicy = gc.BoehmGcPolicy
     Coroutine = Coroutine
 
     def setup_method(self, method):

Modified: pypy/dist/pypy/translator/c/genc.py
==============================================================================
--- pypy/dist/pypy/translator/c/genc.py	(original)
+++ pypy/dist/pypy/translator/c/genc.py	Tue Jun 20 12:14:10 2006
@@ -46,16 +46,12 @@
         if self.stackless:
             if not self.standalone:
                 raise Exception("stackless: only for stand-alone builds")
-            if self.stackless == 'old':
-                from pypy.translator.c.stackless import StacklessData
-                db.stacklessdata = StacklessData(db)
-            else:
-                from pypy.translator.stackless.transform import \
-                                                       StacklessTransformer
-                db.stacklesstransformer = StacklessTransformer(translator,
-                                              self.originalentrypoint,
-                                              db.gcpolicy.requires_stackless)
-                self.entrypoint = db.stacklesstransformer.slp_entry_point
+
+            from pypy.translator.stackless.transform import StacklessTransformer
+            db.stacklesstransformer = StacklessTransformer(translator,
+                                                           self.originalentrypoint,
+                                                           db.gcpolicy.requires_stackless)
+            self.entrypoint = db.stacklesstransformer.slp_entry_point
 
         # pass extra options into pyobjmaker
         if pyobj_options:

Modified: pypy/dist/pypy/translator/c/node.py
==============================================================================
--- pypy/dist/pypy/translator/c/node.py	(original)
+++ pypy/dist/pypy/translator/c/node.py	Tue Jun 20 12:14:10 2006
@@ -678,18 +678,7 @@
             fnobj._callable,)
     elif hasattr(fnobj, 'graph'):
         cpython_exc = getattr(fnobj, 'exception_policy', None) == "CPython"
-        if hasattr(db, 'stacklessdata'):
-            split_slp_function = False
-            if split_slp_function:
-                from pypy.translator.c.stackless import SlpSaveOnlyFunctionCodeGenerator, \
-                                                        SlpResumeFunctionCodeGenerator
-                return [SlpSaveOnlyFunctionCodeGenerator(fnobj.graph, db, cpython_exc, functionname),
-                        SlpResumeFunctionCodeGenerator(fnobj.graph, db, cpython_exc, functionname)]
-            else:
-                from pypy.translator.c.stackless import SlpFunctionCodeGenerator
-                return [SlpFunctionCodeGenerator(fnobj.graph, db, cpython_exc, functionname)]
-        else:
-            return [FunctionCodeGenerator(fnobj.graph, db, cpython_exc, functionname)]
+        return [FunctionCodeGenerator(fnobj.graph, db, cpython_exc, functionname)]
     elif getattr(fnobj, 'external', None) == 'C':
         # deprecated case
         if hasattr(fnobj, 'includes'):

Modified: pypy/dist/pypy/translator/c/test/test_stackless.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_stackless.py	(original)
+++ pypy/dist/pypy/translator/c/test/test_stackless.py	Tue Jun 20 12:14:10 2006
@@ -10,7 +10,8 @@
 
 class StacklessTest(object):
     backendopt = False
-    stacklessmode = 'old'
+    stacklessmode = True
+    gcpolicy = gc.BoehmGcPolicy
 
     def setup_class(cls):
         import py
@@ -51,7 +52,6 @@
 
 
 class TestStackless(StacklessTest):
-    gcpolicy = None # Refcounting
 
     def test_stack_depth(self):
         def g1():
@@ -293,14 +293,3 @@
     from pypy.rpython.lltypesystem.lloperation import llop
     from pypy.rpython.lltypesystem import lltype
     llop.gc__collect(lltype.Void)
-
-# ____________________________________________________________
-    
-class TestStacklessBoehm(TestStackless):
-    gcpolicy = gc.BoehmGcPolicy
-
-
-# ____________________________________________________________
-
-class TestStacklessTransformBoehm(TestStacklessBoehm):
-    stacklessmode = True

Modified: pypy/dist/pypy/translator/c/test/test_tasklets.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_tasklets.py	(original)
+++ pypy/dist/pypy/translator/c/test/test_tasklets.py	Tue Jun 20 12:14:10 2006
@@ -195,7 +195,6 @@
 # ____________________________________________________________
 
 class TestTasklets(test_stackless.StacklessTest):
-    gcpolicy = gc.BoehmGcPolicy
     backendopt = True
 
     def test_simplex(self):
@@ -496,8 +495,3 @@
 
         res = self.wrap_stackless_function(f)
         assert res == 1
-
-# ____________________________________________________________
-
-class TestTaskletsStacklessTransform(TestTasklets):
-    stacklessmode = True

Modified: pypy/dist/pypy/translator/goal/translate.py
==============================================================================
--- pypy/dist/pypy/translator/goal/translate.py	(original)
+++ pypy/dist/pypy/translator/goal/translate.py	Tue Jun 20 12:14:10 2006
@@ -50,7 +50,7 @@
 
     '2_gc': [OPT(('--gc',), "Garbage collector", ['boehm', 'ref', 'framework', 'none', 'exact_boehm', 'stacklessgc'])],
     '3_stackless': [OPT(('--new-stackless',), "Stackless code generation (graph transformer)", True)],
-    '4_stackless': [OPT(('--stackless',), "Stackless code generation (old GenC way)", 'old')],
+    '4_stackless': [OPT(('--stackless',), "Stackless code generation (graph transformer)", True)],
     '5_merge_if_blocks': [OPT(('--no-if-blocks-merge',), "Do not merge if ... elif ... chains and use a switch statement for them.", False)],
     '6_raisingop2direct_call': [OPT(('--raisingop2direct_call',), "Convert possible exception raising operations to direct calls.", True)],
     },



More information about the Pypy-commit mailing list