Update Dockerfiles and CI scripts to Ubuntu 20.04 and simplify them.

This commit is contained in:
Daniel Kirchner
2020-05-11 17:35:01 +02:00
parent debee799dc
commit c1ed5bbb0f
12 changed files with 121 additions and 207 deletions
+1 -1
View File
@@ -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 \"" +
+5 -5
View File
@@ -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));
});
+1 -1
View File
@@ -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)