Shim functions are an artifact of how we compiled foreign functions. They are explained a comment in <trans/foreign.rs>. They are not long for this world, though: https://github.com/mozilla/rust/pull/6661
Niko On Thu, May 23, 2013 at 03:33:24AM -0700, Tom Lee wrote: > Hey Rustlers, > > I'm fighting with issue #6575 > <https://github.com/mozilla/rust/issues/6575> which > involves the removal of a useless function parameter emitted during the > trans phase. I've got a WIP available > here<https://github.com/thomaslee/rust/commit/issue-6575>if anybody's > interested, though it does right now is segfault. :) I > *think *the segfault is the result of me getting something silly wrong & > somehow the stack is getting messed up in the process (and/or something is > getting prematurely collected). > > In any case, all this digging around is leaving me with some questions that > may or may not be useful to getting this thing to stop segfaulting & start > doing something useful. > > Can anybody out there offer some clarification about the following? > > - What are glue_fns and why are they necessary? How/why do they differ > from shim_fns (used to invoke foreign functions)? > > - What's the purpose of *visit_glue* in the type_desc struct? The others > seem largely obvious (take/drop doing some sort of refcounting, free to > clean up, but visit ... ?) > > - Where are type_descs/tydescs written? The stack? The heap(s)? (i.e. > anything that can be a GC root?) Where in the source code does this happen? > > - What exactly is a "safe point" wrt the garbage collector? > > Appreciate any insight! > > Thanks, > Tom > > > -- > *Tom Lee */ http://tomlee.co / @tglee <http://twitter.com/tglee> > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
