Tag Info

New answers tagged


The key is that this is being used in a JIT which produces specialized code. Let's say that have a function something like this: function add_points(a, b) { return new Point(a.x + b.x, a.y + b.y); } V8 will actually generate different versions of this function, for different possible arguments that you pass in. For example, it would generate a version ...


V8 and other language implementations using similar techniques are just-in-time compilers. They generate code, and that generated code is speculatively optimized (with checks to fall back to slower, more general code if the specialization turns out to be invalid). So when generating code, the JIT compiler often has a good guess at what the hidden class of an ...

Top 50 recent answers are included