Q:
At which point LLInt starts to compile bytecode to the native code?
If I'm not mistaken it should be in prepareForExecution function, so I guess that this part of code actually does translation from bytecode to native code.
if ( JITCode::isBaselineCode( jitType)) {// Start off in the low level interpreter.LLInt::getEntrypoint(exec->globalData(), codeBlock.get(), jitCode);codeBlock->setJITCode( jitCode, MacroAssemblerCodePtr());return true;}
But I just cannot figure out how translation actually is done. My only assumption that this function only set up some native code,
and actually compilation begins when calling functions from native assembly code.
Can anyone please explain LLInt working mechanism, any links or articles?
I don't want to believe that rubby interprets custom assembly runtime, can you please explain how it works?
A: The LLInt doesn't compile anything to native code, since its an interpreter. It interprets the code instead.