mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
commit
678a95f6e3
@ -835,10 +835,12 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
|
|||||||
case FunctionType::Kind::RIPEMD160:
|
case FunctionType::Kind::RIPEMD160:
|
||||||
{
|
{
|
||||||
_functionCall.expression().accept(*this);
|
_functionCall.expression().accept(*this);
|
||||||
static const map<FunctionType::Kind, u256> contractAddresses{{FunctionType::Kind::ECRecover, 1},
|
static map<FunctionType::Kind, u256> const contractAddresses{
|
||||||
|
{FunctionType::Kind::ECRecover, 1},
|
||||||
{FunctionType::Kind::SHA256, 2},
|
{FunctionType::Kind::SHA256, 2},
|
||||||
{FunctionType::Kind::RIPEMD160, 3}};
|
{FunctionType::Kind::RIPEMD160, 3}
|
||||||
m_context << contractAddresses.find(function.kind())->second;
|
};
|
||||||
|
m_context << contractAddresses.at(function.kind());
|
||||||
for (unsigned i = function.sizeOnStack(); i > 0; --i)
|
for (unsigned i = function.sizeOnStack(); i > 0; --i)
|
||||||
m_context << swapInstruction(i);
|
m_context << swapInstruction(i);
|
||||||
appendExternalFunctionCall(function, arguments);
|
appendExternalFunctionCall(function, arguments);
|
||||||
|
Loading…
Reference in New Issue
Block a user