Browse Source

fixed CALL case. added exception

cl-refactor
Liana Husikyan 10 years ago
parent
commit
32458c0808
  1. 4
      libsolidity/ExpressionCompiler.cpp
  2. 2
      test/libsolidity/solidityExecutionFramework.h

4
libsolidity/ExpressionCompiler.cpp

@ -1105,8 +1105,8 @@ void ExpressionCompiler::appendExternalFunctionCall(
m_context << eth::Instruction::CALL;
//Propagate error condition (if CALL pushes 0 on stack).
auto tag = m_context.appendConditionalJump();
m_context << eth::Instruction::STOP << tag; // STOP if CALL leaves 0.
m_context << eth::Instruction::ISZERO;
m_context.appendConditionalJumpTo(m_context.errorTag());
if (_functionType.valueSet())
m_context << eth::Instruction::POP;

2
test/libsolidity/solidityExecutionFramework.h

@ -40,7 +40,7 @@ namespace test
class ExecutionFramework
{
public:
ExecutionFramework() { g_logVerbosity = 0; }
ExecutionFramework() { g_logVerbosity = 0; }
bytes const& execute(std::string const& _sourceCode, u256 const& _value = 0, std::string const& _contractName = "")
{

Loading…
Cancel
Save