327 Commits

Author SHA1 Message Date
0456badd02 creating on a new visitor-based antlr to kotlin translator 2025-06-02 01:18:07 +02:00
435dfbb932 optimize: rewrite suitable when into on..goto 2025-05-13 01:12:58 +02:00
d04164c0a6 fix const evaluation of bitwise logical expressions (&, |, ^, <<, >>) of signed operands 2025-04-30 22:27:31 +02:00
b047731f82 removed some redundant arguments 2025-04-25 23:27:06 +02:00
99ae8ea52e code cleanup 2025-04-24 18:51:03 +02:00
1e702439b7 avoid JDK 21+/Kotlin method conflict of removeLast()/removeFirst()
background: see https://www.reddit.com/r/androiddev/comments/1gspjrs/dont_use_kotlins_removefirst_and_removelast_when/
https://youtrack.jetbrains.com/issue/KT-71375/Prevent-Kotlins-removeFirst-and-removeLast-from-causing-crashes-on-Android-14-and-below-after-upgrading-to-Android-API-Level-35

it's about Android but the problem also occurs on desktop JDKs for example when running a Java21 compiled prog8 with Java17
2025-04-24 18:11:42 +02:00
dd2d466350 code cleanups 2025-04-17 22:58:02 +02:00
dfda8b7ed5 remove problematic rewriting of X=value-X 2025-04-14 02:35:37 +02:00
3770a4fe0c easier datatype notation by just using the type objects directly 2025-03-18 23:33:04 +01:00
6ff75bef29 fix verafx register address typo VERA_FX_POLY_FILL_H 2025-02-27 21:59:04 +01:00
3e2b2a698d Separate simple Ast and Symboltable from codeCore into new simpleAst module. VirtualMachine and Intermediate do not need them, just codeCore. 2025-02-24 22:06:52 +01:00
efd41260f2 added %jmptable 2025-02-09 15:02:59 +01:00
08cd2fd6e8 fix check for assigning to a constant, for multi-value assigns. 2025-01-18 20:38:02 +01:00
bc7b086f0f fix a configurable compilation target, add working example 2025-01-17 22:58:51 +01:00
e8f3af6981 adding a configurable compilation target 2025-01-17 00:56:44 +01:00
09a17743ad merge IMachineDefinition into ICompilationTarget 2025-01-13 21:45:38 +01:00
ca9422bbe9 be able to parse multiple return values (sub + return) 2025-01-07 01:51:54 +01:00
d187cef6b7 optimize x=min(x,100) and some other simple min() and max() cases 2025-01-05 11:59:00 +01:00
10b9162dc5 improving fileselector 2024-12-30 21:34:03 +01:00
4c1e2f3110 refactor package nesting of ast exception classes 2024-12-23 18:14:46 +01:00
2727a4dcb3 tweak DataType class and memsizer related to subtypes/elementtypes 2024-12-23 17:28:25 +01:00
512ddd1694 cleanups 2024-12-20 22:59:20 +01:00
3804fba0f1 moved jdk version config back to main gradle build file, version consistency 2024-12-19 13:39:27 +01:00
7c79cdbd2f fix symbol prefixing on goto with expression
added coroutines example
2024-12-17 16:16:38 +01:00
02f3f5d0f5 @split is back to force splitting of word arrays 2024-12-16 14:51:32 +01:00
8f799567cf make word arrays split by default (w.i.p.) 2024-12-15 08:12:34 +01:00
535ec13072 improved codegen for testing for single bits: x & mask == mask 2024-12-09 04:05:00 +01:00
1a1ab0dac6 changed the data type system to composite types 2024-12-05 21:48:51 +01:00
6aaa0f928e IR: fix invalid asm name matching that resulted in not removing subs with a name matching an IR asm instruction 2024-11-30 00:10:57 +01:00
189399d5f8 update to kotlin 2.1.0 2024-11-28 03:49:07 +01:00
d58f9f56c4 tests for register args for normal subs
some warnings demoted into infos
2024-11-24 19:21:45 +01:00
2e35f3c3a3 code check cleanups 2024-11-24 16:14:22 +01:00
5c6bd9c091 register params support for normal subroutines 2024-11-24 15:56:54 +01:00
906b137a7c renamed 'string' module to 'strings' for consistency 2024-11-23 15:51:38 +01:00
f569ce6141 setting a byte >=128 or word >=32768 now results in an out-of-range error, instead of an invalid casted value 2024-11-22 21:24:04 +01:00
5c09dc10ae convert build.gradle to build.gradle.kts (kotlin DSL) 2024-11-20 23:23:26 +01:00
35c477b5a6 Make extsub address a (constant) expression instead of a numeric literal
this makes it easier to define API jump tables
2024-11-20 23:23:26 +01:00
a874aec6a1 implementing const long 2024-11-20 23:22:56 +01:00
d640cfbe13 removed BuiltinFunctionCallStatement redundant ast node type 2024-11-20 23:22:56 +01:00
51a05ec4b7 removed BuiltinFunctionCall redundant ast node type 2024-11-20 23:22:56 +01:00
64164c1c72 changed @initonce to @dirty and meaning is now: not initialized at all. 2024-11-08 22:05:31 +01:00
f89f1a84d0 @initonce variable tag to skip variable reinitialization 2024-11-08 19:03:48 +01:00
7cfb33a448 tweak & fix if expression with word condition 2024-11-02 22:01:57 +01:00
a82f211f9a added alias statement 2024-10-28 00:36:10 +01:00
c9535049c8 %align directive and @align64 2024-10-26 20:58:35 +02:00
1cd754f05d adding @alignword/page on individual variables 2024-10-26 17:00:38 +02:00
6da1f7eb4c don't remove essential subroutines even though they seem unused 2024-10-22 21:17:02 +02:00
ca5f7ae32f global (block-level) variables that get initialized with an array index expression now get a constant value as well if possible. This reduces the number of instructions in the init globals code block 2024-10-16 02:14:19 +02:00
aef211e5f3 stricter array literal element type handling (number,bool,address-of).
More consistent implicit address-of handling if array literals contain by-ref identifiers (such as subroutine names)
2024-10-13 17:46:41 +02:00
66829203d8 New [x]*42 syntax to create array literals with repeated values (like "abc"*10 already exists for strings)
Should be used in place of array initializer expressions that contain only a single numeric value to initialize the whole array with. That isn't supported anymore.
2024-10-13 05:16:08 +02:00