[Mono-list] x86 JIT
Fergus Henderson
fjh@cs.mu.oz.au
Thu, 12 Jul 2001 05:16:05 +1000
Kevin Scott <jks6b@cs.virginia.edu> wrote:
> John Zedlewski writes:
> >[Fergus Henderson wrote:]
> >> There is one big technical drawback with using gcc that I didn't mention
> >> in my earlier message, namely that accurate GC is going to be a problem,
> >> so you may have to stick with conservative GC.
> >
> >I don't see why this should be a problem just because no current gcc
> >language uses precise GC. Whenever an object is instantiated, you can
> >just have gcc emit a quick, inline call to a GC runtime function, like:
> >"describe_to_gc(void* obj_addr, size_t obj_size)." The runtime GC will
> >also have access to class descriptions, so it can easily look at the
> >memory addresses stored in reference fields and build the whole
> >reference tree however it wants to.
>
> Maybe I'm missing something, but how does this scheme communicate to the
> collector which temporaries and registers contain pointers to objects.
That is indeed the problem -- finding pointers in registers and
temporaries, and updating them when the objects that they point to
get moved by the collector.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.