[Mono-list] Method JIT Compilation

Paolo Molaro lupus@ximian.com
Thu, 7 Aug 2003 13:20:03 +0200


On 08/06/03 Hamza Karamali wrote:
> However, I haven't been able to locate exactly how the JIT compilation
> process is re-triggered when I call another method from within the main
> function.  I guess somewhere there is a pointer that either diverts the
> program to a previously compiled version of the method or to the JIT
> compiler for compilation.  Where exactly does this happen?

You can see in mini-x86.c, for example, that when a call is made to a
method and the method is not already compiled, we insert a call to
a magic trampoline (grep for MONO_PATCH_INFO_METHOD).
The magic trampoline (implemented in tramp-x86.c) will compile the
method and jump to it.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better