TODO List¶
Todo
Replace custom stack implementation with collections.ChainMap
Todo
Implement decorator to eliminate unused lines of code (assignments to unused values)
Todo
Technically, x += y
doesn’t have to be the same thing as x = x + y
. Handle it as its own operation of the form x += y; return x
Todo
Support efficiently inlining simple functions, i.e. where there is no return or only one return as the last line of the function, using pure name substitution without loops, try/except, or anything else fancy
Todo
Catch replacement of loop variables that conflict with globals, or throw a more descriptive error when detected. See test_iteration_variable
Todo
Python 3.8/3.9+ support: https://docs.python.org/3/library/ast.html . ast.Constant
is taking over for ast.[Num, Str, Bytes, NameConstant, Ellipsis]
. Simple-valued indexes are now values, and extended slices are now tuples: ast.[Index, ExtSlice]
no longer exist.
Todo
Always commit changes within a block, and only mark values as non-deterministic outside of conditional blocks
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/collapse_literals.rst, line 69.)
Todo
Support list/set/dict comprehensions
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/collapse_literals.rst, line 70.)
Todo
Attributes are too iffy, since properties abound, but assignment to a known index of a known indexable should be remembered
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/collapse_literals.rst, line 71.)
Todo
Fix name collision by name-mangling non-free variables
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/inline.rst, line 60.)
Todo
Support inlining a generator into another generator by merging the functions together. E.g., for x in my_range(5): yield x + 2
becomes i = 0; while i < 5: yield i + 2; i += 1
(or something vaguely like that).
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/inline.rst, line 71.)
Todo
Replace custom stack implementation with collections.ChainMap
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/todo.rst, line 4.)
Todo
Implement decorator to eliminate unused lines of code (assignments to unused values)
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/todo.rst, line 5.)
Todo
Technically, x += y
doesn’t have to be the same thing as x = x + y
. Handle it as its own operation of the form x += y; return x
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/todo.rst, line 6.)
Todo
Support efficiently inlining simple functions, i.e. where there is no return or only one return as the last line of the function, using pure name substitution without loops, try/except, or anything else fancy
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/todo.rst, line 7.)
Todo
Catch replacement of loop variables that conflict with globals, or throw a more descriptive error when detected. See test_iteration_variable
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/todo.rst, line 8.)
Todo
Python 3.8/3.9+ support: https://docs.python.org/3/library/ast.html . ast.Constant
is taking over for ast.[Num, Str, Bytes, NameConstant, Ellipsis]
. Simple-valued indexes are now values, and extended slices are now tuples: ast.[Index, ExtSlice]
no longer exist.
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/todo.rst, line 9.)
Todo
Assignment to known lists and dictionaries
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/unroll.rst, line 161.)
Todo
Resolving compile-time known conditionals before detecting top-level breaks
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/pypragma/checkouts/latest/docs/unroll.rst, line 162.)