[pypy-commit] jitviewer default: make it clearer that these ops are guards; also, use == insteaf of 'is' for guard_value, because it's more correct in case of eg guard(i4 == 0) vs guard(i4 is 0)
antocuni
noreply at buildbot.pypy.org
Fri Jul 22 14:57:53 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r157:a6e6c83ade89
Date: 2011-07-22 12:12 +0200
http://bitbucket.org/pypy/jitviewer/changeset/a6e6c83ade89/
Log: make it clearer that these ops are guards; also, use == insteaf of
'is' for guard_value, because it's more correct in case of eg
guard(i4 == 0) vs guard(i4 is 0)
diff --git a/_jitviewer/parser.py b/_jitviewer/parser.py
--- a/_jitviewer/parser.py
+++ b/_jitviewer/parser.py
@@ -67,16 +67,16 @@
locals()['repr_' + name] = _new_binop(bin_op)
def repr_guard_true(self):
- return '%s is true' % self.getarg(0)
+ return 'guard(%s is true)' % self.getarg(0)
def repr_guard_false(self):
- return '%s is false' % self.getarg(0)
+ return 'guard(%s is false)' % self.getarg(0)
def repr_guard_value(self):
- return '%s is %s' % (self.getarg(0), self.getarg(1))
+ return 'guard(%s == %s)' % (self.getarg(0), self.getarg(1))
def repr_guard_isnull(self):
- return '%s is null' % self.getarg(0)
+ return 'guard(%s is null)' % self.getarg(0)
def repr_getfield_raw(self):
name, field = self.descr.split(' ')[1].rsplit('.', 1)
More information about the pypy-commit
mailing list