diff options
author | chriseth <chris@ethereum.org> | 2016-11-01 01:35:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-01 01:35:02 +0800 |
commit | 1d3460c4e26d9ae2f91bb92276a975dfe45b62ea (patch) | |
tree | 5a9228a84df7723a13d27343afadd5f45b0010a0 /libsolidity | |
parent | e85390cc60cb8305b9cda9241d90017dd460dd73 (diff) | |
parent | 1427c82c77ecfb1bfba7490ad656dc2ed414873c (diff) | |
download | dexon-solidity-1d3460c4e26d9ae2f91bb92276a975dfe45b62ea.tar dexon-solidity-1d3460c4e26d9ae2f91bb92276a975dfe45b62ea.tar.gz dexon-solidity-1d3460c4e26d9ae2f91bb92276a975dfe45b62ea.tar.bz2 dexon-solidity-1d3460c4e26d9ae2f91bb92276a975dfe45b62ea.tar.lz dexon-solidity-1d3460c4e26d9ae2f91bb92276a975dfe45b62ea.tar.xz dexon-solidity-1d3460c4e26d9ae2f91bb92276a975dfe45b62ea.tar.zst dexon-solidity-1d3460c4e26d9ae2f91bb92276a975dfe45b62ea.zip |
Merge pull request #1307 from ethereum/fixclean
Fix cleanup of higher order bytes prior to store.
Diffstat (limited to 'libsolidity')
-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; |