From 5216a9bc678597c0076b2e8615cac43c9077a95e Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 31 Mar 2015 14:59:38 +0200 Subject: Some cleanup concerning byte arrays. --- LValue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'LValue.cpp') 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(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) -- cgit