# HG changeset patch # User Paul Boddie # Date 1305997205 -7200 # Node ID 58a51f45c389165d8be1bdcfbeea4943dd5edf86 # Parent 18c62608bfa6ef381fb391afd76a07ae9da0af2f Added some more notes on potentially useful features. diff -r 18c62608bfa6 -r 58a51f45c389 TO_DO.txt --- a/TO_DO.txt Tue May 10 00:48:24 2011 +0200 +++ b/TO_DO.txt Sat May 21 19:00:05 2011 +0200 @@ -1,3 +1,12 @@ +Low-Level Instructions and Macro Instructions +============================================= + +Migrate macro instructions such as the *Index instructions to library code implemented +using low-level instructions. + +Consider introducing classic machine level instructions (word addition, subtraction, and +so on) in order to implement all current RSVP instructions. + Class and Module Attribute Assignment ===================================== @@ -6,6 +15,21 @@ Update docs/assignment.txt. +Consider attribute assignment observations, along with the possibility of class and module +attribute assignment. + + (Note direct assignments as usual, indirect assignments via the attribute usage + mechanism. During attribute collection and inference, add assigned values to all + inferred targets.) + + (Since class attributes can be assigned, StoreAttrIndex would no longer need to reject + static attributes, although this might still be necessary where attribute usage analysis + has not been performed.) + + Potentially consider changing static attribute details to use object-relative offsets in + order to simplify the instruction implementations. This might allow us to eliminate the + static attribute flag for attributes in the object table, at least at run-time. + Dynamic Attribute Access ======================== @@ -14,21 +38,6 @@ Attribute Usage =============== -Consider attribute assignment observations, along with the possibility of class attribute -assignment. - - Note direct assignments as usual, indirect assignments via the attribute usage - mechanism. During attribute collection and inference, add assigned values to all - inferred targets. - - Since class attributes can be assigned, StoreAttrIndex would no longer need to reject - static attributes, although this might still be necessary where attribute usage analysis - has not been performed. - - Potentially consider changing static attribute details to use object-relative offsets in - order to simplify the instruction implementations. This might allow us to eliminate the - static attribute flag for attributes in the object table, at least at run-time. - Consider attribute usage observations being suspended inside blocks where AttributeError may be caught (although this doesn't anticipate such exceptions being caught outside a function altogether). @@ -60,7 +69,15 @@ Local assignment detection plus frame re-use. Example: slice.__init__ calls xrange.__init__ with the same arguments which are unchanged in xrange.__init__. There is -therefore no need to build a new frame for this call. +therefore no need to build a new frame for this call, although in some cases the locals +frame might need expanding. + +Inlining +======== + +Where a function or method call can always be determined, the body of the target could be +inlined - copied into place - within the caller. If the target is only ever called by a +single caller it could be moved into place. Function Specialisation =======================