1.1 --- a/micropython/common.py Fri Aug 26 00:03:08 2011 +0200
1.2 +++ b/micropython/common.py Sun Aug 28 02:03:04 2011 +0200
1.3 @@ -180,6 +180,12 @@
1.4 values of the contributing dictionaries being themselves combined such that
1.5 a "product" of the values for a given key are stored in the combined
1.6 dictionary.
1.7 +
1.8 + For example:
1.9 +
1.10 + d1: {'a' : [{'f', 'g'}, {'f', 'h'}], ...}
1.11 + d2: {'a' : [{'f'}, {'e', 'f', 'g'}], ...}
1.12 + -> {'a' : [{'f', 'g'}, {'f', 'h'}, {'e', 'f', 'g'}, {'e', 'f', 'g', 'h'}], ...}
1.13 """
1.14
1.15 combined = {}
2.1 --- a/micropython/data.py Fri Aug 26 00:03:08 2011 +0200
2.2 +++ b/micropython/data.py Sun Aug 28 02:03:04 2011 +0200
2.3 @@ -510,9 +510,14 @@
2.4 if users.has_key(name):
2.5 for user in users[name]:
2.6 values = user._attrnames[name]
2.7 +
2.8 + # Add an entry for the attribute, optionally with an assigned
2.9 + # value.
2.10 +
2.11 values.add(attrname)
2.12 if value is not None:
2.13 values[attrname].append(value)
2.14 +
2.15 return users[name]
2.16 else:
2.17 return []
2.18 @@ -557,7 +562,7 @@
2.19 # Attribute usage for names.
2.20
2.21 if not hasattr(node, "_attrnames"):
2.22 - node._attrnames = ObjectSet()
2.23 + node._attrnames = {}
2.24
2.25 # Branches contributing usage to this node.
2.26
2.27 @@ -647,8 +652,8 @@
2.28 provided these cannot "escape" from the branch.
2.29 """
2.30
2.31 - self.attribute_users[-1] = AbandonedBranchUsers()
2.32 - self.scope_usage[-1] = AbandonedBranchScope()
2.33 + self.attribute_users[-1] = abandoned_branch_users
2.34 + self.scope_usage[-1] = abandoned_branch_scope
2.35
2.36 def _suspend_broken_branch(self):
2.37
2.38 @@ -859,6 +864,9 @@
2.39
2.40 pass
2.41
2.42 +abandoned_branch_users = AbandonedBranchUsers()
2.43 +abandoned_branch_scope = AbandonedBranchScope()
2.44 +
2.45 class ScopeConflict:
2.46
2.47 """