| Store | Cart

Re: Shared padlists

From: Father Chrysostomos <spr...@cpan.org>
29 Oct 2014 12:47:09 -0000
I wrote:
> Wait.  I'm not thinking straight.      

Ahem.  I was *still* not thinking straight.

> According to what I was thinking before, a boolean would be suffi-> cient, because you just have to check if some other sub is using the> padlist already to decide whether to clone the whole thing.> > But I've been stuck mentally associating CvDEPTH with the CV itself.> > If CvDEPTH goes inside the padlist, then it may not be necessary for a> sub to clone a padlist that is already active.  Given two subrefs $a> and $b that come from the same closure prototype, $a->() will use pad> 1, and if it calls $b, $b will use pad 2, because it will already have> a depth of 1, even though it is not being called.

We can't do that for closures, because closures by definition need to
capture outer lexicals.  We could still use this approach for fixing
blessed anonymous subs.

Recent Messages in this Thread
Father Chrysostomos Oct 28, 2014 08:05 pm
Father Chrysostomos Oct 29, 2014 12:47 pm
Father Chrysostomos Oct 28, 2014 07:52 pm
Messages in this thread