Commits

Armin Rigo committed 4d9da70

Write 'ConstPtr(null)' when we know the constant is null.
May break some tests in pypyjit/test_pypy_c.

Comments (0)

Files changed (1)

rpython/jit/metainterp/logger.py

         elif isinstance(arg, BoxInt):
             return 'i' + str(mv)
         elif isinstance(arg, self.ts.ConstRef):
-            return 'ConstPtr(ptr' + str(mv) + ')'
+            if arg.value:
+                return 'ConstPtr(ptr' + str(mv) + ')'
+            return 'ConstPtr(null)'
         elif isinstance(arg, self.ts.BoxRef):
             return 'p' + str(mv)
         elif isinstance(arg, ConstFloat):