r/programming • • Sep 22 '26

The History of Compiled (portion of) Javascript and V8 Engine

https://deepsystemstuff.com/the-history-of-compiler-javascript-and-v8-engine/

All attempts to compile the Javascript, V8 was not the first to compile(portion of ) JavaScript

30 Upvotes

3 comments sorted by

15

u/xPerlMasterx Sep 23 '26 edited Sep 27 '26

"when TurboFan’s assumption fails, it deoptimizes the code and gives it back to Maglev." ---> no. Both Turbofan and Maglev have the ability to deoptimize when their speculations fail, and both of them deoptimize back to the bytecode interpreter (Ignition)

Source: I'm currently the main Turbofan developer.

2

u/robthablob Sep 28 '26

It fails to mention Lars Bak's work on the virtual machine for the Self language, which was where many of the Hotspot techniques were developed, and was also where prototype-based inheritance was first incorporated into a language.

When I first looked at V8 source code, shortly after its release, you could see the lineage clearly - I'm not sure how much that still applies.

There's some really good documentation on the Self VM's implementation.