Copy-and-Patch

2025-10-13

A Tutorial

If you can ctrl-c and ctrl-v, you can build a JIT.
2025-10-13

How It Works

Clang optimizations. Machine code models. Relocations!

Calculator

Building a complete calculator rather than toy example involves solving a few more traditional compiler problems.

2025-05-22

Control Flow

[draft]
Ifs, loops, and more.
2025-06-25

Register Allocation

[draft]
Efficient complex expressions and function bodies.
2025-08-26

Stencil Library Generation

[draft]
Turning compiled stencils into a library of code emitting and patching functions.
2025-07-15

Stencil Selection

[draft]
Building a library of stencils and efficiently selecting variants during code generation.

More posts will trickle out over time:

Appendix

2025-04-28

Benchmarking with WasmNow

[draft]
A closer look at WasmNow vs V8 Liftoff.



See discussion of this page on Reddit, Hacker News, and Lobsters.