Fix tuple assignments for empty tuples in Yul IR.

This commit is contained in:
Daniel Kirchner
2020-04-15 11:10:52 +02:00
parent cbd90f8d12
commit 0c5c93f3c2
4 changed files with 23 additions and 24 deletions
@@ -1465,14 +1465,17 @@ void IRGeneratorForStatements::declareAssign(IRVariable const& _lhs, IRVariable
else
m_code << (_declare ? "let ": "") << _lhs.part(stackItemName).name() << " := " << _rhs.part(stackItemName).name() << "\n";
else
m_code <<
(_declare ? "let ": "") <<
_lhs.commaSeparatedList() <<
" := " <<
m_context.utils().conversionFunction(_rhs.type(), _lhs.type()) <<
{
if (_lhs.type().sizeOnStack() > 0)
m_code <<
(_declare ? "let ": "") <<
_lhs.commaSeparatedList() <<
" := ";
m_code << m_context.utils().conversionFunction(_rhs.type(), _lhs.type()) <<
"(" <<
_rhs.commaSeparatedList() <<
")\n";
}
}
IRVariable IRGeneratorForStatements::zeroValue(Type const& _type, bool _splitFunctionTypes)