Irmen de Jong
a3d14003cb
Enhanced inlining: support subroutines with one simple parameter. NOTE: risky optimization, maybe still broken in obscure cases
...
also improve parent pointer relinking, fix namespace scoping, and refine assembly checks.
2026-06-19 04:57:54 +02:00
Irmen de Jong
b5fc25b2f4
Merge branch 'v12.2.1'
...
# Conflicts:
# compiler/test/TestCompilerOnExamples.kt
# docs/source/_static/symboldumps/skeletons-cx16.txt
2026-06-17 19:41:34 +02:00
Irmen de Jong
0f80b695e7
Fix invalid optimizer edge cases
2026-06-17 01:18:39 +02:00
Irmen de Jong
88a3e5b23f
Merge branch 'v12.2.1'
...
# Conflicts:
# compiler/test/TestCompilerOnExamples.kt
# compiler/test/codegeneration/TestArrayThings.kt
# examples/test.p8
2026-06-16 00:48:35 +02:00
Irmen de Jong
19f3b03ac3
remove problematic inlining for subroutines having 1 or more parameters, to avoid an endless loop
2026-06-16 00:02:05 +02:00
Irmen de Jong
de988f72c6
switch from IDEA iml to Gradle build config, this finally fixes Kotest integration as well
2026-06-08 20:43:54 +02:00
Irmen de Jong
eb19d00a1e
prevent faulty inlining of subs with register-aliased parameters
2026-06-02 23:14:55 +02:00
Irmen de Jong
8bf744cc4a
fix some bitwise expression optimization bugs
2026-05-31 07:35:32 +02:00
Irmen de Jong
6ab74fd51d
don't erroneously allow taking the address of const values
2026-05-27 00:58:01 +02:00
Irmen de Jong
cdd3d37376
update asmsub inlining behavior and tests: improve support for parameterized calls
2026-05-22 04:17:43 +02:00
Irmen de Jong
d0bc01d618
improve inliner: support slightly more complex return expressions
2026-05-22 03:15:57 +02:00
Irmen de Jong
82aa67ffda
lineclip module added
2026-05-15 17:45:13 +02:00
Irmen de Jong
7c44835772
const folding is always done even when -noopt is used
2026-05-15 12:22:52 +02:00
Irmen de Jong
08c12131d4
tweak the rules for turning pointers into consts
2026-05-10 19:51:06 +02:00
Irmen de Jong
5a3ddf705a
threshold 2 on ptr usages before no longer const
...
version 12.2-BETA
2026-05-10 03:08:54 +02:00
Irmen de Jong
fd3d59e159
fix sizeof() on a memory slab reference to return const 2 again
...
diskio.list_filenames() now checks filenames_buf_size minimum (>20)
2026-05-09 23:43:05 +02:00
Irmen de Jong
6d1dfd2a09
due to internal complexity, only pointers to bytes can be made const
2026-05-09 22:45:44 +02:00
Irmen de Jong
1fe5ff18b1
memory() turned into 2 new ast nodes (slab reservation and slab ref) - still somewhat broken
2026-05-09 11:16:09 +02:00
Irmen de Jong
793b2a703b
first step refactoring memory() calls
2026-05-08 19:32:33 +02:00
Irmen de Jong
fd93d103f6
fix const value problems related to memory(), and fix a bug in constvalue calculation for ArrayIndexedExpression
2026-05-07 03:07:01 +02:00
Irmen de Jong
28977996e2
non-const pointers now can get optimized to const too.
2026-05-06 19:50:21 +02:00
Irmen de Jong
1ba8dfcc8b
actually doing some const-folding for most const pointer usages.
2026-05-06 00:31:47 +02:00
Irmen de Jong
cd2d30c2c7
const pointer support added (but lacks proper const-folding still)
2026-05-05 23:21:32 +02:00
Irmen de Jong
6be70af79f
fix Inliner crash when using void in multi-value assignment.
...
update to gradle 9.4.1, tweak agent instructions.
2026-05-03 21:01:57 +02:00
Irmen de Jong
0a1d06b7f2
corrected associative -> commutative operators names, simplified maySwapOperandOrder logic
2026-04-30 01:13:50 +02:00
Irmen de Jong
7383ffae46
fix UnusedCodeRemover wrongly removing var initializers
2026-04-27 00:19:16 +02:00
Irmen de Jong
6f9f31cd8a
better const folding for multivalue assignments / vardecl inits in StatementReorderer
2026-04-24 07:18:01 +02:00
Irmen de Jong
7cd70acc01
implemented const folding of lmh() and divmod()
2026-04-24 06:02:16 +02:00
Irmen de Jong
a5c078be14
fix inline warning
2026-04-21 06:27:40 +02:00
Irmen de Jong
547d21a42b
added more redundant variable initialization removals
2026-04-21 06:13:39 +02:00
Irmen de Jong
8592a3a200
use VarDecl builder instead of constructor
2026-04-19 02:26:50 +02:00
Irmen de Jong
5dcc11d67e
try to avoid crash when importing modules twice (via symlink for instance).
2026-04-18 18:06:41 +02:00
Irmen de Jong
d3f19bb438
fix lacking checks for IO registers in asm optimizer, caused incorrect instruction removals
2026-04-11 18:01:57 +02:00
Irmen de Jong
59d0f7d49c
2-dimensional array support
2026-04-10 04:22:38 +02:00
Irmen de Jong
5c1aa2307d
for loops where the counter variable is unused in the loop body and count is constant -> simple repeat loops
2026-04-05 23:35:58 +02:00
Irmen de Jong
1100ab0d22
performance tweaks
2026-04-03 19:54:37 +02:00
Irmen de Jong
1ed618c474
performance improvements in parser
2026-04-03 04:31:29 +02:00
Irmen de Jong
3da3d63eb4
more inlining support
...
fix invalid character in LSP
2026-04-01 19:04:03 +02:00
Irmen de Jong
45c05522d5
fix inliner bug
2026-03-31 21:25:34 +02:00
Irmen de Jong
db417ab9ce
refactoring AstModification
2026-03-31 19:59:56 +02:00
Irmen de Jong
c17a3aff5c
refactoring AstModification
2026-03-31 15:37:55 +02:00
Irmen de Jong
f38c701658
some support for inlining multi-value returns (where there are no function parameters to deal with)
2026-03-31 04:42:34 +02:00
Irmen de Jong
331e2b8f2b
improve ast source position tracking
2026-03-29 19:49:42 +02:00
Irmen de Jong
05093e35c8
refactor inliner
2026-03-29 11:00:26 +02:00
Irmen de Jong
5fd11ca036
more consistent allowance of inline keyword
2026-03-29 10:15:51 +02:00
Irmen de Jong
400149d5a3
standardize gradle project configurations across submodules
2026-03-28 10:08:47 +01:00
Irmen de Jong
8d44a1b226
implemented bitmap text drawing for the virtual target (so monogfx.text() now works there)
2026-03-26 22:47:44 +01:00
Irmen de Jong
68226a8fcd
Update Kotlin and dependencies to latest versions
...
- Bump Kotlin to 2.3.20 across all configurations.
- Upgrade `kotlin-result-jvm` to 2.3.1 in all modules.
- Update Gradle wrapper to 9.4.0.
- Add `poweroff_system()` function in virtual target symboldump
2026-03-25 17:51:01 +01:00
Irmen de Jong
bc959435ec
fix missing const-evaluation for abs() and clamp()
...
add `poweroff_system()` for virtual target function
clarify CX16 usage and debugging tips
2026-03-20 02:31:17 +01:00
Irmen de Jong
ca56cf26c5
more work on making memory() const (virtual target only for now)
2026-03-18 02:20:50 +01:00