On Wed, Aug 20, 2003 at 06:40:51PM -0400, Benjamin Goldberg wrote:
> Dave Mitchell wrote:
> >
> > On Sun, Aug 17, 2003 at 05:48:14AM -0600, Luke Palmer wrote:
> > > Here comes that ever-reincarnating thread again, sorry.
> > >
> > > This is a proposal for an efficient solution to the timely destruction
> > > problem, which doesn't use refcounting, and fits in to the current
> > > scheme pretty well.
> >
> > I don't quite follow all the below (probably mainly due to my
> > infamiliarity with parrot's DOD/GC stuff).
> >
> > Would it be possible to illuminate it by explaining how the following
> > Perl5 code (presumably being executed by Ponie/Parrot) would ensure that
> > the two destructors are called at the places marked:
> >
> > {
> > my $ref;
> > {
> > my $obj1 = Foo->new(...);
> > my $obj2 = Foo->new(...);
> > $ref = $obj1;
> > } # $obj2->DESTROY called here
> > # ...
> > } # $obj1->DESTROY called here
> > # ...
>
> At each of the two end-of-scope braces, a "sweep 0" instruction would be
> emmited. This performs Dead Object Detection, which at the first "}"
> detects that $obj2 is dead, and at the second "}" detects that $obj1 is
> unreachable.
Yeah, I understood that bit. It was all the stuff about lists of
high-priority and low-priority objects etc that I got lost in. In
particular how does it detect that $obj2 should be kept alive at the end
of the inner block withoput doing a *full* DoD sweep? Since I presume
that's what the proposal was intended to avoid.
--
"There's something wrong with our bloody ships today, Chatfield."
Admiral Beatty at the Battle of Jutland, 31st May 1916.