mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[ewasm] Properly encode i32/i64.select in the text format
This commit is contained in:
@@ -122,8 +122,11 @@ string TextTransform::operator()(wasm::BuiltinCall const& _builtinCall)
|
||||
{
|
||||
string args = joinTransformed(_builtinCall.arguments);
|
||||
string funcName = _builtinCall.functionName;
|
||||
// These are prefixed in the dialect, but are actually overloaded instructions in WebAssembly.
|
||||
if (funcName == "i32.drop" || funcName == "i64.drop")
|
||||
funcName = "drop";
|
||||
else if (funcName == "i32.select" || funcName == "i64.select")
|
||||
funcName = "select";
|
||||
return "(" + funcName + (args.empty() ? "" : " " + args) + ")";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user