mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[Sol->Yul] Implementing read from storage for array types.
This commit is contained in:
@@ -2203,6 +2203,11 @@ string YulUtilFunctions::readFromStorageValueType(Type const& _type, optional<si
|
||||
|
||||
string YulUtilFunctions::readFromStorageReferenceType(Type const& _type)
|
||||
{
|
||||
if (auto const* arrayType = dynamic_cast<ArrayType const*>(&_type))
|
||||
return copyArrayFromStorageToMemoryFunction(
|
||||
dynamic_cast<ArrayType const&>(*arrayType->copyForLocation(DataLocation::Storage, false)),
|
||||
*arrayType
|
||||
);
|
||||
solUnimplementedAssert(_type.category() == Type::Category::Struct, "");
|
||||
|
||||
string functionName = "read_from_storage_reference_type_" + _type.identifier();
|
||||
|
||||
Reference in New Issue
Block a user