[perl #46179] [TODO] Remove GC code depending upon -D40 before parrot 1.0
Andrew Whitworth via RT
parrotbug-followup at parrotcode.org
Mon Feb 2 18:04:51 UTC 2009
On Mon Feb 02 09:57:02 2009, doughera wrote:
> On Mon, 2 Feb 2009, Andrew Whitworth via RT wrote:
>
> > On Sat Oct 06 05:46:09 2007, pcoch wrote:
> > > In src/gc/register.c:clear_regs() there is the todo item:
> > >
> > > /* depending on -D40 we set int, num to garbage different garbage
> > > * TODO remove this code for parrot 1.0
> >
> > We do want to remove the current code from clear_regs(), but what do we
> > want to change it to? The PMC and STRING registers obviously need to be
> > nulled out for GC to avoid false positives. Do we need to clear the
> > values of the INT and NUM registers too? If so, what values do we want
> > them to have? Should we still use special flag values for -D40?
>
> There's a bit more history of this in [perl #38978] and [perl #39244]
(and
> some other old tickets too, but those are enough to give the idea). The
> problem was that, on some compilers in some situations, the I and N
> registered ended up as 0 even if they weren't explicitly initialized, and
> various bits in the test suite worked accidentally because of that.
(There
> used to be conditional compilation mixed in there as well, just to
make it
> even more confusing.)
>
> Such bugs have long since been eradicated in the test suite, and nothing
> developed in the past couple of years could rely on accidental
> initialization.
>
> None of which answers your question. The original intent was that the
> registers are not to be initialized, which would mean deleting the second
> branch (with the 888's) but leaving the -D40 branch as a possible
> debugging tool.
>
Thanks for the info, Andy! I'll do some background research on those
tickets you mentioned, and I'll deal with this issue after that.
--
Andrew Whitworth
a.k.a Whiteknight
More information about the parrot-dev
mailing list