Hi Michael,<div><br></div><div> yes, all of this protocol is obsolete. Look at the methods in 'debugger support' for relevant stuff. if you are in the mood to implement useful stuff here we could do with an efficient method that tells if a context is at the end of its block or method. For a method activation that's easy, pc >= method endPC. But for a block activation one has to parse the block creation bytecode to find out how bit the block is (that's going to be far faster than scanning). This is useful in implementing e.g. Process>>isTerminated.<br>
<br><div class="gmail_quote">On Tue, Sep 21, 2010 at 4:46 AM, Michael Haupt <span dir="ltr"><<a href="mailto:mhaupt@gmail.com">mhaupt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi again,<br>
<div><div></div><div class="h5"><br>
On Tue, Sep 21, 2010 at 10:09 AM, Michael Haupt <<a href="mailto:mhaupt@gmail.com">mhaupt@gmail.com</a>> wrote:<br>
> CompiledMethod allInstances detect: [ :m | m containsBlockClosures ]<br>
> finds no CompiledMethod containing a BlockClosure. (Can't be right, can it?)<br>
><br>
> Delving further into this, it seems the methods in the "closures"<br>
> protocol of CompiledMethod are all broken. Is that correct?<br>
<br>
</div></div>having looked at things a bit more, it seems that most of the<br>
"closures" protocol is obsolete:<br>
<br>
* allEmbeddedBlockMethods - no senders, only marked as a failing test<br>
* embeddedBlockMethods - no senders, only marked as a failing test<br>
* isBlockMethod, isBlockMethod: - no senders<br>
* containsBlockClosures - no senders (and a non-working implementation)<br>
* method - there are many senders of #method, but I'm not sure if<br>
CompiledMethods are receivers<br>
* remoteReturns - no senders<br>
* searchImageForHomeMethod - no senders save itself (recursive)<br>
<br>
I am going to upload some things to the Inbox in a few minutes that do<br>
the following:<br>
<br>
* remove most of the "obsolete" methods above,<br>
* prototypical implementation of embeddedBlockMethods that makes<br>
containsBlockClosures work again<br>
* some few tests (extension of CompiledMethodTest)<br>
<br>
Please comment. I'm not sure the implementation is (a) sound or (b)<br>
sensible. :-)<br>
<br>
Best,<br>
<font color="#888888"><br>
Michael<br>
<br>
</font></blockquote></div><br></div>