# HG changeset patch # User paulb@localhost.localdomain # Date 1163371220 -3600 # Node ID 60fbda2deb14a2d91756fe523782b4e99867486c # Parent c61ceee0c8d37e8a232449e175a703a7c76397b6 Introduced non_writes as an annotation. diff -r c61ceee0c8d3 -r 60fbda2deb14 annotate.py --- a/annotate.py Tue Oct 31 00:44:10 2006 +0100 +++ b/annotate.py Sun Nov 12 23:40:20 2006 +0100 @@ -397,13 +397,18 @@ expr = self.namespace.types storeattr.lvalue = self.dispatch(storeattr.lvalue) writes = {} + non_writes = [] for attr in self.namespace.types: if attr is None: - print "Empty attribute storage attempt" + if not attr in non_writes: + non_writes.append(attr) continue attr.type.namespace.store(storeattr.name, expr) writes[attr.type] = attr.type.namespace.load(storeattr.name) + if not writes: + print "Unable to store attribute", storeattr.name, "given", self.namespace.types storeattr.writes = writes + storeattr.non_writes = non_writes return storeattr def visitStoreName(self, storename): diff -r c61ceee0c8d3 -r 60fbda2deb14 viewer.py --- a/viewer.py Tue Oct 31 00:44:10 2006 +0100 +++ b/viewer.py Sun Nov 12 23:40:20 2006 +0100 @@ -143,7 +143,7 @@ float: left; } - .non-accesses { + .non-writes, .non-accesses { padding: 0.5em; background-color: #FF0000; float: right; } @@ -762,6 +762,8 @@ self.stream.write("\n") if hasattr(node, "non_accesses") and node.non_accesses: self._types_list(node.non_accesses, style_class="non-accesses") + if hasattr(node, "non_writes") and node.non_writes: + self._types_list(node.non_writes, style_class="non-writes") # Utility functions.