Reputation: 1
Before the Sparkplug compiler, JS code was first converted into byte code and executed, all done by the Ignition Interpreter. The Sparkplug compiler nowadays will take the byte code generated by Ignition Interpreter and turn it into machine code. Great. What executes code, though?
Does the Ignition Interpreter still execute it or maybe the CPU executes it now (machine code generated by Sparkplug)?
EDIT: There is also another JIT compiler called Maglev. So it adds even more confusion now
Upvotes: 0
Views: 48
Reputation: 40491
Ignition still executes bytecode as the first execution tier.
Machine code is executed by the CPU directly; that's what the term "machine code" means. V8 currently has three JavaScript compilers that generate machine code, in an increasingly optimized fashion for increasingly hot functions: Sparkplug, Maglev, and Turbofan.
Upvotes: 2