This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!
Conversion of IL into Native Code
The IL instruction set is designed as a target for compilers, but it is not designed as a traditional interpreted byte code or tree code. Converting IL to native code requires some per-method analysis, so it is truly a compiler intermediate language. A compiler back-end that accepts IL as input and produces native code is called, for historical reasons, a Just-In-Time Compiler or JITter. There is a standard interface between a JITter and the EE.
NGWS runtime will ship with three different classes of JITters (although all JITters may not exist for all architectures):
- JIT, which is an optimizing compiler back end. The input to JIT is unrestricted sets of IL instructions. It performs a data flow analysis and produces high quality output code. It requires significant resources (memory footprint, working set, and time) to compile IL to native code.
- EconoJIT, which is designed for high speed conversion of IL to native code, ease of porting to new architectures, and caching of the generated native code. The output code need not be of high quality. The code generation strategy makes it possible to discard the native code as desired, so that even large IL programs can be converted to native code and fit in a fixed-size code memory area.
- PreJIT is based on the main JIT, but runs in a more traditional compilation model rather than just-in-time. It is used at installation time, by converting an entire assembly into managed native code. The resulting file loads and starts more quickly than code produced just-in-time.