Irmen de Jong
3278d4c945
fixed function calls, added some string-to-number conversion functions
2018-09-30 22:43:34 +02:00
Irmen de Jong
734948c813
funcion call parameters are now checked against function signature
2018-09-30 20:58:47 +02:00
Irmen de Jong
d1589bef26
builtin funcs with multiple param types
2018-09-30 20:19:25 +02:00
Irmen de Jong
02075f2cf2
changed subroutine syntax and fixed array/matrix initalizer values
2018-09-30 18:49:58 +02:00
Irmen de Jong
505de87f27
builtin funcs
2018-09-30 16:25:00 +02:00
Irmen de Jong
34dec55eb2
fix builtin functions over non-const arrays/strings
2018-09-29 19:17:19 +02:00
Irmen de Jong
5ee427b72b
enforce const on array/matrix values
2018-09-29 18:05:35 +02:00
Irmen de Jong
6b89bb7be5
strings and arrays are now stored in a 'heap' instead of in the value itself, to reflect how the target platform will store them
2018-09-29 17:33:59 +02:00
Irmen de Jong
d4232721fc
improve check to see if expression is iterable
2018-09-29 10:07:27 +02:00
Irmen de Jong
814b7ce6aa
track vars per block for later 6502 generation
2018-09-28 23:04:36 +02:00
Irmen de Jong
c5d251073f
removed broken unused symbol clean up for now
...
streamlined irq routine handling and compilation
2018-09-28 21:28:16 +02:00
Irmen de Jong
4d7279b004
fix lsb, msb result data type
2018-09-28 19:35:34 +02:00
Irmen de Jong
1c036c4813
translating subroutine calls and returns
2018-09-28 02:26:56 +02:00
Irmen de Jong
bf5c2e07a2
subroutines cannot use builtin function names for parameters
2018-09-27 23:58:14 +02:00
Irmen de Jong
91f9229b07
fixed memory vars in compiler, added invalid assignment check
2018-09-27 23:21:04 +02:00
Irmen de Jong
7f28f8be11
60hz irq implemented in stackvm
2018-09-27 22:45:57 +02:00
Irmen de Jong
99d63b13a8
slightly simplified const grouping
2018-09-27 20:50:39 +02:00
Irmen de Jong
5e729e21ff
added some more constant foldings
2018-09-27 01:35:35 +02:00
Irmen de Jong
6681787288
fix handling of (too) large integer literals, and range check crash
2018-09-26 21:37:46 +02:00
Irmen de Jong
0f53f87895
made stackvm source a bit more readable
2018-09-26 01:14:10 +02:00
Irmen de Jong
00baec12ab
arithmetic statement optimizations added
2018-09-26 00:58:02 +02:00
Irmen de Jong
f85d8edeba
added some more division by zero checks
...
bitwise operator optimizations
2018-09-25 22:16:32 +02:00
Irmen de Jong
a2c165839d
optimize for loop over 1-valued range
2018-09-25 20:40:41 +02:00
Irmen de Jong
53cd50ad48
changed float handling and appropriate compiler messages
2018-09-25 19:52:59 +02:00
Irmen de Jong
d990b05998
compilation of prefix operators, added NOT opcode
2018-09-25 01:02:01 +02:00
Irmen de Jong
70e5a38aa2
changed set/clear carry and irqd somewhat
2018-09-24 23:38:33 +02:00
Irmen de Jong
cef0aae927
compilation of builtin functions to opcode
...
untit tests for stackvm opcodes, value and parser literalvalue
2018-09-24 22:34:12 +02:00
Irmen de Jong
3a0c1c5ada
optimized mandelbrot example
2018-09-23 02:53:57 +02:00
Irmen de Jong
68037e4425
implemented while and repeat loops
2018-09-23 02:04:45 +02:00
Irmen de Jong
cfd63dc42a
more opcodes unit tested
2018-09-22 14:16:48 +02:00
Irmen de Jong
4174d49fb3
for loop generates working code for the most often occurring loop scenarios
2018-09-22 02:43:10 +02:00
Irmen de Jong
f84e06bdeb
tweak branches
2018-09-22 00:33:25 +02:00
Irmen de Jong
0137478ad4
tweaks
2018-09-21 22:43:29 +02:00
Irmen de Jong
2f48406aad
unit tests for most of the StackVM opcodes. Fixed some opcode behaviors.
2018-09-21 02:20:37 +02:00
Irmen de Jong
455f60fb84
for loop and comparison expression fixes
2018-09-20 01:13:21 +02:00
Irmen de Jong
b72bd805e1
sub decl checking
2018-09-19 02:41:35 +02:00
Irmen de Jong
cba9e7670e
added floordivision operator //
2018-09-19 01:24:28 +02:00
Irmen de Jong
00d74551b3
fix for loop code generation.
...
added flt conversion function.
attempt at implementing break and continue.
var initializer value can be omitted for numeric vars (and default to 0)
subroutine return statement not needed when no return values.
2018-09-18 23:14:32 +02:00
Irmen de Jong
63492a1805
stackvm functions
2018-09-18 00:38:29 +02:00
Irmen de Jong
54aeee2676
for translation improvements
2018-09-17 22:22:41 +02:00
Irmen de Jong
dd96ef8ef2
simple for loop (with constant ranges) is now compiled
2018-09-16 22:00:19 +02:00
Irmen de Jong
326e5cd81a
restructure compiler
2018-09-16 20:36:02 +02:00
Irmen de Jong
88a9f2d493
stackvm program tweaks
2018-09-16 17:48:13 +02:00
Irmen de Jong
719a446d19
syntaxcheck for loop
2018-09-16 16:37:28 +02:00
Irmen de Jong
004776d0d8
added char symbols in petscii source code
2018-09-16 16:07:35 +02:00
Irmen de Jong
3c7a233b43
improved handling of range and range type checks
2018-09-16 15:40:28 +02:00
Irmen de Jong
2591f4e27e
forloop in grammar
2018-09-16 03:00:32 +02:00
Irmen de Jong
1a40a88103
added remainder operator '%'
2018-09-16 00:59:12 +02:00
Irmen de Jong
3426593a06
fixed a load of type checks regarding arrays and matrixes and strings
...
added more builtin functions to the compiler to access the syscalls in the stackVm
2018-09-16 00:06:06 +02:00
Irmen de Jong
c05cd72d23
vm tweaks
2018-09-15 18:43:23 +02:00
Irmen de Jong
e382be89db
changed source file suffix to .p8
2018-09-15 16:35:15 +02:00
Irmen de Jong
8ff72167a4
renamed project to Prog8
2018-09-15 16:21:05 +02:00