Merge pull request #1975 from LianaHus/sol_EVMExceptions

"error jump" instead of STOP instraction in case of exception
This commit is contained in:
chriseth
2015-06-01 17:45:55 +02:00
5 changed files with 11 additions and 12 deletions
+5 -2
View File
@@ -1106,8 +1106,11 @@ 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.
//Propagate error condition (if CALL pushes 0 on stack).
m_context << eth::Instruction::ISZERO;
m_context.appendConditionalJumpTo(m_context.errorTag());
if (_functionType.valueSet())
m_context << eth::Instruction::POP;
if (_functionType.gasSet())