1

The V8 Engine contains both Ignition "Interpreter" (which is an interesting name for something that not only interprets) and TurboFan Compiler. TurboFan compiler helps to optimize "hot" parts of code by compiling it into machine code.

However, when it comes to Ignition Interpreter. It can produce byte code and then execute it. To create the byte code, however, it needs to "compile/transform" the AST (Abstract Syntax Tree). Is Ignition's ability to do it (create the byte code) possible only because it was built on TurboFan which itself can "compile" code?

1 Answer 1

1

No, the fact that Ignition's bytecode handlers are generated with Turbofan is totally unrelated to Ignition's ability to generate bytecode. Anyone (in V8 or other projects) can build any number of JavaScript compilers that compile JS to anything you want (bytecode, machine code, ES5, ES3, some random format of your own design, ...); there is no need to reuse parts of them for each other.

Sign up to request clarification or add additional context in comments.

1 Comment

That really makes sense. Thank you, jmrk!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.