# HG changeset patch # User Paul Boddie # Date 1313967214 -7200 # Node ID 664bd4ab235a4b7d5a9b84673f17e67028e4ddb7 # Parent eb806eaca9d5dd27957eb607950340777c1be0f1 Updated the "to do" list. Moved some code around. diff -r eb806eaca9d5 -r 664bd4ab235a TO_DO.txt --- a/TO_DO.txt Sun Aug 21 23:59:52 2011 +0200 +++ b/TO_DO.txt Mon Aug 22 00:53:34 2011 +0200 @@ -1,10 +1,6 @@ Low-Level Instructions and Macro Instructions ============================================= -Instructions manipulated through the temporary infrastructure are reused and can be -corrupted by set_source and set_target operations. It might be better if such operations -cloned the instructions or if new instructions were explicitly created. - Have contexts and values stored separately in memory. This involves eliminating DataValue and storing attributes using two words. @@ -23,9 +19,6 @@ Attempt to use result data directly instead of transferring it explicitly to the working registers and then using it. -Perhaps store resultant working values on Block instances in order to better track active -values. - Class and Module Attribute Assignment ===================================== diff -r eb806eaca9d5 -r 664bd4ab235a micropython/opt.py --- a/micropython/opt.py Sun Aug 21 23:59:52 2011 +0200 +++ b/micropython/opt.py Mon Aug 22 00:53:34 2011 +0200 @@ -257,6 +257,11 @@ return self.get_active_value() and self.is_simple_input(self.get_active_value()) + # Indicate whether the active instruction can be used in place of access + # to a temporary variable retaining the result of the last instruction. + + have_temp_compatible_access = have_simple_input + def have_self_input(self, unit): """ @@ -270,11 +275,6 @@ expr = self.get_active_value() return expr and isinstance(expr, LoadName) and expr.attr.name == "self" - # Indicate whether the active instruction can be used in place of access - # to a temporary variable retaining the result of the last instruction. - - have_temp_compatible_access = have_simple_input - def have_correct_self_for_target(self, context, unit): "Return whether the 'context' is compatible with the given 'unit'."