Commit Graph
93 Commits
Author SHA1 Message Date
Irmen de Jong c8d29e6dc9 ir: more IR peephole optimizations 2026-08-29 00:29:50 +02:00
Irmen de Jong df659d285b optimize imports 2026-08-18 01:28:35 +02:00
Irmen de Jong cc4f27d121 vm: making VM 32 bit
work in progress: see vm32.md there are failing tests still
2026-08-16 19:49:28 +02:00
Irmen de Jong 4c6d9b8f5f even more IR peephole optimizations 2026-08-13 23:01:41 +02:00
Irmen de Jong 6a3ee52bd5 more IR peephole optimizations 2026-08-13 22:50:50 +02:00
Irmen de Jong b0cf649c2d register packer does't work well 2026-07-16 20:33:27 +02:00
Irmen de Jong c43cacdc2f added a IR RegisterPacking optimization step that reduces the number of registers through reuse of register slots 2026-07-15 22:39:19 +02:00
Irmen de Jong 4506a3cb3e pass compilation target to more places to be able to determine correct types 2026-07-12 03:52:57 +02:00
Irmen de Jong 8a7922ffcc fix split words arrays on m68k to be not split 2026-07-10 01:47:18 +02:00
Irmen de Jong 52fe2f2c0d adjust compilation options etc for the newCodegen flag 2026-07-02 01:21:18 +02:00
Irmen de Jong 4bf0eba2f8 Merge branch 'master' into new-codegens
# Conflicts:
#	.idea/compiler.xml
#	codeCore/src/prog8/code/core/CompilationOptions.kt
#	codeGenIntermediate/test/TestVmCodeGen.kt
#	codeGenNew6502/src/prog8/codegen/new6502/New6502CodeGenerator.kt
#	compiler/src/prog8/CompilerMain.kt
#	compiler/src/prog8/compiler/Compiler.kt
#	compiler/src/prog8/compiler/CompilerDaemon.kt
#	compiler/test/TestCompilerOnExamples.kt
#	compiler/test/helpers/compileXyz.kt
#	scripts/clean.sh
#	settings.gradle
2026-07-02 01:14:55 +02:00
Irmen de Jong 5130a74754 removed expericodegen 2026-07-02 01:07:21 +02:00
Irmen de Jong 15756a8977 rename -expericodegen into -newcodegen that should switch all existing 6502 codegens to using the new one based on IR 2026-07-02 00:51:45 +02:00
Irmen de Jong 55ea599fca Remove hardcoded external KERNAL entry points in codegen 2026-06-29 04:43:24 +02:00
Irmen de Jong 71583a5b93 Move symbol prefixing logic from 6502 codegen to IR generation. 2026-06-28 21:33:10 +02:00
Irmen de Jong 48214a6fdb more IR peephole optimizations, added some implementation plans to the todo 2026-05-19 00:26:35 +02:00
Irmen de Jong 930697dad5 using builder to improve massive lists of constructor params 2026-04-19 01:39:50 +02:00
Irmen de Jong c794d2a50b fix invalid IR opcode used for inplace assignments to memory targets 2026-04-14 15:32:12 +02:00
Irmen de Jong 9ae0623ad0 making MemoryAddress an Unsigned Int 2026-04-09 02:40:24 +02:00
Irmen de Jong 33b34b990e making RegisterNum type safe 2026-04-08 02:57:45 +02:00
Irmen de Jong 6dc96bb8f0 making IRInstruction parameters type safe 2026-04-07 20:15:55 +02:00
Irmen de Jong 4739bd087a IR: avoid redundant CMPI in if-expressions, remove dead stores 2026-04-02 23:41:03 +02:00
Irmen de Jong 15bf4c7692 unit test helpers refactoring 2026-03-31 05:50:30 +02:00
Irmen de Jong da6e47d422 fix IR long comparisons (used in for loops for instance) 2026-03-01 01:17:22 +01:00
Irmen de Jong 9736ac19d1 implementing multiple return values for builtin functions 2026-02-22 19:54:21 +01:00
Irmen de Jong 10ae42ed59 suggest import for undefined block symbols, update github links 2026-01-25 05:45:33 +01:00
Irmen de Jong 2c2de8bfb3 fix IR peephole optimizer index off by 1 error and make SSA blocks configurable (still defaults to yes in this version) 2025-12-30 18:58:42 +01:00
Irmen de Jong 307796f115 fixed some bugs in optimizing long values 2025-10-12 23:15:42 +02:00
Irmen de Jong d66dc664de work on longs 2025-10-03 01:22:24 +02:00
Irmen de Jong 9d3b2f12fd IR code blocks now better SSA basic blocks (ending with single branch instruction) 2025-10-01 19:08:44 +02:00
Irmen de Jong a611406020 IR: add compilerversion attribute to p8ir file 2025-09-30 22:07:04 +02:00
Irmen de Jong 701f155951 Merge branch 'master' into structs
# Conflicts:
#	codeGenCpu6502/src/prog8/codegen/cpu6502/ProgramAndVarsGen.kt
#	compiler/test/TestSymbolTable.kt
#	docs/source/todo.rst
#	examples/test.p8
#	intermediate/src/prog8/intermediate/IRFileReader.kt
#	intermediate/src/prog8/intermediate/IRFileWriter.kt
#	intermediate/src/prog8/intermediate/IRSymbolTable.kt
#	simpleAst/src/prog8/code/SymbolTable.kt
#	simpleAst/src/prog8/code/SymbolTableMaker.kt
#	virtualmachine/src/prog8/vm/VmProgramLoader.kt
2025-05-06 17:59:36 +02:00
Irmen de Jong 522958e0e9 @dirty variables now actually end up in the uninitialized BSS_NOCLEAR section 2025-05-06 01:41:34 +02:00
Irmen de Jong e328520588 initial struct and typed pointer support 2025-05-02 00:41:40 +02:00
Irmen de Jong 98505d27b1 IR: fix invalid removal of label chunks and include asmsubs when looking for labels 2025-04-24 23:30:51 +02:00
Irmen de Jong cd63a58ad9 IR: get rid of problematic PREPARECALL pseudo instruction 2025-04-24 22:32:40 +02:00
Irmen de Jong 99ae8ea52e code cleanup 2025-04-24 18:51:03 +02:00
Irmen de Jong a4d0589f10 fix errors like parse error still printed in color when -plaintext is set 2025-04-22 19:26:11 +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 e55ce5504e added %option romable to enable romable mode, but only generate a bunch of warnings for problematic codegeneration atm 2025-02-20 23:40:44 +01:00
Irmen de Jong 7a13f57ab0 enforce variable init values are only strings or arrays 2025-01-20 01:25:17 +01:00
Irmen de Jong 09a17743ad merge IMachineDefinition into ICompilationTarget 2025-01-13 21:45:38 +01:00
Irmen de Jong 8f6b5676d7 working on codegen for multi-value returns 2025-01-07 20:35:49 +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 7c79cdbd2f fix symbol prefixing on goto with expression
added coroutines example
2024-12-17 16:16:38 +01:00
Irmen de Jong cc59069876 allow goto to take any expression, not only an integer or an identifier (part 1) 2024-12-14 01:01:32 +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 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