aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen
diff options
context:
space:
mode:
authorErik Kundt <bitshift@posteo.org>2018-05-16 23:18:30 +0800
committerErik Kundt <bitshift@posteo.org>2018-05-30 23:43:20 +0800
commit98d52beba3f989b3a5eeaba2d257de8de5df60a7 (patch)
tree32b6d25005a1e6585fac536a7d58660aadd6cc5c /libsolidity/codegen
parent34b5eca1f8d9a8f04db20139601c6e944532f4e4 (diff)
downloaddexon-solidity-98d52beba3f989b3a5eeaba2d257de8de5df60a7.tar.gz
dexon-solidity-98d52beba3f989b3a5eeaba2d257de8de5df60a7.tar.zst
dexon-solidity-98d52beba3f989b3a5eeaba2d257de8de5df60a7.zip
Adds syntax tests, documentation and changelog entry.
Refines comment for array utility function.
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r--libsolidity/codegen/ArrayUtils.cpp2
-rw-r--r--libsolidity/codegen/ArrayUtils.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libsolidity/codegen/ArrayUtils.cpp b/libsolidity/codegen/ArrayUtils.cpp
index d78e64a9..6bb9a961 100644
--- a/libsolidity/codegen/ArrayUtils.cpp
+++ b/libsolidity/codegen/ArrayUtils.cpp
@@ -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))
diff --git a/libsolidity/codegen/ArrayUtils.h b/libsolidity/codegen/ArrayUtils.h
index 84d591d7..daf50bf5 100644
--- a/libsolidity/codegen/ArrayUtils.h
+++ b/libsolidity/codegen/ArrayUtils.h
@@ -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: