Superspeed.

This commit is contained in:
chriseth 2020-11-26 17:38:01 +01:00
parent 3e5396598b
commit 111eaa1e9b

View File

@ -103,9 +103,9 @@ void CommonSubexpressionEliminator::visit(Expression& _e)
for (auto const& [variable, value]: m_value)
{
assertThrow(value.value, OptimizerException, "");
assertThrow(inScope(variable), OptimizerException, "");
if (SyntacticallyEqual{}(_e, *value.value))
{
assertThrow(inScope(variable), OptimizerException, "");
_e = Identifier{locationOf(_e), variable};
break;
}