added error jump instead of STOP instraction in case of exception

This commit is contained in:
Liana Husikyan
2015-06-01 13:06:12 +02:00
parent f7e3568c62
commit 2f50eb0028
4 changed files with 10 additions and 10 deletions
+4 -3
View File
@@ -1102,9 +1102,10 @@ void ExpressionCompiler::appendExternalFunctionCall(
)
m_context << eth::Instruction::CALLCODE;
else
m_context << eth::Instruction::CALL;
auto tag = m_context.appendConditionalJump();
m_context << eth::Instruction::STOP << tag; // STOP if CALL leaves 0.
{
m_context << eth::Instruction::CALL << eth::Instruction::ISZERO;
auto tag = m_context.appendConditionalJumpTo(m_context.errorTag());// if CALL leaves 0.
}
if (_functionType.valueSet())
m_context << eth::Instruction::POP;
if (_functionType.gasSet())