diff options
author | Lars Knoll <lars.knoll@digia.com> | 2012-12-12 22:46:57 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2012-12-12 14:57:43 +0100 |
commit | 42ebe165489b5429d1e1dc9f850bbf7d37dd127f (patch) | |
tree | 215f2a078431b3a60250a20065cb6b4047bf47ab /qv4isel_masm.cpp | |
parent | 8b9a17e97c67eac5163b25eab4ededdfdf6e9354 (diff) |
Fix increment and decrement operators
These operators have semantics that are different from
(foo + 1), as they always convert the LHS to a number first.
Change-Id: I3fb4a1a328e3dfcb334875435c3cec90d01b67dd
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'qv4isel_masm.cpp')
-rw-r--r-- | qv4isel_masm.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qv4isel_masm.cpp b/qv4isel_masm.cpp index d667fa5cb3..cabd1f7c5c 100644 --- a/qv4isel_masm.cpp +++ b/qv4isel_masm.cpp @@ -187,6 +187,8 @@ const Assembler::BinaryOperationInfo Assembler::binaryOperations[QQmlJS::IR::Las NULL_OP, // OpUMinus NULL_OP, // OpUPlus NULL_OP, // OpCompl + NULL_OP, // OpIncrement + NULL_OP, // OpDecrement INLINE_OP(__qmljs_bit_and, &Assembler::inline_and32, &Assembler::inline_and32), // OpBitAnd INLINE_OP(__qmljs_bit_or, &Assembler::inline_or32, &Assembler::inline_or32), // OpBitOr @@ -688,6 +690,8 @@ void InstructionSelection::visitMove(IR::Move *s) case IR::OpUMinus: setOp(op, opName, __qmljs_uminus); break; case IR::OpUPlus: setOp(op, opName, __qmljs_uplus); break; case IR::OpCompl: setOp(op, opName, __qmljs_compl); break; + case IR::OpIncrement: setOp(op, opName, __qmljs_increment); break; + case IR::OpDecrement: setOp(op, opName, __qmljs_decrement); break; default: assert(!"unreachable"); break; } // switch |