Commit Graph

94 Commits

Author SHA1 Message Date
Irmen de Jong
3cce985f03 check float bits 2023-02-16 22:22:12 +01:00
Irmen de Jong
c59df6ec20 optimize isZpVar 2023-02-16 00:41:20 +01:00
Irmen de Jong
5c3f41f64d reintroduce explicit PtAugmentedAssign ast node 2023-02-15 22:54:32 +01:00
Irmen de Jong
0cbc56b82e remove unused ast print func 2023-02-13 00:19:48 +01:00
Irmen de Jong
b95608f68a new common ICodeGeneratorBackend interface for all code generator classes 2023-02-12 23:52:54 +01:00
Irmen de Jong
75d486b124 fix variable node casting 2023-02-12 17:04:58 +01:00
Irmen de Jong
4914609485 local varnames and fix uninitialized parents 2023-02-12 16:00:58 +01:00
Irmen de Jong
75bd66326a fix variable zpwish 2023-02-11 15:18:57 +01:00
Irmen de Jong
ed68d604d6 fix break as indirect jump
fix subroutine param scoped name
2023-02-11 01:21:27 +01:00
Irmen de Jong
30d20a453b tweak SymbolTable and fix its unittest 2023-02-09 22:58:21 +01:00
Irmen de Jong
fe29d8a23f tweak codegen of inline sub 2023-02-09 21:59:09 +01:00
Irmen de Jong
694d088160 some cleanups about asmsub return registers and types 2023-02-09 03:19:57 +01:00
Irmen de Jong
6aabbffc62 some cleanups 2023-02-09 02:34:18 +01:00
Irmen de Jong
623329fb33 fix 2023-02-05 17:08:24 +01:00
Irmen de Jong
9f0074eef9 Merge branch 'master' into codegen-on-new-ast
# Conflicts:
#	codeCore/src/prog8/code/ast/AstStatements.kt
2023-02-05 16:44:30 +01:00
Irmen de Jong
6733253826 added printer for Pt Ast tree 2023-02-05 16:42:06 +01:00
Irmen de Jong
c75b1581d2 lookup via new ST 2023-02-05 01:15:23 +01:00
Irmen de Jong
988a3e4446 group the three Pt nodes that represent a variable in the p8 source under single interface IPtVariable 2023-01-31 23:29:15 +01:00
Irmen de Jong
0f5cd22bb7 more codegen fixes 2023-01-31 22:57:26 +01:00
Irmen de Jong
5b6534bb28 fix symbol lookup in new ast and minor codegen errors 2023-01-31 00:18:21 +01:00
Irmen de Jong
07d5fafe2e Merge branch 'master' into codegen-on-new-ast
# Conflicts:
#	compiler/src/prog8/compiler/astprocessing/IntermediateAstMaker.kt
2023-01-29 13:34:00 +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
8a4979f44c vm target 'zeropage' more robust 2023-01-29 12:47:12 +01:00
Irmen de Jong
117d848466 consolidate builtin function definitions into codeCore 2023-01-25 00:23:00 +01:00
Irmen de Jong
b2cb125bd4 more 6502 codegen on new Pt-AST. 2023-01-22 17:10:52 +01:00
Irmen de Jong
5e8f767642 6502 codegen on new Pt-AST. 2023-01-22 17:10:52 +01:00
Irmen de Jong
6ee270d9d8 make name a var in new ast to allow cheap renames 2023-01-22 17:10:04 +01:00
Irmen de Jong
3718b9d768 less joins 2023-01-02 02:10:38 +01:00
Irmen de Jong
c25eb088ec redo 8e730ef93d to avoid larger code generated 2023-01-01 23:43:33 +01:00
Irmen de Jong
3feb3e52f8 optimizing scoped names in zeropage 2022-12-31 03:57:51 +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
d1d0115aed removed unused option 'keepIR' 2022-12-09 18:44:44 +01:00
Irmen de Jong
17bedac96c vm: memory is randomized on start instead of 0. P8ir file now has BSS segment. Vm clears BSS vars to 0. 2022-12-03 17:46:06 +01:00
Irmen de Jong
4831fad27a x16 emulators are now launched with PULSE_LATENCY_MSEC=10 env setting to mitigate static noise 2022-12-03 16:19:26 +01:00
Irmen de Jong
5e896cf582 preparing to add Golden RAM 2022-12-03 00:21:31 +01:00
Irmen de Jong
f470576822 it's now possible to use symbols that are the same name as 6502 instructions
because these are now prefixed internally before generating assembly.
2022-11-30 18:39:56 +01:00
Irmen de Jong
b8fb391022 - ir codegen now allows subroutine having the same name as its block
this is not possible for the 6502 codegen due to 64tass scoping limitation
2022-11-28 21:54:33 +01:00
Irmen de Jong
9d7b9771c2 p8ir file format is now valid XML 2022-11-11 23:35:52 +01:00
Irmen de Jong
30ee65fd14 ir: ensure that block and sub labels are also on the first chunk in said block/sub 2022-10-23 18:54:08 +02:00
Irmen de Jong
6fc89607d3 ir: moving to labeled chunks, no more IRLabel nodes 2022-10-07 00:34:56 +02:00
Irmen de Jong
af6be44676 ir: adding register usage inspections
fix compiler problems with untrimmed inlined asm, and when only a single return statement is present in a subroutine
2022-09-30 20:25:00 +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
7c1bdfe713 ir: uninitialized vars remain empty, bss section classifier (unused for now as there are no segements yet) 2022-09-28 16:56:50 +02:00
Irmen de Jong
7ea7e63f44 use require() more often 2022-09-27 18:27:55 +02:00
Irmen de Jong
0da117efd2 vm: get rid of .p8virt file and cruft 2022-09-26 19:28:40 +02:00
Irmen de Jong
1d65d63bd9 ir: making sure all names are scoped properly. textelite now runs in vm 2022-09-25 18:02:35 +02:00
Irmen de Jong
0e1886e6bd vm: fix nested label prefixing 2022-09-24 16:00:25 +02:00
Irmen de Jong
c26e116f0e vm: fix crashes when array contains pointers/strings 2022-09-24 14:42:07 +02:00
Irmen de Jong
ca2fb6cef3 IR no longer depends on VM syscalls but has its own syscall list for the few builtin functions that still require it 2022-09-23 14:27:51 +02:00