ir: uninitialized vars remain empty, bss section classifier (unused for now as there are no segements yet)

This commit is contained in:
Irmen de Jong
2022-09-28 15:58:58 +02:00
parent 9f09784b55
commit 7c1bdfe713
13 changed files with 86 additions and 34 deletions

View File

@@ -17,9 +17,9 @@ Future Things and Ideas
^^^^^^^^^^^^^^^^^^^^^^^
Compiler:
- vm/ir: put variables and arrays in BSS section (unless -noreinit is specified)
- create BSS section in output program and put StStaticVariables in there with bss=true. Don't forget to add init code to zero out everything that was put in bss. If array in bss->only zero ONCE! So requires self-modifying code
- vm: Jumps go to a code block rather than a specific address(label) -> also helps future dead code elimination?
- vm: the above means that every label introduces a new code block. This eliminates the use of actual labels altogether.
- vm: the above means that every label introduces a new code block. This eliminates the use of actual labels altogether during execution/translation.
- vm: add more optimizations in IRPeepholeOptimizer
- vm: how to remove all unused subroutines? (the 6502 assembly codegen relies on 64tass solve this for us)
- see if we can let for loops skip the loop if end<start, like other programming languages. Without adding a lot of code size/duplicating the loop condition.