mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Refactor.
This commit is contained in:
@@ -2189,24 +2189,7 @@ void ExpressionCompiler::appendExternalFunctionCall(
|
||||
// an internal helper function e.g. for ``send`` and ``transfer``. In that
|
||||
// case we're only interested in the success condition, not the return data.
|
||||
if (!_functionType.returnParameterTypes().empty())
|
||||
{
|
||||
if (haveReturndatacopy)
|
||||
{
|
||||
m_context << Instruction::RETURNDATASIZE;
|
||||
m_context.appendInlineAssembly(R"({
|
||||
switch v case 0 {
|
||||
v := 0x60
|
||||
} default {
|
||||
v := mload(0x40)
|
||||
mstore(0x40, add(v, and(add(returndatasize(), 0x3f), not(0x1f))))
|
||||
mstore(v, returndatasize())
|
||||
returndatacopy(add(v, 0x20), 0, returndatasize())
|
||||
}
|
||||
})", {"v"});
|
||||
}
|
||||
else
|
||||
utils().pushZeroPointer();
|
||||
}
|
||||
utils().returnDataToArray();
|
||||
}
|
||||
else if (funKind == FunctionType::Kind::RIPEMD160)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user