aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerUtils.cpp
diff options
context:
space:
mode:
authorRhett Aultman <roadriverrail@gmail.com>2016-11-15 04:41:58 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-11-15 04:41:58 +0800
commit58e75c7a48f8166cca41e9017dad351113952ab5 (patch)
treeae7af869a4c5b1be6ee9272c01de855e0dbeb7c3 /libsolidity/codegen/CompilerUtils.cpp
parent3f74c3c2369e59cb480cafdb31eeab6c18011504 (diff)
downloaddexon-solidity-58e75c7a48f8166cca41e9017dad351113952ab5.tar.gz
dexon-solidity-58e75c7a48f8166cca41e9017dad351113952ab5.tar.zst
dexon-solidity-58e75c7a48f8166cca41e9017dad351113952ab5.zip
Unimplemented features moved to their own exception (#1361)
Unimplemented features moved to their own exception InternalCompilerError is an exception that really should be reserved for actual internal errors of the compiler. Unimplemented features can now use either solUnimplemented( ) or, if it should be conditional, then solUnimplementedAssert( ). * Revert some unimplemented exceptions, add handlers The jsonCompiler and CommandLineInterface needed handlers for the new UnimplementedFeatureException, and some cases I had moved on to the new exception were better treated as real internal compiler errors. * Standardize on "Unimplemented feature" message
Diffstat (limited to 'libsolidity/codegen/CompilerUtils.cpp')
-rw-r--r--libsolidity/codegen/CompilerUtils.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/codegen/CompilerUtils.cpp b/libsolidity/codegen/CompilerUtils.cpp
index db4aac34..58d1caa9 100644
--- a/libsolidity/codegen/CompilerUtils.cpp
+++ b/libsolidity/codegen/CompilerUtils.cpp
@@ -138,7 +138,7 @@ void CompilerUtils::storeInMemoryDynamic(Type const& _type, bool _padToWordBound
unsigned numBytes = prepareMemoryStore(_type, _padToWordBoundaries);
if (numBytes > 0)
{
- solAssert(
+ solUnimplementedAssert(
_type.sizeOnStack() == 1,
"Memory store of types with stack size != 1 not implemented."
);
@@ -161,7 +161,7 @@ void CompilerUtils::encodeToMemory(
solAssert(targetTypes.size() == _givenTypes.size(), "");
for (TypePointer& t: targetTypes)
{
- solAssert(
+ solUnimplementedAssert(
t->mobileType() &&
t->mobileType()->interfaceType(_encodeAsLibraryTypes) &&
t->mobileType()->interfaceType(_encodeAsLibraryTypes)->encodingType(),
@@ -361,7 +361,7 @@ void CompilerUtils::convertType(Type const& _typeOnStack, Type const& _targetTyp
}
break;
case Type::Category::FixedPoint:
- solAssert(false, "Not yet implemented - FixedPointType.");
+ solUnimplemented("Not yet implemented - FixedPointType.");
case Type::Category::Integer:
case Type::Category::Contract:
case Type::Category::RationalNumber:
@@ -401,7 +401,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);
- solAssert(false, "Not yet implemented - FixedPointType.");
+ solUnimplemented("Not yet implemented - FixedPointType.");
}
else
{
@@ -414,7 +414,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.");
+ solUnimplementedAssert(!constType.isFractional(), "Not yet implemented - FixedPointType.");
if (targetType.numBits() < constType.integerType()->numBits() && _cleanupNeeded)
cleanHigherOrderBits(targetType);
}