Merge remote-tracking branch 'origin/develop' into merge_develop_060

This commit is contained in:
Leonardo Alt
2019-11-20 12:27:40 +01:00
104 changed files with 621 additions and 653 deletions
+11 -9
View File
@@ -21,7 +21,9 @@
#include <libyul/backends/evm/EVMDialect.h>
#include <liblangutil/ErrorReporter.h>
#include <libevmasm/SemanticInformation.h>
#include <functional>
#include <variant>
using namespace std;
using namespace dev;
@@ -31,7 +33,7 @@ using namespace dev::solidity;
namespace
{
class AssemblyViewPureChecker: public boost::static_visitor<void>
class AssemblyViewPureChecker
{
public:
explicit AssemblyViewPureChecker(
@@ -49,16 +51,16 @@ public:
void operator()(yul::Identifier const&) {}
void operator()(yul::ExpressionStatement const& _expr)
{
boost::apply_visitor(*this, _expr.expression);
std::visit(*this, _expr.expression);
}
void operator()(yul::Assignment const& _assignment)
{
boost::apply_visitor(*this, *_assignment.value);
std::visit(*this, *_assignment.value);
}
void operator()(yul::VariableDeclaration const& _varDecl)
{
if (_varDecl.value)
boost::apply_visitor(*this, *_varDecl.value);
std::visit(*this, *_varDecl.value);
}
void operator()(yul::FunctionDefinition const& _funDef)
{
@@ -72,16 +74,16 @@ public:
checkInstruction(_funCall.location, *fun->instruction);
for (auto const& arg: _funCall.arguments)
boost::apply_visitor(*this, arg);
std::visit(*this, arg);
}
void operator()(yul::If const& _if)
{
boost::apply_visitor(*this, *_if.condition);
std::visit(*this, *_if.condition);
(*this)(_if.body);
}
void operator()(yul::Switch const& _switch)
{
boost::apply_visitor(*this, *_switch.expression);
std::visit(*this, *_switch.expression);
for (auto const& _case: _switch.cases)
{
if (_case.value)
@@ -92,7 +94,7 @@ public:
void operator()(yul::ForLoop const& _for)
{
(*this)(_for.pre);
boost::apply_visitor(*this, *_for.condition);
std::visit(*this, *_for.condition);
(*this)(_for.body);
(*this)(_for.post);
}
@@ -108,7 +110,7 @@ public:
void operator()(yul::Block const& _block)
{
for (auto const& s: _block.statements)
boost::apply_visitor(*this, s);
std::visit(*this, s);
}
private: