Merge remote-tracking branch 'origin/develop' into develop_060

This commit is contained in:
chriseth
2019-12-03 21:17:15 +01:00
31 changed files with 202 additions and 232 deletions
+5 -5
View File
@@ -870,8 +870,11 @@ void SMTEncoder::endVisit(IndexAccess const& _indexAccess)
{
createExpr(_indexAccess);
if (_indexAccess.annotation().type->category() == Type::Category::TypeType)
return;
shared_ptr<smt::SymbolicVariable> array;
if (auto const& id = dynamic_cast<Identifier const*>(&_indexAccess.baseExpression()))
if (auto const* id = dynamic_cast<Identifier const*>(&_indexAccess.baseExpression()))
{
auto varDecl = identifierToVariable(*id);
solAssert(varDecl, "");
@@ -886,7 +889,7 @@ void SMTEncoder::endVisit(IndexAccess const& _indexAccess)
return;
}
}
else if (auto const& innerAccess = dynamic_cast<IndexAccess const*>(&_indexAccess.baseExpression()))
else if (auto const* innerAccess = dynamic_cast<IndexAccess const*>(&_indexAccess.baseExpression()))
{
solAssert(m_context.knownExpression(*innerAccess), "");
array = m_context.expression(*innerAccess);
@@ -900,9 +903,6 @@ void SMTEncoder::endVisit(IndexAccess const& _indexAccess)
return;
}
if (_indexAccess.annotation().type->category() == Type::Category::TypeType)
return;
solAssert(array, "");
defineExpr(_indexAccess, smt::Expression::select(
array->currentValue(),
@@ -24,6 +24,7 @@
#include <libsolidity/ast/ASTJsonConverter.h>
#include <libyul/AssemblyStack.h>
#include <libyul/Exceptions.h>
#include <liblangutil/SourceReferenceFormatter.h>
#include <libevmasm/Instruction.h>
#include <libdevcore/JSON.h>
@@ -857,6 +858,16 @@ Json::Value StandardCompiler::compileSolidity(StandardCompiler::InputsAndSetting
"Unimplemented feature (" + _exception.lineInfo() + ")"
));
}
catch (yul::YulException const& _exception)
{
errors.append(formatErrorWithException(
_exception,
false,
"YulException",
"general",
"Yul exception"
));
}
catch (Exception const& _exception)
{
errors.append(formatError(