I am confused about how v8 works and how it execute js code.
I understand that v8 first parse the code and create AST then take this AST introducing it to the interpreter as input and produce byte code then this byte code introduced to turbofan compiler that converts this intermediate code to machine code that computer understands.
I am reading an article about this topic which is good but it turned out that something is confusing to me
- Execution Phase: The byte code is executed by using the Memory heap and the Call Stack of the V8 engine’s runtime environment
I thought that machine code is the one that get executed otherwise why we need to create that code if the byte code is the one that is executed??