[pypy-svn] r25856 - pypy/dist/pypy/rpython/memory

cfbolz at codespeak.net cfbolz at codespeak.net
Sat Apr 15 14:43:29 CEST 2006


Author: cfbolz
Date: Sat Apr 15 14:43:28 2006
New Revision: 25856

Modified:
   pypy/dist/pypy/rpython/memory/gctransform.py
Log:
simplify pop_root since the result is anyway not used for a non-moving GC


Modified: pypy/dist/pypy/rpython/memory/gctransform.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gctransform.py	(original)
+++ pypy/dist/pypy/rpython/memory/gctransform.py	Sat Apr 15 14:43:28 2006
@@ -774,11 +774,15 @@
             top.address[0] = addr
             gcdata.root_stack_top = top + sizeofaddr
 
+        # XXX specific to mark and sweep
         def pop_root():
-            top = gcdata.root_stack_top - sizeofaddr
-            result = top.address[0]
-            gcdata.root_stack_top = top
-            return result
+            gcdata.root_stack_top -= sizeofaddr
+        # this should really be:
+        # def pop_root():
+        #     top = gcdata.root_stack_top - sizeofaddr
+        #     result = top.address[0]
+        #     gcdata.root_stack_top = top
+        #     return result
 
         bk = self.translator.annotator.bookkeeper
 
@@ -805,7 +809,7 @@
                                              [annmodel.SomeAddress()],
                                              annmodel.s_None)
         pop_root_graph = annhelper.getgraph(pop_root, [],
-                                            annmodel.SomeAddress())
+                                            annmodel.s_None)
 
         classdef = bk.getuniqueclassdef(GCData.GCClass)
         s_gcdata = annmodel.SomeInstance(classdef)



More information about the Pypy-commit mailing list