diff --git a/compiler/src/prog8/optimizer/UnusedCodeRemover.kt b/compiler/src/prog8/optimizer/UnusedCodeRemover.kt index 9e9397421..d929bc2d2 100644 --- a/compiler/src/prog8/optimizer/UnusedCodeRemover.kt +++ b/compiler/src/prog8/optimizer/UnusedCodeRemover.kt @@ -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 diff --git a/docs/source/todo.rst b/docs/source/todo.rst index ee39a50c4..b6ad0d73c 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -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 diff --git a/examples/test.p8 b/examples/test.p8 index 2251c7b2b..7b402568f 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -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 } }