[pypy-commit] pypy jit-short_from_state: a bit more info when not translated

hakanardo noreply at buildbot.pypy.org
Sat May 28 15:41:22 CEST 2011


Author: Hakan Ardo <hakan at debian.org>
Branch: jit-short_from_state
Changeset: r44575:87e9fb4767b4
Date: 2011-05-28 15:11 +0200
http://bitbucket.org/pypy/pypy/changeset/87e9fb4767b4/

Log:	a bit more info when not translated

diff --git a/pypy/jit/metainterp/optimizeopt/virtualstate.py b/pypy/jit/metainterp/optimizeopt/virtualstate.py
--- a/pypy/jit/metainterp/optimizeopt/virtualstate.py
+++ b/pypy/jit/metainterp/optimizeopt/virtualstate.py
@@ -263,11 +263,19 @@
         virtual_state.notvirtuals.append(self)
 
     def debug_print(self, indent, seen):
-        l = {LEVEL_UNKNOWN: 'Unknown',
-             LEVEL_NONNULL: 'NonNull',
-             LEVEL_KNOWNCLASS: 'KnownClass',
-             LEVEL_CONSTANT: 'Constant',
-             }[self.level]
+        if we_are_translated():
+            l = {LEVEL_UNKNOWN: 'Unknown',
+                 LEVEL_NONNULL: 'NonNull',
+                 LEVEL_KNOWNCLASS: 'KnownClass',
+                 LEVEL_CONSTANT: 'Constant',
+                 }[self.level]
+        else:
+            l = {LEVEL_UNKNOWN: 'Unknown',
+                 LEVEL_NONNULL: 'NonNull',
+                 LEVEL_KNOWNCLASS: 'KnownClass(%r)' % self.known_class,
+                 LEVEL_CONSTANT: 'Constant(%r)' % self.constbox,
+                 }[self.level]
+            
         debug_print(indent + 'NotVirtualInfo(%d' % self.position + ', ' +
                     l + ', ' + self.intbound.__repr__() + ')')
 


More information about the pypy-commit mailing list