5 ms·
Very cool stuff, but in what situation does the code run the same for one thousand times or more and then all of a sudden cause a guard condition to fail. I kno
by megaman821 16y ago
Very cool stuff, but in what situation does the code run the same for one thousand times or more and then all of a sudden cause a guard condition to fail. I know it must happen with some frequency, hence the blackhole interpreter, but what is the most common scenario?
- janzer 16y agoI'm not directly involved at all. But what comes to my mind is a loop exit condition or more accurately, and by definition I suppose, any trace exit.
- fijall 16y agoThe thing is in case of tracing you don't record all paths taken, just the one at the hot point. So say you have if that takes every path every second go, the JIT will compile just one path at first. Then the guard will fail every second iteration, hence the blackhole. Of course at some point JIT will realize guard fails often enough and will compile another path, so you'll get a tree. And so on...