diff options
Diffstat (limited to 'src/tools/js-wrapper.h')
-rw-r--r-- | src/tools/js-wrapper.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/js-wrapper.h b/src/tools/js-wrapper.h index 34a823e97..a2d481f42 100644 --- a/src/tools/js-wrapper.h +++ b/src/tools/js-wrapper.h @@ -91,7 +91,7 @@ static std::string generateJSWrapper(Module& wasm) { ret += "try {\n"; ret += std::string(" console.log('[fuzz-exec] calling $") + exp->name.str + "');\n"; - if (func->result != none) { + if (func->sig.results != Type::none) { ret += std::string(" console.log('[fuzz-exec] note result: $") + exp->name.str + " => ' + literal("; } else { @@ -99,7 +99,7 @@ static std::string generateJSWrapper(Module& wasm) { } ret += std::string("instance.exports.") + exp->name.str + "("; bool first = true; - for (Type param : func->params) { + for (Type param : func->sig.params.expand()) { // zeros in arguments TODO more? if (first) { first = false; @@ -112,8 +112,8 @@ static std::string generateJSWrapper(Module& wasm) { } } ret += ")"; - if (func->result != none) { - ret += ", '" + func->result.toString() + "'))"; + if (func->sig.results != Type::none) { + ret += ", '" + func->sig.results.toString() + "'))"; // TODO: getTempRet } ret += ";\n"; |