aboutsummaryrefslogtreecommitdiffstats
path: root/LValue.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-03-31 20:59:38 +0800
committerchriseth <c@ethdev.com>2015-04-16 00:06:41 +0800
commit5216a9bc678597c0076b2e8615cac43c9077a95e (patch)
treeec2ec1dc821bfb0348458eaadf1b4336d7d609ad /LValue.cpp
parente1b20fb3a10f629aff172399c6e6111c941f931d (diff)
downloaddexon-solidity-5216a9bc678597c0076b2e8615cac43c9077a95e.tar.gz
dexon-solidity-5216a9bc678597c0076b2e8615cac43c9077a95e.tar.zst
dexon-solidity-5216a9bc678597c0076b2e8615cac43c9077a95e.zip
Some cleanup concerning byte arrays.
Diffstat (limited to 'LValue.cpp')
-rw-r--r--LValue.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/LValue.cpp b/LValue.cpp
index 234072bc..02e6cbca 100644
--- a/LValue.cpp
+++ b/LValue.cpp
@@ -225,7 +225,8 @@ void StorageItem::setToZero(SourceLocation const&, bool _removeReference) const
else if (m_dataType.getCategory() == Type::Category::Struct)
{
// stack layout: storage_key storage_offset
- // @todo this can be improved for packed types
+ // @todo this can be improved: use StorageItem for non-value types, and just store 0 in
+ // all slots that contain value types later.
auto const& structType = dynamic_cast<StructType const&>(m_dataType);
for (auto const& member: structType.getMembers())
{
@@ -245,7 +246,6 @@ void StorageItem::setToZero(SourceLocation const&, bool _removeReference) const
else
{
solAssert(m_dataType.isValueType(), "Clearing of unsupported type requested: " + m_dataType.toString());
- // @todo actually use offset
if (!_removeReference)
CompilerUtils(m_context).copyToStackTop(sizeOnStack(), sizeOnStack());
if (m_dataType.getStorageBytes() == 32)