aboutsummaryrefslogtreecommitdiffstats
path: root/ArrayUtils.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-03-06 01:22:17 +0800
committerchriseth <c@ethdev.com>2015-03-06 20:17:52 +0800
commitd8b156ecbbb4d470ba3432975694585dd5a019e2 (patch)
treea5ffc773101dcba3b274acc5329c20f6a73aed6b /ArrayUtils.h
parent34e8de749aeecbca5f5dae817aa67f42907e9bf7 (diff)
downloaddexon-solidity-d8b156ecbbb4d470ba3432975694585dd5a019e2.tar
dexon-solidity-d8b156ecbbb4d470ba3432975694585dd5a019e2.tar.gz
dexon-solidity-d8b156ecbbb4d470ba3432975694585dd5a019e2.tar.bz2
dexon-solidity-d8b156ecbbb4d470ba3432975694585dd5a019e2.tar.lz
dexon-solidity-d8b156ecbbb4d470ba3432975694585dd5a019e2.tar.xz
dexon-solidity-d8b156ecbbb4d470ba3432975694585dd5a019e2.tar.zst
dexon-solidity-d8b156ecbbb4d470ba3432975694585dd5a019e2.zip
Copying between calldata and storage.
Diffstat (limited to 'ArrayUtils.h')
-rw-r--r--ArrayUtils.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/ArrayUtils.h b/ArrayUtils.h
index 73e88340..31cca817 100644
--- a/ArrayUtils.h
+++ b/ArrayUtils.h
@@ -60,10 +60,11 @@ public:
/// Stack pre: end_ref start_ref
/// Stack post: end_ref
void clearStorageLoop(Type const& _type) const;
- /// Converts length to size (multiplies by size on stack), rounds up for byte arrays.
+ /// Converts length to size (number of storage slots or calldata/memory bytes).
+ /// if @a _pad then add padding to multiples of 32 bytes for calldata/memory.
/// Stack pre: length
/// Stack post: size
- void convertLengthToSize(ArrayType const& _arrayType) const;
+ void convertLengthToSize(ArrayType const& _arrayType, bool _pad = false) const;
/// Retrieves the length (number of elements) of the array ref on the stack. This also
/// works for statically-sized arrays.
/// Stack pre: reference