develooper Front page | perl.ponie.dev | Postings from June 2004

RVs are now stored in the PMC

Thread Next
From:
Nicholas Clark
Date:
June 23, 2004 06:21
Subject:
RVs are now stored in the PMC
Message ID:
20040623132117.GV1147@plum.flirble.org
Ponie now stores RVs in the PMC slot of the PMC, instead of a struct xrv
hanging off the the SV head. This means that now SvRV() returns a different
lvalue from SvPVX().

All tests still pass [although Devel::Peek's test needed tweaking again :-)]

The PMC in the PMC slot should be visible to the parrot garbage collector,
so there should be no need to register it with parrot, and therfore no need
to reference count it.

However, before we can disable reference counting on SVs pointed to by RVs,
I think that we first need to move all reference counting inside the PMC
(ie make SvREFCNT_inc and SvREFCNT_dec directly register/unregister PMCs
with the GC), and in turn I think that this requires checking that the
perl core doesn't over-free references. At the moment I'm under the
impression that there are places were an extra SvREFCNT_dec is ignored if
if the SV's type is SvTYPEMASK. (ie the SV has been freed)

Nicholas Clark

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