= JavaScriptCore = JavaScriptCore is the built-in JavaScript engine for WebKit. It currently implements [http://en.wikipedia.org/wiki/ECMAScript ECMAScript] as in [http://www.ecma-international.org/publications/standards/Ecma-262.htm ECMA-262 specification]. JavaScriptCore is often referred with different names, such as [http://www.webkit.org/blog/189/announcing-squirrelfish/ SquirrelFish] and [http://www.webkit.org/blog/214/introducing-squirrelfish-extreme/ SquirrelFish Extreme]. Within the context of Safari, Nitro and Nitro Extreme (the marketing terms from Apple) are also commonly used. However, the name of the project and the library is always '''JavaScriptCore'''. JavaScriptCode source code resides in WebKit source tree, it's under [http://trac.webkit.org/browser/trunk/Source/JavaScriptCore Source/JavaScriptCore] directory. Note that while Chromium uses WebKit as the rendering engine, it [http://googlecode.blogspot.com/2008/09/google-chrome-chromium-and-v8-launch.html does not] use JavaScriptCore as the JavaScript engine. Rather, Chromium uses [http://code.google.com/p/v8/ V8] (which is not a WebKit project). == Core Engine == Like a typical scripting engine, JavaScriptCore consists of the following building blocks: lexer, parser, and interpreter. '''Lexer''' is responsible for the [http://en.wikipedia.org/wiki/Lexical_analysis lexical analysis], i.e. breaking down the script source into a series of ''tokens''. JavaScriptCore lexer is hand-written, it is mostly in [http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/parser/Lexer.h parser/Lexer.h] and [http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/parser/Lexer.cpp parser/Lexer.cpp]. '''Parser''' carries out the [http://en.wikipedia.org/wiki/Parser syntactic analysis], i.e. consuming the tokens from the lexer and building the corresponding syntax tree. JavaScriptCore uses a hand-written [http://en.wikipedia.org/wiki/Recursive_descent_parser recursive descent parser], the code is in [http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/parser/JSParser.h parser/JSParser.h] and [http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/parser/JSParser.cpp parser/JSParser.cpp]. '''Interpreter''' executes the bytecodes produced by the parser. JavaScriptCore has two types of interpreter: bytecode-based and JIT-based. The former runs the bytecodes in a virtual machine, the latter uses JIT (Just-in-time) compiling approach to produce native machine codes in order to have a faster execution. The bulk of the interpreter code is in [http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/interpreter interpreter/] subdirectory with the JIT compiler in [http://trac.webkit.org/browser/trunk/Source/JavaScriptCore/jit jit/] subdirectory. (More to be written) == Runtime == (To be written) == Binding == (To be written)