aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-05-15 18:23:13 +0800
committerLiana Husikyan <liana@ethdev.com>2015-06-01 19:06:12 +0800
commit2f50eb0028c7f7525ff35a60db7a18e09eee42e6 (patch)
tree67722e7b7f2960db1a7e8716a0eb0ab6fe13b88f /ExpressionCompiler.cpp
parentf7e3568c6202b940394097f147e0c4e6ffe7fe9c (diff)
downloaddexon-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.cpp7
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())