Merge pull request #13406 from ethereum/slot_on_reference_fix

Fix `.slot` accessing via mapping reference in assembly
This commit is contained in:
Damian Wechman
2022-09-05 14:00:18 +02:00
committed by GitHub
4 changed files with 40 additions and 2 deletions
+5
View File
@@ -3789,6 +3789,11 @@ TypeResult MappingType::interfaceType(bool _inLibrary) const
return this;
}
std::vector<std::tuple<std::string, Type const*>> MappingType::makeStackItems() const
{
return {std::make_tuple("slot", TypeProvider::uint256())};
}
string TypeType::richIdentifier() const
{
return "t_type" + identifierList(actualType());
+2
View File
@@ -1528,6 +1528,8 @@ public:
bool hasSimpleZeroValueInMemory() const override { solAssert(false, ""); }
bool nameable() const override { return true; }
std::vector<std::tuple<std::string, Type const*>> makeStackItems() const override;
Type const* keyType() const { return m_keyType; }
Type const* valueType() const { return m_valueType; }