Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r70105:d41fc1add33b
Date: 2014-03-20 10:41 +0100
http://bitbucket.org/pypy/pypy/changeset/d41fc1add33b/

Log:    Revert a change from c4

diff --git a/rpython/rlib/rgc.py b/rpython/rlib/rgc.py
--- a/rpython/rlib/rgc.py
+++ b/rpython/rlib/rgc.py
@@ -93,22 +93,11 @@
 def _make_sure_does_not_move(p):
     """'p' is a non-null GC object.  This (tries to) make sure that the
     object does not move any more, by forcing collections if needed.
-    It may return a different addr!
     Warning: should ideally only be used with the minimark GC, and only
     on objects that are already a bit old, so have a chance to be
     already non-movable."""
     if not we_are_translated():
-        if isinstance(p, _GcRef):
-            return cast_gcref_to_int(p)
-        else:
-            from rpython.rtyper.lltypesystem import rffi
-            return rffi.cast(lltype.Signed, p)
-    
-    if stm_is_enabled():
-        from rpython.rtyper.lltypesystem.lloperation import llop
-        res = llop.stm_allocate_nonmovable_int_adr(lltype.Signed, p)
-        return res
-        
+        return
     i = 0
     while can_move(p):
         if i > 6:
@@ -116,8 +105,6 @@
         collect(i)
         i += 1
 
-    return 0
-
 def _heap_stats():
     raise NotImplementedError # can't be run directly
 
diff --git a/rpython/rlib/test/test_rgc.py b/rpython/rlib/test/test_rgc.py
--- a/rpython/rlib/test/test_rgc.py
+++ b/rpython/rlib/test/test_rgc.py
@@ -228,5 +228,3 @@
     x1 = X()
     n = rgc.get_rpy_memory_usage(rgc.cast_instance_to_gcref(x1))
     assert n >= 8 and n <= 64
-
-
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to