4 ms·
Ah. Okay. So the problem is that if a class is monkeypatched, all prior instances of that class must also be monkeypatched (given how Ruby works, there's no poi
by qwertyuiop924 10y ago
Ah. Okay. So the problem is that if a class is monkeypatched, all prior instances of that class must also be monkeypatched (given how Ruby works, there's no point otherwise), and so all code that was inlined now has to be uninlined, so the new, monkeypatched code can run. Now I actually get it.
The point I was discussing is actually irrelevant to vtables, it would work just as well with any other method dispatch mechanism, but you probably already knew that, and it has nothing to do with the actual problem.
Out of curiosity, how does Squeak handle this? Or does it just not inline?
- chrisseaton 10y agoI presume Squeak deoptimises, because deoptimisation was originally a Smalltalk thing, and Squeak comes from Smalltalk.
- qwertyuiop924 10y agoAh, thanks. Yeah, now that I actually get what deoptimization is, it doesn't seem as crazy.