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
+3 -3
View File
@@ -85,12 +85,12 @@ void LoadResolver::tryResolve(
{
if (auto value = util::valueOrNullptr(m_storage, key))
if (inScope(*value))
_e = Identifier{locationOf(_e), *value};
_e = Identifier{debugDataOf(_e), *value};
}
else if (!m_containsMSize && _location == StoreLoadLocation::Memory)
if (auto value = util::valueOrNullptr(m_memory, key))
if (inScope(*value))
_e = Identifier{locationOf(_e), *value};
_e = Identifier{debugDataOf(_e), *value};
}
void LoadResolver::tryEvaluateKeccak(
@@ -140,7 +140,7 @@ void LoadResolver::tryEvaluateKeccak(
bytes contentAsBytes = toBigEndian(*memoryContent);
contentAsBytes.resize(static_cast<size_t>(*byteLength));
_e = Literal{
locationOf(_e),
debugDataOf(_e),
LiteralKind::Number,
YulString{u256(keccak256(contentAsBytes)).str()},
m_dialect.defaultType