[pypy-svn] r77852 - pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt

hakanardo at codespeak.net hakanardo at codespeak.net
Tue Oct 12 19:03:56 CEST 2010


Author: hakanardo
Date: Tue Oct 12 19:03:53 2010
New Revision: 77852

Modified:
   pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt/virtualize.py
Log:
virtual arrays

Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt/virtualize.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt/virtualize.py	(original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/optimizeopt/virtualize.py	Tue Oct 12 19:03:53 2010
@@ -203,6 +203,15 @@
     def _make_virtual(self, modifier):
         return modifier.make_varray(self.arraydescr)
 
+    def get_forced_boxes(self):
+        if self.box is None:
+            boxes = []
+            for itemvalue in self._items:
+                boxes.extend(itemvalue.get_forced_boxes())
+            return boxes
+        else:
+            return [self.box]
+
 
 class __extend__(SpecNode):
     def setup_virtual_node(self, optimizer, box, newinputargs):



More information about the Pypy-commit mailing list