mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[Sol->Yul] Implementing dynamic array push for arrays of structs.
This commit is contained in:
committed by
chriseth
parent
b06936b11c
commit
85b8325f0b
@@ -212,8 +212,10 @@ public:
|
||||
std::string storageArrayPopFunction(ArrayType const& _type);
|
||||
|
||||
/// @returns the name of a function that pushes an element to a storage array
|
||||
/// @param _fromType represents the type of the element being pushed.
|
||||
/// If _fromType is ReferenceType the function will perform deep copy.
|
||||
/// signature: (array, value)
|
||||
std::string storageArrayPushFunction(ArrayType const& _type);
|
||||
std::string storageArrayPushFunction(ArrayType const& _type, TypePointer _fromType = nullptr);
|
||||
|
||||
/// @returns the name of a function that pushes the base type's zero element to a storage array and returns storage slot and offset of the added element.
|
||||
/// signature: (array) -> slot, offset
|
||||
@@ -483,7 +485,7 @@ public:
|
||||
std::string externalCodeFunction();
|
||||
|
||||
private:
|
||||
/// @returns function that copies struct to storage
|
||||
/// @returns the name of a function that copies a struct from calldata or memory to storage
|
||||
/// signature: (slot, value) ->
|
||||
std::string copyStructToStorageFunction(StructType const& _from, StructType const& _to);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user