1 Consider attribute assignment observations, along with the possibility of class attribute
2 assignment.
3
4 Local assignment detection plus frame re-use. Example: slice.__init__ calls
5 xrange.__init__ with the same arguments which are unchanged in xrange.__init__. There is
6 therefore no need to build a new frame for this call.
7
8 Consider attribute usage observations being suspended inside blocks where AttributeError
9 may be caught (although this doesn't anticipate such exceptions being caught outside a
10 function altogether).
11
12 Fix object table entries for attributes not provided by any known object, or provide an
13 error, potentially overridden by options. For example, the augmented assignment methods
14 are not supported by the built-in objects and thus the operator module functions cause
15 the compilation to fail. Alternatively, just supply the methods since something has to do
16 so in the builtins.
17
18 Consider type deduction and its consequences where types belong to the same hierarchy
19 and where a guard could be generated for the most general type.
20
21 Consider attribute merging where many attributes are just aliases for the same underlying
22 definition.
23
24 Consider merging the InspectedModule.store tests with the scope conflict handling.
25
26 Consider permitting multiple class alternatives where the attributes are all identical.
27
28 Support class attribute positioning similar to instance attribute positioning, potentially
29 (for both) based on usage observations. For example, if __iter__ is used on two classes,
30 the class attribute could be exposed at a similar relative position to the class (and
31 potentially accessible using a LoadAttr-style instruction).
32
33 Consider references to defaults as occurring only within the context of a particular
34 function, thus eliminating default value classes if such functions are not themselves
35 invoked.
36
37 Consider labelling _scope on assignments and dealing with the assignment of removed
38 attributes, possibly removing the entire assignment, and distinguishing between such cases
39 and unknown names.
40
41 Check name origin where multiple branches could yield multiple scope interpretations:
42
43 ----
44 try:
45 set # built-in name
46 except NameError:
47 from sets import Set as set # local definition of name
48
49 set # could be confused by the local definition at run-time
50 ----
51
52 Support __init__ traversal (and other implicit names) more effectively.
53
54 Check context_value initialisation (avoiding or handling None effectively).
55
56 __getitem__ could be written in Python, using a native method only to access fragments.
57
58 Consider better "macro" support where new expressions need to be generated and processed.
59
60 **** Constant attribute users need not maintain usage since they are already resolved. ****
61
62 Loop entry points should capture usage to update later assignments in the loop.
63 The continue and break statements should affect usage propagation.
64
65 Consider handling CallFunc in micropython.inspect in order to produce instances of specific classes.
66 Then, consider adding support for guard removal/verification where known instances are involved.
67 Consider handling branches of values within namespaces in order to support more precise value usage.