summaryrefslogtreecommitdiff
path: root/src/wasm-interpreter.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-06-01 18:45:26 -0700
committerGitHub <noreply@github.com>2017-06-01 18:45:26 -0700
commit6611f548cc1e6b373693cde09e9a7379659e8832 (patch)
treeeb1565a85ee751d1ebc52673916d62d17ef44e36 /src/wasm-interpreter.h
parent0dc07eaa7db35cf65edbbccebe5c89b995613745 (diff)
parentbd001c187b90a570ce8babaad83af3b420f48eb5 (diff)
downloadbinaryen-6611f548cc1e6b373693cde09e9a7379659e8832.tar.gz
binaryen-6611f548cc1e6b373693cde09e9a7379659e8832.tar.bz2
binaryen-6611f548cc1e6b373693cde09e9a7379659e8832.zip
Merge pull request #1033 from WebAssembly/fuzz2
More misc fuzz fixes
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r--src/wasm-interpreter.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index b06afb1a1..0b01fb1d3 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -692,6 +692,7 @@ private:
// stack traces.
std::vector<Name> functionStack;
+public:
// Call a function, starting an invocation.
Literal callFunction(Name name, LiteralList& arguments) {
// if the last call ended in a jump up the stack, it might have left stuff for us to clean up here
@@ -700,7 +701,6 @@ private:
return callFunctionInternal(name, arguments);
}
-public:
// Internal function call. Must be public so that callTable implementations can use it (refactor?)
Literal callFunctionInternal(Name name, LiteralList& arguments) {
@@ -903,7 +903,6 @@ public:
Flow flow = RuntimeExpressionRunner(*this, scope).visit(function->body);
assert(!flow.breaking() || flow.breakTo == RETURN_FLOW); // cannot still be breaking, it means we missed our stop
Literal ret = flow.value;
- if (function->result == none) ret = Literal();
if (function->result != ret.type) {
std::cerr << "calling " << function->name << " resulted in " << ret << " but the function type is " << function->result << '\n';
WASM_UNREACHABLE();