Front page | perl.perl5.porters |
Postings from October 2014
Re: Shared padlists
Thread Previous
|
Thread Next
From:
Dave Mitchell
Date:
October 28, 2014 12:23
Subject:
Re: Shared padlists
Message ID:
20141028122318.GY5204@iabyn.com
On Tue, Oct 28, 2014 at 05:34:45AM -0000, Father Chrysostomos wrote:
> If we could extend padlists to hold a boolean indicating whether the
> sub is being called (i.e., !!CvDEPTH), then we could make sub clones
> share padlists. If the padlist is in use when a sub is about to be
> called (and the sub itself has a CvDEPTH of 0), then that means the
> padlist is shared with another sub that is currently running, so it
> needs to be cloned. The sub we are calling then keeps its own pad-
> list from that point on.
I worry that this adds a new test to every pp_entersub() call, and
involves a new flag that must be reset/restored on every sub exit
(deliberately or via dying), which may slow down all sub calls.
Also, is a boolean flag in the pad sufficient, or would you need a
counter, to handle recursion? Perhaps CvDEPTH should just be moved into
the pad?
So I like the idea in theory, but worry in practice.
--
"Emacs isn't a bad OS once you get used to it.
It just lacks a decent editor."
Thread Previous
|
Thread Next
-
Shared padlists
by Father Chrysostomos
-
Re: Shared padlists
by Dave Mitchell