diff options
author | Christian <c@ethdev.com> | 2015-02-28 05:52:02 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-02-28 05:52:19 +0800 |
commit | 3074d08b44d4696e32d69db85d915dcf79df5e86 (patch) | |
tree | 94d9252f248acec2577dae117f0a66ed255214d9 /ArrayUtils.h | |
parent | 2ea8f3a75a9eaf6006052426168cb70ef5c6fa8d (diff) | |
download | dexon-solidity-3074d08b44d4696e32d69db85d915dcf79df5e86.tar dexon-solidity-3074d08b44d4696e32d69db85d915dcf79df5e86.tar.gz dexon-solidity-3074d08b44d4696e32d69db85d915dcf79df5e86.tar.bz2 dexon-solidity-3074d08b44d4696e32d69db85d915dcf79df5e86.tar.lz dexon-solidity-3074d08b44d4696e32d69db85d915dcf79df5e86.tar.xz dexon-solidity-3074d08b44d4696e32d69db85d915dcf79df5e86.tar.zst dexon-solidity-3074d08b44d4696e32d69db85d915dcf79df5e86.zip |
Array copy storage to storage.
Diffstat (limited to 'ArrayUtils.h')
-rw-r--r-- | ArrayUtils.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ArrayUtils.h b/ArrayUtils.h index f080dce6..73e88340 100644 --- a/ArrayUtils.h +++ b/ArrayUtils.h @@ -39,7 +39,8 @@ class ArrayUtils public: ArrayUtils(CompilerContext& _context): m_context(_context) {} - /// Copies an array to an array in storage. + /// Copies an array to an array in storage. The arrays can be of different types only if + /// their storage representation is the same. /// Stack pre: [source_reference] target_reference /// Stack post: target_reference void copyArrayToStorage(ArrayType const& _targetType, ArrayType const& _sourceType) const; @@ -63,6 +64,11 @@ public: /// Stack pre: length /// Stack post: size void convertLengthToSize(ArrayType const& _arrayType) const; + /// Retrieves the length (number of elements) of the array ref on the stack. This also + /// works for statically-sized arrays. + /// Stack pre: reference + /// Stack post: reference length + void retrieveLength(ArrayType const& _arrayType) const; private: CompilerContext& m_context; |