At 05:57 PM 2/14/2001 -0300, Branden wrote:
>Simon Cozens wrote:
> > On Wed, Feb 14, 2001 at 11:38:58AM -0800, Damien Neil wrote:
> > >   sub do_stuff { ... }
> > >
> > >   {
> > >     my $fh = IO::File->new("file");
> > >     do_stuff($fh);
> > >   }
> > >
> > > In this code, the compiler can determine that $fh has no active
> > > references at the end of the block
> >
> > No, it can't, but it can certainly put a *test* for not having references
> > there.

Yes it can tell, actually--we do have the full bytecode to the sub 
available to us, along with whatever metainfo we choose to remember 
generally about the sub. Whether we use the info is a separate matter, of 
course.

>How can it do it without using ref-counts or spawning a full GC round?

There's going to be two bits reserved for the refcount. It is enough, it's 
not  a performance issue, and will you people *please* hold off until I get 
the darned GC/object cleanup PDD written?

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to