3 ms·
JITs don’t need to reload code, they run the same code and tier it up to an optimized implementation when it gets hot. No execution context is lost, at least se
by saagarjha 5y ago
JITs don’t need to reload code, they run the same code and tier it up to an optimized implementation when it gets hot. No execution context is lost, at least semantically.
- chrisseaton 5y ago> JITs don’t need to reload code If I've inlined a method, and someone redefines that method in a language that allows that, then I'm going to need to reload that code.
- tedunangst 5y agoYes, but if a called function redefines its own parent, it still returns to the old code, not the new code.
- moonchild 5y agoThat is true, but JITs nevertheless perform on-stack replacement for optimization purposes.
- kaba0 5y agoI don’t know much about the internals of a JIT compiler, but wouldn’t it just (recursively) deoptimize the methods which include the inlined method and do a normal method call instead which will now go to the updated implementation?