58 Commits

Author SHA1 Message Date
belka a1c9910300 Add stage options 2024-12-20 15:32:20 +01:00
belka fbd08f2707 Add more internal allocation errors 2024-12-11 21:44:32 +01:00
belka 7fc90f1d2d Calculate stack offset from array index 2024-12-08 16:19:52 +01:00
belka 1c996b3c8b Make IR for array access 2024-12-06 15:37:36 +01:00
belka 0c40bca60b Add array assignment to the IR 2024-12-02 13:57:03 +01:00
belka 147967c04b Reverse procedure parameters on the stack 2024-11-28 16:28:19 +01:00
belka f7b36cb81d Implement the while loop 2024-11-26 23:44:25 +01:00
belka 0c9799b887 Adjust stack size based on local variables 2024-11-20 17:38:03 +01:00
belka 276d4c963b Split the allocator and add state to it 2024-11-16 09:23:40 +01:00
belka 1ec3467830 Map local variables in IR to their original names 2024-11-14 19:55:30 +01:00
belka 060496fc6e Parse local variables 2024-11-06 22:23:49 +01:00
belka e2d4b76c0b Check argument list length 2024-10-31 22:19:48 +01:00
belka 43882a3a06 Generate a call to _divide_by_zero_error on RiscV 2024-10-30 14:12:51 +01:00
belka 6b92e5059c Encode labels as untyped local symbols in ELF 2024-10-27 20:43:56 +01:00
belka 57436f664e Abstract the string table into a newtype 2024-10-22 01:21:02 +02:00
belka bf5ec1f3e2 Parse type declarations 2024-10-17 00:37:42 +02:00
belka 582040e5d3 Implement comparison operators 2024-10-13 12:59:47 +02:00
belka 0850f0a8d6 Implement if statements with equality 2024-10-11 16:14:01 +02:00
belka 87f183baad Add branch relocation type 2024-10-09 23:37:58 +02:00
belka 699cc8684b Implement division 2024-10-06 18:09:08 +02:00
belka 35742aa525 Add printc and exit builtin functions 2024-10-04 18:26:10 +02:00
belka fdf56ce9d0 Negate integral expressions 2024-10-02 22:56:15 +02:00
belka cafae5c830 Use one register less for addition and subtraction 2024-10-01 22:44:55 +02:00
belka bbb15a0218 Add allocator convertion functions 2024-10-01 00:02:19 +02:00
belka c2c923276f Implement addition and subtraction 2024-09-29 19:50:55 +02:00
belka ed144309fa Print numbers with multiple digits 2024-09-27 22:53:05 +02:00
belka 8eaeb5afa3 Generate IR and target code 2024-09-25 23:06:02 +02:00
belka b30bbcab28 Parse call statements 2024-09-24 22:20:57 +02:00
belka e66ccf46f4 Take function name from the generated asm 2024-09-22 23:45:59 +02:00
belka daec506ed3 Put _start and main call into builtins 2024-09-21 23:35:32 +02:00
belka 0a8d3fce2f Collect function declaration symbols 2024-09-20 23:00:07 +02:00
belka c9ff4f0a2a Add call pseudo instruction 2024-09-15 23:03:25 +02:00
belka d29012d30e Pass relocation base table 2024-09-12 02:21:48 +02:00
belka 8a0751dfb0 Add a state monad transformer to the Elf generator 2024-09-10 02:03:20 +02:00
belka bb33423c31 Create empty relocations section 2024-09-09 23:10:37 +02:00
belka 1cbbef19af Stub the implementation for all phases 2024-09-08 02:08:13 +02:00
belka 042e4e8714 Add command line parser 2024-09-05 23:18:48 +02:00
belka be73032b93 Add rake task to build a cross toolchain 2024-09-04 22:05:55 +02:00
belka ad0bf43ba5 Create numerated temporary variables 2024-08-30 14:55:40 +02:00
belka 0c45a9886a Add Intermediate monad stack for the code generation 2024-08-27 14:21:50 +02:00
belka 2bd965bd5c Generate IR for while and calls 2024-08-18 20:13:59 +02:00
belka 6a54b66421 Generate the code for IfStatement 2024-08-17 14:16:16 +02:00
belka d405072dbf Access multidimensional arrays 2024-08-15 20:13:56 +02:00
belka f78592378a Add IR quadruple definitions 2024-08-12 21:00:52 +02:00
belka 38a8d6811c Write parameter info into procedure info 2024-08-12 00:50:36 +02:00
belka 5e7683af32 Check types 2024-08-09 20:16:41 +02:00
belka 18a299098c Typecheck statements 2024-08-08 19:11:24 +02:00
belka 573990551c Determine an expression type 2024-08-07 22:47:35 +02:00
belka 385322235d Look for undefined symbols 2024-08-06 17:02:18 +02:00
belka a1863147f8 Don't allow identifier duplicates 2024-08-05 22:56:35 +02:00