Fix property dependency generation for accelerated QML QObject properties
authorSimon Hausmann <simon.hausmann@digia.com>
Sat, 2 Nov 2013 19:35:33 +0000 (20:35 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 12 Nov 2013 17:20:30 +0000 (18:20 +0100)
commit7a092000169a8e9d537f3d341ef48277397f997d
treef29f189d57e4923dff2decfd073b8e04f4a211a8
parent7c6d2d78fe0997dfebba5569f097bdacbba5a861
Fix property dependency generation for accelerated QML QObject properties

The previous approach of collecting the dependencies through an IR visitor
doesn't work, because it relies on a fixed structure - for example MEMBER(NAME,
prop) - which we can't guarantee (it's usually MEMBER(TEMP, prop)). But it
turns out that we can only pre-calculate dependencies for context, scope or id
properties, so we can do that right away in the QML specific JS codegen, store
that information in the IR function and use it from there in the data structure
generator as well as in the isel as a parameter to getQObjectProperty to tell
the run-time whether capture is required or not.

Change-Id: I33711c3420d6534c653c2a6a4284f0fc12e941cf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
17 files changed:
src/qml/compiler/qqmlcodegenerator.cpp
src/qml/compiler/qv4compiler.cpp
src/qml/compiler/qv4instr_moth_p.h
src/qml/compiler/qv4isel_masm.cpp
src/qml/compiler/qv4isel_masm_p.h
src/qml/compiler/qv4isel_moth.cpp
src/qml/compiler/qv4isel_moth_p.h
src/qml/compiler/qv4isel_p.cpp
src/qml/compiler/qv4isel_p.h
src/qml/compiler/qv4jsir.cpp
src/qml/compiler/qv4jsir_p.h
src/qml/compiler/qv4regalloc.cpp
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/jsruntime/qv4qobjectwrapper_p.h
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4runtime_p.h
src/qml/jsruntime/qv4vme_moth.cpp