Added support for FunctionType::Kind::StringConcat and functions string.concat

This commit is contained in:
nishant-sachdeva
2022-02-10 22:08:47 +05:30
parent f1be7e1e23
commit 276851ff91
24 changed files with 391 additions and 38 deletions
@@ -1389,6 +1389,7 @@ void IRGeneratorForStatements::endVisit(FunctionCall const& _functionCall)
}
break;
}
case FunctionType::Kind::StringConcat:
case FunctionType::Kind::BytesConcat:
{
TypePointers argumentTypes;
@@ -1399,11 +1400,10 @@ void IRGeneratorForStatements::endVisit(FunctionCall const& _functionCall)
argumentVars += IRVariable(*argument).stackSlots();
}
define(IRVariable(_functionCall)) <<
m_utils.bytesConcatFunction(argumentTypes) <<
m_utils.bytesOrStringConcatFunction(argumentTypes, functionType->kind()) <<
"(" <<
joinHumanReadable(argumentVars) <<
")\n";
break;
}
case FunctionType::Kind::MetaType: