Commit Graph

335 Commits

Author SHA1 Message Date
Irmen de Jong 96f690e749 fix a ptr indexing error 2025-05-17 20:27:38 +02:00
Irmen de Jong 38448e471c Merge branch 'master' into structs
# Conflicts:
#	codeGenCpu6502/src/prog8/codegen/cpu6502/ForLoopsAsmGen.kt
#	codeGenIntermediate/src/prog8/codegen/intermediate/IRCodeGen.kt
#	examples/test.p8
2025-05-13 23:42:13 +02:00
Irmen de Jong 435dfbb932 optimize: rewrite suitable when into on..goto 2025-05-13 01:12:58 +02:00
Irmen de Jong 59c378089e fix some struct type and symbol lookup errors 2025-05-11 00:52:35 +02:00
Irmen de Jong 835c4b6da3 allow multi-field declarations in structs, get rid of . -> ^^ rewrite 2025-05-03 12:32:29 +02:00
Irmen de Jong e0dea89477 added support for ptr[x].field 2025-05-02 22:16:20 +02:00
Irmen de Jong 2661d3c489 allow array syntax on pointers 2025-05-02 00:41:42 +02:00
Irmen de Jong b920d553a0 make address-of dereference work 2025-05-02 00:41:42 +02:00
Irmen de Jong 5e2d0d0dfc fix param order of AssignTarget 2025-05-02 00:41:42 +02:00
Irmen de Jong e328520588 initial struct and typed pointer support 2025-05-02 00:41:40 +02:00
Irmen de Jong d04164c0a6 fix const evaluation of bitwise logical expressions (&, |, ^, <<, >>) of signed operands 2025-04-30 22:27:31 +02:00
Irmen de Jong b047731f82 removed some redundant arguments 2025-04-25 23:27:06 +02:00
Irmen de Jong 99ae8ea52e code cleanup 2025-04-24 18:51:03 +02:00
Irmen de Jong 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
Irmen de Jong dd2d466350 code cleanups 2025-04-17 22:58:02 +02:00
Irmen de Jong dfda8b7ed5 remove problematic rewriting of X=value-X 2025-04-14 02:35:37 +02:00
Irmen de Jong 3770a4fe0c easier datatype notation by just using the type objects directly 2025-03-18 23:33:04 +01:00
Irmen de Jong 6ff75bef29 fix verafx register address typo VERA_FX_POLY_FILL_H 2025-02-27 21:59:04 +01:00
Irmen de Jong 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
Irmen de Jong efd41260f2 added %jmptable 2025-02-09 15:02:59 +01:00
Irmen de Jong 08cd2fd6e8 fix check for assigning to a constant, for multi-value assigns. 2025-01-18 20:38:02 +01:00
Irmen de Jong bc7b086f0f fix a configurable compilation target, add working example 2025-01-17 22:58:51 +01:00
Irmen de Jong e8f3af6981 adding a configurable compilation target 2025-01-17 00:56:44 +01:00
Irmen de Jong 09a17743ad merge IMachineDefinition into ICompilationTarget 2025-01-13 21:45:38 +01:00
Irmen de Jong ca9422bbe9 be able to parse multiple return values (sub + return) 2025-01-07 01:51:54 +01:00
Irmen de Jong d187cef6b7 optimize x=min(x,100) and some other simple min() and max() cases 2025-01-05 11:59:00 +01:00
Irmen de Jong 10b9162dc5 improving fileselector 2024-12-30 21:34:03 +01:00
Irmen de Jong 4c1e2f3110 refactor package nesting of ast exception classes 2024-12-23 18:14:46 +01:00
Irmen de Jong 2727a4dcb3 tweak DataType class and memsizer related to subtypes/elementtypes 2024-12-23 17:28:25 +01:00
Irmen de Jong 512ddd1694 cleanups 2024-12-20 22:59:20 +01:00
Irmen de Jong 3804fba0f1 moved jdk version config back to main gradle build file, version consistency 2024-12-19 13:39:27 +01:00
Irmen de Jong 7c79cdbd2f fix symbol prefixing on goto with expression
added coroutines example
2024-12-17 16:16:38 +01:00
Irmen de Jong 02f3f5d0f5 @split is back to force splitting of word arrays 2024-12-16 14:51:32 +01:00
Irmen de Jong 8f799567cf make word arrays split by default (w.i.p.) 2024-12-15 08:12:34 +01:00
Irmen de Jong 535ec13072 improved codegen for testing for single bits: x & mask == mask 2024-12-09 04:05:00 +01:00
Irmen de Jong 1a1ab0dac6 changed the data type system to composite types 2024-12-05 21:48:51 +01:00
Irmen de Jong 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
Irmen de Jong 189399d5f8 update to kotlin 2.1.0 2024-11-28 03:49:07 +01:00
Irmen de Jong d58f9f56c4 tests for register args for normal subs
some warnings demoted into infos
2024-11-24 19:21:45 +01:00
Irmen de Jong 2e35f3c3a3 code check cleanups 2024-11-24 16:14:22 +01:00
Irmen de Jong 5c6bd9c091 register params support for normal subroutines 2024-11-24 15:56:54 +01:00
Irmen de Jong 906b137a7c renamed 'string' module to 'strings' for consistency 2024-11-23 15:51:38 +01:00
Irmen de Jong 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
Irmen de Jong 5c09dc10ae convert build.gradle to build.gradle.kts (kotlin DSL) 2024-11-20 23:23:26 +01:00
Irmen de Jong 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
Irmen de Jong a874aec6a1 implementing const long 2024-11-20 23:22:56 +01:00
Irmen de Jong d640cfbe13 removed BuiltinFunctionCallStatement redundant ast node type 2024-11-20 23:22:56 +01:00
Irmen de Jong 51a05ec4b7 removed BuiltinFunctionCall redundant ast node type 2024-11-20 23:22:56 +01:00
Irmen de Jong 64164c1c72 changed @initonce to @dirty and meaning is now: not initialized at all. 2024-11-08 22:05:31 +01:00
Irmen de Jong f89f1a84d0 @initonce variable tag to skip variable reinitialization 2024-11-08 19:03:48 +01:00