meta-objects for closures? (CompiledMethod >> #embeddedBlockMethods and #allEmbeddedBlockMethods don't work)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

meta-objects for closures? (CompiledMethod >> #embeddedBlockMethods and #allEmbeddedBlockMethods don't work)

Michael Haupt-3
Dear all,

the two methods mentioned in the subject appear to be obsolete - they
will answer empty collections since in closure-compiled images,
embedded block methods are no longer stored as CompiledMethod
literals.

It is possible to obtain the extents of embedded block methods via
#blockExtentsInto:......, but how does one get the corresponding
meta-objects (e.g., BlockClosure instances)?

Best,

Michael

Reply | Threaded
Open this post in threaded view
|

Re: meta-objects for closures? (CompiledMethod >> #embeddedBlockMethods and #allEmbeddedBlockMethods don't work)

Eliot Miranda-2


On Tue, May 25, 2010 at 2:30 AM, Michael Haupt <[hidden email]> wrote:
Dear all,

the two methods mentioned in the subject appear to be obsolete - they
will answer empty collections since in closure-compiled images,
embedded block methods are no longer stored as CompiledMethod
literals.

It is possible to obtain the extents of embedded block methods via
#blockExtentsInto:......, but how does one get the corresponding
meta-objects (e.g., BlockClosure instances)?

What exactly do you mean by getting teh corresponding BlockClosure instances?  You mean create some representative ones or search the image for existing instances?  If the former then the attached will be useful.  It creates contexts for each block in a method. You should be able to adapt it easily to answer BlockClosures.  

HTH
Eliot

P.S. Disregard its class comment or implement the tests based on it, as you wish :)
"I make a linear pass through a method creating a context for each method or activation wthin it, synthesizing local variable values etc.  This is used to test temp variable access in the debugger."
It isn't but it should be :) 

Best,

Michael





ActivationSynthesizer.st (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: meta-objects for closures? (CompiledMethod >> #embeddedBlockMethods and #allEmbeddedBlockMethods don't work)

Michael Haupt-3
Hi Eliot,

On Wed, May 26, 2010 at 12:30 AM, Eliot Miranda <[hidden email]> wrote:
> What exactly do you mean by getting teh corresponding BlockClosure
> instances?  You mean create some representative ones or search the image for
> existing instances?  If the former then the attached will be useful.

the former is correct. Thank you for the attachment - in the meantime,
we had built a small tool that creates embedded block method
descriptors from the information that CompiledMethod >>
#startpcsToBlockExtents delivers.

Isn't it a bit sad that embedded block methods cannot any longer be
accessed as CompiledMethods? I think it is a loss of richness at the
meta-level.

Best,

Michael

Reply | Threaded
Open this post in threaded view
|

Points of View

Squeak List
probably announced on this list and i missed it... just found it 2nite... on a different list...

this one is VERY nice : if you also missed it:

http://piumarta.com/pov/points-of-view.pdf

ken





Reply | Threaded
Open this post in threaded view
|

Re: meta-objects for closures? (CompiledMethod >> #embeddedBlockMethods and #allEmbeddedBlockMethods don't work)

Eliot Miranda-2
In reply to this post by Michael Haupt-3


On Tue, May 25, 2010 at 10:47 PM, Michael Haupt <[hidden email]> wrote:
Hi Eliot,

On Wed, May 26, 2010 at 12:30 AM, Eliot Miranda <[hidden email]> wrote:
> What exactly do you mean by getting teh corresponding BlockClosure
> instances?  You mean create some representative ones or search the image for
> existing instances?  If the former then the attached will be useful.

the former is correct. Thank you for the attachment - in the meantime,
we had built a small tool that creates embedded block method
descriptors from the information that CompiledMethod >>
#startpcsToBlockExtents delivers.

Isn't it a bit sad that embedded block methods cannot any longer be
accessed as CompiledMethods? I think it is a loss of richness at the
meta-level.

So add it back :)  Not too hard to do.


Best,

Michael