1.1 --- a/micropython/ast.py Wed Aug 24 01:01:24 2011 +0200
1.2 +++ b/micropython/ast.py Wed Aug 24 01:05:46 2011 +0200
1.3 @@ -159,7 +159,7 @@
1.4
1.5 # Store the object as the result.
1.6
1.7 - self.new_op(LoadTemp(0, target="result")) # load the context from the locals
1.8 + self.new_op(LoadTemp(0)) # load the context from the locals
1.9 self.new_op(Return())
1.10
1.11 self.unit.blocks = self.blocks
1.12 @@ -222,6 +222,7 @@
1.13 self.dispatch(node.expr)
1.14
1.15 temp = self.optimiser.optimise_temp_storage()
1.16 + self.new_op(temp)
1.17 self._generateTestBoolean(node.expr, temp)
1.18 self.discard_temp(temp)
1.19
1.20 @@ -775,6 +776,7 @@
1.21 self.dispatch(test)
1.22
1.23 temp = self.optimiser.optimise_temp_storage()
1.24 + self.new_op(temp)
1.25 self._generateTestBoolean(node, temp)
1.26
1.27 next_block = self.new_block()
1.28 @@ -814,7 +816,7 @@
1.29
1.30 self.discard_temp(temp_arg)
1.31
1.32 - self.set_target("exception")
1.33 + self.new_op(Transfer(source="working", target="exception"))
1.34
1.35 self.new_op(RaiseException())
1.36
1.37 @@ -824,8 +826,6 @@
1.38 else:
1.39 self.dispatch(compiler.ast.Name("None"))
1.40
1.41 - self.set_target("result")
1.42 -
1.43 if self.in_exception_handler:
1.44 self.new_op(ClearException(target="exception"))
1.45
1.46 @@ -932,6 +932,7 @@
1.47 self.dispatch(node.test)
1.48
1.49 temp = self.optimiser.optimise_temp_storage()
1.50 + self.new_op(temp)
1.51 self._generateTestBoolean(node, temp)
1.52
1.53 if node.else_ is not None: