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