IR: working on inplace +/-

This commit is contained in:
Irmen de Jong
2024-01-28 21:19:52 +01:00
parent 9553248ed6
commit e0055bc431
3 changed files with 189 additions and 21 deletions

View File

@@ -1,9 +1,6 @@
TODO
====
IR ExpressionGen: implement all in-place operators TODOs. Starting with operatorPlusInplace
maze: if cell & UP!=0 and @(celladdr(cx,cy-1)) & (WALKED|BACKTRACKED) ==0
^^ adding this !=0 caused a weird beq + / lda #1 / + to appear in front of the shortcircuit beq...
@@ -88,6 +85,7 @@ What if we were to re-introduce Structs in prog8? Some thoughts:
Other language/syntax features to think about
---------------------------------------------
- remove ++/-- (just use Pythonesque x+=1) OR make ++/-- into a postfix expression (but then we need a prefix variant of them too?) maybe via a new builtin function like postincr__w() etc?
- support for assigning multiple return values from romsub/asmsub to multiple variables.
- add (rom/ram)bank support to romsub. A call will then automatically switch banks, use callfar and something else when in banked ram.
challenges: how to not make this too X16 specific? How does the compiler know what bank to switch (ram/rom)?