[pypy-svn] r65565 - pypy/branch/pyjitpl5-experiments/pypy/rpython/memory/gctransform

arigo at codespeak.net arigo at codespeak.net
Wed Jun 3 23:05:04 CEST 2009


Author: arigo
Date: Wed Jun  3 23:05:04 2009
New Revision: 65565

Modified:
   pypy/branch/pyjitpl5-experiments/pypy/rpython/memory/gctransform/framework.py
Log:
Fix for tests: ignore 'remember_young_pointer' if it's not there.


Modified: pypy/branch/pyjitpl5-experiments/pypy/rpython/memory/gctransform/framework.py
==============================================================================
--- pypy/branch/pyjitpl5-experiments/pypy/rpython/memory/gctransform/framework.py	(original)
+++ pypy/branch/pyjitpl5-experiments/pypy/rpython/memory/gctransform/framework.py	Wed Jun  3 23:05:04 2009
@@ -340,13 +340,14 @@
                                             annmodel.SomeAddress()],
                                            annmodel.s_None,
                                            inline=True)
-            func = gcdata.gc.remember_young_pointer
-            assert isinstance(func, types.FunctionType)   # not a bound method,
-                                                          # but a real function
-            self.write_barrier_failing_case_ptr = getfn(func,
-                                           [annmodel.SomeAddress(),
-                                            annmodel.SomeAddress()],
-                                           annmodel.s_None)
+            func = getattr(gcdata.gc, 'remember_young_pointer', None)
+            if func is not None:
+                # func should not be a bound method, but a real function
+                assert isinstance(func, types.FunctionType)
+                self.write_barrier_failing_case_ptr = getfn(func,
+                                               [annmodel.SomeAddress(),
+                                                annmodel.SomeAddress()],
+                                               annmodel.s_None)
         else:
             self.write_barrier_ptr = None
         self.statistics_ptr = getfn(GCClass.statistics.im_func,



More information about the Pypy-commit mailing list