1.1 --- a/translator.py Tue Mar 14 22:41:14 2017 +0100
1.2 +++ b/translator.py Tue Mar 14 22:52:13 2017 +0100
1.3 @@ -1446,8 +1446,7 @@
1.4
1.5 name_ref = TrResolvedNameRef(n.name, ref, expr=expr, is_global=is_global,
1.6 parameter=parameter, location=location)
1.7 - result = self.get_aliases(name_ref)
1.8 - return result or name_ref
1.9 + return not expr and self.get_aliases(name_ref) or name_ref
1.10
1.11 def get_aliases(self, name_ref):
1.12
1.13 @@ -1455,21 +1454,9 @@
1.14
1.15 location = name_ref.access_location()
1.16
1.17 - accessor_locations = location and self.deducer.get_accessors_for_access(location)
1.18 - alias_refs = set()
1.19 - access_locations = set()
1.20 -
1.21 - if accessor_locations:
1.22 - for accessor_location in accessor_locations:
1.23 - aliased_accesses = self.deducer.alias_index.get(accessor_location)
1.24 - if not aliased_accesses:
1.25 - continue
1.26 - access_locations.update(aliased_accesses)
1.27 - refs = self.deducer.referenced_objects.get(accessor_location)
1.28 - if refs:
1.29 - alias_refs.update(refs)
1.30 -
1.31 - return AliasResult(name_ref, alias_refs, access_locations)
1.32 + refs = self.deducer.referenced_objects.get(location)
1.33 + refs = refs or self.deducer.accessor_all_types.get(location)
1.34 + return AliasResult(name_ref, refs or set(), [location])
1.35
1.36 def make_volatile(self, name):
1.37