Commit Graph

  • bcc9f29ff5 Merge pull request 'feature/char-support' (#3) from feature/char-support into master master nitrix 2023-03-24 17:03:23 +01:00
  • 259ac49981 ContextAnalysis: Make comparing more generous nitrix 2023-03-24 00:17:38 +01:00
  • 2aff9b3d0d Char: Add support for chars. nitrix 2023-03-23 23:04:09 +01:00
  • a7e93f4f01 GenASM: Set the bytesToClearFromStack variable earlier nitrix 2023-03-23 22:52:52 +01:00
  • 5f0e84198a GenASM+Void: Generate an implicit return nitrix 2023-03-23 22:49:36 +01:00
  • aef2c84fdc Void Type: Fix a problem where calls to void functions were ignored nitrix 2023-03-23 21:40:22 +01:00
  • 4219f93021 Merge pull request 'Add support for void types' (#2) from 31-void-type into master nitrix 2023-03-23 14:28:24 +01:00
  • 7965c89a60 VoidType: Add tests and fix some bugs nitrix 2023-03-23 13:10:20 +01:00
  • 26eff47057 Fix typos. nitrix 2023-03-23 13:09:52 +01:00
  • 53976615e1 31: Add void type Marvin Kaiser 2020-03-09 21:08:04 +01:00
  • c124587983 git: ignore idea designer file nitrix 2023-03-23 03:35:11 +01:00
  • 07e5a338a4 GenASM: Fix segfaults when calling malloc nitrix 2023-03-23 03:21:10 +01:00
  • 76419d86bb GenASM: Remove a few warnings nitrix 2023-03-23 02:57:17 +01:00
  • f55f2661de Tests: Fix failing test because the error message changed. nitrix 2023-03-23 00:32:50 +01:00
  • 06609ae899 GenASM: Get number of local variables from the "localVariables" attribute of FunctionDefinition. nitrix 2023-03-22 23:40:02 +01:00
  • c5c01041e4 ContextAnalysis: Track local variables and function parameters separately. nitrix 2023-03-22 23:22:36 +01:00
  • 9751a1da2f Eval: Add the corresponding named type to a struct Value. nitrix 2023-03-22 00:14:24 +01:00
  • 534b507f7a Eval: Make a NullExpression evaluate to a Value with Type "NulLValue" instead of returning null. nitrix 2023-03-22 00:13:23 +01:00
  • cce58b6e38 ContextAnalysis: Make naught comparable to struct again. nitrix 2023-03-21 22:44:21 +01:00
  • 8b17ced533 Build: Set Java to verison 17 nitrix 2023-03-21 22:43:40 +01:00
  • bacc40d844 GenASM: Make sure the stack is 16 byte aligned before calling malloc or free. nitrix 2023-03-21 00:46:38 +01:00
  • f38bd3d69e GenASM: Use leave instead of mov and pop for returning from a function. nitrix 2023-03-21 00:22:11 +01:00
  • 441d0122f8 Merge pull request 'feature/add-enum-support' (#1) from feature/add-enum-support into master nitrix 2023-03-20 21:19:53 +01:00
  • e835bd0f06 GenASM: Make GenASM quietly rewrite a user's function if it's called main. nitrix 2023-03-20 21:05:24 +01:00
  • ea1c04ae0a Build: Add a main manifest attribute to the generated jar. nitrix 2023-03-20 19:55:37 +01:00
  • 198bd74a47 Enums: Make the EnumAccessExpression save a reference to the EnumValue it is referencing. nitrix 2023-03-20 19:54:48 +01:00
  • 0594542167 Enums: Make EnumDefinition use EnumValues instead of Strings as children. nitrix 2023-03-20 19:30:07 +01:00
  • 77fe360ffa Evaluate: Implement evaluation for enums. nitrix 2023-03-20 19:10:40 +01:00
  • 55a5b8f54a Make sure that a variable that references an enum has to be initialized. nitrix 2023-03-16 00:01:31 +01:00
  • 2768b4429c Check that a struct field name of a struct declaration does not shadow an enum or a struct definition. nitrix 2023-03-15 23:48:57 +01:00
  • 30dfbbbbba Check that a variable name of variable declaration does not shadow an enum definition. nitrix 2023-03-15 23:33:12 +01:00
  • f77d6a002d Check that a parameter name of a function definition does not shadow an enum definition. nitrix 2023-03-15 23:17:43 +01:00
  • 22634c9652 Use LinkedHashMaps and LinkedHashSets to preserve the order of parameters and struct fields. nitrix 2023-03-15 23:08:38 +01:00
  • 6fd3f5a2e6 Make it possible to use an enum in an expression (i.e. selecting one of the enum values: Foo.A) nitrix 2023-03-15 19:14:04 +01:00
  • 3b928d621b Refactor FunctionDefinition and Parameter context analysis and extend the type check to include enums. nitrix 2023-03-15 17:47:58 +01:00
  • 9a58afb550 Implement StructField type checking in ContextAnalysis. nitrix 2023-03-15 17:21:35 +01:00
  • 6e4431652c Remove FunctionInformation and replace it with FunctionDefinition. nitrix 2023-03-15 16:19:42 +01:00
  • 7af815042b WIP: Add enum support nitrix 2023-03-15 15:55:41 +01:00
  • 7c40a50196 add intellij config files nitrix 2023-03-15 05:23:09 +01:00
  • 8529e24a37 Merge branch '32-create-asm-class-structure' into 'master' Dennis Kaiser 2020-03-17 16:08:54 +01:00
  • 49b024b95f 32: Require data type for all asm functions Marvin Kaiser 2020-03-17 16:02:03 +01:00
  • 982fc6417d 32: Create Meta ASM Structure Marvin Kaiser 2020-03-14 14:14:19 +01:00
  • bd173b1d45 Merge branch 'bug/fix-tco' into 'master' abgabe_compilerbau Dennis Kaiser 2020-03-10 12:19:34 +01:00
  • 221b928d0e push all args onto stack before moving them into the local var to ensure that the function parameters can be used in the tail recursive function call nitrix 2020-03-10 12:07:55 +01:00
  • 8dd0b6cffa Fix pretty printing to file Marvin Kaiser 2020-03-10 11:21:49 +01:00
  • f288d5585f Update README.md Marvin Kaiser 2020-03-10 11:04:03 +01:00
  • e05ca07d23 Merge branch 'extend-readme' into 'master' Dennis Kaiser 2020-03-09 23:27:45 +01:00
  • fd17a25f29 add section explaining structs nitrix 2020-03-09 23:18:46 +01:00
  • 500cfaffbe Merge branch 'fix-do-while' into 'master' Dennis Kaiser 2020-03-09 23:16:33 +01:00
  • 5a5191612e visit block first because the condition variable may be initialized inside the block nitrix 2020-03-09 23:04:55 +01:00
  • 36a38ee7ab Merge branch '16-tail-recursion-optimization' into 'master' Dennis Kaiser 2020-03-09 22:59:38 +01:00
  • c38a330fda Merge branch '19-add-junit-testsuite' into 'master' Dennis Kaiser 2020-03-09 22:59:24 +01:00
  • ac870460e6 use ubuntu, install maven nitrix 2020-03-09 22:03:01 +01:00
  • da56e1c05e try maven:latest as base image nitrix 2020-03-09 21:55:47 +01:00
  • ba17c7e2b6 fix typo nitrix 2020-03-09 21:50:06 +01:00
  • d6c0131d8f add test parser test, rename test to test compilation nitrix 2020-03-09 21:46:52 +01:00
  • d90581f0cd add new target testJava to execute the junit tests nitrix 2020-03-09 21:46:31 +01:00
  • 6714d2136d do not run tests when building the project nitrix 2020-03-09 21:43:26 +01:00
  • fe9c9b79b8 add test directory to settings nitrix 2020-03-09 21:40:45 +01:00
  • 89ec828499 remove unused import nitrix 2020-03-09 21:32:40 +01:00
  • 9df0da89ff implement junit tests nitrix 2020-03-09 21:32:05 +01:00
  • 649e690ac4 add junit nitrix 2020-03-09 21:31:54 +01:00
  • 6d60dcc4a3 add option to surpress illegal relfective access warning nitrix 2020-03-09 21:31:45 +01:00
  • 35de3c7de4 implement test for tail call optimization nitrix 2020-03-09 17:10:50 +01:00
  • 5701d3e918 add TCO to readme, add floats nitrix 2020-03-09 16:13:44 +01:00
  • 704e6441ca move float result into rax before further processing nitrix 2020-03-09 16:09:15 +01:00
  • cb5ceafbbc implement tail recursion call optimization when generation function call nitrix 2020-03-09 15:58:15 +01:00
  • d96b083c41 add metadata to class fields during visit of function definition nodes nitrix 2020-03-09 15:57:37 +01:00
  • acaa37b3b1 implement detection of tail calls nitrix 2020-03-09 15:55:23 +01:00
  • d1cf626934 add flag to indicate whether this is a tail call nitrix 2020-03-09 15:55:01 +01:00
  • 4f1d009626 Merge branch '24-structs' into 'master' Dennis Kaiser 2020-03-09 14:43:17 +01:00
  • 335b70d301 Merge branch '29-remove-print-statement' into 'master' Dennis Kaiser 2020-03-09 14:23:07 +01:00
  • ac6cb22e45 delete print statement nitrix 2020-03-09 14:19:43 +01:00
  • 14f80b46cc remove whitespace nitrix 2020-03-09 14:12:19 +01:00
  • 4a9e5c30e1 implement test_expected functions for all types in use nitrix 2020-03-09 14:10:35 +01:00
  • 0adb9e22da implement print function for struct addresses and bools nitrix 2020-03-09 14:10:03 +01:00
  • 1f8de66751 update the struct test so that field c of the test struct is of type double nitrix 2020-03-09 13:49:09 +01:00
  • fc16663dae make floats work in structs nitrix 2020-03-09 13:48:31 +01:00
  • 31330db676 replace DOT with PERIOD nitrix 2020-03-09 12:53:26 +01:00
  • 8bb912b377 implement isNumericType nitrix 2020-03-09 12:51:28 +01:00
  • 3b5dc43cfb implement test functions nitrix 2020-03-07 01:22:38 +01:00
  • 08398e4064 add struct test function prototype nitrix 2020-03-07 01:22:08 +01:00
  • b776ac00e3 call struct tests nitrix 2020-03-07 01:21:53 +01:00
  • 9adc48da82 implement struct tests nitrix 2020-03-07 01:21:29 +01:00
  • 1403e0a231 fix indices nitrix 2020-03-07 00:22:22 +01:00
  • 02666a9459 implement visitors nitrix 2020-03-07 00:14:31 +01:00
  • 32cb06cd51 implement method that returns the index of a field by name nitrix 2020-03-07 00:14:06 +01:00
  • e3d8f3cfa7 implement field access visitor nitrix 2020-03-07 00:13:37 +01:00
  • 90ed033943 implement fielfd assignment node nitrix 2020-03-07 00:13:08 +01:00
  • ed4c901c6c add field assignment to statements nitrix 2020-03-07 00:12:53 +01:00
  • 86e77d1609 update the struct definition when following the path nitrix 2020-03-07 00:11:48 +01:00
  • eb75cc7838 implement GenASM for structs nitrix 2020-03-06 00:21:59 +01:00
  • e2986b3d65 add the struct name to the struct field access expression node nitrix 2020-03-06 00:18:48 +01:00
  • 1693eb6426 implement helper functions to determine the struct size and field offsets nitrix 2020-03-06 00:17:59 +01:00
  • 622be803cc add structs to the constructor params of GenASM nitrix 2020-03-05 23:03:12 +01:00
  • 3f18fa56c2 add struct definitions as a constructor parameter nitrix 2020-03-05 23:02:48 +01:00
  • a9ab8f08e6 implement structs nitrix 2020-03-05 22:43:47 +01:00
  • bc5efde8c5 add the retrieved structs to the constructor call of the eval visitor nitrix 2020-03-05 22:43:20 +01:00
  • edaa686a2a add method to get the value as a struct nitrix 2020-03-05 22:42:43 +01:00
  • b9569c7df6 add missing semicolong since a destructor call is now a statement nitrix 2020-03-05 22:08:20 +01:00