1.1 --- a/micropython/data.py Fri Aug 26 00:03:08 2011 +0200
1.2 +++ b/micropython/data.py Sun Aug 28 02:03:04 2011 +0200
1.3 @@ -510,9 +510,14 @@
1.4 if users.has_key(name):
1.5 for user in users[name]:
1.6 values = user._attrnames[name]
1.7 +
1.8 + # Add an entry for the attribute, optionally with an assigned
1.9 + # value.
1.10 +
1.11 values.add(attrname)
1.12 if value is not None:
1.13 values[attrname].append(value)
1.14 +
1.15 return users[name]
1.16 else:
1.17 return []
1.18 @@ -557,7 +562,7 @@
1.19 # Attribute usage for names.
1.20
1.21 if not hasattr(node, "_attrnames"):
1.22 - node._attrnames = ObjectSet()
1.23 + node._attrnames = {}
1.24
1.25 # Branches contributing usage to this node.
1.26
1.27 @@ -647,8 +652,8 @@
1.28 provided these cannot "escape" from the branch.
1.29 """
1.30
1.31 - self.attribute_users[-1] = AbandonedBranchUsers()
1.32 - self.scope_usage[-1] = AbandonedBranchScope()
1.33 + self.attribute_users[-1] = abandoned_branch_users
1.34 + self.scope_usage[-1] = abandoned_branch_scope
1.35
1.36 def _suspend_broken_branch(self):
1.37
1.38 @@ -859,6 +864,9 @@
1.39
1.40 pass
1.41
1.42 +abandoned_branch_users = AbandonedBranchUsers()
1.43 +abandoned_branch_scope = AbandonedBranchScope()
1.44 +
1.45 class ScopeConflict:
1.46
1.47 """