develooper Front page | perl.perl5.porters | Postings from February 2003

Re: New SV Flag

Thread Previous | Thread Next
Nicholas Clark
February 5, 2003 14:17
Re: New SV Flag
Message ID:
On Mon, Feb 03, 2003 at 01:14:59AM +0100, Arthur Bergman wrote:
> Hi,
> I would like a new SV flag, or SV flag combination that means, this SV 
> does not live on the arenas and should not be PL_sv_counted, a hint to 
> sv_free not to plant this sv again.

What do you mean plant? particularly with respect to sv_free?

> I would like all SVs that are living in the optree to be of this kind, 
> this would allow us to move constants out of the pad and let them be 
> PVMG so they can't be upgraded anymore, same applies for the 

I can't see any free flags. Which flags logically conflict with this - is
there a sane way to overload one?

If that fails, I can see a way to free up one flag bit - change

#define SVf_OOK		0x00200000	/* has valid offset value */
#define SvOOK(sv)		(SvFLAGS(sv) & SVf_OOK)


#define SVf_OOK		0x80000000	/* has valid offset value */
#define SvOOK(sv)		((SvFLAGS(sv) & (SVp_IOK|SVf_OOK)) == SVf_OOK)

because you can't be SVf_IVisUV:

#define SVf_IVisUV	0x80000000	/* use XPVUV instead of XPVIV */

without also being SVp_IOK

Nicholas Clark

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About