I've been working on a compiler for an object oriented language called Cool (Classroom Object Oriented Language).
I need to choose an intermediate code representation now. I was thinking maybe p-code or three address-code.
For code generation, as I do not have much time, I have thought of using existing (Open Source) code that converts an intermediate code to a target machine code, like MIPS or x86.
Please suggest if there are any existing converters (or emulators) that do what I above described. And based on the availability of such a program I will choose the apt intermediate representation.
- If is are no such existing Open Source code, suggest any such short way or arriving at the target code from intermediate code without having to write a code generator the conventional way.
Thanks.