Commit Graph

244 Commits

Author SHA1 Message Date
a4f697bae1 faster 2024-02-10 23:56:55 +01:00
4dc50cb551 fix unused subroutine removal not removing all unused subs 2024-02-10 21:26:53 +01:00
d7f72056fc rest of the array copying 2024-02-10 17:16:06 +01:00
8485b8429f optimizing +=1/-=1 2024-02-06 23:49:40 +01:00
358215e4dd removed postIncrDecr (still allow ++/-- to be parsed into +=1/-=1) 2024-02-06 18:50:08 +01:00
d4a2031c07 fix certain assignment data type mismatch crash 2024-01-25 21:14:20 +01:00
a8c09d6144 removed a problematic bitshift replacement in the const evaluator 2024-01-21 23:05:51 +01:00
fdbbd181ea fixes for address-of uword pointer array expressions 2024-01-17 22:51:15 +01:00
e0de662f8e fix signed word bitshift right (>8 shifts) 2024-01-16 01:08:16 +01:00
45a9751217 fix type of optimized lsb() / mkword() arguments when signed.
printast1 command line option now also works in case of compilation errors.
2024-01-10 23:57:44 +01:00
f27e3478b9 fix const value of AddressOf for certain types 2024-01-09 22:10:25 +01:00
f8084e7955 fix const replacement optimization error on memory mapped variable 2024-01-07 18:48:18 +01:00
d85c347a6c optimize /256 more, and fixed a unsigned byte word cast error 2024-01-07 02:34:05 +01:00
7dd758a753 better optimize WORD & $xx00 , WORD & $00xx 2024-01-06 22:01:21 +01:00
806654fc44 fix invalid const optimization with multiplication 2024-01-06 13:59:13 +01:00
8e6b91cb9e some optimizations 2024-01-06 00:44:00 +01:00
f2daa17b92 tweak some not optimizations
cleanup IR typestring
2024-01-05 17:49:56 +01:00
6d9fccacb1 boolean not expression tweaks and optimizations 2024-01-05 13:32:16 +01:00
37638e7ed0 added Absorption laws optimization 2024-01-05 00:36:47 +01:00
0e086d788b removed chained comparisons again, because they caused invalid expression evaluations due to changed semantics. 2024-01-01 16:00:11 +01:00
d03ff1e4d0 improved var -> const replacement, now done in constfolding already (fixes some obscure problems later on)
Also fixed some directive parenting errors
2023-12-29 19:48:40 +01:00
ccc11e49d2 fix asmgen for uword shift right 8 or more bits 2023-12-29 05:06:09 +01:00
a0594cbce3 const optimizer now knows about a bunch of library functions, such as math.* 2023-12-28 20:14:13 +01:00
9c1b11d605 some WARN messages are now INFO 2023-12-28 14:20:47 +01:00
09c6cb4d6b replace unwritten vars by consts. Improved const eval.
Fixed some slight bugs in library code
2023-12-28 05:17:15 +01:00
2b8f613a00 added %option ignore_unused to suppress warnings about unused vars and subs in that module/block.
Also improved error for invalid directive.
2023-12-26 23:37:59 +01:00
2eb137618e refactor block options 2023-12-26 22:13:08 +01:00
4bb2b8ca9b make isArray a computed property by simply checking the datatype 2023-12-26 19:58:08 +01:00
a8be94de6b better error message when attempting to cast a float to integer 2023-12-15 22:28:06 +01:00
58400f53bc optimize: flip if true/else blocks if the else block only contains a jump (inverting the condition) 2023-12-13 22:06:53 +01:00
08a079a96e concerns with in for strings 2023-12-11 21:15:48 +01:00
2668bf8519 fix void optimization issue 2023-12-09 21:48:22 +01:00
cce08d95db unused subroutine warning only for main compilation module 2023-12-06 21:48:56 +01:00
6ebd4e821f improved docs about subroutine scoping, fix possible optimizer crash for inlined sub 2023-12-04 23:23:52 +01:00
db52a9466c fix weird compiler warning for while 1 {..} 2023-12-02 20:24:45 +01:00
1509de390e various fixes
print_f() no longer prints a leading space.
Better error message if using float in for loop.
Fix crash when using non-const as when choice value.
VM print_f() more closely resembles the CBM version.
2023-12-02 18:23:54 +01:00
88a1aa4f3d fix invalid optimization for integers (X/C1)*C2 , only ok for floats because of int rounding 2023-12-01 23:17:49 +01:00
8dfa0bc38c fix a compiler crash in certain vardecl initialization expressions 2023-11-28 21:01:58 +01:00
44d232f52a optimize for x in something downto 0 2023-11-26 02:24:18 +01:00
2764d235a9 optimizing for x in 0 to something 2023-11-25 21:37:27 +01:00
f21adaa3ef fix compiler error caused by removal of string symbol in txt.print() optimization 2023-11-17 19:51:48 +01:00
7e3b8c2c59 fix compiler crash on certain subroutine inlining attempts. 2023-11-09 21:16:12 +01:00
3b0d7ea960 better const-evaluation of addressOf a memory mapped variable 2023-11-08 22:04:41 +01:00
efe4df92dc optimize when with const value (remove other choices from code) 2023-11-06 00:08:07 +01:00
d9389afc66 fix compiler crash on certain constant expressions 2023-11-05 13:59:08 +01:00
b7a622c68e fix alignment of uninitialized arrays in aligned blocks (make them initialized with zeros so they don't end up in the BSS section)
fix alignment of uninitialized arrays in aligned blocks (make them initialized with zeros so they don't end up in the BSS section)
2023-10-04 00:12:36 +02:00
880c0a5da8 allow taking address of array element 2023-09-18 04:37:41 +02:00
31c132c2eb several optimizations and compiler error fix for @(&var) and @(&var+1) 2023-09-14 23:04:23 +02:00
6afdd4e6fd preparing next version 2023-09-12 21:53:49 +02:00
c15c10a94e fixed 'unroll CONSTANTEXPR' compiler errors 2023-09-05 01:03:35 +02:00