Commit Graph

67 Commits

Author SHA1 Message Date
Irmen de Jong
e779a07bce allow when with byte 1,2,3 for word variables without having to cast the values to word explicitly 2023-03-09 22:15:56 +01:00
Irmen de Jong
9ca6860ffa tweak 2023-02-19 15:08:16 +01:00
Irmen de Jong
0cbc56b82e remove unused ast print func 2023-02-13 00:19:48 +01:00
Irmen de Jong
75d486b124 fix variable node casting 2023-02-12 17:04:58 +01:00
Irmen de Jong
6aabbffc62 some cleanups 2023-02-09 02:34:18 +01:00
Irmen de Jong
c75b1581d2 lookup via new ST 2023-02-05 01:15:23 +01:00
Irmen de Jong
0f5cd22bb7 more codegen fixes 2023-01-31 22:57:26 +01:00
Irmen de Jong
e08da659e5 got rid of PtScopeVarsDecls node, just insert variable nodes directly 2023-01-29 13:25:15 +01:00
Irmen de Jong
8e730ef93d optimizing scoped names more and fix scoping of identifier names in arrays (pointers) in SymbolTable 2022-12-31 03:20:20 +01:00
Irmen de Jong
e0913a39ab optimizing 2022-12-30 18:50:45 +01:00
Irmen de Jong
7a27fbc001 add params for future changes 2022-12-30 17:43:55 +01:00
Irmen de Jong
1860f66de5 allow "x not in array" as equivalent to "not x in array"
update antlr parsing lib
2022-12-23 17:59:56 +01:00
Irmen de Jong
d0e6a2eb8b fix compiler crash on hoisting certain vardecls from inner scopes 2022-12-22 18:49:53 +01:00
Irmen de Jong
e2f20ebf94 fix crash on empty conditional branch statement (if_cc { } ) 2022-11-23 02:14:48 +01:00
Irmen de Jong
d8e87bd881 make uword xx = 1<<shift into a word shifting 2022-11-16 01:39:34 +01:00
Irmen de Jong
b22804efaf ir: fix inlineasm linking 2022-10-31 23:59:33 +01:00
Irmen de Jong
8f9d1cfa30 fix regression: indexing pointer variable with word (>255) didn't work anymore since release 8.2 or so 2022-10-24 23:43:47 +02:00
Irmen de Jong
0d4dd385b8 added '%ir' to write inline IR code, '%asm' is now only for real 6502 assembly.
(%ir is probably only used in the library modules for the virtual machine target)
2022-09-30 15:12:26 +02:00
Irmen de Jong
f37a822725 move 2022-08-14 13:17:03 +02:00
Irmen de Jong
88cbb6913d tweak bool type handling 2022-07-11 14:55:50 +02:00
Irmen de Jong
6a57337a68 improved bool type checking 2022-07-08 22:59:35 +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
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
c75bd97537 update kotest 2022-06-26 18:51:03 +02:00
Irmen de Jong
5a756aaed9 Pipe expression "|>" removed from the language 2022-06-12 18:41:42 +02:00
Irmen de Jong
af2ca7a67e fix problematic characters that cause path errors on Windows 2022-06-05 11:46:37 +02:00
Irmen de Jong
ba614801ee cleanup 2022-05-22 23:11:22 +02:00
Irmen de Jong
dad5b17ac8 fix regression compiler crash in string comparison 2022-05-08 13:47:24 +02:00
Irmen de Jong
6f2fdbe447 added %option merge, also fixed problem with unit test building in newer IntelliJ version 2022-04-15 22:38:32 +02:00
Irmen de Jong
ab1766a559 moved all *integer* builtin trig functions (sin8u, cos8u etc) as regular asmsubs in math module 2022-04-13 00:27:35 +02:00
Irmen de Jong
b133d51a83 make the parser report '&&' as an error instead of treating it as bitwise and followed by address-of. 2022-04-02 02:08:01 +02:00
Irmen de Jong
3b6e7eccdd simplified containment check, only possible on string and arrays (as per the docs) 2022-03-27 16:59:55 +02:00
Irmen de Jong
27f6d47efa working on vm codegen 2022-03-24 23:26:57 +01:00
Irmen de Jong
ff57c5e9d3 working on vm and new ast 2022-03-21 01:36:11 +01:00
Irmen de Jong
92737bb695 better handling of loadAddress 2022-03-13 16:21:02 +01:00
Irmen de Jong
4a0031080a getting rid of directives in new Ast 2022-03-13 00:30:20 +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
9a798360f4 introduced codeAst and codeCore modules to reduce dependencies 2022-03-10 22:38:16 +01:00
Irmen de Jong
844ad09464 reducing dependencies 2022-03-10 21:36:51 +01:00
Irmen de Jong
abcdd331db started with a simulator 2022-03-10 21:23:00 +01:00
Irmen de Jong
775d136b91 new compileText result 2022-03-10 21:22:32 +01:00
Irmen de Jong
dc93691fd9 working on new ast 2022-03-10 21:22:32 +01:00
Irmen de Jong
0a04e626d7 added new intermediate (simplified) AST meant for new codegen 2022-03-10 21:21:15 +01:00
Irmen de Jong
251b6fcf70 reducing dependencies 2022-03-10 02:09:34 +01:00
Irmen de Jong
7d20458e82 fixed arrayliteral regression 2022-03-10 01:02:40 +01:00
Irmen de Jong
db7ae028b2 simplified CompilationResult a bit 2022-03-07 21:41:12 +01:00
Irmen de Jong
6a0551cea1 added 'atari' compiler target beginnings (Atari 800 XL)
also default char and string encoding now taken from compiler target
2022-02-22 00:52:35 +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
af0e7f7187 searching names in inlined assembly now ignores source comments 2022-02-13 13:41:12 +01:00