How to do logging (was Re: [squeak-dev] Files documentation)

Michael van der Gulik mikevdg at gmail.com
Thu Nov 27 20:52:47 UTC 2008


On Fri, Nov 28, 2008 at 8:52 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:

>
> On 27.11.2008, at 18:44, Keith Hodges wrote:
>
>  Hello All,
>>
>> I need a villainous superpower that I haven't needed before, can anyone
>> tell me how to achieve this.
>>
>> I have some code like this:
>>
>> self send a message to me.
>> self nextThing.
>>
>> or
>>
>> self send a message to me.
>> A := self nextThing.
>>
>> What naughty superpower code can I put in to #send that will jump
>> execution to self nextThing directly?
>>
>
>
> send
>        ...
>        thisContext sender jump: 4
>
> This skips 4 bytecodes in the calling method before returning, so instead
> of pc=31 it continues at pc=35:
>
>
In terms of code smells, this is chemical warfare!! :-D.

Gulik.

--
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20081128/32a15152/attachment.htm


More information about the Squeak-dev mailing list