mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Take special functions that require literals into account.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <libyul/optimiser/ASTWalker.h>
|
||||
|
||||
#include <libyul/AsmData.h>
|
||||
#include <libyul/Dialect.h>
|
||||
|
||||
#include <libdevcore/CommonData.h>
|
||||
|
||||
@@ -43,6 +44,11 @@ void ExpressionSplitter::operator()(FunctionalInstruction& _instruction)
|
||||
|
||||
void ExpressionSplitter::operator()(FunctionCall& _funCall)
|
||||
{
|
||||
if (BuiltinFunction const* builtin = m_dialect.builtin(_funCall.functionName.name))
|
||||
if (builtin->literalArguments)
|
||||
// We cannot outline function arguments that have to be literals
|
||||
return;
|
||||
|
||||
for (auto& arg: _funCall.arguments | boost::adaptors::reversed)
|
||||
outlineExpression(arg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user