1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-14 23:04:57 +00:00
Commit Graph

323 Commits

Author SHA1 Message Date
jespergravgaard
62a56f23fb Removed unused LValueLoHiByte. 2017-12-27 22:48:26 +01:00
jespergravgaard
4bcf51732b Added aseetion stopping compilation at pass 3 if any value list has survived. 2017-12-27 22:22:53 +01:00
jespergravgaard
347fc03f47 Made all declared arrays/strings implicitly constant. 2017-12-27 22:08:15 +01:00
jespergravgaard
4a7dd31d40 Fixed word constructor detection to detect all inline word constructors. 2017-12-27 21:47:07 +01:00
jespergravgaard
212e8572de Improved constant string detection. Type System is still a bit of a mess. 2017-12-27 20:52:38 +01:00
jespergravgaard
8a1dbc36d7 Refactored recursive value replacement into ValueReplacer. Moved VariableReplacer to a simple ValueReplacer. Added test for true inline word constructors. 2017-12-27 13:40:55 +01:00
jespergravgaard
a3a7d02cd7 Added test to confirm that pointer destinations can now be incremented corrently. Closes #29 2017-12-26 17:38:51 +01:00
jespergravgaard
b412a4aefc Assignments are now expressions. For-loops can now contain assignments in the increment part. LValue handling reimplemented (lvalue no longer exist in parser - only expression). RValues now also contains pointer derefs. Complex array expressions (SCREEN+$100)[i] now possible as LValues. ASM fragment generation improved to handle new more complex LValues & RValues. Closes #5. Closes #43 2017-12-26 17:24:30 +01:00
jespergravgaard
2c44783879 Added ALU potential for _word_ operator 2017-12-26 10:31:30 +01:00
jespergravgaard
91f22c44f0 Removed all ASM steps between ASM optimizations - result smaller log file. 2017-12-26 09:15:10 +01:00
jespergravgaard
42b026a757 Allowing ZP coalescing whenever registers are the same type (before variables had to be the same type). 2017-12-26 00:24:40 +01:00
jespergravgaard
e3353acbc9 Implemented syntax for composing word from two bytes word w = { b1, b2 };
Optimizer still needs to attempt to (and allow) placing the two byte variables directly at the lo/hi-vars of the word wo minimize moving data around.

