| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | [cup] Add `>>` and `<<` operators, `fork()` buildin and `SYS_execve`HEADmaster | Mustafa Quraish | 2022-02-08 | 1 | -3/+33 |
| | | |||||
| * | [cup] Self-hosting is now possible! Make some tweaks to match C output | Mustafa Quraish | 2022-02-07 | 1 | -1/+1 |
| | | | | | | | | | | | | A bit of a chonky commit, but this ports over the remaining (well, almost) everything from the C implementation to the self-hosted compiler. The only things that really remain right now are (1) defer support and (2) support for constants in local scopes. There were used barely enough so for now their uses have been removed, but I'll implement them back later. Not sure how useful (2) is though. | ||||
| * | Add missing files to self-hosted directory | Mustafa Quraish | 2022-02-07 | 1 | -0/+99 |
| | | | | | ... Someone forgot to add them into the repo for a while. | ||||
| * | [cup] Add support for `here` keyword + fix `putu_buffer` bug | Mustafa Quraish | 2022-02-07 | 1 | -3/+3 |
| | | |||||
| * | [compiler.cup] Add support for function calls! | Mustafa Quraish | 2022-02-05 | 2 | -2/+2 |
| | | |||||
| * | [compiler.cup] Add support for lexically scoped local variables | Mustafa Quraish | 2022-02-05 | 2 | -0/+23 |
| | | |||||
| * | Some very minor fixes (look at message) | Mustafa Quraish | 2022-02-05 | 1 | -1/+2 |
| | | | | | | (1) Add support for escaped single quotes (2) Fix `putu_buffer` in `std/common.cup` | ||||
| * | Add `lseek` and `mmap` syscall info | Mustafa Quraish | 2022-02-05 | 1 | -0/+8 |
| | | |||||
| * | Add support for some more binary ops: |, &, ^ | Mustafa Quraish | 2022-02-05 | 1 | -0/+40 |
| | | |||||
| * | Miscellaneous stdlib additions | Mustafa Quraish | 2022-02-05 | 1 | -5/+41 |
| | | | | | | | - `close()` syscall - `putu_buffer()` - toy `malloc()` which can allocate from a 1gb pool without freeing. | ||||
| * | Add `void` type and allow void* to be assigned to other ptr types | Mustafa Quraish | 2022-02-05 | 1 | -2/+6 |
| | | |||||
| * | Allow `builtins.c` to inject constants into program, use for syscalls | Mustafa Quraish | 2022-02-05 | 1 | -21/+109 |
| | | | | | | | We can now directly expose the `syscallN()` APIs to the program and define the `open()`, `write()` etc syscalls in the stdlib. This simplifies the implementation a decent bunch :^) | ||||
| * | Minor fixes, rearranging, whitespace trimming. No functional changes. | Mustafa Quraish | 2022-02-04 | 1 | -4/+9 |
| | | |||||
| * | Add helper to create builtins for syscalls + implement `read()` | Mustafa Quraish | 2022-02-03 | 1 | -1/+1 |
| | | | | | | | | | | | This was possible, but very tedious to do by hand before. Now we automate it based on the number of arguments. Note that currently we can't just add `syscall3()` etc as builtins because the actual numbers for the system calls vary from one system to another, and we want to maintain support for macOS and Linux (at least for now). | ||||
| * | Remove `putc` intrinsic and replace with `write(fd, buf, size)` | Mustafa Quraish | 2022-02-03 | 1 | -5/+17 |
| | | | | | | `putc`, `puts`, and `putnum` in `std/common.cup` are now implemented in terms of the `write()` syscall. | ||||
| * | Move all common utilities to `std/common.cup` | Mustafa Quraish | 2022-02-03 | 2 | -22/+73 |
| | | | | | | | In the future we can split this into multiple files if we need to, after we've added to ability to handle more complex input graphs without parsing the same file twice. | ||||
| * | Add .gitattributes to try to highlight code as Rust | Mustafa Quraish | 2022-01-31 | 1 | -1/+1 |
| | | |||||
| * | Add `std/math.cup` with some common math functions | Mustafa Quraish | 2022-01-31 | 1 | -0/+22 |
| For now this is very limited, but shows the ability to import files! | |||||