1.1 --- a/TO_DO.txt Mon May 07 20:46:43 2012 +0200
1.2 +++ b/TO_DO.txt Tue May 08 00:29:20 2012 +0200
1.3 @@ -64,29 +64,21 @@
1.4 Attribute Usage
1.5 ===============
1.6
1.7 +To consider: is it useful to distinguish between attribute name sets when the same names
1.8 +are mentioned, but where one path through the code sets different values on attributes
1.9 +than another? The _attrtypes collapses observations in order to make a list of object
1.10 +types for a name, and the final set of names leading to such type deductions might be a
1.11 +useful annotation to be added alongside _attrcombined.
1.12 +
1.13 +Interface/Type Generalisation
1.14 +-----------------------------
1.15 +
1.16 Consolidate interface observations by taking all cached table accesses and determining
1.17 which usage patterns lead to the same types. For example, if full usage of {a, b} and
1.18 {a, b, c} leads to A and B in both cases, either {a, b} can be considered as partial usage
1.19 of the complete interface {a, b, c}, or the latter can be considered as an
1.20 overspecification of the former.
1.21
1.22 -Make the gathering of usage parameterisable according to the optimisation level so that a
1.23 -choice can be made between control-flow-dependent observations and the simple collection
1.24 -of all attributes used with a name (producing a more static interface observation).
1.25 -
1.26 -Usage of self to restrict attribute usage observations and coverage.
1.27 -
1.28 -Perform attribute usage on attributes of self as names, potentially combining observations
1.29 -across methods.
1.30 -
1.31 -Loop entry points and other places where usage becomes more specific might be used as
1.32 -places to impose guards. See tests/attribute_access_type_restriction_loop_list.py for an
1.33 -example.
1.34 -
1.35 -Consider attribute usage observations being suspended inside blocks where AttributeError
1.36 -may be caught (although this doesn't anticipate such exceptions being caught outside a
1.37 -function altogether).
1.38 -
1.39 Consider type deduction and its consequences where types belong to the same hierarchy
1.40 and where a guard could be generated for the most general type.
1.41
1.42 @@ -99,9 +91,42 @@
1.43
1.44 **** Constant attribute users need not maintain usage since they are already resolved. ****
1.45
1.46 +Self-related Usage
1.47 +------------------
1.48 +
1.49 +Usage of self to restrict attribute usage observations and coverage.
1.50 +
1.51 +Perform attribute usage on attributes of self as names, potentially combining observations
1.52 +across methods.
1.53 +
1.54 +Additional Guards
1.55 +-----------------
1.56 +
1.57 +Consider handling branches of values within namespaces in order to support more precise value usage.
1.58 +
1.59 +Loop entry points and other places where usage becomes more specific might be used as
1.60 +places to impose guards. See tests/attribute_access_type_restriction_loop_list.py for an
1.61 +example. (Such information is already shown in the reports.)
1.62 +
1.63 +Strict Interfaces/Types
1.64 +-----------------------
1.65 +
1.66 +Make the gathering of usage parameterisable according to the optimisation level so that a
1.67 +choice can be made between control-flow-dependent observations and the simple collection
1.68 +of all attributes used with a name (producing a more static interface observation).
1.69 +
1.70 +AttributeError
1.71 +--------------
1.72 +
1.73 +Consider attribute usage observations being suspended inside blocks where AttributeError
1.74 +may be caught (although this doesn't anticipate such exceptions being caught outside a
1.75 +function altogether).
1.76 +
1.77 +Instantiation Deduction
1.78 +-----------------------
1.79 +
1.80 Consider handling CallFunc in micropython.inspect in order to produce instances of specific classes.
1.81 Then, consider adding support for guard removal/verification where known instances are involved.
1.82 -Consider handling branches of values within namespaces in order to support more precise value usage.
1.83
1.84 Frame Optimisations
1.85 ===================
2.1 --- a/docs/annotations.txt Mon May 07 20:46:43 2012 +0200
2.2 +++ b/docs/annotations.txt Tue May 08 00:29:20 2012 +0200
2.3 @@ -1,6 +1,8 @@
2.4 AST Node Annotations
2.5 ====================
2.6
2.7 +These annotations should be defined in the revised compiler.ast classes.
2.8 +
2.9 Attribute Users
2.10 ---------------
2.11