summaryrefslogtreecommitdiff
path: root/src/wasm-interpreter.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-06 16:35:16 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-06 16:35:16 -0800
commitd8c94b6ad4094b580f4a788de3733b5433ca4c2a (patch)
treebb24aab222947170b58fa4396b5b99a4cf88fd4c /src/wasm-interpreter.h
parent750cb1029cea2dfe5ae98ac4aa9fa47e522228e0 (diff)
downloadbinaryen-d8c94b6ad4094b580f4a788de3733b5433ca4c2a.tar.gz
binaryen-d8c94b6ad4094b580f4a788de3733b5433ca4c2a.tar.bz2
binaryen-d8c94b6ad4094b580f4a788de3733b5433ca4c2a.zip
fix switch parsing and semantics, for br in the table
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r--src/wasm-interpreter.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index d231aee42..5dbd09ef1 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -252,8 +252,10 @@ private:
}
auto iter = caseMap.find(target);
if (iter == caseMap.end()) {
- // not in the cases, so this is a break outside
- return Flow(target);
+ // not in the cases, so this is a break
+ Flow flow(target);
+ flow.clearIf(curr->name);
+ return flow;
}
size_t caseIndex = iter->second;
assert(caseIndex < curr->cases.size());