diff --git a/compiler/src/prog8/compiler/astprocessing/BeforeAsmAstChanger.kt b/compiler/src/prog8/compiler/astprocessing/BeforeAsmAstChanger.kt index 7e8687c3c..1c140223d 100644 --- a/compiler/src/prog8/compiler/astprocessing/BeforeAsmAstChanger.kt +++ b/compiler/src/prog8/compiler/astprocessing/BeforeAsmAstChanger.kt @@ -39,6 +39,7 @@ internal class BeforeAsmAstChanger(val program: Program, private val options: Co return noModifications } +/* TODO remove permanently: override fun after(assignment: Assignment, parent: Node): Iterable { // Try to replace A = B Something by A= B, A = A Something // this triggers the more efficent augmented assignment code generation more often. @@ -104,6 +105,7 @@ internal class BeforeAsmAstChanger(val program: Program, private val options: Co } return noModifications } +*/ override fun after(scope: AnonymousScope, parent: Node): Iterable { if(scope.statements.any { it is VarDecl || it is IStatementContainer }) diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 4a42aaad6..9fce3508e 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -1,8 +1,10 @@ TODO ==== -- why does cx16.r1L = lsb(xx) & 3 generate 5 asm instructions? (noopt) -- optimize asm: sta VAR / / sta VAR +- monogfx/gfx2 flood fill is broken after removing the after(assignment: Assignment) from BeforeAsmAstChanger that splits assignments + also other things broken? rectangle? not sure + +- remove after(assignment from BeforeAsmAstChanger permanently once issues above fixed - gfx2/monogfx: use vera auto in/decrement in the flood fill routine (getpixels) - gfx2: use vera fx fill for horizontal_line of sufficient length? diff --git a/examples/test.p8 b/examples/test.p8 index 67d91e6a7..419872e45 100644 --- a/examples/test.p8 +++ b/examples/test.p8 @@ -1,44 +1,10 @@ -%import gfx2 -%import textio -%import math - %option no_sysinit %zeropage basicsafe - main { sub start() { - ubyte[] shifts = [0,2,4,6] - ubyte value = 100 - ubyte index = 2 - value >>= shifts[index] - txt.print_ub(value) - txt.nl() - value = 100 - index = 1 - value >>= shifts[index] - txt.print_ub(value) - txt.nl() - value = 100 - index = 0 - value >>= shifts[index] - txt.print_ub(value) - txt.nl() - - gfx2.screen_mode(2) - demofill() - repeat { - } - } - - sub demofill() { - gfx2.circle(160, 120, 110, 1) - gfx2.rect(180, 5, 25, 190, 1) - gfx2.line(100, 150, 240, 10, 1) - gfx2.line(101, 150, 241, 10, 1) - gfx2.fill(100,100,2) - gfx2.fill(182,140,3) - gfx2.fill(182,40,1) + uword xx + cx16.r1L = lsb(xx) & 3 } }