Commit Graph

61 Commits

Author SHA1 Message Date
86e77d1609 update the struct definition when following the path 2020-03-09 12:48:31 +01:00
eb75cc7838 implement GenASM for structs 2020-03-09 12:48:31 +01:00
3f18fa56c2 add struct definitions as a constructor parameter 2020-03-09 12:48:31 +01:00
a9ab8f08e6 implement structs 2020-03-09 12:47:44 +01:00
b9569c7df6 add missing semicolong since a destructor call is now a statement 2020-03-09 12:47:02 +01:00
9300e37fca implement node visitors for the destructor node 2020-03-09 12:47:02 +01:00
80deae6971 implement visitors for null atom 2020-03-09 12:47:02 +01:00
5c0459c5a2 implement constructor call, eval and genasm are still stubs 2020-03-09 12:45:16 +01:00
f0b6f052d6 implement pretty print for struct field access expression 2020-03-09 12:45:16 +01:00
fef397c60d implement empty visitors 2020-03-09 12:43:25 +01:00
33904a3c33 implement pretty print visitor 2020-03-09 12:41:52 +01:00
279ea28a29 add empty stubs for the visit method of the new nodes 2020-03-09 12:41:52 +01:00
15c55ed065 add the new nodes to the list of visitable nodes 2020-03-09 12:41:52 +01:00
309fe39c01 implement get vars visitor 2020-03-09 12:41:52 +01:00
1530dc6c55 sign extend rax into rbx before calling idiv, the replaces the rbx zeroing 2020-03-05 17:13:19 +01:00
150e18e05b inspec type of expression instead of the type of the assignment, since the assignment type is always null 2020-03-05 16:40:31 +01:00
Marvin Kaiser
bba950c851 25: Fix tests 2020-03-05 12:31:09 +01:00
Marvin Kaiser
cbc8020e81 25: Rewrite prepareRegisters, correct operator order for comparisons 2020-03-05 09:06:22 +01:00
Marvin Kaiser
6eb61f905f 25: Add logic for handling float in function calls 2020-03-04 19:29:24 +01:00
Marvin Kaiser
0316a7d4bf 25: Start adding Float Type 2020-03-03 20:45:55 +01:00
47390f6757 add missing type declarations to pretty print output 2020-02-04 00:16:14 +01:00
26b1406013 make boolean and comparison expression evaluate to bool, user asBoolean when expecting a boolean, re-welcome the conditions of loops everytime another step has to be evaluated 2020-02-04 00:07:22 +01:00
3a89ab2231 remove error handling, since these kinds of errors are caught by our context analysis 2020-02-03 22:24:27 +01:00
0aed4ee893 my initial short for typechecking, still very unifinished tho 2020-01-21 00:21:54 +01:00
295bcaec8a implement visitors for boolean expressions 2020-01-20 19:32:50 +01:00
Marvin Kaiser
d27df13ec1 added boolean operators 2020-01-20 16:01:25 +01:00
1186bb4550 add bool literal 2020-01-20 15:26:55 +01:00
Marvin Kaiser
34d0e1bb0e Added cli argument to either generate main method or not 2020-01-14 18:37:34 +01:00
Marvin Kaiser
be43cc9a77 implement for loops 2020-01-14 11:04:31 +01:00
Marvin Kaiser
586c2bb5d9 renamed whileLoop to WhileLoop 2020-01-14 08:50:45 +01:00
Marvin Kaiser
5eb0679bf3 Renamed doWhileLoop to DoWhileLoop 2020-01-14 08:48:51 +01:00
Marvin Kaiser
e52ad061f9 Implemented do while loops 2020-01-13 16:43:38 +01:00
Marvin Kaiser
bd4ae1d605 Added while loop 2020-01-13 16:08:44 +01:00
Marvin Kaiser
079cdf4969 Implemented != expression 2019-12-20 09:09:01 +01:00
Marvin Kaiser
a79b7c9362 Implemented boolean expressions 2019-12-20 09:01:03 +01:00
Marvin Kaiser
f341401ccc Implemented pretty printing and evaluating of boolean expressions 2019-12-20 08:42:20 +01:00
d1f8a18bef add missing visit of lhs in a modulo expresion 2019-12-19 14:47:26 +01:00
Marvin Kaiser
3f2987074d Fix: Variable Declaration with initialization not correctly pretty printed 2019-12-18 10:37:05 +01:00
Marvin Kaiser
08f486203b Fix: Arguments that don't fit into registeres are passed in the incorrect order 2019-12-17 17:22:44 +01:00
Marvin Kaiser
5745062704 Fix: Subtraction tests not working. Was: incorrect order of expression evaluation 2019-12-17 16:53:20 +01:00
Marvin Kaiser
d3847682d6 Fix: Offset calculation for stack parameters 2019-12-17 16:45:54 +01:00
Marvin Kaiser
e71ccf1cdc Fix: Additional parameters not pushed onto stack 2019-12-17 16:45:32 +01:00
Marvin Kaiser
aaf1c3195d if statement asm generation now omits else labels if no else was defined 2019-12-17 15:12:36 +01:00
1c686fb0ea Implement variable declaration 2019-12-16 22:41:58 +01:00
63c5f70358 add new node types to the visitors 2019-12-16 21:46:43 +01:00
Marvin Kaiser
ecae26c8a7 Fix: offset calculation for function definitions
Fix: Jumps / Labels in if statement
2019-12-02 17:13:11 +01:00
Marvin Kaiser
b7e6567d69 Fixed main function asm code
Fixed: IntegerValues not passed via rax
Fixed: Some values passed via stack, not via rax
2019-11-26 09:14:44 +01:00
7d17accad5 implement assembler code generation 2019-11-26 08:07:43 +01:00
Marvin Kaiser
37e4db94f2 Implemented GetVars Visitor 2019-11-25 15:29:22 +01:00
5d62ef1d30 start implement a asm code generator visitor 2019-11-25 14:45:52 +01:00