On Wed, Jun 08, 2005 at 11:28:01AM +0200, Rafael Garcia-Suarez wrote:
> Yitzchak Scott-Thoennes wrote:
> > On Wed, Jun 08, 2005 at 10:06:28AM +0200, Rafael Garcia-Suarez wrote:
> > > Yitzchak Scott-Thoennes wrote:
> > > > I agree with the sentiment, but think it would be worth it (perhaps in
> > > > conjuction with a short warning in perlfunc/exists that exists on @_
> > > > or @DB::args may not work).
> > > > 
> > > > The only complete fix I see would be to also make av_reify replace all
> > > > PL_sv_undefs with new sv's, something like (untested):
> > > 
> > > That's what Dave was suggesting with using an SV placeholder.
> > 
> > Unless I'm just being very dense, that's not at all the same.
> 
> Or I haven't fully understood what Dave suggested...
> 
> He wrote :
> > Can't really be fixed short of using some other static SV to mark unused
> > elements (cf PL_sv_placeholder), but personally I think that's throwing
> > good money after bad.
> which I thought was in the context of array reification. The difference
> with your second patch is that you're creating new undefined SVs...

Ah, I see the connection now.  The problem with a new immortal is that it
has to be checked for in addition to PL_sv_undef in av_fetch and I think
av_store, which would have a detrimental effect (albeit very slight) on
all array operations.  My suggestion just involves a memory cost for
reifying @_ when undefs are passed.

Reply via email to