Javascript engines
JavaScript is a high-level language and an engine is needed to run the code. A JavaScript engine typically contains a parser, an interpreter and a runtime module. The parser parses the JavaScript code into tokens, typically building an abstract syntax tree to represent the JavaScript program. The interpreter walks the abstract syntax tree and interprets the intermediate representation contained in it. While earlier versions of JavaScript engines used the simpler AST walking interpreter design, things have changed quite a bit in later engines. These parse the JavaScript to an intermediate form, which typically contains byte-codes. An interpreter translates the byte-codes and optionally supports a JIT compiler, which can translate byte-codes to native code. There are trade-offs involved in having an interpreter rather than a JavaScript compiler. Interpreters are faster on application start-up, because they don't representations; hence, their start-up latency is quite low. On the other hand, a JavaScript compiler can convert the intermediate representation into machine or native code—and, of course, native code execution is considerably faster than interpreted code.
who invented JavaScript, was code-named SpiderMonkey and was implemented in C. Rhino, from Mozilla Corporation ( http://www.mozilla.org/rhino/), is an open source implementation of a JavaScript engine written in Java. The SquirrelFish Extreme engine (code named Nitro in the Safari browser) uses interpreted byte-codes with certain hot parts of the code being translated by the JIT compiler into machine language. TraceMonkey, embedded in Mozilla’s FireFox browser, employs a similar technology. The internals of TraceMonkey are described in a paper presented at the ACM Conference on Programming Languages Design and Implementation (PLDI) 2009, which is available at http://www. cs.ucsb.edu/~ckrintz/gal-pldi09.pdf.
https://developers.google.com/v8/. number of optimisations. Recall that I had earlier mentioned the overheads in recursive property lookup following prototype property access, by what are known as hidden classes. These are based on the premise that an object’s properties are typically unlikely to change after it has been initialised. Hence the object structure is captured in hidden classes, and an object’s hidden class changes when a new property is added. The concept of hidden classes is not new, but inherited from the www. sel anguage.org found at https://developers.google.com/v8/design. I will discuss