diff options
author | bitshift <bitshift@posteo.org> | 2018-03-10 00:46:24 +0800 |
---|---|---|
committer | Erik Kundt <bitshift@posteo.org> | 2018-05-29 18:53:02 +0800 |
commit | e9dcfb0b624e5443942451fc865c154a2c5a73d7 (patch) | |
tree | 0c898c43537109fb786a979a981150e79806229a /libsolidity/codegen/ArrayUtils.h | |
parent | 8f04c59046595216e9fffd93435055aa864fbd1f (diff) | |
download | dexon-solidity-e9dcfb0b624e5443942451fc865c154a2c5a73d7.tar dexon-solidity-e9dcfb0b624e5443942451fc865c154a2c5a73d7.tar.gz dexon-solidity-e9dcfb0b624e5443942451fc865c154a2c5a73d7.tar.bz2 dexon-solidity-e9dcfb0b624e5443942451fc865c154a2c5a73d7.tar.lz dexon-solidity-e9dcfb0b624e5443942451fc865c154a2c5a73d7.tar.xz dexon-solidity-e9dcfb0b624e5443942451fc865c154a2c5a73d7.tar.zst dexon-solidity-e9dcfb0b624e5443942451fc865c154a2c5a73d7.zip |
Implements pop() for value type arrays.
Diffstat (limited to 'libsolidity/codegen/ArrayUtils.h')
-rw-r--r-- | libsolidity/codegen/ArrayUtils.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libsolidity/codegen/ArrayUtils.h b/libsolidity/codegen/ArrayUtils.h index 99786397..84d591d7 100644 --- a/libsolidity/codegen/ArrayUtils.h +++ b/libsolidity/codegen/ArrayUtils.h @@ -73,6 +73,11 @@ public: /// Stack pre: reference (excludes byte offset) /// Stack post: new_length void incrementDynamicArraySize(ArrayType const& _type) const; + /// Decrements the size of a dynamic array by one if length is nonzero. Returns otherwise. + /// Clears the removed data element. In case of a byte array, this might move the data. + /// Stack pre: reference + /// Stack post: + void popStorageArrayElement(ArrayType const& _type) const; /// Appends a loop that clears a sequence of storage slots of the given type (excluding end). /// Stack pre: end_ref start_ref /// Stack post: end_ref |