[Sol->Yul] Implementing dynamic array push for arrays of structs.

This commit is contained in:
Djordje Mijovic
2021-01-11 17:49:42 +01:00
committed by chriseth
parent b06936b11c
commit 85b8325f0b
7 changed files with 104 additions and 50 deletions
@@ -1316,9 +1316,13 @@ void IRGeneratorForStatements::endVisit(FunctionCall const& _functionCall)
}
else
{
IRVariable argument = convert(*arguments.front(), *arrayType.baseType());
IRVariable argument =
arrayType.baseType()->isValueType() ?
convert(*arguments.front(), *arrayType.baseType()) :
*arguments.front();
m_code <<
m_utils.storageArrayPushFunction(arrayType) <<
m_utils.storageArrayPushFunction(arrayType, &argument.type()) <<
"(" <<
IRVariable(_functionCall.expression()).commaSeparatedList() <<
", " <<