1.1 --- a/translator.py Sat Dec 10 17:35:58 2016 +0100
1.2 +++ b/translator.py Sat Dec 10 18:52:54 2016 +0100
1.3 @@ -647,20 +647,7 @@
1.4
1.5 def process_attribute_access(self, n):
1.6
1.7 - """
1.8 - Process the given attribute access node 'n'.
1.9 -
1.10 - Where a name is provided, a single access should be recorded
1.11 - involving potentially many attributes, thus providing a path to an
1.12 - object. The remaining attributes are then accessed dynamically.
1.13 - The remaining accesses could be deduced and computed, but they would
1.14 - also need to be tested.
1.15 -
1.16 - Where no name is provided, potentially many accesses should be
1.17 - recorded, one per attribute name. These could be used to provide
1.18 - computed accesses, but the accessors would need to be tested in each
1.19 - case.
1.20 - """
1.21 + "Process the given attribute access node 'n'."
1.22
1.23 # Obtain any completed chain and return the reference to it.
1.24
1.25 @@ -684,6 +671,7 @@
1.26 "<assexpr>" : str(self.in_assignment),
1.27 "<context>" : "__tmp_context",
1.28 "<accessor>" : "__tmp_value",
1.29 + "<target_accessor>" : "__tmp_target_value",
1.30 }
1.31
1.32 output = []
1.33 @@ -1687,7 +1675,7 @@
1.34
1.35 targets = targets is not None and "__tmp_targets[%d], " % targets or ""
1.36
1.37 - self.writeline("__ref __tmp_context, __tmp_value;")
1.38 + self.writeline("__ref __tmp_context, __tmp_value, __tmp_target_value;")
1.39 self.writeline("__attr %s__tmp_result;" % targets)
1.40 self.writeline("__exc __tmp_exc;")
1.41