Properly working post increment/decrement operators
authorLars Knoll <lars.knoll@digia.com>
Sun, 27 Jan 2013 20:16:09 +0000 (21:16 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Mon, 28 Jan 2013 12:45:15 +0000 (13:45 +0100)
commitd8e0c2e0e5c8f80d8a6d929fdb9153136bf03b7d
treede0ab878a92e2b6cd7251a7c2b453bbeed0fe585
parentff643446f595c028f158ef95f3ca0ef23e072a17
Properly working post increment/decrement operators

This required some larger changes in our infrastructure.
Unfortunately the post increment/decrement operators
don't return the old value unmodified, but return
toNumber(oldValue).

At the same time they need to properly store the new value
into the referenced expression. The only way to solve this
(as we can't have two return values) is to pass a proper
reference into runtime methods.

Change-Id: I0e0c2cc011ab22d5d4b27924abc8c18372c104a5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
14 files changed:
moth/qv4instr_moth_p.h
moth/qv4isel_moth.cpp
moth/qv4isel_moth_p.h
moth/qv4vme_moth.cpp
qmljs_runtime.cpp
qmljs_runtime.h
qv4codegen.cpp
qv4ir.cpp
qv4ir_p.h
qv4isel_masm.cpp
qv4isel_masm_p.h
qv4isel_p.cpp
qv4isel_p.h
tests/TestExpectations