1.1 --- a/micropython/ast.py Mon May 05 00:37:53 2008 +0200
1.2 +++ b/micropython/ast.py Mon May 05 00:43:26 2008 +0200
1.3 @@ -752,17 +752,16 @@
1.4 # Get left method on temp1.
1.5
1.6 self._generateAttr(node, left_method, (LoadAddress, LoadAttr, LoadAttrIndex))
1.7 - temp_method = self._optimise_temp_storage()
1.8
1.9 # Add exception handling to the method acquisition instructions where
1.10 # the attribute access cannot be resolved at compile-time.
1.11
1.12 - if not self._optimise_known_target(temp_method):
1.13 - self.capture_ops()
1.14 + if not self._optimise_known_target():
1.15 self.dispatch(compiler.ast.Name("AttributeError"))
1.16 - temp_method += self.get_captured_ops()
1.17 - temp_method.append(CheckException())
1.18 - temp_method.append(JumpIfTrue(end_left_label))
1.19 + self.new_op(CheckException())
1.20 + self.new_op(JumpIfTrue(end_left_label))
1.21 +
1.22 + temp_method = self._optimise_temp_storage()
1.23
1.24 # Add arguments.
1.25
1.26 @@ -793,17 +792,16 @@
1.27 # Get right method on temp2.
1.28
1.29 self._generateAttr(node, right_method, (LoadAddress, LoadAttr, LoadAttrIndex))
1.30 - temp_method = self._optimise_temp_storage()
1.31
1.32 # Add exception handling to the method acquisition instructions where
1.33 # the attribute access cannot be resolved at compile-time.
1.34
1.35 - if not self._optimise_known_target(temp_method):
1.36 - self.capture_ops()
1.37 + if not self._optimise_known_target():
1.38 self.dispatch(compiler.ast.Name("AttributeError"))
1.39 - temp_method += self.get_captured_ops()
1.40 - temp_method.append(CheckException())
1.41 - temp_method.append(JumpIfTrue(type_error_label))
1.42 + self.new_op(CheckException())
1.43 + self.new_op(JumpIfTrue(type_error_label))
1.44 +
1.45 + temp_method = self._optimise_temp_storage()
1.46
1.47 # Add arguments.
1.48