Bugfix: Additional swap for compound assignment.

This commit is contained in:
Christian 2014-12-18 22:15:11 +01:00
parent 1da53d1681
commit 8dbe13f840

View File

@ -62,6 +62,8 @@ bool ExpressionCompiler::visit(Assignment const& _assignment)
m_context << eth::Instruction::SWAP1 << eth::Instruction::DUP2;
m_currentLValue.retrieveValue(_assignment, true);
appendOrdinaryBinaryOperatorCode(Token::AssignmentToBinaryOp(op), *_assignment.getType());
if (m_currentLValue.storesReferenceOnStack())
m_context << eth::Instruction::SWAP1;
}
m_currentLValue.storeValue(_assignment);
m_currentLValue.reset();