Writing a Compiler for .net - IL or Bytecode?
Posted
by Michael Stum
on Stack Overflow
See other posts from Stack Overflow
or by Michael Stum
Published on 2010-04-08T10:05:56Z
Indexed on
2010/04/08
10:23 UTC
Read the original article
Hit count: 325
I'm currently diving into the inner workings of .net, which means IL. As an exercise, I want to build a brainf..k compiler for .net (yes, they already exist, but as said it's for learning purposes).
For the moment I'm just writing some text files that contain .il and compile them with ilasm, which works. But I wonder if I could/should go one level deeper and write bytecode directly?
My "concern" is the Windows PE Stuff when compiling an EXE - instead of ilasm I would need some sort of Bytecode linker that would take my MSIL/CIL bytecode and generate the PE Stuff for it?
Or do compilers "only" compile their language to IL and execute ilasm? Is there a managed version of it that I can call/embed from my compiler?
© Stack Overflow or respective owner