On Wed, Feb 14, 2001 at 03:04:40PM -0500, Dan Sugalski wrote:
> 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.

What about the (not uncommon, I think) case where the object is
passed to a method call?  (Or, for that matter, a function which the
compiler has not seen yet?)

  sub snrub {
     my Dog $spot = shift;
     my $fh = IO::File->new("file");
     $spot->eat($fh);
  }

Unless the object on which the call is made is instantiated in the
same block, there is no way to tell which method sub will be called.
(Since the actual object could be a subclass of the declared class.)


> 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?

Apologies for continuing this.  I'll be quiet now until the PDD appears.
I still think you're overestimating the frequency with which object
lifetime can be determined via code flow analysis, however.

                       - Damien

Reply via email to