Refactoring yul source locations.

This commit is contained in:
Djordje Mijovic
2021-05-04 16:05:23 +02:00
parent fe4822a1d2
commit e404b6e7a6
62 changed files with 394 additions and 358 deletions
+4 -4
View File
@@ -101,15 +101,15 @@ void ExpressionSplitter::outlineExpression(Expression& _expr)
visit(_expr);
SourceLocation location = locationOf(_expr);
shared_ptr<DebugData const> debugData = debugDataOf(_expr);
YulString var = m_nameDispenser.newName({});
YulString type = m_typeInfo.typeOf(_expr);
m_statementsToPrefix.emplace_back(VariableDeclaration{
location,
{{TypedName{location, var, type}}},
debugData,
{{TypedName{debugData, var, type}}},
make_unique<Expression>(std::move(_expr))
});
_expr = Identifier{location, var};
_expr = Identifier{debugData, var};
m_typeInfo.setVariableType(var, type);
}