Don't we have a class-change prim now? It used to require a #become:, which would be very expensive. But if we can just swizzle the class pointer this could be a pretty decent approach. I should also say that Stef has a good paper about this kind of stuff that I hope he'll post a link to.
:)
http://www.iam.unibe.ch/~scg/Archive/Papers/Duca99aMsgPassingControl.pdf But take care what is described in the paper works for VW and some tricks do not work for Squeak. In particular changeClass: is reallllllllyyyyyyy dangerous in Squeak (even with class having the same format we can crash an image in no time I did not tried a lot but I could not have a code working with changeClass: involved.)
But the paper is worth reading. Stef
Avi