Section 01 / Inside JavaScript

How it works:
JavaScript Engine

From a line of code to a running program.
We will explore the engine step by step, using examples and interactive diagrams.

19 lessons~60–90 minutes including practiceECMA-262 + V8
Start section →
Core engine mechanisms
Source → AST → Bytecode
Ignition ↔ JIT
Call Stack + Memory Heap
Lessons completed0 / 19
Progress is stored in this browser

Section contents

Lessons can be opened individually or followed in order
  1. 01ECMAScript · Engine · RuntimeLanguage, engine, and runtime✓
  2. 02OverviewHow V8 executes JavaScript✓
  3. 03Source text → tokensScanner: recognizing language elements✓
  4. 04Syntax treeAST: the structure of a program✓
  5. 05Startup and lazy parsingNot everything needs compiling at startup✓
  6. 06AST → instructionsBytecode: instructions for Ignition✓
  7. 07Executing bytecodeHow an interpreter works✓
  8. 08Bytecode → machine codeJIT: why V8 has several compilers✓
  9. 09Feedback → specialization → deoptOptimization relies on assumptions✓
  10. 10Call → returnCall Stack: which function is running✓
  11. 11Arguments and returnStack frame: the state of a function call✓
  12. 12Objects and referencesMemory Heap: where objects are stored✓
  13. 13An object and its referenceChanging an object or replacing a reference?✓
  14. 14ReachabilityGC finds reachable objects✓
  15. 15Scene lifecycleMemory leaks: a reference keeps the object alive✓
  16. 16ThreadsJavaScript threads✓
  17. 17Practical diagnosisGame performance✓
  18. 18RecapHow the engine works: a recap✓
  19. 19Self-checkCheck your understanding✓