Commit Graph

22 Commits

Author SHA1 Message Date
r4 f6b74f8f97 add generic arrays 2021-12-30 17:59:28 +01:00
r4 4d5cd93354 implement basic RAII-ish array management 2021-12-29 21:42:43 +01:00
r4 7773cc6c14 change IR stream to linked list 2021-12-29 13:27:58 +01:00
r4 0d5313a063 fix invalid memory access 2021-12-28 13:39:59 +01:00
r4 22f71d7e56 add pointers, variable arguments and void functions 2021-12-28 13:39:12 +01:00
r4 18d6e7b7df add 'not equal' operator 2021-12-26 12:19:54 +01:00
r4 cf93109f1e IR optimization
IR optimization currently very basic, in fact it probably doesn't even
improve performance measurably.
2021-12-25 23:01:18 +01:00
r4 f02dae603d unify printing + add basic strings 2021-12-25 12:16:06 +01:00
r4 9bd4d4e0c4 support for builtin functions with 0 args 2021-12-23 22:25:41 +01:00
r4 6bdc4e3210 add logical or and logical and 2021-12-23 21:42:09 +01:00
r4 d67008cfbf add char literals 2021-12-23 21:26:53 +01:00
r4 a0842424ec print not in IR 2021-12-23 21:08:01 +01:00
r4 84785dc3cf add boolean logic 2021-12-23 21:06:49 +01:00
r4 d185396a1c rename arith to binary 2021-12-23 20:10:02 +01:00
r4 97e8e32ebc add if and else, and fix nested loops (hopefully) 2021-12-23 19:58:00 +01:00
r4 5dd15ce9f1 add builtin functions 2021-12-22 16:09:52 +01:00
r4 41a5dba208 replace malloc with xmalloc 2021-12-22 13:10:00 +01:00
r4 b80e5a9c4e formatting 2021-12-22 12:57:14 +01:00
r4 e7f4773cba make while loop parsing more elegant
It is now possible to parse parts of the program and save the IR for
later addition. This is currently used for while loops but will also make other
control flow elements easier to implement in the future.
2021-12-22 12:52:16 +01:00
r4 10d436107c very basic while loop 2021-12-21 15:02:53 +01:00
r4 005309d1eb IR jmp and scopes 2021-12-21 13:59:08 +01:00
r4 21694f98ac init 2021-12-21 01:18:22 +01:00