[Mono-list] array casts in mint
Mon, 14 Jul 2003 17:02:20 +0200
On 07/11/03 Sam Clegg wrote:
> Is this a bug? Is there much interest in fixing bugs in the
> interpreter now that mini is working?
Yes, bugs in the interpreter will be fixed, but they are lower priority
than almost all the rest of the stuff: we'll gladly accept and applyt
patches to it, though.
> I am interested in the interpreter because I am working on some
> optimisations that are better suited (at the moment anyway) to it.
> They involve runtime aggregation of remoting calls. In the end,
> what I plan to do is, from with the JIT, select certain methods
> and run them through my optimising interpreter. It looks like
> switching from JIT to interp at runtime is possible since they
> share most data structures. Has anyone else tried to do thie
Switching from JIT execution to the interp is not possible and it would
require significant effort, especially when dealing with exception
handling. As Zoltan points out, a dual interp/JIT setup is used by some
VMs, but I don't think we should deal with the complexity of it at this
time (and it wouldn't be based on the current interp.c code anyway...).
I think there is lots of room for improvements in the
not-fully-optimizing JIT code, so that JIT times could be significantly
reduced in most cases. Using profiling info is then the next obvious step.
As for your optimizing interpreter: it's fine if you hack the current
interpreter to test it, but the way I'd see it implemented is as
*) I assume you select some methods by some sort of profiling or runtime
instrumentation, but if you do it offline it's even simpler
*) you create a new optimized method (rewriting the IL code, maybe
adding some specialized IL opcode like we do for marshaling)
*) call the new method directly from the previous unoptimized one, or
install it in the JIT so it's executed instead of the old one
This last chunk is the only missing bit in the JIT infrastructure to
achieve what I think you need and we need to implement it also to
support recompilation of methods and simplify and speedup a bunch of
things anyway. Let us know if that would work for you.
email@example.com Monkeys do it better