diff options
author | chriseth <c@ethdev.com> | 2014-12-19 18:38:45 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2014-12-19 18:38:45 +0800 |
commit | 8e3fbbad44ad144b8cad9d6874e17de882869f11 (patch) | |
tree | ab951d7343ac23ce80d64e1f55445c27afc87933 | |
parent | d612bf1d17fc1ade5e477adf8b6390ae919ab9d9 (diff) | |
parent | 8dbe13f840acb4846ef3b7f8fc3988433cba6288 (diff) | |
download | dexon-solidity-8e3fbbad44ad144b8cad9d6874e17de882869f11.tar dexon-solidity-8e3fbbad44ad144b8cad9d6874e17de882869f11.tar.gz dexon-solidity-8e3fbbad44ad144b8cad9d6874e17de882869f11.tar.bz2 dexon-solidity-8e3fbbad44ad144b8cad9d6874e17de882869f11.tar.lz dexon-solidity-8e3fbbad44ad144b8cad9d6874e17de882869f11.tar.xz dexon-solidity-8e3fbbad44ad144b8cad9d6874e17de882869f11.tar.zst dexon-solidity-8e3fbbad44ad144b8cad9d6874e17de882869f11.zip |
Merge pull request #664 from chriseth/sol_fix_compoundAssign
Bugfix: Additional swap for compound assignment.
-rw-r--r-- | ExpressionCompiler.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp index f58c157d..cf641935 100644 --- a/ExpressionCompiler.cpp +++ b/ExpressionCompiler.cpp @@ -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(); |