1.1 --- a/TO_DO.txt Mon Nov 05 00:07:54 2012 +0100
1.2 +++ b/TO_DO.txt Mon Nov 05 00:22:09 2012 +0100
1.3 @@ -146,25 +146,6 @@
1.4 except AttributeError:
1.5 z = None
1.6
1.7 -Instantiation Deduction
1.8 ------------------------
1.9 -
1.10 -Consider handling Const in micropython.inspect in order to produce instances of specific
1.11 -classes. Then, consider adding support for guard removal/verification where known
1.12 -instances are involved. For example:
1.13 -
1.14 - l = []
1.15 - l.append(123) # type deductions are filtered using instantiation knowledge
1.16 -
1.17 -Handling CallFunc in a similar way is more challenging. Consider the definitions in the sys module:
1.18 -
1.19 - stderr = file()
1.20 -
1.21 -It must first be established that file only ever refers to the built-in file class, and
1.22 -only then can the assumption be made that stderr in this case refers to instances of file.
1.23 -If file can also refer to other objects, potential filtering operations are more severely
1.24 -limited.
1.25 -
1.26 Frame Optimisations
1.27 ===================
1.28
1.29 @@ -182,11 +163,36 @@
1.30 attribute, or passed to another function or method might, if such observations were
1.31 combined, allow frame-based or temporary allocation to occur.
1.32
1.33 -Instantiation
1.34 -=============
1.35 +Instantiation Deduction
1.36 +=======================
1.37 +
1.38 +Consider handling Const, List and Tuple in micropython.inspect in order to produce
1.39 +instances of specific classes. Then, consider adding support for guard
1.40 +removal/verification where known instances are involved. For example:
1.41 +
1.42 + l = []
1.43 + l.append(123) # type deductions are filtered using instantiation knowledge
1.44 +
1.45 +Currently, this is done only for Const values in the context of attribute accesses during
1.46 +inspection.
1.47 +
1.48 +Handling CallFunc in a similar way is more challenging. Consider the definitions in the sys module:
1.49
1.50 -Specific instances could be produced, providing type information and acting somewhat like
1.51 -classes during inspection.
1.52 + stderr = file()
1.53 +
1.54 +It must first be established that file only ever refers to the built-in file class, and
1.55 +only then can the assumption be made that stderr in this case refers to instances of file.
1.56 +If file can also refer to other objects, potential filtering operations are more severely
1.57 +limited.
1.58 +
1.59 +Invocation-Related Deduction
1.60 +============================
1.61 +
1.62 +Where an attribute access (either in conjunction with usage observations or independently)
1.63 +could refer to a number of different targets, but where the resulting attribute is then
1.64 +used in an invocation, filtering of the targets could be done to eliminate any targets
1.65 +that are not callable. Guards would need introducing to prevent inappropriate operations
1.66 +from occurring at run-time.
1.67
1.68 Inlining
1.69 ========