On Fri, Nov 28, 2008 at 8:52 AM, Bert Freudenberg <bert@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/