diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 234f821b1..bd1368383 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -24,7 +24,7 @@ Future Things and Ideas Compiler: - writeAssembly(): make it possible to actually get rid of the VarDecl nodes by fixing the rest of the code mentioned there. -- make everything an expression. (get rid of Statements. Statements are expressions with void return types). +- make everything an expression? (get rid of Statements. Statements are expressions with void return types?). - allow "xxx" * constexpr (where constexpr is not a number literal), now gives expression error not same type - for the pipe operator: recognise a placeholder (``?`` or ``%`` or ``_``) in a non-unary function call to allow non-unary functions in the chain; ``4 |> mkword(?, $44) |> print_uw`` OR: change pipe syntax and require function call, but always have implicit first argument added. @@ -32,6 +32,7 @@ Compiler: - make it possible to inline non-asmsub routines that just contain a single statement (return, functioncall, assignment) but this requires all identifiers in the inlined expression to be changed to fully scoped names. If we can do that why not perhaps also able to inline multi-line subroutines? Why would it be limited to just 1 line? Maybe to protect against code bloat. + Inlined subroutines cannot contain further nested subroutines! - simplifyConditionalExpression() should not split expression if it still results in stack-based evaluation, but how does it know? - simplifyConditionalExpression() sometimes introduces needless assignment to r9 tempvar (scenario sought) - consider adding McCarthy evaluation to shortcircuit and and or expressions. First do ifs by splitting them up? Then do expressions that compute a value? @@ -69,7 +70,7 @@ Optimizations: - VariableAllocator: can we think of a smarter strategy for allocating variables into zeropage, rather than first-come-first-served - translateFunctioncall() in BuiltinFunctionsAsmGen: should be able to assign parameters to a builtin function directly from register(s), this will make the use of a builtin function in a pipe expression more efficient without using a temporary variable -- translateNormalAssignment() -> better code gen for assigning boolean comparison expressions +- AssignmentAsmGen.assignExpression() -> better code gen for assigning boolean comparison expressions - when a for loop's loopvariable isn't referenced in the body, and the iterations are known, replace the loop by a repeatloop but we have no efficient way right now to see if the body references a variable. - automatically convert if statements that test for multiple values (if X==1 or X==2..) to if X in [1,2,..] statements, instead of just a warning.