[squeak-dev] Re: The Trunk: Kernel-dtl.331.mcz
Andreas Raab
andreas.raab at gmx.de
Sat Dec 19 12:12:25 UTC 2009
Eliot Miranda wrote:
> Interesting! To my mind that definition is incorrect. I would
> expect the sender of a block to be the sender of the enclosing method,
> in which case the definition would arguably be
>
> BlockClosure methods for accessing
> sender
> ^self home sender
>
> A block activation's caller would be it's sender slot, so within a block
> you might refer to thisContext caller. But what is arguably a bug in my
> implementation is that within a block activation thisContext sender
> refers to the caller (the sender of value: to the activation's block)
> not to the sender of the enclosing method.
How about instead of faking out BlockClosure>>sender we fix MessageTally
along the lines of:
MessageTally>>tallySendsTo:inBlock:showTree:
prev := aBlock asContextWithSender: thisContext.
This should work just as well if I understand the intent of the change
correctly.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|