1.1 --- a/micropython/trans.py Sat Sep 11 21:45:24 2010 +0200
1.2 +++ b/micropython/trans.py Sun Sep 12 01:48:01 2010 +0200
1.3 @@ -310,17 +310,12 @@
1.4
1.5 def _generateGuards(self, node):
1.6
1.7 - if not (self.optimiser.should_optimise_accesses_by_attribute_usage() and hasattr(node, "_attrnames")):
1.8 + if not (self.optimiser.should_optimise_accesses_by_attribute_usage() and hasattr(node, "_attrtypes")):
1.9 return
1.10
1.11 # For each name, attempt to restrict the type employed.
1.12
1.13 - for name, names_used in node._attrnames.items():
1.14 -
1.15 - # Get the names of all object types supporting these names.
1.16 -
1.17 - targets = self.objtable.all_possible_objects_plus_status(names_used)
1.18 - #found_target_names = [target_name for (target_name, is_static) in targets]
1.19 + for name, targets in node._attrtypes.items():
1.20
1.21 # NOTE: Need to merge targets using the same type but suggesting
1.22 # NOTE: different kinds of attributes (instance vs. class).
1.23 @@ -1089,8 +1084,7 @@
1.24
1.25 # Add any attribute usage guards.
1.26
1.27 - if self.optimiser.should_optimise_accesses_by_attribute_usage() and hasattr(node, "_attrnames"):
1.28 - self._generateGuards(node)
1.29 + self._generateGuards(node)
1.30
1.31 # Visit the actual code.
1.32