Commit Graph

89 Commits

Author SHA1 Message Date
Irmen de Jong
0a43eae184 rework registerArgsViaStackEvaluation to use cpu hardware stack instead 2022-02-18 22:38:00 +01:00
Irmen de Jong
3117e2b2a3 more tweaks 2022-02-18 01:25:08 +01:00
Irmen de Jong
41fece4643 slight tweaks related to builtin functions in the ast 2022-02-17 01:25:13 +01:00
Irmen de Jong
7aa807ec7f proper error if attempting to do a containment check against non const range, and some cleanup in asmgen 2022-02-16 00:39:19 +01:00
Irmen de Jong
b47fc1c020 renames of some Ast node classes 2022-02-11 00:34:36 +01:00
Irmen de Jong
bd0dee5db5 cleanup 2022-02-10 22:22:50 +01:00
Irmen de Jong
343f01d5e1 re-enabled unused variable removal from library modules (+fixed some @shared vars in libraries) 2022-02-10 03:10:47 +01:00
Irmen de Jong
08bacdd090 temp vars are now dynamically added to AST as needed 2022-02-10 02:52:47 +01:00
Irmen de Jong
8c2e6971fc start using vars instead of callgraph (2) 2022-02-08 21:09:00 +01:00
Irmen de Jong
7d67005709 more rewrite variable allocation 2022-02-08 20:40:10 +01:00
Irmen de Jong
30e1c3307c simplify SourceCode: just read the full text immediately. Also optimized imports. 2022-02-05 03:50:54 +01:00
Irmen de Jong
f965804e6d fix invalid optimization of returning a parameter variable in a subroutine 2022-01-28 16:44:42 +01:00
Irmen de Jong
ec078eba72 optimize w=msb(w) => w>>=8, w=lsb(w) ==> w&=$00ff 2022-01-28 16:11:52 +01:00
Irmen de Jong
7b3cd71085 fixed improper optimization of word<<8 and word>>8 2022-01-28 13:54:06 +01:00
Irmen de Jong
586ce1fc80 tweak return's use of intermediate variable 2022-01-24 01:10:04 +01:00
Irmen de Jong
3b59592110 generalize string encoding flag into enum 2022-01-18 21:21:49 +01:00
Irmen de Jong
8e56656c8d fix broken code generated for certain ==/!= expressions 2022-01-16 17:10:49 +01:00
Irmen de Jong
564a6a1f62 fix invalid removal of Jump
that would generate wrong code if occurs at the end of a subroutine
2022-01-16 14:05:42 +01:00
Irmen de Jong
b29c3152db Assignment: make its origin explicit 2022-01-10 02:25:02 +01:00
Irmen de Jong
3831679772 VarDecl: make its origin explicit 2022-01-10 01:53:03 +01:00
Irmen de Jong
895534f32b don't remove dead variable assignments if they are a function call 2022-01-09 18:41:01 +01:00
Irmen de Jong
d99d977d2b fix more typecasting issues 2022-01-08 17:04:25 +01:00
Irmen de Jong
7dd7e562bc pipes also as expressions, cleanup codegen, fix various typecasting issues 2022-01-08 13:45:19 +01:00
Irmen de Jong
17694c1d01 better error handling of invalid number casts 2022-01-07 22:12:13 +01:00
Irmen de Jong
749ad700d8 naming consistency for some expression classes 2022-01-07 21:02:55 +01:00
Irmen de Jong
8f3df3039a added pipe operator `|>` 2022-01-06 22:54:18 +01:00
Irmen de Jong
b62183adcb slightly optimized binexpr evaluation for ==/!= in some cases 2021-12-30 02:00:36 +01:00
Irmen de Jong
de6ce4a46e add "X in [1,2,3]" expression (efficient containment check) 2021-12-29 17:26:00 +01:00
Irmen de Jong
7b54aa0c7d more consistent naming of the statement classes 2021-12-28 13:56:47 +01:00
Irmen de Jong
6e11b8ada1 GoSub no longer inherits from Jump node, fixes subtle ast/codegen bugs related to jsrs 2021-12-28 01:55:13 +01:00
Irmen de Jong
1c7c4fc3b0 optimized if-goto codegeneration 2021-12-28 00:42:00 +01:00
Irmen de Jong
97e84d0977 tweak if statement handling 2021-12-27 15:04:25 +01:00
Irmen de Jong
9906b58818 tweak while desugaring, moved postfixexpr optimizations to VariousCleanups regardless of optimizer setting because asmgen requires these for conditional expressions 2021-12-27 12:41:26 +01:00
Irmen de Jong
4da4f96669 lower code: break -> goto after (simplifies codegen) 2021-12-25 22:30:38 +01:00
Irmen de Jong
a090fe3834 no compiler optimizer crash on certain missing symbol 2021-12-23 23:51:21 +01:00
Irmen de Jong
e051e09c1d trim down number of warnings a bit 2021-12-17 20:21:14 +01:00
Irmen de Jong
1462c57d0c no need for intermediary returnvalue var for prefix expressions 2021-12-16 21:00:38 +01:00
Irmen de Jong
08f87c321f fixed capitalization of operator sets to be consistent with other sets names 2021-12-15 23:43:14 +01:00
Irmen de Jong
a7b5949e6a fix compiler crash when using a gosub/subroutinecall in a branch statement 2021-12-11 15:11:16 +01:00
Irmen de Jong
3d743a1ba1 added more constfolding 2021-12-09 23:32:48 +01:00
Irmen de Jong
abca618008 added more constfolding 2021-12-09 23:12:12 +01:00
Irmen de Jong
0d2c3901a3 added more constfolding 2021-12-09 22:12:31 +01:00
Irmen de Jong
d8d56b195f comments 2021-12-09 21:13:13 +01:00
Irmen de Jong
c92f914081 gradle build settings tweak to avoid jdk version conflict 2021-12-04 18:36:47 +01:00
Irmen de Jong
0498444ef2 moved all unit tests into single project to avoid dependency issues 2021-12-04 18:20:22 +01:00
Irmen de Jong
e545ea9504 fix and optimize storing A into pointervar 2021-12-04 04:43:58 +01:00
Irmen de Jong
b438d8aec0 fix invalid range size check when stepval is not a positive integer 2021-11-29 02:01:19 +01:00
Irmen de Jong
45b8762188 use inc/ina instead of adc 2021-11-29 00:07:15 +01:00
Irmen de Jong
9256f910f0 rollback binexpr splitting, caused slowdowns 2021-11-28 18:50:05 +01:00
Irmen de Jong
32068a832a split some additional binary expressions to avoid stack-based evaluation 2021-11-28 18:27:28 +01:00