Mercurial > lcfOS
diff python/ppci/ir.py @ 312:2c9768114877
Added cool logging formatter
author | Windel Bouwman |
---|---|
date | Mon, 16 Dec 2013 17:58:15 +0100 |
parents | e95e5572cd6d |
children | e30a77ae359b |
line wrap: on
line diff
--- a/python/ppci/ir.py Mon Dec 16 12:49:24 2013 +0100 +++ b/python/ppci/ir.py Mon Dec 16 17:58:15 2013 +0100 @@ -166,6 +166,7 @@ if not self.Empty: return self.LastInstruction.Targets return [] + Successors = property(getSuccessors) def getPredecessors(self): @@ -174,6 +175,7 @@ if self in bb.Successors: preds.append(bb) return preds + Predecessors = property(getPredecessors) def precedes(self, other): @@ -326,7 +328,9 @@ class Statement: """ Base class for all instructions. """ - pass + @property + def IsTerminator(self): + return isinstance(self, LastStatement) class Move(Statement):