mhtirogla
Home
Systems
API
Pricing
About
Log in
← Back
Home
›
Systems
›
Compilers and language tooling
wasm-toolchain
WebAssembly toolchain
wasm-bindgen, Binaryen
System
Techniques · 14
Primitives · 28
wasm-toolchain
Debug info (DWARF)
compilers · medium: DWARF stores a tree of typed entries (DIEs), a line-number bytecode, unwind tables and location expressions that map machine state back to source; pick it for ELF/Mach-O debug builds.
›
FFI bindings generation
compilers · medium: Describe a library's C-ABI surface once (header, attributes or IDL) and generate the declarations, converters and wrappers for each caller language.
›
Function inlining
compilers · medium: Inline call sites by cost model and call-graph order; enables downstream optimizations
Instruction selection
compilers · medium: Cover the IR with target instruction patterns at least cost; greedy maximal munch is simple, dynamic programming over a tree or DAG is optimal.
›
Linking and relocation
compilers · medium: The linker merges object files, matches each undefined name to one definition, assigns addresses and patches every recorded reference (relocation); dynamic linking defers part of that to load time.
›
Register allocation
compilers · medium: Map unlimited virtual registers onto a few machine registers, spilling the rest to the stack; linear scan is fast, graph coloring and splitting allocators give better code.
›
Structured control flow
compilers · medium: Turn a jump graph into nested block, loop and if constructs with numbered breaks; reducible graphs need no duplication.
›
Varint (LEB128)
compression · low: Variable-length integers in 7-bit groups with a continuation bit; small numbers take 1 byte, the wire format of Protobuf, WebAssembly and DWARF.
›
Calling conventions abi
compilers · low: System V, Windows x64 and AAPCS64 ABIs: argument registers, stack frames, struct passing, FFI
SSA form
compilers · low: Give every variable exactly one definition, merging at joins with phi functions; def-use becomes explicit and optimizations turn sparse and cheap.
›
Peephole optimization
compilers · low: Local pattern rewrites on short instruction windows or IR
WebAssembly binary format
compilers · low: A section-based module container with LEB128 integers and structured, typed code, so untrusted bytes are validated in one pass and compiled as they stream in.
›
Executable formats elf pe
compilers · low: ELF, PE and Mach-O: sections, segments, symbol tables, relocations, dynamic loading
Reference counting
compilers · low: Keep a count of owners in each object, free it when the count hits zero; deterministic and local, but pays on every copy and leaks cycles.
›
Strongly connected components
graphs · low: Tarjan/Kosaraju SCCs for cycle detection in dependency graphs
Machine code emission
compilers · low: Encode instructions to bytes for x86-64 and AArch64, branch relaxation, constant pools
Tree pattern matching
compilers · low: Matching AST patterns with metavariables
String interning
data-structures · low: Store each distinct string once and refer to it by id
Swiss table
data-structures · low: Open-addressing hash table that filters 8-16 slots at once with 1-byte hash tags and SIMD, giving fast lookups at 87.5 % load.
›
mmap and the page cache
hardware-os · low: How read() and mmap reach file data through the kernel page cache, what readahead and madvise do, and why databases use their own buffer pool instead.
›
Interval tree
data-structures · low: Index of ranges that answers "which intervals overlap this point or range?" in O(log n + k); static sorted-array form is the compact, cache-friendly choice.
›
Control-flow graph
compilers · low: Split a linear instruction list into basic blocks and connect them by jumps; the graph every optimizer, SSA builder and dataflow pass walks.
›
Dominator tree
compilers · low: Dominators via Lengauer-Tarjan or Cooper-Harvey-Kennedy; dominance frontiers for SSA
+ 7 more techniques
+ 12 more primitives
System
Techniques · 14
Primitives · 28
wasm-toolchain
Debug info (DWARF)
compilers · medium: DWARF stores a tree of typed entries (DIEs), a line-number bytecode, unwind tables and location expressions that map machine state back to source; pick it for ELF/Mach-O debug builds.
›
FFI bindings generation
compilers · medium: Describe a library's C-ABI surface once (header, attributes or IDL) and generate the declarations, converters and wrappers for each caller language.
›
Function inlining
compilers · medium: Inline call sites by cost model and call-graph order; enables downstream optimizations
Instruction selection
compilers · medium: Cover the IR with target instruction patterns at least cost; greedy maximal munch is simple, dynamic programming over a tree or DAG is optimal.
›
Linking and relocation
compilers · medium: The linker merges object files, matches each undefined name to one definition, assigns addresses and patches every recorded reference (relocation); dynamic linking defers part of that to load time.
›
Register allocation
compilers · medium: Map unlimited virtual registers onto a few machine registers, spilling the rest to the stack; linear scan is fast, graph coloring and splitting allocators give better code.
›
Structured control flow
compilers · medium: Turn a jump graph into nested block, loop and if constructs with numbered breaks; reducible graphs need no duplication.
›
Tree shaking
compilers · medium: Remove unused exports via module graph reachability and side-effect analysis
Software fault isolation
security · medium: Sandbox code in-process with bounds-checked or guard-page linear memory (Wasm, NaCl)
Call graph construction
compilers · medium: Building call graphs with dynamic dispatch resolution (CHA, RTA)
Dataflow analysis
compilers · medium: Compute a fact per program point (live variables, reaching definitions, available expressions) by iterating transfer functions over the CFG to a fixed point.
›
Idl code generation
compilers · medium: Generate typed client/server stubs and codecs from an interface definition
Graph coloring
graphs · medium: Greedy/DSatur colouring for conflict-free assignment such as radio channels
Template engines
compilers · medium: Compile templates with loops, partials and auto-escaping into render functions
Varint (LEB128)
compression · low: Variable-length integers in 7-bit groups with a continuation bit; small numbers take 1 byte, the wire format of Protobuf, WebAssembly and DWARF.
›
Calling conventions abi
compilers · low: System V, Windows x64 and AAPCS64 ABIs: argument registers, stack frames, struct passing, FFI
SSA form
compilers · low: Give every variable exactly one definition, merging at joins with phi functions; def-use becomes explicit and optimizations turn sparse and cheap.
›
Peephole optimization
compilers · low: Local pattern rewrites on short instruction windows or IR
WebAssembly binary format
compilers · low: A section-based module container with LEB128 integers and structured, typed code, so untrusted bytes are validated in one pass and compiled as they stream in.
›
Executable formats elf pe
compilers · low: ELF, PE and Mach-O: sections, segments, symbol tables, relocations, dynamic loading
Reference counting
compilers · low: Keep a count of owners in each object, free it when the count hits zero; deterministic and local, but pays on every copy and leaks cycles.
›
Strongly connected components
graphs · low: Tarjan/Kosaraju SCCs for cycle detection in dependency graphs
Machine code emission
compilers · low: Encode instructions to bytes for x86-64 and AArch64, branch relaxation, constant pools
Tree pattern matching
compilers · low: Matching AST patterns with metavariables
String interning
data-structures · low: Store each distinct string once and refer to it by id
Swiss table
data-structures · low: Open-addressing hash table that filters 8-16 slots at once with 1-byte hash tags and SIMD, giving fast lookups at 87.5 % load.
›
mmap and the page cache
hardware-os · low: How read() and mmap reach file data through the kernel page cache, what readahead and madvise do, and why databases use their own buffer pool instead.
›
Interval tree
data-structures · low: Index of ranges that answers "which intervals overlap this point or range?" in O(log n + k); static sorted-array form is the compact, cache-friendly choice.
›
Control-flow graph
compilers · low: Split a linear instruction list into basic blocks and connect them by jumps; the graph every optimizer, SSA builder and dataflow pass walks.
›
Dominator tree
compilers · low: Dominators via Lengauer-Tarjan or Cooper-Harvey-Kennedy; dominance frontiers for SSA
Module resolution
compilers · low: Resolve import specifiers to files: Node and ESM resolution, package exports, CJS interop
Name resolution
compilers · low: Bind every use of a name to its declaration with a scope stack, handling shadowing, hoisting and closure capture in one AST walk.
›
BFS and DFS
graphs · low: The two basic graph traversals; BFS gives hop distances and levels, DFS gives discovery/finish order for cycles, components and topological order.
›
Disassembly
compilers · low: Instruction decoding for x86 (prefixes, ModRM, variable length) and ARM; linear sweep vs recursive traversal
Guard pages memory sandboxing
security · low: Reserve large virtual regions with guard pages so bounds checks become page faults
Topological sort
graphs · low: Order the vertices of a DAG so every edge points forward; the core of build systems, schedulers and dependency resolution, with cycle detection for free.
›
Recursive-descent parsing
compilers · low: Hand-written top-down parser with one function per grammar rule; simple, fast, with full control over error messages and recovery.
›
Protobuf wire format
networking · low: Protocol Buffers wire format: tags, varints, length-delimited fields and schema evolution
d-ary heap
data-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.
›
Html sanitization
security · low: Allowlist-based HTML sanitizing of untrusted markup
Virtual memory and the TLB
hardware-os · low: How page tables and TLBs translate every address, what TLB reach means, and when 2 MiB or 1 GiB huge pages pay off on Linux.
›
Sparse matrices (CSR)
numerics · low: Compressed sparse row stores only nonzeros as row pointers, column indices and values; SpMV streams them once, so it is memory-bandwidth bound.
›
Copy for AI
Similar systems
Share the most building blocks with this one.
compiler
31 %
shader-compiler
27 %
cuda-platform
21 %
wasm-runtime
17 %