Commit Graph
100 Commits
Author SHA1 Message Date
cyclaneandJonny 191c5df824 feat: imports and parallelised renamer
Merge request lab2425_spring/WACC_37!40

Co-authored-by: Jonny <j.sinteix@gmail.com>
2025-03-13 23:10:38 +00:00
cyclane a3895dca2c style: scala format 2025-03-13 22:26:56 +00:00
cyclane 6e592e7d9b feat: functional single-threaded imports 2025-03-13 22:24:41 +00:00
cyclane ee54a1201c fix: return proper AST from renamer 2025-03-13 20:47:56 +00:00
cyclane c73b073f23 feat: initial attempt at renamer parallelisation 2025-03-13 20:45:57 +00:00
cyclane 8d8df3357d refactor: use getCanonicalPath instead of toRealPath 2025-03-13 18:39:11 +00:00
cyclane 00df2dc546 feat: filenames in errors 2025-03-13 15:03:26 +00:00
cyclane 67e85688b2 refactor: fMap to replace fOption, fList and fNonEmptyList 2025-03-13 14:03:53 +00:00
cyclane 0497dd34a0 fix: use GOps to avoid scala error 2025-03-13 13:37:17 +00:00
cyclane 6904aa37e4 style: scala format 2025-03-13 13:31:47 +00:00
cyclane 5141a2369f fix: convert parser to use FParsley 2025-03-13 13:26:35 +00:00
cyclane 3fff9d3825 feat: file parser bridges 2025-03-13 13:26:19 +00:00
cyclane f11fb9f881 test: integration tests for imports 2025-03-13 09:43:29 +00:00
cyclane e881b736f8 feat: imports parser 2025-03-13 08:18:44 +00:00
cyclaneandJonny 905a5e5b61 feat: parallelised compilation
Merge request lab2425_spring/WACC_37!39

Co-authored-by: Jonny <j.sinteix@gmail.com>
2025-03-13 01:08:58 +00:00
cyclane 0d8be53ae4 fix: set output to . for labts compiler 2025-03-12 23:34:39 +00:00
cyclane 96ba81e24a refactor: consistent error handling in Main.scala 2025-03-09 23:37:04 +00:00
cyclane f896cbb0dd fix: add opSize back in to stack
Merge request lab2425_spring/WACC_37!38
2025-03-02 14:10:18 +00:00
cyclane 1b6d81dfca style: scala format 2025-03-01 02:15:01 +00:00
cyclane ae52fa653c fix: add opSize back in to stack 2025-03-01 02:07:45 +00:00
cyclane 3b723392a7 fix: do not overwrite RDI in free 2025-02-28 18:47:36 +00:00
cyclane 9a0d3e38a4 refactor: merge MemLocation with IndexedAddress
Merge request lab2425_spring/WACC_37!37
2025-02-28 18:44:48 +00:00
cyclane 37812fb5a7 fix: copy whole register on assignment 2025-02-28 18:41:31 +00:00
cyclane 578a28a222 Revert "fix: zero-out D32 as well"
This reverts commit 0eaf2186b6.
2025-02-28 18:28:50 +00:00
cyclane 0eaf2186b6 fix: zero-out D32 as well 2025-02-28 17:51:06 +00:00
cyclane 5ae65d3190 fix: sanity check 2025-02-28 17:22:49 +00:00
cyclane 68903f5b69 refactor: use explicit sizes in asmGenerator 2025-02-28 17:21:45 +00:00
cyclane e1d90eabf9 fix: use MemLocation.copy for zeroRest 2025-02-28 16:40:58 +00:00
cyclane 1a39950a7b refactor: merge MemLocation with IndexedAddress 2025-02-28 16:26:40 +00:00
61643a49eb refactor: merge comments and extracting constants & renaming refactors
Merge request lab2425_spring/WACC_37!36

