So I reused a lot of the previous work done for my C++ compiler in C#, but instead of targeting IL it’s targeting straight ASM, soooo yeah. Anyhow lemme get into it:
The preprocessor system is fully implemented so you have #define, #undef, #ifdef, #ifndef, #if, etc.
The compiler supports C89 fully minus the STD, but I have char, short, int, long etc. all the floating point types const, typedef, volatile, etc.
Now for declarations you can have K&R functions, extern declarations, static locals, static arrays, multiple declarators, etc.
All arithmetic, bitwise, comparisons, logical, ternary, pre/post, casts, and assignments as expression operators are supported.
if/else, while, do/while, for, switch/case/default, break, continue, return, goto, labels, and compound statements are all supported.
Now the biggest part Code-gen it targets x86-64 Windows with full Microsoft ABI supported, variadic functions, struct return, 64-bit arithmetic, widening , string pool dedupplicatoin, floating point support, and a few more things.
Now Standard Library-wise stdio.h, stdlib, string.h, assert.h, cytpe.h, and time.h are the only supported ones as of right now while I continue to implement them.
Comments 1
you need medical help- I mean cool project!
Sign in to join the conversation.