diff options
author | chriseth <c@ethdev.com> | 2016-10-31 23:40:30 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-10-31 23:40:30 +0800 |
commit | 9920e88eead1b874f7168d7cbc6b63d79c035834 (patch) | |
tree | cca3352862532b2ae4fbfff7a8caab9d03ab8eef /libsolidity/codegen | |
parent | 681b130dc81fa591be7c4b08200146912b12ffb9 (diff) | |
download | dexon-solidity-9920e88eead1b874f7168d7cbc6b63d79c035834.tar dexon-solidity-9920e88eead1b874f7168d7cbc6b63d79c035834.tar.gz dexon-solidity-9920e88eead1b874f7168d7cbc6b63d79c035834.tar.bz2 dexon-solidity-9920e88eead1b874f7168d7cbc6b63d79c035834.tar.lz dexon-solidity-9920e88eead1b874f7168d7cbc6b63d79c035834.tar.xz dexon-solidity-9920e88eead1b874f7168d7cbc6b63d79c035834.tar.zst dexon-solidity-9920e88eead1b874f7168d7cbc6b63d79c035834.zip |
Clear all value types prior to storing.
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r-- | libsolidity/codegen/LValue.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libsolidity/codegen/LValue.cpp b/libsolidity/codegen/LValue.cpp index 553e5518..c1e05792 100644 --- a/libsolidity/codegen/LValue.cpp +++ b/libsolidity/codegen/LValue.cpp @@ -231,10 +231,7 @@ void StorageItem::storeValue(Type const& _sourceType, SourceLocation const& _loc m_context << (u256(0x1) << (256 - 8 * dynamic_cast<FixedBytesType const&>(*m_dataType).numBytes())) << Instruction::SWAP1 << Instruction::DIV; - else if ( - m_dataType->category() == Type::Category::Integer && - dynamic_cast<IntegerType const&>(*m_dataType).isSigned() - ) + else // remove the higher order bits m_context << (u256(1) << (8 * (32 - m_dataType->storageBytes()))) @@ -242,9 +239,6 @@ void StorageItem::storeValue(Type const& _sourceType, SourceLocation const& _loc << Instruction::DUP2 << Instruction::MUL << Instruction::DIV; - else if (m_dataType->category() == Type::Category::FixedPoint) - // implementation should be very similar to the integer case. - solAssert(false, "Not yet implemented - FixedPointType."); m_context << Instruction::MUL << Instruction::OR; // stack: value storage_ref updated_value m_context << Instruction::SWAP1 << Instruction::SSTORE; |