Commits

Hakan Ardo committed 87e9fb4

a bit more info when not translated

Comments (0)

Files changed (1)

pypy/jit/metainterp/optimizeopt/virtualstate.py

         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__() + ')')