Closes #37
2017-12-25 23:27:54 +01:00
Jesper Gravgaard
bd3c26b5ec Fixed constant inlining inside constant value lists. 2017-12-25 20:53:52 +01:00
Jesper Gravgaard
e314794f0b Implemented true recursive variable replacer that can replace into pointers/value lists. Also using this when building SSA. Prepared syntax ant type inference for building a word from 2 bytes using word w = { b1, b2 }; 2017-12-25 20:19:53 +01:00
Jesper Gravgaard
eb6ee9bff8 Prepared parser for inline word expressions. 2017-12-23 15:35:13 +01:00
Jesper Gravgaard
10b8431833 Simplified fragment value naming further. 2017-12-23 10:49:18 +01:00
Jesper Gravgaard
8b96c1ae40 Merge remote-tracking branch 'gitlab/master' 2017-12-23 10:31:24 +01:00
Jesper Gravgaard
9d6fd3e1c9 Simplified fragment symbol naming 2017-12-23 10:31:20 +01:00
jespergravgaard
c38e9b85e4 Implemented signed words - first test works. Closes #22 2017-12-23 02:35:50 +01:00
jespergravgaard
978c1fb997 Improved readability. 2017-12-22 14:34:10 +01:00
jespergravgaard
b3649997b6 Simplified fragement synthesis. 2017-12-13 00:48:59 +01:00
jespergravgaard
177be17dd9 Last of fragment renaming completed (zpptrby1/zpptrsby1 => pbuz1/pbsz1) 2017-12-13 00:29:48 +01:00
jespergravgaard
49b8545232 Next part of fragment renaming completed (coby1/cosby1/cowo1/coswo1 => vbuc1/vbsc1/vwuc1/vwsc1) 2017-12-12 22:39:27 +01:00
jespergravgaard
07478e86b1 Next part of fragment renaming completed (zpby1/zpsby1 => vbuz1/vbsz1) 2017-12-12 20:53:22 +01:00
jespergravgaard
7f6f1583a2 merged diffs 2017-12-12 00:17:13 +01:00
jespergravgaard
8b8095ff87 First part of fragment renaming completed (aby/xby/yby/asby/xsby/ysby => vbuaa/vbuxx/vbuyy/vbsaa/vbsxx/vbsyy) 2017-12-12 00:09:14 +01:00
jespergravgaard
597bcf01bb First part of fragment renaming completed (aby/xby/yby/asby/xsby/ysby => vbuaa/vbuxx/vbuyy/vbsaa/vbsxx/vbsyy) 2017-12-12 00:09:14 +01:00
Jesper Gravgaard
5a819659a0 Removed signed byte register usage by allowing the fragment binding to also look at the variable type. 2017-12-10 20:00:00 +01:00
Jesper Gravgaard
e2aa0cd7e0 Removed signed byte register usage by allowing the fragment binding to also look at the variable type. 2017-12-10 19:53:14 +01:00
jespergravgaard
69dba6ea27 Added casting problem test nocast.kc 2017-12-05 23:31:43 +01:00
jespergravgaard
a79853a4ec Improved static ASM analysis to recognize & remove several LDA/LDX/LDY of the same value. 2017-12-05 22:01:32 +01:00
jespergravgaard
c1b2b8ab7d Added sprite MSB 2017-12-05 21:49:40 +01:00
jespergravgaard
ad9873d201 Improved slightly 2017-12-05 01:15:17 +01:00
jespergravgaard
5b070b5a27 Added progress while generating sines 2017-12-05 01:11:31 +01:00
jespergravgaard
3569405dc1 Added some consts 2017-12-04 23:54:12 +01:00
jespergravgaard
56b74e7e0f Implemented initial sinus sprites. 2017-12-04 23:48:14 +01:00
jespergravgaard
c74b86a616 Moved tables into methods. 2017-12-03 23:24:25 +01:00
jespergravgaard
9ea1d4f2c1 Minor refactoring improving sine example. 2017-12-03 23:17:13 +01:00
jespergravgaard
c769aabc0a Minor refactoring improving float lib. 2017-12-03 23:08:47 +01:00
jespergravgaard
80d5f2bf9d Updated print test reference data. 2017-12-03 22:59:25 +01:00
jespergravgaard
e18a8cb7d8 Added library for using BASIC functions. Improved print library. Added test creating a sine. Added asserts for methods with to few/many parameters. Added assert for requiring procedure return value. Added som missing fragments. 2017-12-03 22:57:54 +01:00
jespergravgaard
878d3ae36b Added tests for to few and many method parameters 2017-12-03 17:01:23 +01:00
jespergravgaard
87f58d8782 Implemented check in pass1 ensuring that all used vars have been assigned a value. Closes #8. Closes #21. 2017-12-03 16:49:56 +01:00
jespergravgaard
b43489f11a Implemented ASM long label relabelling. Closes #57 2017-12-03 15:12:20 +01:00
jespergravgaard
defd957837 Intorduced better error when assigning a constant. Closes #19 2017-12-03 14:26:28 +01:00
jespergravgaard
ee5b113b3a Declared constants only create a single version. Closes #34. 2017-12-03 14:01:31 +01:00
jespergravgaard
0323fb0a0d Fixed tests to take adcantadge of casting & int constant type elasticity. 2017-12-02 17:17:19 +01:00
jespergravgaard
9c39311d67 Preventing double imports. Closes #102 2017-12-02 16:56:58 +01:00
jespergravgaard
41fd3bc436 Implemented import functionality. Added import test. Closes #32. 2017-12-02 16:35:13 +01:00
jespergravgaard
78dd8bc149 Added import keyword and failing test. 2017-12-02 00:01:53 +01:00