4 ms·
It actually generates C, which can then be pushed through the $CC of your choice. Usually GCC. You can examine the generated C by passing a flag to the compiler
by qwertyuiop924 10y ago
It actually generates C, which can then be pushed through the $CC of your choice. Usually GCC. You can examine the generated C by passing a flag to the compiler, telling it not to compile it beyond that stage. However, reading the generated code isn't a task for the feint of heart: It generates CPS code, and it uses Cheney on the MTA (a really bizarre hack thought up by Henry Baker, and describe in his paper "CONS should not CONS its arguments, Part II: Cheney on the MTA," which is essentially required reading if you want to even have a hope of understanding what's going on.)
However, it makes heavy use of ELF and dynamic linking by default (although you can link statically), and libchicken, the runtime system, depends upon libc by default.
So yes, you probably could make use of it for OS work, but it's not ideal for that context.