The reason I asked this question is that if I write a Javascript where there is no hot code in it (therefore it won't need to be optimized by TurboFan, aka short running script), so when I run this Javascript, I assume it will go through the following process:
js code (ignition)-> bytecode -> codeStubHandler(TurboFan IR) -> assembly code
And the assembly code generated for all the builtins declared in builtins-definition.h is in a file called embedded.S.
so every bytecode has a handler to generate assembly code for them directly? is my understanding right? At least this is what I saw when I was debugging through the script.
Please help me verify.
Ignition does not compile JavaScript to assembly. It is an interpreter after all. It creates bytecode, then interprets that bytecode (via bytecode handlers).
The bytecode handlers are a special class of what we call "built-ins". They are generated at V8 build time, and embedded into the binary. They do not generate assembly code at runtime.
Interpretation means that the bytecode handlers themselves are executed. It does not mean that any assembly code is produced at runtime.
Only optimized compilation (with Turbofan) creates Turbofan IR at runtime.