[squeak-dev] Re: extracting BlockClosures from CompiledMethods

Michael Haupt mhaupt at gmail.com
Tue Sep 21 11:46:47 UTC 2010


Hi again,

On Tue, Sep 21, 2010 at 10:09 AM, Michael Haupt <mhaupt at gmail.com> wrote:
> CompiledMethod allInstances detect: [ :m | m containsBlockClosures ]
> finds no CompiledMethod containing a BlockClosure. (Can't be right, can it?)
>
> Delving further into this, it seems the methods in the "closures"
> protocol of CompiledMethod are all broken. Is that correct?

having looked at things a bit more, it seems that most of the
"closures" protocol is obsolete:

* allEmbeddedBlockMethods - no senders, only marked as a failing test
* embeddedBlockMethods - no senders, only marked as a failing test
* isBlockMethod, isBlockMethod: - no senders
* containsBlockClosures - no senders (and a non-working implementation)
* method - there are many senders of #method, but I'm not sure if
CompiledMethods are receivers
* remoteReturns - no senders
* searchImageForHomeMethod - no senders save itself (recursive)

I am going to upload some things to the Inbox in a few minutes that do
the following:

* remove most of the "obsolete" methods above,
* prototypical implementation of embeddedBlockMethods that makes
containsBlockClosures work again
* some few tests (extension of CompiledMethodTest)

Please comment. I'm not sure the implementation is (a) sound or (b)
sensible. :-)

Best,

Michael



More information about the Squeak-dev mailing list