RVs are now stored in the PMC

[email protected] (Nicholas Clark) Wed, 23 Jun 2004 14:21:17 +0100
Newsgroups perl.ponie.dev
Message-ID <[email protected]>
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