[squeak-dev] Re: extracting BlockClosures from CompiledMethods

Eliot Miranda eliot.miranda at gmail.com
Tue Sep 21 16:55:00 UTC 2010


Hi Michael,

    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.

On Tue, Sep 21, 2010 at 4:46 AM, Michael Haupt <mhaupt at gmail.com> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100921/50f4c955/attachment.htm


More information about the Squeak-dev mailing list