diff options
| author | titzer <titzer@google.com> | 2016-02-08 18:27:22 +0100 |
|---|---|---|
| committer | titzer <titzer@google.com> | 2016-02-08 18:27:22 +0100 |
| commit | f20b82d3ffa27dd45f0c6ab90b8e3603b6a37b6f (patch) | |
| tree | c3c29811634ee12b7abebe8db4a8216a25c0cab3 /BinaryEncoding.md | |
| parent | 6490fe86194110c8b191b2b0c1a651dad624485c (diff) | |
| download | nanowasm-design-f20b82d3ffa27dd45f0c6ab90b8e3603b6a37b6f.tar.gz | |
Add control flow operators.
Diffstat (limited to 'BinaryEncoding.md')
| -rw-r--r-- | BinaryEncoding.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/BinaryEncoding.md b/BinaryEncoding.md index 6a3aec1..5af6dbf 100644 --- a/BinaryEncoding.md +++ b/BinaryEncoding.md @@ -199,3 +199,13 @@ first byte, before the child nodes. | Name | Opcode | Immediate | Description | | ---- | ---- | ---- | ---- | | `nop` | `0x00` | | no operation | +| `block` | `0x01` | count = `varuint32` | a sequence of expressions, the last of which yields a value | +| `loop` | `0x02` | count = `varuint32` | a block which can also form control flow loops | +| `if` | `0x03` | | high-level one-armed if | +| `if_else` | `0x04` | | high-level two-armed if | +| `select` | `0x05` | | select one of two values based on condition | +| `br` | `0x06` | relative_depth = `uint8` | break that targets a outer nested block | +| `br_if` | `0x07` | relative_depth = `uint8` | conditional break that targets a outer nested block | +| `tableswitch` | 0x08 | `tableswitch_operand` | tableswitch control flow construct | +| `return` | 0x14 | | return zero or one value from this function | +| `unreachable` | 0x15 | | trap immediately | |
