mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-01-26 15:30:28 +00:00
Minor syntax fixes
This commit is contained in:
parent
46ffa81633
commit
3c1f4d2901
@ -1,17 +1,3 @@
|
||||
TODO's for new Constant Solution
|
||||
+ Live range overlap analysis of register combinations inside methods must also look at registers alive at all calls.
|
||||
+ Examine why temp-vars are used in flipper.
|
||||
+ Examine why flipper is plotted in a wrong position on the screen.
|
||||
+ Implement constants into the symbol table and support them in code.
|
||||
- Implement new constant consolidation steps.
|
||||
- Reintroduce constant addition optimization
|
||||
+ Add asmName for ConstantVar to remove subscripts
|
||||
+ Inline constants for "single" versions of vars - such as .const i#0 = 0
|
||||
+ Look at optimizing liverange.kc's ASM further - atm. there are to many copy-operations into unnecesary registers.
|
||||
+ In summin.asm the result of the 2nd sum() is clobbered twice during call to sum(). jsr sum, txa, lda #$d, ldx #$9, jsr sum
|
||||
+ Fix by introducing "effective alive vars" which includes alive vars at all calls to containing methods and using that during clobber check.
|
||||
+ In loopnest.asm x&y are used in both loops - the outer x&y are clobbered by the inner loop.
|
||||
+ In voronoi.asm in render() x is clobbered during call to findcol().
|
||||
|
||||
Features
|
||||
- Move the main code into a main() function, and disallow code outside functions. The main function per default has no parameters and exits with RTS.
|
||||
@ -44,7 +30,7 @@ Features
|
||||
Assembler Improvements
|
||||
- Make generated ASM human readable.
|
||||
+ Use hex-numbers
|
||||
- add labels for constants and zp-variables.
|
||||
+ add labels for constants and zp-variables.
|
||||
- Eliminate chained JMP's (replace by direct JMP) - example: loopsplit.asm
|
||||
- Better ASM static value analysis
|
||||
- Not just constants - but also other values (value of var, value of var1[var2], value of var+4 etc.)
|
||||
@ -110,4 +96,19 @@ Real Usage
|
||||
- Implement library for fast multiply (mul.asm)
|
||||
- Implement spline library (spline.asm)
|
||||
- Implement polygon filler for complex polygons.
|
||||
- Implement a true type font renderer.
|
||||
- Implement a true type font renderer.
|
||||
|
||||
New Constant Solution
|
||||
+ Live range overlap analysis of register combinations inside methods must also look at registers alive at all calls.
|
||||
+ Examine why temp-vars are used in flipper.
|
||||
+ Examine why flipper is plotted in a wrong position on the screen.
|
||||
+ Implement constants into the symbol table and support them in code.
|
||||
+ Implement new constant consolidation steps.
|
||||
+ Reintroduce constant addition optimization
|
||||
+ Add asmName for ConstantVar to remove subscripts
|
||||
+ Inline constants for "single" versions of vars - such as .const i#0 = 0
|
||||
+ Look at optimizing liverange.kc's ASM further - atm. there are to many copy-operations into unnecesary registers.
|
||||
+ In summin.asm the result of the 2nd sum() is clobbered twice during call to sum(). jsr sum, txa, lda #$d, ldx #$9, jsr sum
|
||||
+ Fix by introducing "effective alive vars" which includes alive vars at all calls to containing methods and using that during clobber check.
|
||||
+ In loopnest.asm x&y are used in both loops - the outer x&y are clobbered by the inner loop.
|
||||
+ In voronoi.asm in render() x is clobbered during call to findcol().
|
||||
|
@ -102,18 +102,20 @@ public class Operator {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Operator operator1 = (Operator) o;
|
||||
return operator != null ? operator.equals(operator1.operator) : operator1.operator == null;
|
||||
if (precedence != operator1.precedence) return false;
|
||||
if (!operator.equals(operator1.operator)) return false;
|
||||
return type == operator1.type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return operator != null ? operator.hashCode() : 0;
|
||||
int result = operator.hashCode();
|
||||
result = 31 * result + precedence;
|
||||
result = 31 * result + type.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* A replacer capable to getReplacement all usages of a variable (or constant var) with a suitable replacement
|
||||
* A replacer capable to alias all usages of a variable (or constant var) with a suitable replacement
|
||||
*/
|
||||
public class VariableReplacer {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user