mirror of
https://github.com/irmen/prog8.git
synced 2024-11-26 11:49:22 +00:00
remove assigment splitter, it now caused code bloat instead of more efficient code
This commit is contained in:
parent
97c5c90eff
commit
dd7c9d62e6
@ -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<IAstModification> {
|
||||
// Try to replace A = B <operator> Something by A= B, A = A <operator> 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<IAstModification> {
|
||||
if(scope.statements.any { it is VarDecl || it is IStatementContainer })
|
||||
|
@ -1,8 +1,10 @@
|
||||
TODO
|
||||
====
|
||||
|
||||
- why does cx16.r1L = lsb(xx) & 3 generate 5 asm instructions? (noopt)
|
||||
- optimize asm: sta VAR / <something with A> / 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?
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user