Telling the JIT to recompile a method
Godmar Back
kaffe@rufus.w3.org
Tue, 21 Mar 2000 12:45:01 -0700 (MST)
>
>
> Is there a way to tell the JIT to recompile a method? If not, would
> this be difficult to accomplish?
>
On the surface, all you'd have to do is tweak the Method struct to
mark the method as untranslated and invoke translate() again; you'll
also have to ensure you don't free the bytecode after translation
like we currently do.
However, the jit doesn't work that way: if it compiles a method
which calls a method that's already compiled, it will insert a direct
call to the already compiled method. Unless you change the jit to
do an indirect call here, this would presumably defeat the purpose of
recompilation.
If you do change it to an indirect call it might work. However, you'll
still have to deal with the issue that code you're recompiling could
be currently executing.
Plus, any number of unforeseen things are bound to pop up.
- Godmar