[Mono-devel-list] proposal for a different JIT

Emanuele Ruffaldi pit at sssup.it
Tue Oct 14 13:53:29 EDT 2003


Hello there,

I propose an alternative way for the implementation of the JIT in the 
Mono system. The idea is to use the back end of the GCC compiler, but 
instead of creating a full front-end I propose to use the KSI front-end, 
that is a direct mapping of the GCC back-end tree (for details see 
http://ftp.pld-linux.org/people/malekith/ksi/)

Whenever a part of an assembly has to be jitted the JIT should generate 
a KSI source code that is quite platform indepentent and then the GCC 
back-end can compile it with different levels of optimizations. During 
the generation of the KSI code all the references to internal functions 
and variables can be fixed as constants improving the performance.

I've tested this solution in a Cygwin (sorry) environment with GCC 
3.3.1, where a custom program generates the KSI code on the fly, calls 
the GCC tools (ks1, as and ld) and then loads the shared library created 
by the linker.
There is no need to have a full GCC running but only  these files 
(almost 5.5MB):

ksi1.exe
ld.exe
as.exe
cygwin1.dll

I think that working on Linux, and with some optimizations the memory 
requirements can be reduced.

This solution should be used only on the platforms where doesn't exist a 
custom written JIT (like now for the x86), because a custom JIT is much 
faster. I realize that there are many problems in the adoption of this 
solution but it should be faster than the simple intepretation, and can 
be adapted to the AOT too.

Thanks,
Emanuele Ruffaldi






More information about the Mono-devel-list mailing list