Discussion:
[perl #46179] [TODO] Remove GC code depending upon -D40 before parrot 1.0
(too old to reply)
Paul Cochrane
2007-10-06 12:46:09 UTC
Permalink
# New Ticket Created by Paul Cochrane
# Please include the string: [perl #46179]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=46179 >


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
Andy Dougherty
2009-02-02 17:56:24 UTC
Permalink
Post by Paul Cochrane
/* 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.
--
Andy Dougherty ***@lafayette.edu
Loading...