aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit/qv4regalloc.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-06-19 14:18:13 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-08-10 01:21:57 +0000
commitb2889568170b20ca8f870a7f4a1a1c3ac9f698c5 (patch)
treef29aace79649f0f328a84e4aa91b71d49390317b /src/qml/jit/qv4regalloc.cpp
parent18557c26761581e10182d8c019ba3f5a6f81bb1c (diff)
Use the QmlContext to access properties of the scope object
Add some runtime methods to access properties of the scope object directly (using the QmlContext), and generate proper code to call those. Change-Id: I0b29357c9a3b9ad53ba568ec6cb763e8ecb10f21 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jit/qv4regalloc.cpp')
-rw-r--r--src/qml/jit/qv4regalloc.cpp32
1 files changed, 24 insertions, 8 deletions
diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp
index 90076945fc..b8e747e15c 100644
--- a/src/qml/jit/qv4regalloc.cpp
+++ b/src/qml/jit/qv4regalloc.cpp
@@ -299,6 +299,16 @@ protected: // IRDecoder
addCall();
}
+ virtual void callQmlContextProperty(IR::Expr *base, IR::Member::MemberKind /*kind*/, int propertyIndex, IR::ExprList *args, IR::Expr *result)
+ {
+ Q_UNUSED(propertyIndex)
+
+ addDef(result);
+ addUses(base->asTemp(), Use::CouldHaveRegister);
+ addUses(args, Use::CouldHaveRegister);
+ addCall();
+ }
+
virtual void callProperty(IR::Expr *base, const QString &name, IR::ExprList *args,
IR::Expr *result)
{
@@ -445,14 +455,6 @@ protected: // IRDecoder
addCall();
}
- virtual void loadQmlScopeObject(Expr *temp)
- {
- Q_UNUSED(temp);
-
- addDef(temp);
- addCall();
- }
-
virtual void loadQmlSingleton(const QString &/*name*/, Expr *temp)
{
Q_UNUSED(temp);
@@ -517,6 +519,13 @@ protected: // IRDecoder
addCall();
}
+ virtual void setQmlContextProperty(IR::Expr *source, IR::Expr *targetBase, IR::Member::MemberKind /*kind*/, int /*propertyIndex*/)
+ {
+ addUses(source->asTemp(), Use::CouldHaveRegister);
+ addUses(targetBase->asTemp(), Use::CouldHaveRegister);
+ addCall();
+ }
+
virtual void setQObjectProperty(IR::Expr *source, IR::Expr *targetBase, int /*propertyIndex*/)
{
addUses(source->asTemp(), Use::CouldHaveRegister);
@@ -524,6 +533,13 @@ protected: // IRDecoder
addCall();
}
+ virtual void getQmlContextProperty(IR::Expr *base, IR::Member::MemberKind /*kind*/, int /*index*/, IR::Expr *target)
+ {
+ addDef(target);
+ addUses(base->asTemp(), Use::CouldHaveRegister);
+ addCall();
+ }
+
virtual void getQObjectProperty(IR::Expr *base, int /*propertyIndex*/, bool /*captureRequired*/, bool /*isSingleton*/, int /*attachedPropertiesId*/, IR::Expr *target)
{
addDef(target);