HOME

TheInfoList



OR:

V8 is a free and open-source JavaScript engine developed by the Chromium Project for Google Chrome and
Chromium Chromium is a chemical element with the symbol Cr and atomic number 24. It is the first element in group 6. It is a steely-grey, lustrous, hard, and brittle transition metal. Chromium metal is valued for its high corrosion resistance and h ...
web browsers. The project’s creator is
Lars Bak Lars Ytting Bak (born 16 January 1980) is a Danish former professional road bicycle racer, who rode professionally between 2002 and 2019 for the Fakta, , , , and squads. From 2022, Bak will act as team manager for UCI Women's WorldTeam . Ba ...
. The first version of the V8 engine was released at the same time as the first version of Chrome: 2 September 2008. It has also been used on the server side, for example in Couchbase and Node.js.


History

The V8 assembler is based on the
Strongtalk Strongtalk is a Smalltalk environment with optional static typing support. Strongtalk can make some compile time checks, and offer ''stronger'' type safety guarantees; this is the source of its name. It is non-commercial, though it was originally ...
assembler. On 7 December 2010, a new compiling infrastructure named Crankshaft was released, with speed improvements. In version 41 of Chrome in 2015, project TurboFan was added to provide more performance improvements with previously challenging workloads such as
asm.js asm.js is a subset of JavaScript designed to allow computer software written in languages such as C to be run as web applications while maintaining performance characteristics considerably better than standard JavaScript, which is the typical l ...
. Much of V8's development is strongly inspired by the Java HotSpot Virtual Machine developed by
Sun Microsystems Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, ...
, with the newer execution pipelines being very similar to those of HotSpot's. In 2016, the Ignition interpreter was added to V8 with the design goal of reducing the memory usage on small memory
Android Android may refer to: Science and technology * Android (robot), a humanoid robot or synthetic organism designed to imitate a human * Android (operating system), Google's mobile operating system ** Bugdroid, a Google mascot sometimes referred to ...
phones in comparison with TurboFan and Crankshaft. Ignition is a register based machine and shares a similar (albeit not the exact same) design to the templating interpreter utilized by HotSpot. In 2017, V8 shipped a brand-new compiler pipeline, consisting of Ignition (the interpreter) and TurboFan (the optimizing compiler). Starting with V8 version 5.9, Full-codegen (the early baseline compiler) and Crankshaft are no longer used in V8 for JavaScript execution, since the team believed they were no longer able to keep pace with new JavaScript language features and the optimizations those features required. In 2021, a new tiered compilation pipeline was introduced with the release of the SparkPlug compiler, which supplements the existing TurboFan compiler within V8, in a direct parallel to the profiling C1 Compiler used by HotSpot.


Design

V8 first generates an abstract syntax tree with its own parser. Then, Ignition generates
bytecode Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (norma ...
from this syntax tree using the internal V8 bytecode format. TurboFan compiles this bytecode into machine code. In other words, V8 compiles ECMAScript directly to native machine code using
just-in-time compilation In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is a way of executing computer code that involves compiler, compilation during execution of a program (at run time (program lifecycle phase), run tim ...
before executing it. The compiled code is additionally optimized (and re-optimized) dynamically at runtime, based on heuristics of the code's execution profile. Optimization techniques used include inlining,
elision In linguistics, an elision or deletion is the omission of one or more sounds (such as a vowel, a consonant, or a whole syllable) in a word or phrase. However, these terms are also used to refer more narrowly to cases where two words are run toget ...
of expensive runtime properties, and inline caching. The garbage collector is a generational incremental collector.


Usage

V8 can compile to x86, ARM or MIPS
instruction set architecture In computer science, an instruction set architecture (ISA), also called computer architecture, is an abstract model of a computer. A device that executes instructions described by that ISA, such as a central processing unit (CPU), is called an ...
s in both their 32-bit and 64-bit editions; it has additionally been ported to
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple– IBM ...
and IBM s390 for use in servers. V8 can be used in a browser or integrated into independent projects. V8 is used in the following software: *
Chromium Chromium is a chemical element with the symbol Cr and atomic number 24. It is the first element in group 6. It is a steely-grey, lustrous, hard, and brittle transition metal. Chromium metal is valued for its high corrosion resistance and h ...
-based
web browser A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
s - Google Chrome,
Brave Brave most commonly refers to: *Brave, an adjective for one who possesses courage *Braves (Native Americans), a EuroAmerican stereotype for Native American warriors Brave(s) or The Brave(s) may also refer to: Film and television * ''Brave'' (199 ...
,
Opera Opera is a form of theatre in which music is a fundamental component and dramatic roles are taken by singers. Such a "work" (the literal translation of the Italian word "opera") is typically a collaboration between a composer and a libre ...
, Vivaldi and Microsoft Edge. * Couchbase database server * Deno runtime environment *
Electron The electron (, or in nuclear reactions) is a subatomic particle with a negative one elementary electric charge. Electrons belong to the first generation of the lepton particle family, and are generally thought to be elementary partic ...
desktop application framework, used by the
Atom Every atom is composed of a nucleus and one or more electrons bound to the nucleus. The nucleus is made of one or more protons and a number of neutrons. Only the most common variety of hydrogen has no neutrons. Every solid, liquid, gas ...
and Visual Studio Code text editors * MarkLogic database server * NativeScript mobile application framework * Node.js runtime environment * Qt Quick runtime environment


See also

* Blink, the Chromium browser engine


References


External links

* {{NodeJs 2008 software Free compilers and interpreters Google Chrome Google software JavaScript engines Software using the BSD license Virtual machines