[squeak-dev] Re: extracting BlockClosures from CompiledMethods
Michael Haupt
mhaupt at gmail.com
Wed Sep 22 09:57:22 UTC 2010
Hi Eliot,
thanks for your input. See below for some progress (?).
On Tue, Sep 21, 2010 at 6:55 PM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> 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.
I just inboxed KernelTests-mha.164 and Kernel-mha.499 - please take a
look at the implementations of BlockClosure >> #size and MethodContext
>> #atEnd. Is that what you meant? (Please give feedback - it might be
wrong code.)
Apart from these two methods, Kernel-mha.499 moves two of the block
extent methods from debugger support to accessing and private
protocols in CompiledMethod.
I'd still like to get some feedback on CompiledMethod >>
#embeddedBlockMethods; this is a method I sorely need and that IMHO
would make a good extension to CompiledMethod's meta-programming
protocol (read: closures protocol). I'd rather see something like it
in CompiledMethod than in my development code.
Best,
Michael
More information about the Squeak-dev
mailing list
|