I understands that most of the recent browsers use JIT compilation to execute javascript. What I do not understand is: which part of javascript is JIT'ed - the script, or the bytecode?
Let me explain. From what I understand, V8 takes your JS and compiles it into machine language (not bytecode) with output being placed in the RAM instead of being written into a separate file on the drive. Optimizations follow as per future requirements.
About the Chakra engine: this link says that the source code is converted into bytecode and then passed to a bytecode execution unit where it is executed via an interpreter or a JIT compiler. What it does not tell is: How does the javascript get converted into bytecode in the first place? Is it JIT compiled itself - (effectively giving us two jitters working end to end) - or is it compiled more traditionally? Where is the output placed? RAM or some temporary place at the drive?
And how does SpiderMonkey work? Seems it's quite like Chakra/ChakraCore.
While we are at it, would you kindly explain HHVM and php 7 in the same context? Is the bytecode JITed or is the source code JITed? Or is it both?