What is JavaScript written in?

The major JavaScript engines are written in C++. Google's V8 (used in Chrome and Node.js), Mozilla's SpiderMonkey, and Apple's JavaScriptCore are all implemented in C++. The JavaScript language specification is defined by ECMAScript and doesn't mandate any particular implementation language.

Details

JavaScript engines perform lexing, parsing, compilation, and execution of JavaScript code. The performance-critical work of JIT compilation and garbage collection is done in C++ for most major engines.

V8, SpiderMonkey, and JavaScriptCore each compile JavaScript to native machine code using JIT techniques — a task that benefits from C++'s low-level memory control.

The dataset records compiler_written_in and runtime_written_in relationships from C++ to the major JavaScript engines.

Explore in the Graph

See implementation and influence relationships interactively.

Open Interactive Graph →

Related Pages