Support revert()

This commit is contained in:
Alex Beregszaszi committed 2017-02-10 22:40:42 +00:00
1 parent 148f923351
commit f3158f92d6
4 files changed
+10 -1

No files matched your search

@@ -650,6 +650,11 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
utils().convertType(*arguments.front()->annotation().type, *function.parameterTypes().front(), true);
m_context << Instruction::SELFDESTRUCT;
break;
case Location::Revert:
// memory offset returned - zero length
m_context << u256(0) << u256(0);
m_context << Instruction::REVERT;
break;
case Location::SHA3:
{
TypePointers argumentTypes;