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:
@@ -44,7 +44,7 @@ EVMDialect::EVMDialect(AsmFlavour _flavour, bool _objectAccess):
|
||||
if (!m_objectAccess)
|
||||
return;
|
||||
|
||||
addFunction("datasize", 1, 1, true, [this](
|
||||
addFunction("datasize", 1, 1, true, true, [this](
|
||||
FunctionCall const& _call,
|
||||
AbstractAssembly& _assembly,
|
||||
std::function<void()>
|
||||
@@ -58,7 +58,7 @@ EVMDialect::EVMDialect(AsmFlavour _flavour, bool _objectAccess):
|
||||
else
|
||||
_assembly.appendDataSize(m_subIDs.at(dataName));
|
||||
});
|
||||
addFunction("dataoffset", 1, 1, true, [this](
|
||||
addFunction("dataoffset", 1, 1, true, true, [this](
|
||||
FunctionCall const& _call,
|
||||
AbstractAssembly& _assembly,
|
||||
std::function<void()>
|
||||
@@ -72,7 +72,7 @@ EVMDialect::EVMDialect(AsmFlavour _flavour, bool _objectAccess):
|
||||
else
|
||||
_assembly.appendDataOffset(m_subIDs.at(dataName));
|
||||
});
|
||||
addFunction("datacopy", 3, 0, false, [](
|
||||
addFunction("datacopy", 3, 0, false, false, [](
|
||||
FunctionCall const&,
|
||||
AbstractAssembly& _assembly,
|
||||
std::function<void()> _visitArguments
|
||||
@@ -128,6 +128,7 @@ void EVMDialect::addFunction(
|
||||
size_t _params,
|
||||
size_t _returns,
|
||||
bool _movable,
|
||||
bool _literalArguments,
|
||||
std::function<void(FunctionCall const&, AbstractAssembly&, std::function<void()>)> _generateCode
|
||||
)
|
||||
{
|
||||
@@ -137,5 +138,6 @@ void EVMDialect::addFunction(
|
||||
f.parameters.resize(_params);
|
||||
f.returns.resize(_returns);
|
||||
f.movable = _movable;
|
||||
f.literalArguments = _literalArguments;
|
||||
f.generateCode = std::move(_generateCode);
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ private:
|
||||
size_t _params,
|
||||
size_t _returns,
|
||||
bool _movable,
|
||||
bool _literalArguments,
|
||||
std::function<void(FunctionCall const&, AbstractAssembly&, std::function<void()>)> _generateCode
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user