Commit Graph

128 Commits

Author SHA1 Message Date
Irmen de Jong
41f4e22a17 introduce BOOL type 2022-07-07 22:23:56 +02:00
Irmen de Jong
7fff4f249d optimize msb(cx16.r0) -> cx16.r0H, lsb(cx16.r0) -> cx16.r0L 2022-07-02 21:38:22 +02:00
Irmen de Jong
25aad8d7be improve const-evaluation of builtin expressions 2022-07-02 16:29:01 +02:00
Irmen de Jong
965340ff90 logical and/or/xor/not all replaced by bitwise &,|,^,~ (ast, codegens)
this also fixed some invalid outcomes of logical expressions!
2022-07-02 00:38:17 +02:00
Irmen de Jong
97cb0cbd08 tweak "not" removal/rewriting 2022-06-30 02:16:30 +02:00
Irmen de Jong
4b358abbb7 "not" operator removed from ast and codegen (it's been replaced with x==0 as equivalent) 2022-06-29 01:13:08 +02:00
Irmen de Jong
435d6f6f3f vm: and/or/xor/not are all bitwise operations again 2022-06-28 03:17:51 +02:00
Irmen de Jong
775c85fc18 don't swap operands that would change function evaluation order + vm: fix label casing error 2022-06-13 00:25:45 +02:00
Irmen de Jong
5a756aaed9 Pipe expression "|>" removed from the language 2022-06-12 18:41:42 +02:00
Irmen de Jong
dca092fd7c fix pipe expression when start term is constant number 2022-06-12 16:59:28 +02:00
Irmen de Jong
c6e92ecac4 some code cleanup 2022-06-12 16:15:08 +02:00
Irmen de Jong
f7183e38ee tweak trivial subroutine inlining 2022-06-08 21:05:03 +02:00
Irmen de Jong
46ca0ac10d properly optimize X - -1 and X + -1, this also fixes type change of ubyte - 2 + 10 2022-06-05 15:35:29 +02:00
Irmen de Jong
7f69517fd4 preparing optimizing pointer indexing 2022-06-04 16:18:27 +02:00
Irmen de Jong
ba614801ee cleanup 2022-05-22 23:11:22 +02:00
Irmen de Jong
fd6eb47e68 added inlining certain trivial non-asm subroutine calls 2022-05-22 20:22:09 +02:00
Irmen de Jong
627aa61184 clean up subroutine inlining, basis for new try 2022-05-09 15:42:58 +02:00
Irmen de Jong
942c5cc04b fix crash when optimizing pipe expression too aggressively 2022-05-07 17:29:36 +02:00
Irmen de Jong
348b3036ff now correctly accepts "xxx" * constexpr (where constexpr is not just a single const number) 2022-05-05 23:21:20 +02:00
Irmen de Jong
220246278a removed sum(), max(), min(). abs() now always returns uword type.
This greatly simplifies internal handling of builtin functions by always having one fixed return type.
2022-04-14 00:21:16 +02:00
Irmen de Jong
207a7e5160 move operator lists 2022-04-10 13:24:17 +02:00
Irmen de Jong
036d9dbe59 got rid of unnecessary cast of boolean expressions by making their type dynamically adjust to byte or word 2022-04-04 23:43:55 +02:00
Irmen de Jong
ae45ce517e cleanups 2022-04-03 17:33:50 +02:00
Irmen de Jong
30cbb6c9a8 implementing more of the vm 2022-03-27 21:59:46 +02:00
Irmen de Jong
ed30108961 removed '**' power-operator. Use floats.pow() instead. 2022-03-27 13:16:34 +02:00
Irmen de Jong
7b27d270a2 gosub only uses an identifier 2022-03-22 20:53:06 +01:00
Irmen de Jong
97b3a0b093 don't use the temp-variables introducing optimizations for the vm target 2022-03-22 20:21:32 +01:00
Irmen de Jong
ff57c5e9d3 working on vm and new ast 2022-03-21 01:36:11 +01:00
Irmen de Jong
3961f26635 consolidating modules 2022-03-11 20:45:39 +01:00
Irmen de Jong
e51c274a18 reducing dependencies 2022-03-11 20:32:35 +01:00
Irmen de Jong
e75d0c58a9 reducing dependencies 2022-03-10 23:46:43 +01:00
Irmen de Jong
9a798360f4 introduced codeAst and codeCore modules to reduce dependencies 2022-03-10 22:38:16 +01:00
Irmen de Jong
251b6fcf70 reducing dependencies 2022-03-10 02:09:34 +01:00
Irmen de Jong
ab1fffb721 reducing dependencies 2022-03-10 01:41:42 +01:00
Irmen de Jong
fc1c3c6808 working on altered pipe syntax 2022-03-02 20:58:38 +01:00
Irmen de Jong
96ba895b84 working on altered Pipe syntax 2022-02-27 02:42:28 +01:00
Irmen de Jong
064a8e785c cleanups 2022-02-21 03:26:17 +01:00
Irmen de Jong
60b2c44a44 fix returntype handling of builtinfunctions, fix errors in pipe expressions 2022-02-21 01:44:29 +01:00
Irmen de Jong
c4fe3ecc0a refactor 2022-02-20 22:04:18 +01:00
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