mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adds syntax tests, documentation and changelog entry.
Refines comment for array utility function.
This commit is contained in:
1 parent
34b5eca1f8
commit
98d52beba3
33 files changed
+61
-3
No files matched your search
@@ -840,7 +840,7 @@ void ArrayUtils::popStorageArrayElement(ArrayType const& _type) const
|
||||
let length := and(div(slot_value, 2), 0x1f)
|
||||
if iszero(length) { invalid() }
|
||||
|
||||
// Zero-out the suffix inlcluding the least significant byte.
|
||||
// Zero-out the suffix including the least significant byte.
|
||||
let mask := sub(exp(0x100, sub(33, length)), 1)
|
||||
length := sub(length, 1)
|
||||
slot_value := or(and(not(mask), slot_value), mul(length, 2))
|
||||
|
||||
@@ -73,7 +73,7 @@ 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.
|
||||
/// 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:
|
||||
|
||||
Reference in new issue
Block a user