Rename drop to i64.drop in WasmDialect

Also properly implement support for both i32.drop and i64.drop in BinaryTransform, TextTransform, and YulInterpreter
This commit is contained in:
Alex Beregszaszi
2020-07-06 15:47:17 +01:00
parent 375cb09341
commit 60d4b1e8cc
5 changed files with 10 additions and 6 deletions
+4 -1
View File
@@ -94,7 +94,10 @@ string TextTransform::operator()(wasm::GlobalVariable const& _identifier)
string TextTransform::operator()(wasm::BuiltinCall const& _builtinCall)
{
string args = joinTransformed(_builtinCall.arguments);
return "(" + _builtinCall.functionName + (args.empty() ? "" : " " + args) + ")";
string funcName = _builtinCall.functionName;
if (funcName == "i32.drop" || funcName == "i64.drop")
funcName = "drop";
return "(" + funcName + (args.empty() ? "" : " " + args) + ")";
}
string TextTransform::operator()(wasm::FunctionCall const& _functionCall)