|
@ -534,7 +534,8 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall) |
|
|
true, |
|
|
true, |
|
|
true |
|
|
true |
|
|
), |
|
|
), |
|
|
{} |
|
|
{}, |
|
|
|
|
|
true |
|
|
); |
|
|
); |
|
|
break; |
|
|
break; |
|
|
case Location::Suicide: |
|
|
case Location::Suicide: |
|
@ -1034,8 +1035,8 @@ void ExpressionCompiler::appendHighBitsCleanup(IntegerType const& _typeOnStack) |
|
|
|
|
|
|
|
|
void ExpressionCompiler::appendExternalFunctionCall( |
|
|
void ExpressionCompiler::appendExternalFunctionCall( |
|
|
FunctionType const& _functionType, |
|
|
FunctionType const& _functionType, |
|
|
vector<ASTPointer<Expression const>> const& _arguments |
|
|
vector<ASTPointer<Expression const>> const& _arguments, |
|
|
) |
|
|
bool isSend) |
|
|
{ |
|
|
{ |
|
|
solAssert(_functionType.takesArbitraryParameters() || |
|
|
solAssert(_functionType.takesArbitraryParameters() || |
|
|
_arguments.size() == _functionType.getParameterTypes().size(), ""); |
|
|
_arguments.size() == _functionType.getParameterTypes().size(), ""); |
|
@ -1105,8 +1106,15 @@ void ExpressionCompiler::appendExternalFunctionCall( |
|
|
m_context << eth::Instruction::CALL; |
|
|
m_context << eth::Instruction::CALL; |
|
|
|
|
|
|
|
|
//Propagate error condition (if CALL pushes 0 on stack).
|
|
|
//Propagate error condition (if CALL pushes 0 on stack).
|
|
|
m_context << eth::Instruction::ISZERO; |
|
|
if (!isSend) |
|
|
m_context.appendConditionalJumpTo(m_context.errorTag()); |
|
|
{ |
|
|
|
|
|
m_context << eth::Instruction::ISZERO; |
|
|
|
|
|
m_context.appendConditionalJumpTo(m_context.errorTag()); |
|
|
|
|
|
} else |
|
|
|
|
|
{ |
|
|
|
|
|
auto tag = m_context.appendConditionalJump(); |
|
|
|
|
|
m_context << eth::Instruction::STOP << tag; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (_functionType.valueSet()) |
|
|
if (_functionType.valueSet()) |
|
|
m_context << eth::Instruction::POP; |
|
|
m_context << eth::Instruction::POP; |
|
|