Skip to content

Commit

Permalink
v2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Jun 15, 2020
1 parent 37b61d9 commit 76cda82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion compiler/src/prog8/optimizer/UnusedCodeRemover.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/source/todo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 1 addition & 17 deletions examples/test.p8
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

}
Expand Down

0 comments on commit 76cda82

Please sign in to comment.