Co-authored-by: Jonny <j.sinteix@gmail.com>
Co-authored-by: Guy C <gc1523@ic.ac.uk>
2025-02-28 15:32:46 +00:00
cyclane 82997a5a38 docs: clarify evalExprOntoStack sanity check, explanation comments for generateCall 2025-02-28 15:29:41 +00:00
cyclane 720d9320e2 Merge branch 'master' into comments-and-refactors 2025-02-28 15:14:47 +00:00
cyclane c3f2ce8b19 refactor: single definition for common registers 2025-02-28 14:47:47 +00:00
cyclane 7627ec14d2 refactor: return args and defs from labelGenerator, instead of strings 2025-02-28 14:23:09 +00:00
cyclane fb5799dbfd refactor: use LabelGenerator for RuntimeErrors 2025-02-28 14:07:00 +00:00
cyclane 967a6fe58b refactor: replace strings ListBuffer with labelGenerator 2025-02-28 13:14:29 +00:00
cyclane 8b3e9b8380 fix: ensure all advanced wacc-examples function correctly
Merge request lab2425_spring/WACC_37!33
2025-02-28 00:31:25 +00:00
cyclane 41f76e50e0 fix: evaluate all function call arguments before setting registers 2025-02-28 00:27:26 +00:00
cyclane c31dd9de25 style: scala format 2025-02-27 20:00:07 +00:00
cyclane edce236158 fix: read space-delimited tokens (as per spec) 2025-02-27 19:58:57 +00:00
cyclane cb4f899b8c test: provide stdin as space-delimited tokens 2025-02-27 19:50:46 +00:00
cyclane a20f28977b fix: handle runtime_error during testing 2025-02-27 19:47:33 +00:00
cyclane 9a1728fb3f fix: exit from Main with exit code rather than voiding 2025-02-27 19:39:48 +00:00
cyclaneAlex LingJonnyGuy CBarf-VaderLing, Alex <alex.ling23@imperial.ac.uk>
9b9f0a80cb feat: x86 code generation implementation without runtime checking
Merge request lab2425_spring/WACC_37!29

Co-authored-by: Alex Ling <al4423@ic.ac.uk>
Co-authored-by: Jonny <j.sinteix@gmail.com>
Co-authored-by: Guy C <gc1523@ic.ac.uk>
Co-authored-by: Barf-Vader <47476490+Barf-Vader@users.noreply.github.com>
Co-authored-by: Ling, Alex <alex.ling23@imperial.ac.uk>
2025-02-27 18:54:54 +00:00
cyclaneandAlex Ling ada53e518b fix: variable-sized values, heap-allocated arrays (and printCharArray)
Merge request lab2425_spring/WACC_37!28

Co-authored-by: Alex Ling <al4423@ic.ac.uk>
2025-02-27 18:50:11 +00:00
cyclane c0f2473db1 test: fix input handling for IOLoop example 2025-02-27 18:25:12 +00:00
cyclane c472c7a62c fix: reserve return pointer and RBP on stack for user func bodies 2025-02-27 18:15:48 +00:00
cyclane 507cb7dd9b fix: zero-out sub-32 bit expressions 2025-02-27 18:15:48 +00:00
cyclane 887b982331 fix: variable-sized values, heap-allocated arrays (and printCharArray) 2025-02-27 18:15:48 +00:00
cyclane 58df1d7bb9 refactor: extract Stack, proper register naming and sizes 2025-02-27 18:15:48 +00:00
cyclane 09df7af2ab fix: reset scope after all branching 2025-02-26 20:25:27 +00:00
cyclane 2cf18a47a8 fix: only push one item to stack on comparisons 2025-02-26 20:00:50 +00:00
cyclane 4fb399a5e1 feat: generate microWacc for printing booleans 2025-02-26 19:14:12 +00:00
cyclane 16de964f74 refactor: do not append epilogue to user functions since they all return anyway 2025-02-26 18:45:03 +00:00
cyclane c748a34e4c feat: user functions and calls 2025-02-26 18:31:15 +00:00
cyclane 85190ce174 refactor: make microWacc.ArrayElem recursive rather than flat 2025-02-26 18:08:30 +00:00
cyclane 39f88f6f8a test: disable parallel test execution to avoid race conditions 2025-02-26 03:31:11 +00:00
cyclane da0ef9ec24 ci: checkout commitlint back to current commit 2025-02-25 22:03:53 +00:00
cyclane 64b015e494 ci: use JS commitlint configuration 2025-02-25 21:49:23 +00:00
cyclaneandJonny 70e023f27a Local Mutable Chains
Merge request lab2425_spring/WACC_37!27

Co-authored-by: Jonny <j.sinteix@gmail.com>
2025-02-25 21:13:46 +00:00
cyclane 11c483439c fix: generate strDirs after prog, change += to + 2025-02-25 21:05:21 +00:00
cyclane 4f3596b48a ci: fix check commits 2025-02-25 17:35:04 +00:00
cyclane efe9f91303 refactor: use non-singleton labelgenerator (instead use class) 2025-02-25 17:10:56 +00:00
cyclane 5f8b87221c fix: escape characters within assembly 2025-02-25 17:07:21 +00:00
cyclane 8558733719 style: scala format lexer 2025-02-25 16:33:17 +00:00
cyclane f628d16d3d fix: always push a value onto stack on expr evaluation 2025-02-25 16:27:47 +00:00
cyclane c59c28ecbd test: retrieve raw stdout in example tests, rather than lines 2025-02-22 23:38:19 +00:00
cyclane 7f2870e340 feat: generate assembly from main 2025-02-21 23:35:54 +00:00
cyclane 0391b9deba fix: remove logging from Main 2025-02-21 18:51:50 +00:00
cyclane ab28f0950a fix: main outputs to current dir 2025-02-21 18:46:10 +00:00
cyclaneandBarf-Vader 1c6ea16b6e feat: carrot mark + writer
Merge request lab2425_spring/WACC_37!24

