After watching Developer Platform Drill Down I was wondering what does he mean by compiling in cloud. He said that all Windows Phone all will be compiled. Does it mean that all app will be NGEN'd? Will it include more advanced heuristics for the JITer? e.g. in .Net CF a property is resolved to a function call (no inlining).

2 Answers
2

There is no definitive answer to this, because neither the device + OS, nor the SDK are publicly available yet.

Compilation in the cloud, as was explained by Kevin, means that the application will be compiled to machine code (you will still work in a managed environment, most likely), therefore being much more performant on the actual device. From what I understand, the developer will not have access to the cloud compilation service. It will be a task done by Microsoft once the application is submitted for Marketplace approval.

The idea is pretty simple. First, enter MDIL or Machine Dependent Intermediate Language or .NET hybrid assembly language. MDIL is all about compiling to native assembly instructions whenever possible, and compile the rest to pseudo instructions that can quickly be translated to native instructions on the phone. Thus, this assembly containing a mix of pseudo instructions and native instructions can be shipped to the device (and is portable across the same architecture - example, across all the ARM devices), and on the device we perform a light-weight linking step to convert the entire assembly to a native image. Most of the heavy lifting is done when we compile the IL assembly to the intermediate file between an IL assembly and a native image (this is what MDIL is).

"So what?", you ask. The linking step on the device that converts MDIL
assembly to a native image only takes 1/5th the time as traditional
NGEN on device. Thus, we get some of the benefits of both
pre-compilation (since we are executing off the native image where all
instructions are assembly instructions) and JIT-compilation (no heavy
compilation on the device during framework updates).