Hi Michael,<div><br></div><div>    yes, all of this protocol is obsolete.  Look at the methods in &#39;debugger support&#39; 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&#39;s easy, pc &gt;= method endPC.  But for a block activation one has to parse the block creation bytecode to find out how bit the block is (that&#39;s going to be far faster than scanning).  This is useful in implementing e.g. Process&gt;&gt;isTerminated.<br>
<br><div class="gmail_quote">On Tue, Sep 21, 2010 at 4:46 AM, Michael Haupt <span dir="ltr">&lt;<a href="mailto:mhaupt@gmail.com">mhaupt@gmail.com</a>&gt;</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 &lt;<a href="mailto:mhaupt@gmail.com">mhaupt@gmail.com</a>&gt; wrote:<br>
&gt; CompiledMethod allInstances detect: [ :m | m containsBlockClosures ]<br>
&gt; finds no CompiledMethod containing a BlockClosure. (Can&#39;t be right, can it?)<br>
&gt;<br>
&gt; Delving further into this, it seems the methods in the &quot;closures&quot;<br>
&gt; 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>
&quot;closures&quot; 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&#39;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 &quot;obsolete&quot; 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&#39;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>