Co-authored-by: Barf-Vader <47476490+Barf-Vader@users.noreply.github.com>
2025-02-21 18:35:06 +00:00
cyclane b2da8c2408 ci: use x86 image for tests 2025-02-21 18:30:33 +00:00
cyclane 42ff9c9e79 test: backend tests 2025-02-21 18:19:23 +00:00
cyclane 39c695b1bb feat: output backend files 2025-02-21 18:19:03 +00:00
cyclane 87691902be feat: set wacc target to x86-64 2025-02-21 18:18:44 +00:00
cyclane eb7387b49c chore: update dependencies parsley-cats and os-lib 2025-02-21 18:18:35 +00:00
2a234f6db8 Assembly ir
Merge request lab2425_spring/WACC_37!23

Co-authored-by: Barf-Vader <47476490+Barf-Vader@users.noreply.github.com>
Co-authored-by: Guy C <gc1523@ic.ac.uk>
2025-02-20 19:02:47 +00:00
cyclane bb090ad431 feat: microwacc type checker implementation
Merge request lab2425_spring/WACC_37!22
2025-02-18 17:29:10 +00:00
cyclane 8991024d5d feat: initial microWacc definition
Merge request lab2425_spring/WACC_37!21
2025-02-18 17:27:12 +00:00
cyclane 27cc25cc0d feat: type-checker returns micro wacc 2025-02-17 15:26:32 +00:00
cyclane b7e442b269 refactor: introduce exit-code guard against InternalError 2025-02-14 00:35:57 +00:00
cyclane 756b42dd72 refactor: remove implicit ast from type checker 2025-02-14 00:35:57 +00:00
cyclane bc25f914ad fix: add uid to microWacc Ident 2025-02-14 00:35:48 +00:00
cyclane 6a6aadbbeb fix: add nulliter to micro wacc 2025-02-14 00:21:10 +00:00
cyclane 03999e00ef fix: add support for println in micro wacc 2025-02-14 00:07:43 +00:00
cyclane d6aa83a2ea fix: add support for return types in micro wacc calls 2025-02-13 23:59:44 +00:00
cyclane e23ef8da48 feat: initial microWacc definition 2025-02-13 23:07:38 +00:00
cyclane 2a4c2bc993 refactor: comment non-trivial code in typeChecker.scala
Merge request lab2425_spring/WACC_37!20
2025-02-07 18:45:50 +00:00
cyclane 84932edb69 refactor: change typo in Unweakenable 2025-02-07 18:43:30 +00:00
cyclane 9da2744cb9 refactor: comment non-trivial code in typeChecker.scala 2025-02-07 18:41:16 +00:00
cyclaneandBarf-Vader 585ba6958a feat: reduce appearances of unknown-type, catch illegal function calls
Merge request lab2425_spring/WACC_37!19

Co-authored-by: Barf-Vader <47476490+Barf-Vader@users.noreply.github.com>
2025-02-07 18:14:33 +00:00
cyclane 5ea3ca5a03 fix: display function type on incorrect number of args 2025-02-07 18:09:18 +00:00
cyclane 4d25d7a730 fix: make int binary operators and char binary operators errors consistent 2025-02-07 18:02:31 +00:00
cyclane 8a7b37e05f fix: check both sides are unknown for assign error message 2025-02-07 17:32:24 +00:00
cyclane b5e72660b7 fix: make free error message more clear 2025-02-07 17:19:16 +00:00
cyclane e87e61b152 feat: explicitly disallow non-assigned direct function calls 2025-02-07 17:16:23 +00:00
cyclane 4631f4370e Revert "fix: catch function call without keyword with parenscheck"
This reverts commit 4bf63454f4.
2025-02-07 17:13:06 +00:00
cyclane 4738207523 refactor: make missing return type message more precise 2025-02-07 16:22:00 +00:00
cyclane d32855cc29 feat: detect pointer operators 2025-02-07 15:42:38 +00:00
cyclane 959c556eae fix: use verifiedExplain for missing return type check 2025-02-07 15:39:50 +00:00