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:
@@ -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.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user