Commit Graph

55 Commits

Author SHA1 Message Date
Mattia Giambirtone 88073194f2
Fixed test suite and added test suite runner. Also yeeted templates 2023-07-04 14:33:32 +02:00
Mattia Giambirtone 71f44313da
Work on keyword arguments. REPL has been disabled (it's broken). Fixed various issues with casts and typevars 2023-06-01 12:56:59 +02:00
Mattia Giambirtone 97698b28af Initial work on fixing lambdas and minor improvements to error reporting 2023-03-04 12:13:19 +01:00
Mattia Giambirtone cf6d20e757 Added mutateOuterScope to noWarn option, improved error formatting, added backend flag, updated help menu 2022-12-16 15:11:20 +01:00
Mattia Giambirtone dc393bbb34 Initial work on multi-backend support 2022-12-15 11:48:43 +01:00
Mattia Giambirtone f1875736e3 Added switch statements 2022-12-07 09:15:29 +01:00
Mattia Giambirtone af3c7234be Added template support and related test 2022-12-06 12:55:17 +01:00
Mattia Giambirtone 4b6d86ad8e Added named blocks 2022-12-05 08:07:37 +01:00
Mattia Giambirtone 15ec8dce54 Fixed error reporting in REPL 2022-12-04 17:02:32 +01:00
Mattia Giambirtone 21738b9382 Removed broken closure implementation, changed local resolution mechanism, many bug fixes to namespaces and tests 2022-12-04 16:54:28 +01:00
Mattia Giambirtone 8fb90bb0ef Many fixes to generics 2022-12-01 22:04:10 +01:00
Mattia Giambirtone 63cdda42ce Added tagged type unions, moved intrinsics to peon's stdlib and fixed issues with generics and parametric polymorphism 2022-11-29 16:48:05 +01:00
Mattia Giambirtone 7ab757074f Added attribute resolution, fixed closures, fixed cross-shadowing issues 2022-11-27 13:39:41 +01:00
Mattia Giambirtone b589f8109a Added missing files 2022-11-23 09:29:42 +01:00
Mattia Giambirtone 9567319c40 Major error formatting refactoring. Improved warning system 2022-11-23 01:02:35 +01:00
Mattia Giambirtone a3b4fd1048 Initial warning support 2022-11-22 15:13:42 +01:00
Mattia Giambirtone d33a597f19 Massive improvements to import system (added export statement, initial work on namespaces, module names can now be paths, added module search paths) 2022-10-17 11:28:00 +02:00
Mattia Giambirtone d4d1034cef Return addresses are now 64 bits long, return statements now compile to jumps, initial (broken) work on generics 2022-10-13 13:12:24 +02:00
Mattia Giambirtone e759e6cbb2 Various fixes to closures. Fixed chained calls and local scopes 2022-10-07 15:55:41 +02:00
Mattia Giambirtone c230142378 Broken work with closures and chained calls 2022-08-30 12:55:14 +02:00
Mattia Giambirtone 85de75a50a It is now possible to close over function arguments 2022-08-19 12:16:40 +02:00
Mattia Giambirtone 8e53b19233 Various parser adjustments and compiler fixes 2022-08-18 22:07:46 +02:00
Mattia Giambirtone 4fdd90614a Various fixes to the GC, added a few more tests 2022-08-18 19:18:29 +02:00
Mattia Giambirtone 77fd5931fa Further clean up 2022-08-17 19:31:27 +02:00
Mattia Giambirtone f7733d925f Cleaned up and renamed some things 2022-08-17 19:23:11 +02:00
Mattia Giambirtone 0861135e7f Initial work on a stdlib of sorts, added comparison operators and refactored tests 2022-08-15 19:07:37 +02:00
Mattia Giambirtone da651355b9 Added a few more tests 2022-08-01 13:16:07 +02:00
Mattia Giambirtone ff0ae8fcba Various fixes to frames, recursion, and more. Removed stack bottom from CFI data. Added comparison opcode for fib test as well as a clock opcode 2022-08-01 10:38:51 +02:00
Mattia Giambirtone 33066d3b9b Fixed bug with calling a call 2022-07-31 16:09:22 +02:00
Mattia Giambirtone cc0aab850e Simplified calling convention, added for PeonObject, added some comments, fixed bug with StoreVar in stack frames, fixed issues with functions assigned to variables, changed the way closures are emitted so that empty jumps are no longer needed 2022-07-09 12:47:53 +02:00
Mattia Giambirtone 5d572386a3 Initial work on pragma handling (+ some parser fixes). Changed the way the lexer handles indentation and made tabs illegal. Added instructions for some operations on primitive types, removed file argument from serializer 2022-06-14 12:12:56 +02:00
Mattia Giambirtone e3ab2fbdb6 Fixed issues with returning/calling function objects 2022-06-13 15:44:53 +02:00
Mattia Giambirtone dfa42d994b Fixed if/else 2022-06-02 12:05:22 +02:00
Mattia Giambirtone 099f733db6 Initial work on a two-stack design 2022-06-02 01:33:56 +02:00
Mattia Giambirtone f8ab292c27 Fixed peon calling convention and various errors with function calls 2022-05-30 22:06:15 +02:00
Mattia Giambirtone df105125c4 Various fixes to stack frame alignment and added incremental compilation to REPL 2022-05-30 12:32:24 +02:00
Mattia Giambirtone 9dacda4009 Various fixes and stack frame changes 2022-05-29 17:04:19 +02:00
Mattia Giambirtone bf9b9389ce Some work for heap vars, wip fixes for higher-order functions 2022-05-27 14:01:57 +02:00
Mattia Giambirtone 71c05ec1bf Fixed closure variables and debugger output with nested CFI data (also removed unneeded peon files) 2022-05-26 18:32:02 +02:00
Mattia Giambirtone 48d1c3fc8c Initial work on CFI-like functionality for better debugging 2022-05-24 22:26:45 +02:00
Mattia Giambirtone 8d1699ff9e Refactored calling convention and added stack frame support to the VM as well as StoreVar 2022-05-23 10:49:38 +02:00
Mattia Giambirtone 5f43ea9490 Initial work on calls (with runtime support too) 2022-05-22 17:23:52 +02:00
Mattia Giambirtone 9f1769ab71 Added LoadVar support to the VM and fixed a minor mistake in the debugger output 2022-05-22 13:09:46 +02:00
Mattia Giambirtone 42ab1d4c6e Initial work on call resolution, added support for running files 2022-05-22 13:02:57 +02:00
Mattia Giambirtone e4c2ba2ce2 Got rid of serializedRaw in main module and prettyfied the output 2022-05-20 18:34:14 +02:00
Mattia Giambirtone 1a0587d08b Minor style changes, removed findImpl from compiler, made the VM use the multibyte utilities, bytecode chunks now no longer store AST node objects and use a stream of bytes instead, fixed issues with endScope() in the compiler which would not pop properly from self.names, fixed issues with blockStmt in parser, added more multibyte utilities 2022-05-20 15:47:04 +02:00
Mattia Giambirtone cb21af4aa3 Added Makefile, prettyfied code, initial work on pragmas 2022-05-18 13:32:32 +02:00
Mattia Giambirtone e8cbec94bd Minor bug fixes 2022-05-16 19:40:13 +02:00
Mattia Giambirtone e823a459c8 Implemented jump opcodes and LoadUInt64 in the VM, some style and proc changes in the compiler, chunk constants are now type-aware, fixed various inheritance mistakes in the AST node, refined type inference system, moved types back to the compiler and completely redesigned operator parsing to be more modular 2022-05-07 10:48:42 +02:00
Mattia Giambirtone a1c5430773 Collections are no longer a compiler intrinsic. Added parser support for ptr/ref arguments 2022-05-04 14:01:38 +02:00