V8pedia

How to read this site

V8pedia is built for one goal: to take you from "I use JavaScript" to "I can read the V8 source, reason about its performance, and land a patch." That is a steep climb, so this page explains the conventions that make the rest of the site legible.

Prerequisites

You will get the most out of this site if you are comfortable with:

  • JavaScript semantics — prototypes, closures, this binding, the event loop.

  • Basic C++ — V8 is ~2 million lines of modern C++. If you are rusty, read the C++ primer for V8 hackers first; we lean on it throughout.

  • Machine-level basics — registers, the stack, calling conventions, and what "a pointer" really is. We will explain the V8-specific parts (tagging, pointer compression) from scratch.

You do not need prior compiler or GC theory. We introduce the vocabulary as we go, and the glossary is a quick reference.

How claims are grounded

Every non-trivial statement is tied to V8's actual source. Two things make this trustworthy:

  1. Pinned permalinks. All source links point at one frozen commit, v8/v8@fb8be11. They will not rot, and the line ranges line up with what you read here. See the disclaimer for why we pin.

  2. Real excerpts. When we quote code, it is copied verbatim from that commit, with a link back to the exact lines. If our prose and the code ever disagree, the code wins.

::: tip Reading the source yourself You learn this material by reading V8, not by reading about V8. Treat every permalink as homework: open it, read the surrounding code, and form your own view. This site is a map, not a substitute for the territory. :::

Callout conventions

::: info Terminology Boxes like this define a piece of V8's ubiquitous language — a term that means something specific inside the codebase (e.g. "Smi", "Map", "nexus"). :::

::: warning Heuristic, not a contract Numbers like tier-up thresholds and GC trigger sizes are implementation details. We cite them to show mechanism; they change between versions. :::

::: details C++ / tooling aside Collapsible boxes hold background a JS-only reader might be missing — a C++ idiom, a build flag, or a tool — so the main thread of the prose stays focused. :::

Suggested reading order

If you are new, read in this order:

  1. The big picture — the end-to-end pipeline at a glance.

  2. Tagged values & Smis and HeapObject & Map — how V8 represents values. Nearly everything else depends on this.

  3. The tier ladder — why V8 has four execution tiers.

  4. Inline caches — the feedback that ties the object model to the optimizing compilers.

  5. Garbage collection — how memory is reclaimed without long pauses.

Experienced readers can jump straight to any section; pages cross-link their dependencies.

A note on V8's size and churn

V8 lands dozens of commits per day across the interpreter, four compilers, the GC, and the standard library. No single page — and no single person — holds all of it. The skill this site trains is navigation: knowing which directory owns a concern, what the key data structures are, and how to follow the code from an entry point to the hot loop. Coverage will always be partial; the method transfers.