This is a slide deck (not a blog post or article) hence its dependence on JS.
(though even blog posts I write usually depend on JS to provide proper syntax highlighting and diagrams)
> Can someone explain to me why it has to assume that arr.length could change? It states it does, but I don't see why.
If you don't know where `throwConcurrentModificationError(arr)` goes then you don't know what it does, e.g. it can do something like this:
H.throwConcurrentModificationError = function (arr) {
arr.push(10);
};
(contrary to its name - but JITs don't optimize based on names)That's why JIT has to assume global side effects from the `throwConcurrentModificationError` call - unless of course it emits an unconditional deoptimization right before it which is what happens in the (0, o.f)() case.