1.1 --- a/micropython/ast.py Mon Aug 23 00:15:03 2010 +0200
1.2 +++ b/micropython/ast.py Sun Aug 29 02:03:24 2010 +0200
1.3 @@ -479,10 +479,13 @@
1.4 found within the given 'node'.
1.5 """
1.6
1.7 + self.new_op(self.expr_temp[-1])
1.8 + self._generateAttr(node, "__getitem__", self.attribute_load_instructions)
1.9 + temp_getitem = self.optimiser.optimise_temp_storage()
1.10 +
1.11 for i, n in enumerate(node.nodes):
1.12 self._startCallFunc()
1.13 - self.new_op(self.expr_temp[-1])
1.14 - self._generateAttr(node, "__getitem__", self.attribute_load_instructions)
1.15 + self.new_op(temp_getitem)
1.16 temp_target, target, temp_context = self._generateCallFunc([compiler.ast.Const(i)], node)
1.17 self._doCallFunc(temp_target, target)
1.18 self._endCallFunc(temp_target, target, temp_context)
1.19 @@ -496,6 +499,8 @@
1.20 self.dispatch(n)
1.21 self.discard_value()
1.22
1.23 + self.discard_temp(temp_getitem)
1.24 +
1.25 def visitAssName(self, node):
1.26
1.27 "Assign the assignment expression to the recipient 'node'."