diff options
author | chriseth <c@ethdev.com> | 2015-06-27 00:35:43 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-06-27 03:28:02 +0800 |
commit | ca497f5d10b49e5faa348a9285d8d87784072477 (patch) | |
tree | 4de7a01b52c9d88da4a733cb806639bce3c982a6 /LValue.cpp | |
parent | 109b4eafb9d543abb13ed24055bd71d4f67cb9ec (diff) | |
download | dexon-solidity-ca497f5d10b49e5faa348a9285d8d87784072477.tar dexon-solidity-ca497f5d10b49e5faa348a9285d8d87784072477.tar.gz dexon-solidity-ca497f5d10b49e5faa348a9285d8d87784072477.tar.bz2 dexon-solidity-ca497f5d10b49e5faa348a9285d8d87784072477.tar.lz dexon-solidity-ca497f5d10b49e5faa348a9285d8d87784072477.tar.xz dexon-solidity-ca497f5d10b49e5faa348a9285d8d87784072477.tar.zst dexon-solidity-ca497f5d10b49e5faa348a9285d8d87784072477.zip |
Delete for memory objects.
Diffstat (limited to 'LValue.cpp')
-rw-r--r-- | LValue.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -69,17 +69,8 @@ void StackVariable::storeValue(Type const&, SourceLocation const& _location, boo void StackVariable::setToZero(SourceLocation const& _location, bool) const { - unsigned stackDiff = m_context.baseToCurrentStackOffset(m_baseStackOffset); - if (stackDiff > 16) - BOOST_THROW_EXCEPTION( - CompilerError() << - errinfo_sourceLocation(_location) << - errinfo_comment("Stack too deep, try removing local variables.") - ); - solAssert(stackDiff >= m_size - 1, ""); - for (unsigned i = 0; i < m_size; ++i) - m_context << u256(0) << eth::swapInstruction(stackDiff + 1 - i) - << eth::Instruction::POP; + CompilerUtils(m_context).pushZeroValue(m_dataType); + storeValue(m_dataType, _location, true); } MemoryItem::MemoryItem(CompilerContext& _compilerContext, Type const& _type, bool _padded): |