Commit Graph

146 Commits

Author SHA1 Message Date
Irmen de Jong
54fccec7d7 now also support using defer inside if statements 2024-11-12 00:11:19 +01:00
Irmen de Jong
3ba1d00a7c add unit test for @dirty variables 2024-11-09 13:31:54 +01:00
Irmen de Jong
9864abd393 romsub keyword is now extsub 2024-11-06 22:14:53 +01:00
Irmen de Jong
c702c4a6df internal rename of romsub to extsub 2024-11-06 21:42:16 +01:00
Irmen de Jong
89425088ce taking address of a split word array is no longer a fatal error but a warning and the array is turned back into a normal word array. 2024-11-01 20:18:31 +01:00
Irmen de Jong
eeeb8d81f4 merge now also allows monkeypatching if signature is 100% identical 2024-10-30 01:15:56 +01:00
Irmen de Jong
bbba4b3d60 new block merge semantics and implementation 2024-10-29 22:57:54 +01:00
Irmen de Jong
76b05cb5fd fix chained aliasing 2024-10-28 18:35:23 +01:00
Irmen de Jong
a82f211f9a added alias statement 2024-10-28 00:36:10 +01:00
Irmen de Jong
326eab3dd1 unit test for defer, describe defer and if expression in docs 2024-10-22 22:19:49 +02:00
Irmen de Jong
0247fb0d84 some ast2 var tweaks 2024-10-21 00:20:54 +02:00
Irmen de Jong
a0cf1889a3 omit more redundant 0-initializations ("stz's") 2024-10-17 22:51:39 +02:00
Irmen de Jong
7a0eaf3148 Remove array initialization by single value.
New compiler and kotlin version.
2024-10-13 04:31:56 +02:00
Irmen de Jong
51279a98b3 attempt to fix forloop range datatype issues 2024-10-03 21:12:31 +02:00
Irmen de Jong
fff0d741c3 improved parsing of "not in" operator, and [] array signature (allow space) 2024-10-02 19:06:20 +02:00
Irmen de Jong
a064ade1e0 better codegen for call() function 2024-09-29 23:18:51 +02:00
Irmen de Jong
4c843571ea fix syntax error check for missing return statement 2024-09-26 01:52:33 +02:00
Irmen de Jong
e29ff1c848 fix name redefinition check for multi-declarations 2024-09-20 19:55:32 +02:00
Irmen de Jong
4e98fb75d6 support assigning multiple return flags from asmsub in 6502 codegen 2024-09-09 22:56:40 +02:00
Irmen de Jong
2da35fec17 remove requirement to end subroutine with an EOL, so oneliners are now possible
main { sub start() { cx16.r0++ cx16.r1++ } }
2024-09-01 20:55:43 +02:00
Irmen de Jong
8f6eaeac2c half width katakana conversion 2024-08-21 18:51:34 +02:00
Irmen de Jong
966b017670 tweaks 2024-07-22 18:20:01 +02:00
Irmen de Jong
2aae1f5e30 stricter checks for negative array indexing 2024-07-20 22:37:03 +02:00
Irmen de Jong
c9a4235669 update to kotlin 2.0, fix several code style issues 2024-06-04 01:00:46 +02:00
Irmen de Jong
8973763866 Fix line endings conversion errors on windows builds 2024-06-04 00:12:12 +02:00
Irmen de Jong
62afd3342e void syntax check, fixes #135 2024-05-18 17:15:31 +02:00
Irmen de Jong
5d7ddebcad fix bool to uword cast in 6502 codegen 2024-04-11 00:34:53 +02:00
Irmen de Jong
2aae46d632 added -dumpsymbols option to print a dump of all the variables and subroutine signatures 2024-04-09 19:19:13 +02:00
Irmen de Jong
6ed9899dc7 smarter desugaring of ubyte x,y 2024-04-07 23:36:46 +02:00
Irmen de Jong
ddb8346711 added txt.cls() as a shorter alternative to clear_screen().
cx16: added new character encodings, and routines in textio to enable the character sets for them.
cx16: added txt.chrout_lit() and txt.print_lit() to always print the literal characters and never as control codes
2024-04-07 19:32:44 +02:00
Irmen de Jong
641f6c05d8 allow 'void' as dummy assign target in multi-assignment statements 2024-03-31 23:43:26 +02:00
Irmen de Jong
3e34a3ef72 allow multi-assign to skip any status register result 2024-03-29 23:10:08 +01:00
Irmen de Jong
993be6394e unit tests multi-assigns 2024-03-25 23:20:03 +01:00
Irmen de Jong
f40b7b62bb updated unit tests and some basic changes for them 2024-03-02 23:19:20 +01:00
Irmen de Jong
358215e4dd removed postIncrDecr (still allow ++/-- to be parsed into +=1/-=1) 2024-02-06 18:50:08 +01:00
Irmen de Jong
78b4288005 avoid git's line ending translation for this test... 2024-02-03 14:57:25 +01:00
Irmen de Jong
680f5d21ee normalize DOS line endings to just \n, fixes source lines in asm for \r\n source files 2024-02-03 12:53:21 +01:00
Irmen de Jong
932035cdc5 flag "returning a statement" as a syntax error 2024-01-31 21:36:39 +01:00
Irmen de Jong
87c46ba730 check boolean array size mismatch.
check for weird string assignment.
check for X16 problematic cpu instructions rmb, smb, bbr, bbs.
tweak number node equality wrt bool type
2024-01-21 19:15:22 +01:00
Irmen de Jong
fdbbd181ea fixes for address-of uword pointer array expressions 2024-01-17 22:51:15 +01:00
Irmen de Jong
504d1440cc fixed rol(),rol2(),ror(),ror2() 2024-01-17 21:02:17 +01:00
Irmen de Jong
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
Irmen de Jong
f27e3478b9 fix const value of AddressOf for certain types 2024-01-09 22:10:25 +01:00
Irmen de Jong
f8084e7955 fix const replacement optimization error on memory mapped variable 2024-01-07 18:48:18 +01:00
Irmen de Jong
f2daa17b92 tweak some not optimizations
cleanup IR typestring
2024-01-05 17:49:56 +01:00
Irmen de Jong
6d9fccacb1 boolean not expression tweaks and optimizations 2024-01-05 13:32:16 +01:00
Irmen de Jong
56ba24962c fixed 'not not x' optimization to just 'x' 2024-01-04 15:02:21 +01:00
Irmen de Jong
6aed7e429a allow containment check in a range expression ("run time" range expression) 2024-01-03 01:17:13 +01:00
Irmen de Jong
d446b57d05 fix unittest 2024-01-01 16:11:50 +01:00
Irmen de Jong
d1f8ee1e56 replace most common subexpressions by a single temp variable 2024-01-01 14:57:24 +01:00