Commit Graph

265 Commits

Author SHA1 Message Date
96ba81e24a refactor: consistent error handling in Main.scala 2025-03-09 23:37:04 +00:00
Jonny
94ee489faf feat: greedy cli argument implemented, parallel compilation now by default, but no fail fast behaviour 2025-03-03 02:58:04 +00:00
Jonny
f24aecffa3 fix: remove implicit val causing conflicts with parsing cli arguments 2025-03-03 02:10:18 +00:00
Jonny
19e7ce4c11 fix: fix output flag not reading path passed in 2025-03-02 06:20:19 +00:00
Jonny
473189342b refactor: remove commented out code in main.scala 2025-03-02 03:49:21 +00:00
Jonny
f66f1ab3ac refactor: compile function split up into smaller functions 2025-03-02 03:48:37 +00:00
Jonny
abb43b560d refactor: improve resource safety and structure of writer 2025-03-02 03:26:28 +00:00
Jonny
9a5ccea1f6 style: fix formatting 2025-03-02 03:14:58 +00:00
Jonny
85a82aabb4 feat: add option flag, greedy compilation of multiple files, and refactor to use paths instead of files 2025-03-02 03:12:53 +00:00
Jonny
01b38b1445 fix: fix incorrect semantic error logging by refactoring error.scala from frontend 2025-03-01 01:34:05 +00:00
Jonny
667fbf4949 feat: introduction of logger to eliminate printstreams 2025-03-01 01:19:50 +00:00
Jonny
d214723f35 feat: parallelise compilation of multiple files given to cli 2025-02-28 19:36:22 +00:00
Jonny
d56be9249a refactor: introduce decline to integrate command-line parsing with cats-effect 2025-02-28 18:00:18 +00:00
Jonny
1a72decf55 feat: remove unsaferunsync and integrate io in tests instead 2025-02-28 16:24:53 +00:00
Jonny
e54e5ce151 refactor: style fixes and fold combinator used instead of explicit pattern match 2025-02-28 15:50:53 +00:00
Jonny
cf1028454d fix: fix frontend tests failing due to expecting error codes instead of runtime exceptions 2025-02-28 15:20:32 +00:00
Jonny
345c652a57 feat: introduce cats-effect and io 2025-02-28 15:18:24 +00:00
8b3e9b8380 fix: ensure all advanced wacc-examples function correctly
Merge request lab2425_spring/WACC_37!33
2025-02-28 00:31:25 +00:00
41f76e50e0 fix: evaluate all function call arguments before setting registers 2025-02-28 00:27:26 +00:00
Teixeira, Jonny
88f89ce761 feat: implement all runtime errors
Merge request lab2425_spring/WACC_37!32

Co-authored-by: Guy C <gc1523@ic.ac.uk>
Co-authored-by: Jonny <j.sinteix@gmail.com>
Co-authored-by: Connolly, Guy <guy.connolly23@imperial.ac.uk>
Co-authored-by: Gleb Koval <gleb@koval.net>
2025-02-28 00:23:12 +00:00
Guy C
cdf32d93c3 feat: outofboundserror message includes given bad value 2025-02-28 00:17:30 +00:00
Jonny
edcac2782b fix: implements null pointer checks 2025-02-27 23:57:42 +00:00
Jonny
1b2df507ba fix: array bounds checks in place 2025-02-27 23:46:51 +00:00
Jonny
3a2af6f95d feat: implements outofbounds error. array negative bounds check added 2025-02-27 23:02:10 +00:00
Jonny
4727d6c399 fix: remove incorrect newline 2025-02-27 22:32:11 +00:00
Connolly, Guy
9639221a0a feat: merge labts fixes 2025-02-27 22:20:52 +00:00
Jonny
617f6759d3 fix: underflow detected 2025-02-27 21:53:48 +00:00
Jonny
6f5fcd4d85 refactor: redesigned runtime errors with added functionality 2025-02-27 21:48:28 +00:00
c31dd9de25 style: scala format 2025-02-27 20:00:07 +00:00
edce236158 fix: read space-delimited tokens (as per spec) 2025-02-27 19:58:57 +00:00
Guy C
9e6970de62 feat: implements overflow runtime error handling 2025-02-27 19:55:35 +00:00
cb4f899b8c test: provide stdin as space-delimited tokens 2025-02-27 19:50:46 +00:00
a20f28977b fix: handle runtime_error during testing 2025-02-27 19:47:33 +00:00
9a1728fb3f fix: exit from Main with exit code rather than voiding 2025-02-27 19:39:48 +00:00
Guy C
ea262e9a56 feat: implements divByZero and badChr runtime errors 2025-02-27 19:35:50 +00:00
Jonny
332c00b15b feat: added runtime errors class and object 2025-02-27 19:13:17 +00:00
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
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
c0f2473db1 test: fix input handling for IOLoop example 2025-02-27 18:25:12 +00:00
c472c7a62c fix: reserve return pointer and RBP on stack for user func bodies 2025-02-27 18:15:48 +00:00
507cb7dd9b fix: zero-out sub-32 bit expressions 2025-02-27 18:15:48 +00:00
887b982331 fix: variable-sized values, heap-allocated arrays (and printCharArray) 2025-02-27 18:15:48 +00:00
58df1d7bb9 refactor: extract Stack, proper register naming and sizes 2025-02-27 18:15:48 +00:00
Alex Ling
808a59f58a feat: almost implemented arrays 2025-02-27 18:15:48 +00:00
Jonny
bdee6ba756 feat: zero registers via xor 2025-02-27 15:48:48 +00:00
09df7af2ab fix: reset scope after all branching 2025-02-26 20:25:27 +00:00
2cf18a47a8 fix: only push one item to stack on comparisons 2025-02-26 20:00:50 +00:00
Jonny
631f9ddca5 feat: (maybe) tail call optimisation 2025-02-26 19:49:10 +00:00
4fb399a5e1 feat: generate microWacc for printing booleans 2025-02-26 19:14:12 +00:00
16de964f74 refactor: do not append epilogue to user functions since they all return anyway 2025-02-26 18:45:03 +00:00