The way the Eval PMC worked was that it returned a list of Subs, and I think the one at index zero was the sub marked :main. The PackfileView PMC has a method .main_sub(), which does the same thing more explicitly. At least, that's how I remember it. so it's the same Sub being executed, we just get access to it in a different way.
--Andrew Whitworth On Sun, Feb 17, 2013 at 7:27 PM, Gerhard R. <gerd.r.de...@googlemail.com> wrote: > Thanks for chiming in. > >> I haven't looked at gerdr's particular patch. My original formulation >> was intended to be a drop-in replacement for the Eval PMC. > > It's the same as yours, except that I added some stuff on top of it to > make it work mostly as before (in particular, the call to main_sub() > was moved into an additional stage invoked by HLL::Compiler.compile() > so no explicit call is necessary). > > Pmichaud's issue is that in Perl6/World.pm, set_static_lexpad() was > called on the sub at index 0, whereas now it gets called on the main > sub (see > https://github.com/gerdr/rakudo/commit/2a072ee9721a39a9e58ceb7c29c6c5882141b871#commitcomment-2637902 > ). > > Incidentally, the same thing happens elsewhere as invoking the eval > PMC also used to call the sub at index 0, whereas now we call the main > sub again. > > I haven't yet tracked down the code that makes this work, but as it > does, I assume it's there somewhere. Any pointers? > > -- gerdr > _______________________________________________ > http://lists.parrot.org/mailman/listinfo/parrot-dev _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev