diff options
author | Liana Husikyan <liana@ethdev.com> | 2015-05-15 18:23:13 +0800 |
---|---|---|
committer | Liana Husikyan <liana@ethdev.com> | 2015-06-01 19:06:12 +0800 |
commit | 2f50eb0028c7f7525ff35a60db7a18e09eee42e6 (patch) | |
tree | 67722e7b7f2960db1a7e8716a0eb0ab6fe13b88f /ExpressionCompiler.cpp | |
parent | f7e3568c6202b940394097f147e0c4e6ffe7fe9c (diff) | |
download | dexon-solidity-2f50eb0028c7f7525ff35a60db7a18e09eee42e6.tar.gz dexon-solidity-2f50eb0028c7f7525ff35a60db7a18e09eee42e6.tar.zst dexon-solidity-2f50eb0028c7f7525ff35a60db7a18e09eee42e6.zip |
added error jump instead of STOP instraction in case of exception
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r-- | ExpressionCompiler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp index 2e513b7f..a9f0ba3e 100644 --- a/ExpressionCompiler.cpp +++ b/ExpressionCompiler.cpp @@ -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()) |