summaryrefslogtreecommitdiff
path: root/src/s2wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/s2wasm.h')
-rw-r--r--src/s2wasm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index 8dac81b4c..a1805e659 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -695,6 +695,15 @@ private:
curr->value = getInput();
}
bstack.back()->list.push_back(curr);
+ } else if (match("tableswitch")) {
+ auto curr = allocator.alloc<Switch>();
+ curr->value = getInput();
+ skipComma();
+ curr->default_ = getCommaSeparated();
+ while (skipComma()) {
+ curr->targets.push_back(getCommaSeparated());
+ }
+ bstack.back()->list.push_back(curr);
} else if (match("unreachable")) {
bstack.back()->list.push_back(allocator.alloc<Unreachable>());
} else if (match("memory_size")) {