develooper Front page | perl.perl5.porters | Postings from January 2016

Re: reworked context stack system

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
January 6, 2016 16:06
Subject:
Re: reworked context stack system
Message ID:
20160106160542.GG4007@iabyn.com
On Wed, Jan 06, 2016 at 10:27:57AM +0000, Dave Mitchell wrote:
> I've spent the last day looking at Scope::Upper. I think its current
> implementation can't be made to work, because my branch makes it so that
> popping one context won't necessarily call leave_scope(), unless the code
> associated with that scope happens to so something that triggers something
> going on the save stack (like doing 'my' or 'local'). Formerly every
> context scope entry type did a SAVETMPS(), which guaranteed at least one
> savestack entry, and so triggering a leave_scope().

Actually, forget I said said that. Because each context pop artifically
inserts a DESTRUCTOR_X entry into the parent's savestack frame, every
context frame pop should call leave_scope(). So I think it's fixable.
I'll look into this further in a bit.

-- 
The crew of the Enterprise encounter an alien life form which is
surprisingly neither humanoid nor made from pure energy.
    -- Things That Never Happen in "Star Trek" #22

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About