From 7a092000169a8e9d537f3d341ef48277397f997d Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Sat, 2 Nov 2013 20:35:33 +0100 Subject: 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 --- src/qml/compiler/qv4isel_moth_p.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/qml/compiler/qv4isel_moth_p.h') diff --git a/src/qml/compiler/qv4isel_moth_p.h b/src/qml/compiler/qv4isel_moth_p.h index 3a2fdb0c34..ffb8ff4539 100644 --- a/src/qml/compiler/qv4isel_moth_p.h +++ b/src/qml/compiler/qv4isel_moth_p.h @@ -125,7 +125,7 @@ protected: virtual void getProperty(V4IR::Expr *base, const QString &name, V4IR::Temp *target); virtual void setProperty(V4IR::Expr *source, V4IR::Expr *targetBase, const QString &targetName); virtual void setQObjectProperty(V4IR::Expr *source, V4IR::Expr *targetBase, int propertyIndex); - virtual void getQObjectProperty(V4IR::Expr *base, int propertyIndex, V4IR::Temp *target); + virtual void getQObjectProperty(V4IR::Expr *base, int propertyIndex, bool captureRequired, V4IR::Temp *target); virtual void getElement(V4IR::Expr *base, V4IR::Expr *index, V4IR::Temp *target); virtual void setElement(V4IR::Expr *source, V4IR::Expr *targetBase, V4IR::Expr *targetIndex); virtual void copyValue(V4IR::Temp *sourceTemp, V4IR::Temp *targetTemp); @@ -168,7 +168,6 @@ private: void patchJumpAddresses(); QByteArray squeezeCode() const; - V4IR::Function *_function; V4IR::BasicBlock *_block; V4IR::BasicBlock *_nextBlock; -- cgit v1.2.3