Re: How does "new&qu ot; work in a loop?
Barry Kelly <barry.j.kelly@ gmail.comwrote:
There's another reason why it needs this info: so it can adjust all
pointers to relocated objects after a GC has just finished.
-- Barry
--
Barry Kelly <barry.j.kelly@ gmail.comwrote:
One possible implementation: the C# compiler compiles to IL, and the JIT
produces the actual code. The IL contains ldloc and stloc for locals,
and thus the JIT can make a note of where the last use of a variable
occurs for each basic block. Hence it can produce tables which indicate
which stack locations / registers are valid roots for given instruction
pointer ranges.
produces the actual code. The IL contains ldloc and stloc for locals,
and thus the JIT can make a note of where the last use of a variable
occurs for each basic block. Hence it can produce tables which indicate
which stack locations / registers are valid roots for given instruction
pointer ranges.
pointers to relocated objects after a GC has just finished.
-- Barry
--
Comment