1.1 --- a/annotate.py Tue Oct 31 00:44:10 2006 +0100
1.2 +++ b/annotate.py Sun Nov 12 23:40:20 2006 +0100
1.3 @@ -397,13 +397,18 @@
1.4 expr = self.namespace.types
1.5 storeattr.lvalue = self.dispatch(storeattr.lvalue)
1.6 writes = {}
1.7 + non_writes = []
1.8 for attr in self.namespace.types:
1.9 if attr is None:
1.10 - print "Empty attribute storage attempt"
1.11 + if not attr in non_writes:
1.12 + non_writes.append(attr)
1.13 continue
1.14 attr.type.namespace.store(storeattr.name, expr)
1.15 writes[attr.type] = attr.type.namespace.load(storeattr.name)
1.16 + if not writes:
1.17 + print "Unable to store attribute", storeattr.name, "given", self.namespace.types
1.18 storeattr.writes = writes
1.19 + storeattr.non_writes = non_writes
1.20 return storeattr
1.21
1.22 def visitStoreName(self, storename):
2.1 --- a/viewer.py Tue Oct 31 00:44:10 2006 +0100
2.2 +++ b/viewer.py Sun Nov 12 23:40:20 2006 +0100
2.3 @@ -143,7 +143,7 @@
2.4 float: left;
2.5 }
2.6
2.7 - .non-accesses {
2.8 + .non-writes, .non-accesses {
2.9 padding: 0.5em; background-color: #FF0000;
2.10 float: right;
2.11 }
2.12 @@ -762,6 +762,8 @@
2.13 self.stream.write("</div>\n")
2.14 if hasattr(node, "non_accesses") and node.non_accesses:
2.15 self._types_list(node.non_accesses, style_class="non-accesses")
2.16 + if hasattr(node, "non_writes") and node.non_writes:
2.17 + self._types_list(node.non_writes, style_class="non-writes")
2.18
2.19 # Utility functions.
2.20