Compare commits

..

96 Commits

Author SHA1 Message Date
Mattia Giambirtone bac78c87e6 More changes to the README because yes 2022-08-17 21:10:55 +02:00
Mattia Giambirtone f7d4e56d62 Fixed wording 2022-08-17 20:55:00 +02:00
Mattia Giambirtone 213d998b9a Fixed typos 2022-08-17 20:54:35 +02:00
Mattia Giambirtone b25afe236a Updated docs and README 2022-08-17 20:52:23 +02:00
Mattia Giambirtone afeed2d6e8 Even more cleanup. Added pretty colors to the VM's debugger 2022-08-17 20:40:34 +02:00
Mattia Giambirtone 61d45438a1 Further clean up 2022-08-17 19:31:27 +02:00
Mattia Giambirtone 3cdeb8d50b Cleaned up and renamed some things 2022-08-17 19:23:11 +02:00
Mattia Giambirtone 1ba618520f Move towards unboxed types in the Peon VM 2022-08-17 17:31:15 +02:00
Mattia Giambirtone b273cd7448 Added chained imports test 2022-08-16 14:23:58 +02:00
Mattia Giambirtone 63cdb60d07 More fixes to the import system and incremental compilation 2022-08-16 13:37:09 +02:00
Mattia Giambirtone 9679053641 WIP for importing the same module multiple times and other failed fixes 2022-08-16 13:11:09 +02:00
Mattia Giambirtone d746362051 Basic support for actual incremental compilation 2022-08-16 12:20:17 +02:00
Mattia Giambirtone 6f1aaed6da Removed debugging echo 2022-08-15 22:34:08 +02:00
Mattia Giambirtone e120352302 Added all missing comparison operators and fixed error reporting system 2022-08-15 22:15:06 +02:00
Mattia Giambirtone e01f1939bb Expanded comparison test and fixed some typos/mistakes 2022-08-15 20:09:54 +02:00
Mattia Giambirtone ce80cbeea4 Fixed issues with '>', thanks Nim... 2022-08-15 19:52:06 +02:00
Mattia Giambirtone 3c799dff1f Initial work on a stdlib of sorts, added comparison operators and refactored tests 2022-08-15 19:07:37 +02:00
Mattia Giambirtone f759b52796 Deleted standalone fibonacci test 2022-08-15 17:20:21 +02:00
Mattia Giambirtone 50f7ad8425 Fixed some issues with strings and added debug print to fibonacci test 2022-08-15 17:20:09 +02:00
Mattia Giambirtone 6972ffeb77 Made exception handling in main.nim module-aware and did some minor refactoring 2022-08-15 11:46:24 +02:00
Mattia Giambirtone d1fbef3606 Fixed name resolution error in findByName 2022-08-14 19:51:12 +02:00
Mattia Giambirtone 153db62df6 Initial tests for an import system 2022-08-14 18:37:17 +02:00
Mattia Giambirtone 0554431fcb Minor documentation additions 2022-08-04 17:48:56 +02:00
Mattia Giambirtone 06bb81c4c6 Added a few more tests 2022-08-01 13:16:07 +02:00
Mattia Giambirtone b027b0f4f4 Removed debug print 2022-08-01 11:36:23 +02:00
Mattia Giambirtone 4a45fe4ac7 Fixed fib to work again 2022-08-01 11:36:00 +02:00
Mattia Giambirtone ffa2756e97 Fixed inference of unary and binary operators 2022-08-01 11:30:44 +02:00
Mattia Giambirtone 4bf64f6561 Updated the manual and changed the syntax for foreach loops 2022-08-01 11:03:49 +02:00
Mattia Giambirtone d194bf6a2f Added support for GenericPrint opcode 2022-08-01 10:44:38 +02:00
Mattia Giambirtone e03f8518ee 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 ed1970d328 Fixed a bug with nested scopes 2022-07-31 16:40:47 +02:00
Mattia Giambirtone 1054ddd402 Fixed bug with calling a call 2022-07-31 16:09:22 +02:00
Mattia Giambirtone 10e5b88672 Removed the need for parentheses around control flow and looping statements, enforced braces instead. Got rid of the old C-style for loop 2022-07-16 13:21:40 +02:00
Mattia Giambirtone 91bfef576d Added Compiler.check(), made type constraints mandatory in generics, reverted '\n' being converted to a semicolon, minor refactoring 2022-07-16 13:04:00 +02:00
Mattia Giambirtone d0cb7317a5 BYE BYE SEMICOLONS! 2022-07-15 19:48:32 +02:00
Mattia Giambirtone 74f7481625 Fixed issues when debugSerializer == true 2022-07-10 16:31:30 +02:00
Mattia Giambirtone e971e858be Fixed error message when returning values from void functions 2022-07-10 15:10:01 +02:00
Mattia Giambirtone 90d9eb5629 Updated closures test 2022-07-10 15:07:57 +02:00
Mattia Giambirtone 59e74e4506 Temporary fix for not closing over function arguments 2022-07-10 15:07:44 +02:00
Mattia Giambirtone 391f9f1aed Initial work on closures. Seems to be working 2022-07-10 14:50:08 +02:00
Mattia Giambirtone b2ee002699 Moved for peon types to its own module, added support for negating primitives in the compiler and for floats in the VM, added some more docs to the VM and restored the old empty-jump mechanism for closure declaration. Minor changes to endScope 2022-07-10 13:19:57 +02:00
Mattia Giambirtone 9297847b24 Updated Makefile 2022-07-09 16:25:19 +02:00
Mattia Giambirtone 99df9837a1 Updated .gitignore 2022-07-09 13:37:51 +02:00
Mattia Giambirtone 2d1d43a898 Added test for scopes 2022-07-09 13:37:16 +02:00
Mattia Giambirtone 0b7cb70049 Fixed some issued with scoping and globals 2022-07-09 13:36:29 +02:00
Mattia Giambirtone b553cf5266 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 6ba5e1d16a Initial broken work on generics 2022-06-21 20:18:53 +02:00
Mattia Giambirtone ea8191ac14 Initial unfinished work on generic functions 2022-06-20 09:39:54 +02:00
Mattia Giambirtone 94ce81b6f1 Updated .gitignore, slightly edited README and added some more tests 2022-06-19 14:45:38 +02:00
Mattia Giambirtone 998ba94902 More fixes for assigning builtin functions to variables 2022-06-14 23:34:42 +02:00
Mattia Giambirtone d3d915c6b2 Removed extra bloat 2022-06-14 22:46:55 +02:00
Mattia Giambirtone cb95ba60ef Updated .gitignore 2022-06-14 22:46:25 +02:00
Mattia Giambirtone a496a33334 Added some missing files 2022-06-14 22:45:41 +02:00
Mattia Giambirtone 62e7cfeb89 Initial work on generics and fixed bugs in the parser with stropped operator names 2022-06-14 22:45:32 +02:00
Mattia Giambirtone 8a46c616d1 Added built-in operators as a single instruction (src/peon/stdlib/arithmetics.pn is now fully functional) 2022-06-14 18:10:13 +02:00
Mattia Giambirtone 4dc7ce2ada Minor fixes 2022-06-14 12:14:58 +02:00
Mattia Giambirtone 3abc243c06 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 1531811adf Initial work on closures (again?) 2022-06-13 17:28:05 +02:00
Mattia Giambirtone 7214ea129f Fixed issues with returning/calling function objects 2022-06-13 15:44:53 +02:00
Mattia Giambirtone acf4735790 Various style fixes with nil checks, added PushC opcode, added support for calling function objects 2022-06-13 15:04:53 +02:00
Mattia Giambirtone fd9d931b26 More work on pragmas, returning functions now works 2022-06-08 16:07:08 +02:00
Mattia Giambirtone 3377cf12b0 Initial experimental support for parsing pragmas 2022-06-07 11:23:08 +02:00
Mattia Giambirtone aaa6119dc1 Initial work on type declarations 2022-06-02 14:23:05 +02:00
Mattia Giambirtone 5051901339 Fixed logic bug within if/else construct 2022-06-02 12:19:18 +02:00
Mattia Giambirtone 887fa85ec0 Fixed if/else 2022-06-02 12:05:22 +02:00
Mattia Giambirtone 3d84446d50 Updated config.nim 2022-06-02 11:48:17 +02:00
Mattia Giambirtone cdb2c33897 Fixed local variables 2022-06-02 11:45:27 +02:00
Mattia Giambirtone 605a3b1d06 Fixed nested calls 2022-06-02 10:19:34 +02:00
Mattia Giambirtone 15166d26ca Fixed inverse parameter ordering (whoops) 2022-06-02 01:50:06 +02:00
Mattia Giambirtone cf133ff921 Initial work on a two-stack design 2022-06-02 01:33:56 +02:00
Mattia Giambirtone 320619d582 Fixed peon calling convention and various errors with function calls 2022-05-30 22:06:15 +02:00
Mattia Giambirtone 2829f3801d Removed debugging print (oops) 2022-05-30 12:33:30 +02:00
Mattia Giambirtone 12d303003e Various fixes to stack frame alignment and added incremental compilation to REPL 2022-05-30 12:32:24 +02:00
Mattia Giambirtone 552d00c054 Added lastPop field to VM 2022-05-30 09:32:15 +02:00
Mattia Giambirtone bea354cd59 Initial work on function calls 2022-05-30 09:29:03 +02:00
Mattia Giambirtone f4365dd95d Fixed some segfaults 2022-05-29 23:01:36 +02:00
Mattia Giambirtone a3834a27c3 Various fixes and stack frame changes 2022-05-29 17:04:19 +02:00
Mattia Giambirtone c3c2dc31f8 Refactored the type system which no longer relies on AST node objects. Added types for ref, ptr and mutable types 2022-05-29 15:54:01 +02:00
Mattia Giambirtone 268a91ce22 Removed bytecode file 2022-05-29 15:01:15 +02:00
Mattia Giambirtone e07fa4f01b Updated .gitignore 2022-05-29 14:57:37 +02:00
Mattia Giambirtone 636bc6940c Fixed .gitignore (maybe??) 2022-05-29 14:54:22 +02:00
Mattia Giambirtone 568ddaf40a Added tests directory 2022-05-29 14:52:47 +02:00
Mattia Giambirtone f430fe6232 Some work for heap vars, wip fixes for higher-order functions 2022-05-27 14:01:57 +02:00
Mattia Giambirtone 2fc599dac4 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 2167838355 Fixed issues with stack frames when returning from functions 2022-05-25 14:38:40 +02:00
Mattia Giambirtone 8ecbf23710 Fixed recursion error inside inferType 2022-05-25 14:17:58 +02:00
Mattia Giambirtone 0b834fdaf4 Fixed variable declarations not compiling in some cases 2022-05-25 12:15:45 +02:00
Mattia Giambirtone 6efb062e7d Made main.nim a bit nicer with command-line options 2022-05-25 11:49:21 +02:00
Mattia Giambirtone f85df9a690 Updated .gitignore 2022-05-25 11:43:02 +02:00
Mattia Giambirtone fceb6d8fa4 Added info about CFI section and made minor changes to README 2022-05-25 11:36:12 +02:00
Mattia Giambirtone b137e06ac6 Initial work on CFI-like functionality for better debugging 2022-05-24 22:26:45 +02:00
Mattia Giambirtone f348b8e82e Various fixes to matchImpl. Variables can now shadow functions, but not other variables 2022-05-24 10:23:34 +02:00
Mattia Giambirtone 3e26ca4a1c Updated config.nim and changed mechanism for finding operators (also added binary operator lookup) 2022-05-24 09:56:11 +02:00
Mattia Giambirtone 231b7012a1 Removed old binary 2022-05-23 23:34:33 +02:00
Mattia Giambirtone 4c542d999c Merge branch 'master' of https://git.nocturn9x.space/nocturn9x/peon 2022-05-23 23:25:21 +02:00
Mattia Giambirtone 139ccf31d0 Fixed typo 2022-05-23 23:15:09 +02:00

Diff Content Not Available