aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerUtils.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/CompilerUtils.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/CompilerUtils.cpp')
-rw-r--r--libsolidity/codegen/CompilerUtils.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp
index 8589900e..e35f3374 100644
--- a/libsolidity/codegen/CompilerUtils.cpp
+++ b/libsolidity/codegen/CompilerUtils.cpp
@@ -343,10 +343,11 @@ void CompilerUtils::convertType(Type const& _typeOnStack, Type const& _targetTyp
case Type::Category::Enum:
solAssert(targetTypeCategory == Type::Category::Integer || targetTypeCategory == Type::Category::Enum, "");
break;
+ case Type::Category::FixedPoint:
+ solAssert(false, "Not yet implemented - FixedPointType.");
case Type::Category::Integer:
case Type::Category::Contract:
case Type::Category::RationalNumber:
- case Type::Category::FixedPoint:
if (targetTypeCategory == Type::Category::FixedBytes)
{
solAssert(stackTypeCategory == Type::Category::Integer || stackTypeCategory == Type::Category::RationalNumber,
@@ -375,8 +376,7 @@ void CompilerUtils::convertType(Type const& _typeOnStack, Type const& _targetTyp
if (auto typeOnStack = dynamic_cast<IntegerType const*>(&_typeOnStack))
if (targetFixedPointType.integerBits() > typeOnStack->numBits())
cleanHigherOrderBits(*typeOnStack);
- //need m_context call here
-
+ solAssert(false, "Not yet implemented - FixedPointType.");
}
else
{
@@ -389,6 +389,7 @@ void CompilerUtils::convertType(Type const& _typeOnStack, Type const& _targetTyp
RationalNumberType const& constType = dynamic_cast<RationalNumberType const&>(_typeOnStack);
// We know that the stack is clean, we only have to clean for a narrowing conversion
// where cleanup is forced.
+ solAssert(!constType.isFractional(), "Not yet implemented - FixedPointType.");
if (targetType.numBits() < constType.integerType()->numBits() && _cleanupNeeded)
cleanHigherOrderBits(targetType);
}