Part II

Structure

Native code jumps wherever it likes. WebAssembly code cannot: its control flow is nested blocks and loops, and a branch can only leave a block or restart a loop. The first two chapters of this part show how that works and how a compiler fits a language's control flow into it, including the control flow that does not fit naturally. The third steps back to look at a module as a whole: what it can contain, how its parts are numbered, and how it connects to the outside world.

  1. 6Structured Control Flow
  2. 7Control Flow Graphs
  3. 8Modules and Instances