This commit is contained in:
Irmen de Jong 2020-06-16 01:43:44 +02:00
parent 37b61d9e6b
commit 76cda82e23
3 changed files with 3 additions and 18 deletions

View File

@ -30,7 +30,7 @@ internal class UnusedCodeRemover: AstWalker() {
// remove modules that are not imported, or are empty (unless it's a library modules)
program.modules.forEach {
if (!it.isLibraryModule && (it.importedBy.isEmpty() || it.containsNoCodeNorVars()))
removals.add(IAstModification.Remove(it, it.parent)) // TODO does removing modules work like this?
removals.add(IAstModification.Remove(it, it.parent))
}
return removals

View File

@ -6,6 +6,7 @@ TODO
- aliases for imported symbols for example perhaps '%alias print = c64scr.print'
- option to load library files from a directory instead of the embedded ones (easier library development/debugging)
- investigate support for 8bitguy's Commander X16 platform https://murray2.com/forums/commander-x16.9/ and https://github.com/commanderx16/x16-docs
- see if we can group some errors together for instance the (now single) errors about unidentified symbols
More optimizations

View File

@ -7,24 +7,8 @@
main {
sub jumpsub() {
; goto jumpsub ; TODO fix compiler loop
goto blabla
blabla:
A=99
return
}
sub start() {
ubyte[] array = [1,2,3]
ubyte[len(array)] bytesE = 22 ; TODO fix nullpointer error
float[len(array)] floatsE = 3.33 ; TODO fix error
A=42
}
}