Appendix E. Text format extras
- Working with if statements
- Working with loops
- The WebAssembly module’s Table section and function pointers
As mentioned in chapter 11, the code execution in WebAssembly is defined in terms of a stack machine in which instructions push or pop a certain number of values onto and off the stack.
When a function is first called, the stack for that function is empty. The WebAssembly framework will validate the stack when the function ends to ensure that, if the function is returning an i32 value, for example, the last item on the stack when the function returns is an i32 value. If the function doesn’t return anything, then the stack must be empty when the function returns. ...
Get WebAssembly in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.