mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update Dockerfiles and CI scripts to Ubuntu 20.04 and simplify them.
This commit is contained in:
@@ -527,7 +527,7 @@ bool AsmAnalyzer::warnOnInstructions(evmasm::Instruction _instr, SourceLocation
|
||||
// Similarly we assume bitwise shifting and create2 go together.
|
||||
yulAssert(m_evmVersion.hasBitwiseShifting() == m_evmVersion.hasCreate2(), "");
|
||||
|
||||
auto errorForVM = [=](string const& vmKindMessage) {
|
||||
auto errorForVM = [&](string const& vmKindMessage) {
|
||||
typeError(
|
||||
_location,
|
||||
"The \"" +
|
||||
|
||||
@@ -85,11 +85,11 @@ void VariableReferenceCounter::operator()(Block const& _block)
|
||||
void VariableReferenceCounter::increaseRefIfFound(YulString _variableName)
|
||||
{
|
||||
m_scope->lookup(_variableName, GenericVisitor{
|
||||
[=](Scope::Variable const& _var)
|
||||
[&](Scope::Variable const& _var)
|
||||
{
|
||||
++m_context.variableReferences[&_var];
|
||||
},
|
||||
[=](Scope::Function const&) { }
|
||||
[](Scope::Function const&) { }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ void CodeTransform::operator()(FunctionCall const& _call)
|
||||
|
||||
Scope::Function* function = nullptr;
|
||||
yulAssert(m_scope->lookup(_call.functionName.name, GenericVisitor{
|
||||
[=](Scope::Variable&) { yulAssert(false, "Expected function name."); },
|
||||
[](Scope::Variable&) { yulAssert(false, "Expected function name."); },
|
||||
[&](Scope::Function& _function) { function = &_function; }
|
||||
}), "Function name not found.");
|
||||
yulAssert(function, "");
|
||||
@@ -296,7 +296,7 @@ void CodeTransform::operator()(Identifier const& _identifier)
|
||||
// First search internals, then externals.
|
||||
yulAssert(m_scope, "");
|
||||
if (m_scope->lookup(_identifier.name, GenericVisitor{
|
||||
[=](Scope::Variable& _var)
|
||||
[&](Scope::Variable& _var)
|
||||
{
|
||||
// TODO: opportunity for optimization: Do not DUP if this is the last reference
|
||||
// to the top most element of the stack
|
||||
@@ -307,7 +307,7 @@ void CodeTransform::operator()(Identifier const& _identifier)
|
||||
m_assembly.appendConstant(u256(0));
|
||||
decreaseReference(_identifier.name, _var);
|
||||
},
|
||||
[=](Scope::Function&)
|
||||
[](Scope::Function&)
|
||||
{
|
||||
yulAssert(false, "Function not removed during desugaring.");
|
||||
}
|
||||
|
||||
@@ -1232,7 +1232,7 @@ Object EVMToEwasmTranslator::run(Object const& _object)
|
||||
|
||||
FunctionHoister::run(context, ast);
|
||||
FunctionGrouper::run(context, ast);
|
||||
MainFunction{}(ast);
|
||||
MainFunction::run(context, ast);
|
||||
ForLoopConditionIntoBody::run(context, ast);
|
||||
ExpressionSplitter::run(context, ast);
|
||||
WordSizeTransform::run(m_dialect, WasmDialect::instance(), ast, nameDispenser);
|
||||
|
||||
@@ -306,7 +306,7 @@ void RedundantAssignEliminator::finalize(YulString _variable, RedundantAssignEli
|
||||
|
||||
void AssignmentRemover::operator()(Block& _block)
|
||||
{
|
||||
boost::range::remove_erase_if(_block.statements, [=](Statement const& _statement) -> bool {
|
||||
boost::range::remove_erase_if(_block.statements, [&](Statement const& _statement) -> bool {
|
||||
return holds_alternative<Assignment>(_statement) && m_toRemove.count(&std::get<Assignment>(_statement));
|
||||
});
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ void UnusedPruner::operator()(Block& _block)
|
||||
if (std::none_of(
|
||||
varDecl.variables.begin(),
|
||||
varDecl.variables.end(),
|
||||
[=](TypedName const& _typedName) { return used(_typedName.name); }
|
||||
[&](TypedName const& _typedName) { return used(_typedName.name); }
|
||||
))
|
||||
{
|
||||
if (!varDecl.value)
|
||||
|
||||
Reference in New Issue
Block a user