diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-18 21:11:45 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-18 21:11:45 -0800 |
commit | ebb4cc7d0c655975cfc7b5538ed61bd09fd9a507 (patch) | |
tree | 783325d8be25ef848fa02bcd6c62a584703f7d18 /src/wasm-interpreter.h | |
parent | fc5ee5c99bc8cdf383563c791d175da5002cb963 (diff) | |
download | binaryen-ebb4cc7d0c655975cfc7b5538ed61bd09fd9a507.tar.gz binaryen-ebb4cc7d0c655975cfc7b5538ed61bd09fd9a507.tar.bz2 binaryen-ebb4cc7d0c655975cfc7b5538ed61bd09fd9a507.zip |
add assert on breaking
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r-- | src/wasm-interpreter.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 2458b60e1..3f69d36e5 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -774,7 +774,9 @@ private: std::cout << "entering " << function->name << '\n'; #endif - Literal ret = ExpressionRunner(*this, scope).visit(function->body).value; + Flow flow = ExpressionRunner(*this, scope).visit(function->body); + assert(!flow.breaking()); // cannot still be breaking, it means we missed our stop + Literal ret = flow.value; if (function->result == none) ret = Literal(); assert(function->result == ret.type); callDepth--; |