aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/LValue.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-05-10 20:57:29 +0800
committerVoR0220 <catalanor0220@gmail.com>2016-05-11 05:03:33 +0800
commitd4206b7cd0bb0b8a3364c29fe097db035f308388 (patch)
tree267d5df3091710f7a1c3b54ddb8fcac5ab794015 /libsolidity/codegen/LValue.cpp
parent656405240e08e47fce40a2f62af93abc758bd2d2 (diff)
downloaddexon-solidity-d4206b7cd0bb0b8a3364c29fe097db035f308388.tar.gz
dexon-solidity-d4206b7cd0bb0b8a3364c29fe097db035f308388.tar.zst
dexon-solidity-d4206b7cd0bb0b8a3364c29fe097db035f308388.zip
Remove unused tests and add asserts for not implemented parts in code generation.
quick fix on christian's rational change so that ubuntu will stop yelling be more specific with rational declaration for Windows sake rational in namespace correction for windows
Diffstat (limited to 'libsolidity/codegen/LValue.cpp')
-rw-r--r--libsolidity/codegen/LValue.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/libsolidity/codegen/LValue.cpp b/libsolidity/codegen/LValue.cpp
index 1d1956aa..ea8bc1ba 100644
--- a/libsolidity/codegen/LValue.cpp
+++ b/libsolidity/codegen/LValue.cpp
@@ -179,6 +179,9 @@ void StorageItem::retrieveValue(SourceLocation const&, bool _remove) const
m_context
<< Instruction::SWAP1 << Instruction::SLOAD << Instruction::SWAP1
<< u256(0x100) << Instruction::EXP << Instruction::SWAP1 << Instruction::DIV;
+ if (m_dataType->category() == Type::Category::FixedPoint)
+ // implementation should be very similar to the integer case.
+ solAssert(false, "Not yet implemented - FixedPointType.");
if (m_dataType->category() == Type::Category::FixedBytes)
m_context << (u256(0x1) << (256 - 8 * m_dataType->storageBytes())) << Instruction::MUL;
else if (
@@ -186,7 +189,6 @@ void StorageItem::retrieveValue(SourceLocation const&, bool _remove) const
dynamic_cast<IntegerType const&>(*m_dataType).isSigned()
)
m_context << u256(m_dataType->storageBytes() - 1) << Instruction::SIGNEXTEND;
- //need something here for Fixed...guidance would be nice
else
m_context << ((u256(0x1) << (8 * m_dataType->storageBytes())) - 1) << Instruction::AND;
}
@@ -240,9 +242,10 @@ 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;
- //else if (m_dataType->category() == Type::Category::Fixed)
- //trying to figure out what this does...going to require some more assistance
// stack: value storage_ref updated_value
m_context << Instruction::SWAP1 << Instruction::SSTORE;
if (_move)