Mercurial > lcfOS
diff python/ppci/codegen/graph.py @ 337:b00219172a42
Added cool lm3s811 qemu project
author | Windel Bouwman |
---|---|
date | Thu, 20 Feb 2014 20:04:52 +0100 |
parents | e9fe6988497c |
children |
line wrap: on
line diff
--- a/python/ppci/codegen/graph.py Wed Feb 19 22:32:15 2014 +0100 +++ b/python/ppci/codegen/graph.py Thu Feb 20 20:04:52 2014 +0100 @@ -9,7 +9,7 @@ self.edges = set() self.adj_map = {} - def addNode(self, n): + def add_node(self, n): self.nodes.add(n) if n not in self.adj_map: self.adj_map[n] = set() @@ -77,8 +77,8 @@ self.adj_map[n].add(m) self.adj_map[m].add(n) - def addNode(self, n): - super().addNode(n) + def add_node(self, n): + super().add_node(n) if n not in self.suc_map: self.suc_map[n] = set() if n not in self.pre_map: @@ -102,3 +102,6 @@ @property def Pred(self): return self.g.predecessors(self) + + def __gt__(self, other): + return self in other.Succ