aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-05-28 20:48:37 +0800
committerLiana Husikyan <liana@ethdev.com>2015-06-01 19:06:12 +0800
commitccb194fd39781c7b1083615eb21c9d9cc80d4d54 (patch)
treecdb33017bd3cb7645ba71a24f628967be52a8a85 /ExpressionCompiler.cpp
parente72a014cf44d086f3cb12bf1f4e2cfa02d781d38 (diff)
downloaddexon-solidity-ccb194fd39781c7b1083615eb21c9d9cc80d4d54.tar.gz
dexon-solidity-ccb194fd39781c7b1083615eb21c9d9cc80d4d54.tar.zst
dexon-solidity-ccb194fd39781c7b1083615eb21c9d9cc80d4d54.zip
removed exception when function is not found
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r--ExpressionCompiler.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index e8ac8ff8..d618c631 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -534,8 +534,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
true,
true
),
- {},
- true
+ {}
);
break;
case Location::Suicide:
@@ -1035,8 +1034,8 @@ void ExpressionCompiler::appendHighBitsCleanup(IntegerType const& _typeOnStack)
void ExpressionCompiler::appendExternalFunctionCall(
FunctionType const& _functionType,
- vector<ASTPointer<Expression const>> const& _arguments,
- bool isSend)
+ vector<ASTPointer<Expression const>> const& _arguments
+ )
{
solAssert(_functionType.takesArbitraryParameters() ||
_arguments.size() == _functionType.getParameterTypes().size(), "");
@@ -1106,15 +1105,8 @@ void ExpressionCompiler::appendExternalFunctionCall(
m_context << eth::Instruction::CALL;
//Propagate error condition (if CALL pushes 0 on stack).
- if (!isSend)
- {
- m_context << eth::Instruction::ISZERO;
- m_context.appendConditionalJumpTo(m_context.errorTag());
- } else
- {
- auto tag = m_context.appendConditionalJump();
- m_context << eth::Instruction::STOP << tag;
- }
+ auto tag = m_context.appendConditionalJump();
+ m_context << eth::Instruction::STOP << tag; // STOP if CALL leaves 0.// }
if (_functionType.valueSet())
m_context << eth::Instruction::POP;