Search code examples
javascriptv8

Does the ByteCode interpreter, convert the bytecode to machine code and then execute it in V8 engine?


so my question is does the Bytecode interpreter of Ignition convert the bytecode that was created by the bytecode-generator to machine code and execute it line by line?

because from what I've seen I don't see any sign that the bytecode interpreter actually converting the code to machine code.

it seems more like the bytecode generator generates bytecodes and the interpreter just execute it in C++(the interpreter doesn't turn the bytecode to machine code and then execute it)


Solution

  • (V8 developer here.)

    Correct, the key concept of an interpreter is that it executes the bytecode directly. It does not generate machine code. We use the term "compiler" for things that (don't interpret but instead) generate machine code.