diff options
-rwxr-xr-x | check.py | 2 | ||||
-rw-r--r-- | src/wasm-interpreter.h | 6 |
2 files changed, 6 insertions, 2 deletions
@@ -83,7 +83,7 @@ if len(requested) == 0: #spec_tests = [] # XXX [os.path.join('spec', t) for t in sorted(os.listdir(os.path.join('test', 'spec')))] # 'address' : filed issue, test looks invalid # 'exports' : has a "return" https://github.com/WebAssembly/spec/issues/164 - spec_tests = [os.path.join('spec', t + '.wast') for t in ['conversions', 'endianness', 'f32_cmp', 'f32', 'f64_cmp', 'f64', 'float_exprs', 'forward', 'func_ptrs']] + spec_tests = [os.path.join('spec', t + '.wast') for t in ['conversions', 'endianness', 'f32_cmp', 'f32', 'f64_cmp', 'f64', 'float_exprs', 'forward', 'func_ptrs', 'functions']] else: spec_tests = requested[:] diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index ae3f470ce..c4bf21d54 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -576,7 +576,11 @@ public: Function *function = functions[name]; FunctionScope scope(function, arguments); - return ExpressionRunner(*this, scope).visit(function->body).value; + + Literal ret = ExpressionRunner(*this, scope).visit(function->body).value; + if (function->result == none) ret = Literal(); + assert(function->result == ret.type); + return ret; } // Convenience method, for the case where you have no arguments. |