micropython

TO_DO.txt

343:6be1700e4902
2010-06-14 Paul Boddie Moved the namespace lookup logic into NamespaceDict; this permits scope usage analysis and conflict detection. Renamed the ambiguous 'module' attribute to 'astnode' on various classes. Moved the AtLeast class into micropython.common. Added various test cases around scope conflicts.
     1 Consider labelling _scope on assignments and dealing with the assignment of removed
     2 attributes, possibly removing the entire assignment, and distinguishing between such cases
     3 and unknown names.
     4 
     5 Check name origin where multiple branches could yield multiple scope interpretations:
     6 
     7 ----
     8 try:
     9     set # built-in name
    10 except NameError:
    11     from sets import Set as set # local definition of name
    12 
    13 set # could be confused by the local definition at run-time
    14 ----
    15 
    16 Support __init__ traversal (and other implicit names) more effectively.
    17 
    18 Check context_value initialisation (avoiding or handling None effectively).
    19 
    20 __getitem__ could be written in Python, using a native method only to access fragments.
    21 Support slicing.
    22 Consider better "macro" support where new expressions need to be generated and processed.
    23 
    24 **** Constant attribute users need not maintain usage since they are already resolved. ****
    25 
    26 Loop entry points should capture usage to update later assignments in the loop.
    27 The continue and break statements should affect usage propagation.
    28 
    29 Consider handling CallFunc in micropython.inspect in order to produce instances of specific classes.
    30 Then, consider adding support for guard removal/verification where known instances are involved.
    31 Consider handling branches of values within namespaces in order to support more precise value usage.