Ildjit
ILDJIT (Intermediate Language Distributed Just In Time) is an open source initiative aiming to build a portable runtime for Common Language Runtime applications. The project focuses on compatibility with the ECMA-335 standards. ILDJIT is a modular implementation of the Virtual Execution System (VES), then it is a JIT compiler for the CIL byte-code; it uses an intermediate representation called IR when translating from CIL to the target machine code; this translation is made in two phases: first the CIL fragment is translated into the IR equivalent one and then from IR to the target machine code.
ILDJIT is an extendible JIT compiler; this means that everybody can add custom modules in order to change the standard behavior of the system. So many features can be added without changing or studying the source code of ILDJIT. To build a new module, we needs to write a new plug-in and install it as external module (so during the bootstrap, the ILDJIT system is able to load and use one of the modules found into a specific location of the file system).
ILDJIT is a parallel JIT compiler: many steps of the dynamic compilation can be done in parallel with the normal execution of the CIL program given as input.
ILDJIT is a distributed JIT compiler; this means that some steps of the dynamic compilation, which they start from the loading of the CIL program and they end to return the value computed by the execution of it, can be made in different workstations over the IP network. Actually the optimize steps can be made in a distributed way. More discussion above the distributed runtime systems can be found in.
ILDJIT uses the Libjit provided by the Southern Storm Software to make the register allocation and the instruction selection, so it supports as many as the Libjit library does. ILDJIT uses the version released for the Portable.NET project as class library. ILDJIT is composed by many modules, each one offering a particular feature. Some modules are built as shared libraries to allow their utilization by external modules or by modules which they can reside on different workstations. The modules are used in ILDJIT as external (also named plug-ins). With this solution ILDJIT is able to change its behavior simply by loading a different plug-in at start-up time. A CIL program is always given as input of ILDJIT; the output of ILDJIT is the return value of the Main method (or an exception thrown while executing the CIL program itself).
Code optimization
ILDJIT optimizes the generated code using the IR language. Currently we have implemented the following optimization algorithms: liveness analysis, reaching definitions, available expressions, constant propagation, constant folding, deadcode elimination, basic block builder and control flow graph printer.
Garbage collection
ILDJIT exposes an interface to make the garbage collection task easily extensible. Currently there are two garbage collector: Shifter and Bdw; the first one, Shifter, it is developed by Simone Campanoni. Shifter is a mark and sweep garbage collector, it exploits information about the root set which is computable by the virtual machine ILDJIT. The second one, Bdw, is a wrapper to the garbage collector Libgc implemented by Boehm, Demers and Weiser downloadable at http://www.hpl.hp.com/personal/Hans_Boehm/gc.
The garbage collector developed by Boehm, Demers and Weiser is also used by the GCC, Mono and Portable.NET project.
Current status and roadmap
The latest release of ILDJIT is 0.0.1, issued on July 29, 2007. The project supports different CPU architectures (Intel 32bit and Alpha processors) but currently it works only with Linux environments.
The support for the CIL class library developed by the Portable.NET project is being completed. Also, the optimization algorithms for the IR methods composing the CIL program given as input to the ILDJIT dynamic compiler are being implemented.
License
ILDJIT is completely released under the GNU General Public License (GPL).
See also
- Mono
- DotGNU and Portable.NET- another open source Microsoft.NET implementation.
External links
de:ILDJIT es:ILDJIT pl:ILDJIT