[pypy-svn] r69749 - pypy/branch/virtual-forcing/pypy/jit/metainterp

arigo at codespeak.net arigo at codespeak.net
Mon Nov 30 10:58:26 CET 2009


Author: arigo
Date: Mon Nov 30 10:58:25 2009
New Revision: 69749

Modified:
   pypy/branch/virtual-forcing/pypy/jit/metainterp/resume.py
Log:
Fix for test_optimizeopt: allow _already_allocated_resume_virtuals
to be absent.


Modified: pypy/branch/virtual-forcing/pypy/jit/metainterp/resume.py
==============================================================================
--- pypy/branch/virtual-forcing/pypy/jit/metainterp/resume.py	(original)
+++ pypy/branch/virtual-forcing/pypy/jit/metainterp/resume.py	Mon Nov 30 10:58:25 2009
@@ -472,14 +472,18 @@
 
     def _prepare_virtuals(self, metainterp, virtuals):
         if virtuals:
-            if metainterp._already_allocated_resume_virtuals is None:
+            try:
+                v = metainterp._already_allocated_resume_virtuals
+            except AttributeError:
+                v = None
+            if v is None:
                 self.virtuals = [None] * len(virtuals)
                 for i in range(len(virtuals)):
                     vinfo = virtuals[i]
                     if vinfo is not None:
                         self.virtuals[i] = vinfo.allocate(metainterp)
             else:
-                self.virtuals = metainterp._already_allocated_resume_virtuals
+                self.virtuals = v
             for i in range(len(virtuals)):
                 vinfo = virtuals[i]
                 if vinfo is not None:



More information about the Pypy-commit mailing list