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

arigo at codespeak.net arigo at codespeak.net
Tue Dec 1 11:27:29 CET 2009


Author: arigo
Date: Tue Dec  1 11:27:28 2009
New Revision: 69792

Modified:
   pypy/branch/virtual-forcing/pypy/jit/metainterp/resume.py
Log:
Diff-minimizing change.


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	Tue Dec  1 11:27:28 2009
@@ -473,19 +473,19 @@
     def _prepare_virtuals(self, metainterp, virtuals):
         if virtuals:
             v = metainterp._already_allocated_resume_virtuals
-            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)
-                for i in range(len(virtuals)):
-                    vinfo = virtuals[i]
-                    if vinfo is not None:
-                        vinfo.setfields(metainterp, self.virtuals[i],
-                                        self._decode_box)
-            else:
+            if v is not None:
                 self.virtuals = v
+                return
+            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)
+            for i in range(len(virtuals)):
+                vinfo = virtuals[i]
+                if vinfo is not None:
+                    vinfo.setfields(metainterp, self.virtuals[i],
+                                    self._decode_box)
 
     def consume_boxes(self):
         numb = self.cur_numb



More information about the Pypy-commit mailing list