3 ms·
The fundamental problem is that interprocedural optimizations break that model. Optimizations that inline e.g. jQuery code into callers are very important. You
by pcwalton 9y ago
The fundamental problem is that interprocedural optimizations break that model. Optimizations that inline e.g. jQuery code into callers are very important. You end up needing to do optimization on jQuery either way.
Additionally, the code that JavaScript JITs generate is not position independent, and it contains no linkage information (symbol tables, etc.). It contains raw addresses of various browser objects within it. You would need to introduce some sort of linker for that to work, which is a lot of complexity.
- flamedoge 9y agodoesn't mean it can't be done
- pcwalton 9y agoIt could be done, yes, but you'd have to weigh the benefits of caching against the performance downsides of linking and IR serialization. I wouldn't be surprised if it ends up not being worth it in practice.
- jbergens 9y agoThe js landscape changes really fast, they could probably never keep up.