[pypy-svn] r61798 - pypy/branch/pyjitpl5/pypy/jit/metainterp

arigo at codespeak.net arigo at codespeak.net
Thu Feb 12 17:32:49 CET 2009


Author: arigo
Date: Thu Feb 12 17:32:48 2009
New Revision: 61798

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py
   pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
Log:
* Improve display of GraphOps.
* Small fix (?) in optimize.py.


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py	Thu Feb 12 17:32:48 2009
@@ -329,6 +329,12 @@
         op.key = self.key
         return op
 
+    def __repr__(self):
+        result = ResOperation.__repr__(self)
+        if hasattr(self, 'liveboxes'):
+            result = '%s [%s]' % (result, ', '.join(map(repr, self.liveboxes)))
+        return result
+
 # ____________________________________________________________
 
 # The Graph class is to store a loop or a bridge.

Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py	Thu Feb 12 17:32:48 2009
@@ -221,6 +221,7 @@
         if self.startbox:    flags += 's'
         if self.const:       flags += 'c'
         if self.virtual:     flags += 'v'
+        if self.virtualized: flags += 'V'
         return "<InstanceNode %s (%s)>" % (self.source, flags)
 
 
@@ -316,7 +317,8 @@
                 continue
             elif opname == 'guard_nonvirtualized':
                 instnode = self.getnode(op.args[0])
-                instnode.virtualized = True
+                if instnode.startbox:
+                    instnode.virtualized = True
                 if instnode.cls is None:
                     instnode.cls = InstanceNode(op.args[1])
                 continue



More information about the Pypy-commit mailing list