forked from rui314/chibicc
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
There are really two steps here:
- Get the project to a point where
chibicc-uxn.exe(running in Windows/Linux/etc) can compile the codebase tocc.rom, and thiscc.romcan compile something FizzBuzz-sized. - Get the project to a point where even this
cc.rom(running in Uxn) can compile the whole codebase, and reproduce itself.
The biggest limitation is uxn's limited memory. Right now, chibicc-uxn allocates more than 64kB of memory to compile any non-trivial program. So the former sounds difficult enough, and the latter feels a bit like a pipe dream.
Here's the work that needs to be done:
- Implement more standard library functions, like
callocandstrtolandsprintf. A few of these are in lib/ already. - Remove stuff we don't support from the chibicc source code (like
long). - Right now we rely on an external preprocessor. But such a thing doesn't exist in Uxn-land, so it's probably a bit more meaningful if we at least implement
#includeand#define. It could be a separate program. - Severely reduce the memory usage somehow, or find a clever way to manage memory.
drawkula
Metadata
Metadata
Assignees
Labels
No labels