mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Make the dialect available everywhere.
This commit is contained in:
@@ -150,9 +150,9 @@ void RedundantAssignEliminator::operator()(Block const& _block)
|
||||
ASTWalker::operator()(_block);
|
||||
}
|
||||
|
||||
void RedundantAssignEliminator::run(Block& _ast)
|
||||
void RedundantAssignEliminator::run(Dialect const& _dialect, Block& _ast)
|
||||
{
|
||||
RedundantAssignEliminator rae;
|
||||
RedundantAssignEliminator rae{_dialect};
|
||||
rae(_ast);
|
||||
|
||||
AssignmentRemover remover{rae.m_assignmentsToRemove};
|
||||
@@ -211,7 +211,7 @@ void RedundantAssignEliminator::finalize(YulString _variable)
|
||||
for (auto& assignment: m_assignments[_variable])
|
||||
{
|
||||
assertThrow(assignment.second != State::Undecided, OptimizerException, "");
|
||||
if (assignment.second == State{State::Unused} && MovableChecker{*assignment.first->value}.movable())
|
||||
if (assignment.second == State{State::Unused} && MovableChecker{*m_dialect, *assignment.first->value}.movable())
|
||||
// TODO the only point where we actually need this
|
||||
// to be a set is for the for loop
|
||||
m_assignmentsToRemove.insert(assignment.first);
|
||||
|
||||
Reference in New Issue
Block a user