mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[yul] Ensures DataFlowAnalyzer works fine with break/continue statements just like without.
This commit is contained in:
@@ -117,6 +117,9 @@ void DataFlowAnalyzer::operator()(ForLoop& _for)
|
||||
for (auto& statement: _for.pre.statements)
|
||||
visit(statement);
|
||||
|
||||
AssignmentsSinceContinue assignmentsSinceCont;
|
||||
assignmentsSinceCont(_for.body);
|
||||
|
||||
Assignments assignments;
|
||||
assignments(_for.body);
|
||||
assignments(_for.post);
|
||||
@@ -124,22 +127,13 @@ void DataFlowAnalyzer::operator()(ForLoop& _for)
|
||||
|
||||
visit(*_for.condition);
|
||||
(*this)(_for.body);
|
||||
clearValues(assignmentsSinceCont.names());
|
||||
(*this)(_for.post);
|
||||
|
||||
clearValues(assignments.names());
|
||||
|
||||
popScope();
|
||||
}
|
||||
|
||||
void DataFlowAnalyzer::operator()(Break&)
|
||||
{
|
||||
yulAssert(false, "Not implemented yet.");
|
||||
}
|
||||
|
||||
void DataFlowAnalyzer::operator()(Continue&)
|
||||
{
|
||||
yulAssert(false, "Not implemented yet.");
|
||||
}
|
||||
|
||||
void DataFlowAnalyzer::operator()(Block& _block)
|
||||
{
|
||||
size_t numScopes = m_variableScopes.size();
|
||||
|
||||
Reference in New Issue
Block a user