Fix dependency calculation for context and scope properties
authorSimon Hausmann <simon.hausmann@digia.com>
Wed, 4 Dec 2013 15:30:54 +0000 (16:30 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 5 Dec 2013 21:05:21 +0000 (22:05 +0100)
commit7a344ef2b7796731a69a4f36e13ca9cf6f3b1ee9
tree2de37c20020a321d1206208eccd78c8a89c08388
parent41aca0cebf3b49597ad0614e3789bbeff5191ff4
Fix dependency calculation for context and scope properties

We were incorrectly calculating writing to a context or scope property as a
dependency for an expression. We don't know whether a property is being written
only or also being read from at lookup time, but we can make that decision in
the isel then when generating the move instructions.

So initially context and scope properties end up in a candidate set first
and get promoted to real dependencies when they're being used in reading
moves.

Task-number: QTBUG-35210
Change-Id: Ia67057abafc2d611e1e6605327b4965ebe91cbed
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/compiler/qqmlcodegenerator.cpp
src/qml/compiler/qv4isel_p.cpp
src/qml/compiler/qv4jsir_p.h
tests/auto/qml/qqmlecmascript/data/noCaptureWhenWritingProperty.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp