aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/ArrayUtils.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-05-31 00:32:08 +0800
committerGitHub <noreply@github.com>2018-05-31 00:32:08 +0800
commit5a73044fa77c0572a3a5375b0c557313e8c600a7 (patch)
treeb73bfd0559cc70eea3aa022a375bfe273e68445d /libsolidity/codegen/ArrayUtils.h
parenta77531d245d24d82e11858fb99ebfc9ec53b5d38 (diff)
parentfea0d116f7d95e9a39f0c80c5156cb3656b03ce0 (diff)
downloaddexon-solidity-5a73044fa77c0572a3a5375b0c557313e8c600a7.tar
dexon-solidity-5a73044fa77c0572a3a5375b0c557313e8c600a7.tar.gz
dexon-solidity-5a73044fa77c0572a3a5375b0c557313e8c600a7.tar.bz2
dexon-solidity-5a73044fa77c0572a3a5375b0c557313e8c600a7.tar.lz
dexon-solidity-5a73044fa77c0572a3a5375b0c557313e8c600a7.tar.xz
dexon-solidity-5a73044fa77c0572a3a5375b0c557313e8c600a7.tar.zst
dexon-solidity-5a73044fa77c0572a3a5375b0c557313e8c600a7.zip
Merge pull request #3743 from ethereum/popStorageArray
pop() for storage arrays
Diffstat (limited to 'libsolidity/codegen/ArrayUtils.h')
-rw-r--r--libsolidity/codegen/ArrayUtils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libsolidity/codegen/ArrayUtils.h b/libsolidity/codegen/ArrayUtils.h
index 99786397..daf50bf5 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. Causes an invalid instruction 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