Implement calldata arrays for Yul IR

This commit is contained in:
Daniel Kirchner
2020-02-12 14:00:29 +01:00
parent b580a7a35d
commit df0873d138
7 changed files with 178 additions and 7 deletions
+6 -1
View File
@@ -172,9 +172,14 @@ public:
/// @returns the name of a function that returns the calldata address for the
/// given array base ref and index.
/// signature: (baseRef, index) -> address
/// signature: (baseRef, index) -> offset[, length]
std::string calldataArrayIndexAccessFunction(ArrayType const& _type);
/// @returns the name of a function that follows a calldata tail while performing
/// bounds checks.
/// signature: (baseRef, tailPointer) -> offset[, length]
std::string accessCalldataTailFunction(Type const& _type);
/// @returns the name of a function that advances an array data pointer to the next element.
/// Only works for memory arrays, calldata arrays and storage arrays that every item occupies one or multiple full slots.
std::string nextArrayElementFunction(ArrayType const& _type);