diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-11-02 20:35:33 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-12 18:20:30 +0100 |
commit | 7a092000169a8e9d537f3d341ef48277397f997d (patch) | |
tree | f29f189d57e4923dff2decfd073b8e04f4a211a8 /src/qml/compiler/qv4isel_moth.cpp | |
parent | 7c6d2d78fe0997dfebba5569f097bdacbba5a861 (diff) |
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>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r-- | src/qml/compiler/qv4isel_moth.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp index ccc0b5d98c..6db8f11a9e 100644 --- a/src/qml/compiler/qv4isel_moth.cpp +++ b/src/qml/compiler/qv4isel_moth.cpp @@ -154,7 +154,6 @@ inline bool isBoolType(V4IR::Expr *e) InstructionSelection::InstructionSelection(QV4::ExecutableAllocator *execAllocator, V4IR::Module *module, QV4::Compiler::JSUnitGenerator *jsGenerator) : EvalInstructionSelection(execAllocator, module, jsGenerator) - , _function(0) , _block(0) , _codeStart(0) , _codeNext(0) @@ -509,12 +508,13 @@ void InstructionSelection::setQObjectProperty(V4IR::Expr *source, V4IR::Expr *ta addInstruction(store); } -void InstructionSelection::getQObjectProperty(V4IR::Expr *base, int propertyIndex, V4IR::Temp *target) +void InstructionSelection::getQObjectProperty(V4IR::Expr *base, int propertyIndex, bool captureRequired, V4IR::Temp *target) { Instruction::LoadQObjectProperty load; load.base = getParam(base); load.propertyIndex = propertyIndex; load.result = getResultParam(target); + load.captureRequired = captureRequired; addInstruction(load); } |