Telling the JIT to recompile a method

Godmar Back gback at
Tue Mar 21 11:45:01 PST 2000

> 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 
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

More information about the kaffe mailing list