John Lam 1997 — 2026

Microsoft Phoenix

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 :)

1 archived reader comment

Kathy (2006-06-23)

We just had a very unique experience. Rick opened up a brand new MacBook (the black one) from the original packaging. When he lifted the lid to turn it on, it was already on and it woke up. It is running Mac OS X 10.4.6 but it was not configured like a regular Tiger machine. Instead it had a terminal window that was called PhoenixCE. Weird. I also had lots of the services programs in the startup folder like it had been set up to test at the Alpha-geek level. Could you tell us more about what Microsoft’s Phoenix is?