Yes its a simple region but region analysis is normally compile time while this is runtime..knowing the pointer points to the stack doesnt help .
If you copy in a new stack you need to know every pointer to that stack if you move it to a new location .. Copying GCs do this all the time but they scan the heap for the mark and know the references and can use either a global pause or a write barrier . If you had a precise GC ( which can precisely define all the references) you could on need to grow stack , stop the world , scan the whole heap for references to the stack move the stack and update the references. This is expensive so you would want a warning to the programmer to increase the stack size. ( Note conservative collectors can confirm pointers to heap objects its just expensive , there may be a way of confirming a stack object maybe with a typecheck or wrapping such an object with some more data which allows precise determination). Why cant rust do precise marking , is it pointers to internal objects rather than offsets ? All good modern GCs are precise/copying so not having it is a big issue . Ben Kloosterman On Fri, Oct 25, 2013 at 2:39 AM, David Rajchenbach-Teller < dtel...@mozilla.com> wrote: > I am curious. Isn't the stack a very simple region? Couldn't region > inference be used to solve pointer-to-stack problems? > > Or do I completely misunderstand the definition of pointer-to-the-stack? > >
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev