Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add parsing for function definitions | Bad Diode | 2022-04-03 | 5 | -27/+180 |
| | | | | | | | | | | | | This commits also changes the structure of some existing functions. Namely, parse_* functions other than parse_next check that the type of the token to parse is correct. This allow us to use them directly in the rest of the code to consume tokens and properly produce an error if the token type is not the expected one. In the same fashion, two new functions consume_lparen and consume_rparen are implemented. They only report true/false and report errors if something went wrong. | ||||
* | Add parsing for (set ...) statements | Bad Diode | 2022-04-03 | 4 | -1/+47 |
| | |||||
* | Add type signature to def statements | Bad Diode | 2022-03-31 | 5 | -103/+121 |
| | | | | Currently mandatory, may be optional once we have type inference. | ||||
* | Minor styling changes | Bad Diode | 2022-03-30 | 2 | -28/+11 |
| | |||||
* | Add initial parsing of variable definitions | Bad Diode | 2022-03-30 | 4 | -5/+72 |
| | |||||
* | Add support for logic builtins and bools | Bad Diode | 2022-03-30 | 4 | -1/+38 |
| | |||||
* | Add parsing for builtin arithmetic ops | Bad Diode | 2022-03-30 | 6 | -15/+84 |
| | |||||
* | Use Node refs as return arguments from parsing | Bad Diode | 2022-03-30 | 2 | -30/+49 |
| | |||||
* | Make unknown printing explicit | Bad Diode | 2022-03-26 | 1 | -3/+1 |
| | |||||
* | Add number parsing | Bad Diode | 2022-03-12 | 5 | -93/+101 |
| | |||||
* | Add boilerplate for parser | Bad Diode | 2022-02-12 | 4 | -1075/+154 |
| | |||||
* | Make keywords a static array for ease of lex | Bad Diode | 2022-02-12 | 2 | -29/+36 |
| | |||||
* | Ensure EOF is handled properly | Bad Diode | 2022-02-01 | 2 | -62/+42 |
| | |||||
* | Add new syntax to lexer and prepare refactor | Bad Diode | 2022-02-01 | 54 | -5809/+299 |
| | |||||
* | Add support for captured loads inside lambdasir | Bad Diode | 2022-01-09 | 2 | -13/+13 |
| | |||||
* | Add `compile_symbol` for ir | Bad Diode | 2022-01-09 | 1 | -31/+82 |
| | |||||
* | Add some comments for later | Bad Diode | 2022-01-03 | 2 | -1/+16 |
| | |||||
* | Ensure new procedures are compiled only once | Bad Diode | 2021-12-30 | 2 | -2/+51 |
| | |||||
* | Add WIP compilation of lambdas | Bad Diode | 2021-12-30 | 1 | -57/+116 |
| | |||||
* | Add `def` builtin and local var load/store ops | Bad Diode | 2021-12-30 | 1 | -4/+40 |
| | |||||
* | Fix warnings on macos | Bad Diode | 2021-12-23 | 2 | -19/+25 |
| | |||||
* | Add `if` compilation for ir | Bad Diode | 2021-12-23 | 1 | -4/+24 |
| | |||||
* | Add compilation of numerical comparison ops for ir | Bad Diode | 2021-12-23 | 1 | -0/+69 |
| | |||||
* | Add compilation of `or` builtin for the ir | Bad Diode | 2021-12-23 | 1 | -1/+15 |
| | |||||
* | Add `not` and `and` builtins for ir compilation | Bad Diode | 2021-12-23 | 2 | -13/+89 |
| | |||||
* | Add print to ir compilation | Bad Diode | 2021-12-22 | 1 | -0/+14 |
| | |||||
* | Fix typo in enum name | Bad Diode | 2021-12-22 | 2 | -8/+8 |
| | |||||
* | Integrate builtin text into objects | Bad Diode | 2021-12-22 | 2 | -45/+35 |
| | |||||
* | Add builtin object type | Bad Diode | 2021-12-22 | 3 | -38/+108 |
| | |||||
* | Add IR generation for arithmetic ops | Bad Diode | 2021-12-22 | 1 | -2/+43 |
| | |||||
* | Start refactoring of compiler to stack-ir | Bad Diode | 2021-12-22 | 3 | -7/+161 |
| | |||||
* | Fix local variables on recursive calls | Bad Diode | 2021-11-17 | 1 | -8/+26 |
| | |||||
* | Add tail call optimization for function calls | Bad Diode | 2021-11-16 | 1 | -30/+52 |
| | |||||
* | Move ret pointer before closed vars in proc calls | Bad Diode | 2021-11-16 | 1 | -6/+14 |
| | | | | | | | | | | | | | | | The previous call convention we had the following before the function call: [ PROC_ADDR | CLOSED_VARS | ARGS | RP ] This was made to be compatible with the `call` instruction and the `cdecl` calling convention. This commit changes the structure to: [ RP | PROC_ADDR | CLOSED_VARS | ARGS ] With this convention, the stack frame can be discarded in its entirety if we have a tail optimized procedure. | ||||
* | Replace `call` with `jmp` in preparation for TCO | Bad Diode | 2021-11-16 | 1 | -3/+8 |
| | |||||
* | Add proper function calls with closed variables | Bad Diode | 2021-11-16 | 1 | -12/+43 |
| | |||||
* | Add workaround for `void` return in function calls | Bad Diode | 2021-11-15 | 1 | -3/+11 |
| | |||||
* | Add initial boilerplate for closure capture | Bad Diode | 2021-11-15 | 3 | -5/+48 |
| | |||||
* | Fix stack on procedure call return | Bad Diode | 2021-11-15 | 3 | -24/+65 |
| | |||||
* | Fix bug on parameter detection for named functions | Bad Diode | 2021-11-10 | 2 | -4/+9 |
| | |||||
* | Add support for accessing procedure parameters | Bad Diode | 2021-11-10 | 3 | -8/+38 |
| | |||||
* | Add locals for lambda procedures | Bad Diode | 2021-11-10 | 1 | -3/+9 |
| | |||||
* | Add initial local definition/access | Bad Diode | 2021-11-10 | 3 | -7/+39 |
| | |||||
* | Change Environment to store locals in array | Bad Diode | 2021-11-10 | 4 | -25/+42 |
| | | | | This will help directly translate the locals to assembly. | ||||
* | Add support for args in function calls | Bad Diode | 2021-11-10 | 1 | -2/+22 |
| | |||||
* | Add display functionality for lambda objects | Bad Diode | 2021-11-09 | 2 | -7/+28 |
| | |||||
* | Add initial procedure calls for lambdas | Bad Diode | 2021-11-09 | 2 | -11/+36 |
| | |||||
* | Add compilation context | Bad Diode | 2021-11-09 | 2 | -149/+204 |
| | | | | This prepares the compiler for the compilation of lambdas/procedures. | ||||
* | Add support for compiling string literals | Bad Diode | 2021-11-09 | 3 | -30/+128 |
| | |||||
* | Change heap register to `r15` from `rsi` to avoid conflicts | Bad Diode | 2021-11-04 | 2 | -60/+64 |
| |