From f20b82d3ffa27dd45f0c6ab90b8e3603b6a37b6f Mon Sep 17 00:00:00 2001 From: titzer Date: Mon, 8 Feb 2016 18:27:22 +0100 Subject: Add control flow operators. --- BinaryEncoding.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'BinaryEncoding.md') 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 | -- cgit v1.2.3