[pypy-svn] r68983 - in pypy/branch/gc-jit-hack/pypy: jit/metainterp rpython/memory/gc rpython/memory/gc/test rpython/memory/gctransform translator/c/test

arigo at codespeak.net arigo at codespeak.net
Thu Nov 5 10:05:17 CET 2009


Author: arigo
Date: Thu Nov  5 10:05:14 2009
New Revision: 68983

Modified:
   pypy/branch/gc-jit-hack/pypy/jit/metainterp/pyjitpl.py
   pypy/branch/gc-jit-hack/pypy/rpython/memory/gc/generation.py
   pypy/branch/gc-jit-hack/pypy/rpython/memory/gc/test/test_direct.py
   pypy/branch/gc-jit-hack/pypy/rpython/memory/gctransform/framework.py
   pypy/branch/gc-jit-hack/pypy/translator/c/test/test_newgc.py
Log:
Revert r68981.

Modified: pypy/branch/gc-jit-hack/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/gc-jit-hack/pypy/jit/metainterp/pyjitpl.py	(original)
+++ pypy/branch/gc-jit-hack/pypy/jit/metainterp/pyjitpl.py	Thu Nov  5 10:05:14 2009
@@ -1090,7 +1090,7 @@
                     newsize *= 2
             else:
                 newsize = 0
-            lloperation.llop.gc_resize_nursery(lltype.Void, newsize, enlarge)
+            lloperation.llop.gc_resize_nursery(lltype.Void, newsize)
 
 # ____________________________________________________________
 

Modified: pypy/branch/gc-jit-hack/pypy/rpython/memory/gc/generation.py
==============================================================================
--- pypy/branch/gc-jit-hack/pypy/rpython/memory/gc/generation.py	(original)
+++ pypy/branch/gc-jit-hack/pypy/rpython/memory/gc/generation.py	Thu Nov  5 10:05:14 2009
@@ -602,11 +602,11 @@
 
     # ---------- resizing the nursery at runtime ----------
 
-    def resize_nursery(self, newsize, forced):
+    def resize_nursery(self, newsize):
         debug_start("gc-resize-nursery")
         if newsize < self.minimal_setting_for_nursery_size:
             newsize = self.minimal_setting_for_nursery_size
-        if forced or not self.nursery or newsize > self.allocated_nursery_size:
+        if not self.nursery or newsize > self.allocated_nursery_size:
             self.drop_nursery()
             self.nursery_size = newsize
             self.allocated_nursery_size = newsize

Modified: pypy/branch/gc-jit-hack/pypy/rpython/memory/gc/test/test_direct.py
==============================================================================
--- pypy/branch/gc-jit-hack/pypy/rpython/memory/gc/test/test_direct.py	(original)
+++ pypy/branch/gc-jit-hack/pypy/rpython/memory/gc/test/test_direct.py	Thu Nov  5 10:05:14 2009
@@ -347,7 +347,7 @@
         # nursery contains 3/7 objects
 
         # now make the nursery grow to 1024
-        gc.resize_nursery(1024, False)
+        gc.resize_nursery(1024)
         assert counters[1] == 2
         assert counters[0] in (7, 15)
         counters[0] = 0      # empty
@@ -365,7 +365,7 @@
         assert counters[0] in (63, 127)
 
         # now mark it as "must shrink back"
-        gc.resize_nursery(0, False)
+        gc.resize_nursery(0)
         assert counters[1] == 3
         assert counters[0] in (63, 127)
 
@@ -389,7 +389,7 @@
         counters[0] = 0      # nursery not allocated at all
 
         # resize from a fresh nursery: should not do another collect
-        gc.resize_nursery(512, False)
+        gc.resize_nursery(512)
         assert counters[1] == 5
 
         # fill it partially only
@@ -400,7 +400,7 @@
 
         # now mark it as "must shrink back",
         # which should still leave room for 4/8 objects
-        gc.resize_nursery(0, False)
+        gc.resize_nursery(0)
         assert counters[1] == 5
         assert counters[0] == 20
 

Modified: pypy/branch/gc-jit-hack/pypy/rpython/memory/gctransform/framework.py
==============================================================================
--- pypy/branch/gc-jit-hack/pypy/rpython/memory/gctransform/framework.py	(original)
+++ pypy/branch/gc-jit-hack/pypy/rpython/memory/gctransform/framework.py	Thu Nov  5 10:05:14 2009
@@ -350,8 +350,7 @@
                                              annmodel.SomeAddress())
         if getattr(GCClass, 'resize_nursery', False):
             self.resizenursery_ptr = getfn(GCClass.resize_nursery.im_func,
-                                           [s_gc, annmodel.SomeInteger(),
-                                            annmodel.s_Bool],
+                                           [s_gc, annmodel.SomeInteger()],
                                            annmodel.s_None)
 
         if GCClass.moving_gc:
@@ -809,10 +808,9 @@
         if not hasattr(self, 'resizenursery_ptr'):
             return    # only for generational gcs
         livevars = self.push_roots(hop)
-        [v_number, v_forced] = hop.spaceop.args
+        [v_number] = hop.spaceop.args
         hop.genop("direct_call",
-                  [self.resizenursery_ptr, self.c_const_gc,
-                   v_number, v_forced])
+                  [self.resizenursery_ptr, self.c_const_gc, v_number])
         self.pop_roots(hop, livevars)
 
     def gct_gc_set_max_heap_size(self, hop):

Modified: pypy/branch/gc-jit-hack/pypy/translator/c/test/test_newgc.py
==============================================================================
--- pypy/branch/gc-jit-hack/pypy/translator/c/test/test_newgc.py	(original)
+++ pypy/branch/gc-jit-hack/pypy/translator/c/test/test_newgc.py	Thu Nov  5 10:05:14 2009
@@ -960,7 +960,7 @@
             j = 0
             while i < maxcount:
                 if i == events[j][0]:
-                    llop.gc_resize_nursery(lltype.Void, events[j][1], False)
+                    llop.gc_resize_nursery(lltype.Void, events[j][1])
                     j += 1
                 a = A()
                 a.thehash = compute_identity_hash(a)



More information about the Pypy-commit mailing list