Browse Source

style fixes

cl-refactor
Liana Husikyan 10 years ago
parent
commit
d89589febc
  1. 2
      libevmasm/Assembly.h
  2. 2
      libsolidity/CompilerContext.h
  3. 3
      libsolidity/ExpressionCompiler.cpp

2
libevmasm/Assembly.h

@ -67,7 +67,7 @@ public:
AssemblyItem appendJumpI() { auto ret = append(newPushTag()); append(Instruction::JUMPI); return ret; }
AssemblyItem appendJump(AssemblyItem const& _tag) { auto ret = append(_tag.pushTag()); append(Instruction::JUMP); return ret; }
AssemblyItem appendJumpI(AssemblyItem const& _tag) { auto ret = append(_tag.pushTag()); append(Instruction::JUMPI); return ret; }
AssemblyItem errorTag() { return AssemblyItem(PushTag, 0); }
AssemblyItem errorTag() { return AssemblyItem(PushTag, 0); }
template <class T> Assembly& operator<<(T const& _d) { append(_d); return *this; }
AssemblyItems const& getItems() const { return m_items; }

2
libsolidity/CompilerContext.h

@ -98,7 +98,7 @@ public:
eth::AssemblyItem appendJumpToNew() { return m_asm.appendJump().tag(); }
/// Appends a JUMP to a tag already on the stack
CompilerContext& appendJump(eth::AssemblyItem::JumpType _jumpType = eth::AssemblyItem::JumpType::Ordinary);
/// Appends a JUMP to an "ErrorTag"
/// Returns an "ErrorTag"
eth::AssemblyItem errorTag() { return m_asm.errorTag(); }
/// Appends a JUMP to a specific tag
CompilerContext& appendJumpTo(eth::AssemblyItem const& _tag) { m_asm.appendJump(_tag); return *this; }

3
libsolidity/ExpressionCompiler.cpp

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

Loading…
Cancel
Save