Avi,
Great. Is it too early to lobby for this to be made part of the stock VM?
Personally, I feel pretty good about it. There are a couple of things that one needs to keep in mind when playing with this kind of stuff but the VM level changes itself are very small and quite obvious (well, for someone knowing her way around the VM ;)
A somewhat related question I've had for a long time - why is there no primitive for invoking a CompiledMethod without first installing it in a method dictionary?
Well, there is. At least if I understand Anthony's work on the closure compiler correctly. If I'm not mistaken then he uses CompiledMethods as representations for closures which means that he's got to have a primitive for invoking them somehow. So that you might be able to get away with wrapping a CM into a closure and just evaluate it.
To keep the interfaces consistent, this could of course be used by CompiledMethod>>run:with:in:...
It really should! Then one could use this to 'jump' from one kind of interpreter to another where the Squeak Bytecode interpreter sends #run:with:in: to any non-CompiledMethod and the IDunnoWhatInterpreter sends #run:with:in: if it encounters a CompiledMethod.
Heh, heh. I'm just starting to imagine the possibilities here and it makes me grin like a cheshire cat 8-)))
Cheers, - Andreas