1.1 --- a/micropython/opt.py Sun Jun 12 22:14:36 2011 +0200
1.2 +++ b/micropython/opt.py Mon Jun 13 00:18:13 2011 +0200
1.3 @@ -195,7 +195,9 @@
1.4 a load operation from a CPU register or special memory location.
1.5 """
1.6
1.7 - return isinstance(instruction, (LoadConst, LoadClass, LoadFunction, LoadName, LoadTemp, LoadResult, LoadException, LoadAddress))
1.8 + return isinstance(instruction, (LoadConst, LoadClass, LoadFunction,
1.9 + LoadName, LoadTemp, LoadResultIntoValue, LoadException, LoadAddress
1.10 + ))
1.11
1.12 def is_simple_input_user(self, instruction):
1.13
1.14 @@ -217,7 +219,7 @@
1.15 return (
1.16 isinstance(instruction.input, LoadTemp) and isinstance(instruction, StoreTemp) and
1.17 instruction.input.attr == instruction.attr) or (
1.18 - isinstance(instruction.input, LoadResult) and isinstance(instruction, StoreResult)
1.19 + isinstance(instruction.input, LoadResultIntoValue) and isinstance(instruction, LoadValueIntoResult)
1.20 )
1.21
1.22 def is_input(self, instruction):
1.23 @@ -280,11 +282,11 @@
1.24 to a temporary variable retaining the result of the last instruction.
1.25 """
1.26
1.27 - # LoadResult cannot be relied upon in general since the result register
1.28 + # LoadResultIntoValue cannot be relied upon in general since the result register
1.29 # could be updated since first being referenced.
1.30
1.31 return isinstance(self.active_value, (LoadName, LoadTemp, LoadAddress, LoadConst, LoadClass, LoadFunction)) or \
1.32 - isinstance(self.active_value, LoadResult) and self.active_value is self.active or \
1.33 + isinstance(self.active_value, LoadResultIntoValue) and self.active_value is self.active or \
1.34 isinstance(self.active_value, LoadException) and self.active_value is self.active
1.35
1.36 def have_correct_self_for_target(self, context, unit):