Re: Perl 6 Summary for 2005-11-14 through 2005-11-21
On Nov 23, 2005, at 3:06, chromatic wrote: On Wed, 2005-11-23 at 01:39 +0100, Leopold Toetsch wrote: But my argument was: whenever you start introspecting a call frame, by almost whatever means, this will keep the call frame alive[1] (see Continuation or Closure). That is: timely destruction doesn't work for example... Destruction or finalization? We don't have these two separated yet, but it wouldn't matter. Both can only happen after the GC has decided that the object is unreferenced. That is, if I have a filehandle I really want to close at the end of a scope but I don't care when GC drags it into the void, will the close happen even if there's introspection somewhere? *If* introspection sets the life bit ("increments refcount") of the refered item(s) then destruction/finalization can only happen, after that introspection object is also dead. It's the same as: when you store a filehandle into an array, the filehandle will be bound to the life period of that array. The problem now is that there isn't any guarantee that such an introspection PMC stays in that call frame, the function could just return it to the caller (or store it into globals) as any other PMC. Which implies that the whole call chain (with its contents) would have to be kept alive. -- c leo
Re: Perl 6 Summary for 2005-11-14 through 2005-11-21
On Wed, 2005-11-23 at 01:39 +0100, Leopold Toetsch wrote: > But my argument was: whenever you > start introspecting a call frame, by almost whatever means, this will > keep the call frame alive[1] (see Continuation or Closure). That is: > timely destruction doesn't work for example... Destruction or finalization? That is, if I have a filehandle I really want to close at the end of a scope but I don't care when GC drags it into the void, will the close happen even if there's introspection somewhere? -- c
Re: Perl 6 Summary for 2005-11-14 through 2005-11-21
On Nov 22, 2005, at 1:40, Matt Fowles wrote: Call Frame Access Chip began to pontificate about how one should access call frames. Chip suggested using a PMC, but Leo thought that would be too slow. No, not really. It'll be slower, yes. But my argument was: whenever you start introspecting a call frame, by almost whatever means, this will keep the call frame alive[1] (see Continuation or Closure). That is: timely destruction doesn't work for example and the introspection feature is adding another level of complexity that isn't needed per se, because 2 other solutions are already there (or at least implemented mostly). leo [1] a call frame PMC could be stored elsewhere and reused later, refering to then dead contents. Autrijus mentioned that this will need weak references to work properly.