It’s been a long time since I thought about Microsoft’s Phoenix project. It’s a code transformation platform. For example, it can read x86 instructions, CIL instructions or a “Universal AST” into Phoenix’s Intermediate Representation (IR), transform the IR, and then generate an executable using the c2.exe optimizing compiler backend that itself was built using Phoenix. This makes it really straightforward to write code transformation tools like a code coverage tool since Phoenix does most of the heavy lifting for you.

It also means that language developers no longer have to write code generators / optimizers anymore. This is a really powerful idea.

There is now a set of bits available for download. You should definitely check out the Phoenix Explorer demo. It display’s Phoenix’s IR of both x86 and CIL code (so it’s essentially a disassembler). But since Phoenix can consume both x86 and CIL instructions, you do no extra work to disassemble both x86 and CIL.

I took a quick peek at the source code; it looks pretty straightforward (with the exception of having to subclass Phx.Phases.Phase) to port port the Phoenix Explorer to Ruby :)

Media_httpmsdnmicroso_ifhih