Skip to content

Commit 76cda82

Browse files
committed
v2.2
1 parent 37b61d9 commit 76cda82

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

compiler/src/prog8/optimizer/UnusedCodeRemover.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ internal class UnusedCodeRemover: AstWalker() {
3030
// remove modules that are not imported, or are empty (unless it's a library modules)
3131
program.modules.forEach {
3232
if (!it.isLibraryModule && (it.importedBy.isEmpty() || it.containsNoCodeNorVars()))
33-
removals.add(IAstModification.Remove(it, it.parent)) // TODO does removing modules work like this?
33+
removals.add(IAstModification.Remove(it, it.parent))
3434
}
3535

3636
return removals

docs/source/todo.rst

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

1011

1112
More optimizations

examples/test.p8

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,8 @@
77

88
main {
99

10-
sub jumpsub() {
11-
12-
; goto jumpsub ; TODO fix compiler loop
13-
goto blabla
14-
blabla:
15-
A=99
16-
return
17-
18-
}
19-
2010
sub start() {
21-
22-
ubyte[] array = [1,2,3]
23-
24-
ubyte[len(array)] bytesE = 22 ; TODO fix nullpointer error
25-
float[len(array)] floatsE = 3.33 ; TODO fix error
26-
27-
11+
A=42
2812
}
2913

3014
}

0 commit comments

Comments
 (0)