aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_moth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp104
1 files changed, 4 insertions, 100 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index 967dca13a1..8814ad8a78 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -46,8 +46,6 @@
#include <private/qv4regexpobject_p.h>
#include <private/qv4compileddata_p.h>
#include <private/qqmlengine_p.h>
-#include "qml/qqmlaccessors_p.h"
-#include "qml/qqmlpropertycache_p.h"
#undef USE_TYPE_INFO
@@ -739,51 +737,8 @@ void InstructionSelection::setQObjectProperty(IR::Expr *source, IR::Expr *target
addInstruction(store);
}
-void InstructionSelection::getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind,
- QQmlPropertyData *property, int index,
- IR::Expr *target)
-{
- if (property && property->hasAccessors() && property->isFullyResolved()) {
- if (kind == IR::Member::MemberOfQmlScopeObject) {
- if (property->propType == QMetaType::QReal) {
- Instruction::LoadScopeObjectQRealPropertyDirectly load;
- load.base = getParam(source);
- load.accessors = property->accessors;
- load.result = getResultParam(target);
- addInstruction(load);
- return;
- } else if (property->isQObject()) {
- Instruction::LoadScopeObjectQObjectPropertyDirectly load;
- load.base = getParam(source);
- load.accessors = property->accessors;
- load.result = getResultParam(target);
- addInstruction(load);
- return;
- } else if (property->propType == QMetaType::Int) {
- Instruction::LoadScopeObjectIntPropertyDirectly load;
- load.base = getParam(source);
- load.accessors = property->accessors;
- load.result = getResultParam(target);
- addInstruction(load);
- return;
- } else if (property->propType == QMetaType::Bool) {
- Instruction::LoadScopeObjectBoolPropertyDirectly load;
- load.base = getParam(source);
- load.accessors = property->accessors;
- load.result = getResultParam(target);
- addInstruction(load);
- return;
- } else if (property->propType == QMetaType::QString) {
- Instruction::LoadScopeObjectQStringPropertyDirectly load;
- load.base = getParam(source);
- load.accessors = property->accessors;
- load.result = getResultParam(target);
- addInstruction(load);
- return;
- }
- }
- }
-
+void InstructionSelection::getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, IR::Expr *target)
+{
if (kind == IR::Member::MemberOfQmlScopeObject) {
Instruction::LoadScopeObjectProperty load;
load.base = getParam(source);
@@ -807,59 +762,8 @@ void InstructionSelection::getQmlContextProperty(IR::Expr *source, IR::Member::M
}
}
-void InstructionSelection::getQObjectProperty(IR::Expr *base, QQmlPropertyData *property, bool captureRequired, bool isSingletonProperty, int attachedPropertiesId, IR::Expr *target)
-{
- if (property && property->hasAccessors() && property->isFullyResolved()) {
- if (!attachedPropertiesId && !isSingletonProperty) {
- if (property->propType == QMetaType::QReal) {
- Instruction::LoadQRealQObjectPropertyDirectly load;
- load.base = getParam(base);
- load.accessors = property->accessors;
- load.coreIndex = property->coreIndex;
- load.notifyIndex = captureRequired ? property->notifyIndex : -1;
- load.result = getResultParam(target);
- addInstruction(load);
- return;
- } else if (property->isQObject()) {
- Instruction::LoadQObjectQObjectPropertyDirectly load;
- load.base = getParam(base);
- load.accessors = property->accessors;
- load.coreIndex = property->coreIndex;
- load.notifyIndex = captureRequired ? property->notifyIndex : -1;
- load.result = getResultParam(target);
- addInstruction(load);
- return;
- } else if (property->propType == QMetaType::Int) {
- Instruction::LoadIntQObjectPropertyDirectly load;
- load.base = getParam(base);
- load.accessors = property->accessors;
- load.coreIndex = property->coreIndex;
- load.notifyIndex = captureRequired ? property->notifyIndex : -1;
- load.result = getResultParam(target);
- addInstruction(load);
- return;
- } else if (property->propType == QMetaType::Bool) {
- Instruction::LoadBoolQObjectPropertyDirectly load;
- load.base = getParam(base);
- load.accessors = property->accessors;
- load.coreIndex = property->coreIndex;
- load.notifyIndex = captureRequired ? property->notifyIndex : -1;
- load.result = getResultParam(target);
- addInstruction(load);
- return;
- } else if (property->propType == QMetaType::QString) {
- Instruction::LoadQStringQObjectPropertyDirectly load;
- load.base = getParam(base);
- load.accessors = property->accessors;
- load.coreIndex = property->coreIndex;
- load.notifyIndex = captureRequired ? property->notifyIndex : -1;
- load.result = getResultParam(target);
- addInstruction(load);
- return;
- }
- }
- }
- const int propertyIndex = property->coreIndex;
+void InstructionSelection::getQObjectProperty(IR::Expr *base, int propertyIndex, bool captureRequired, bool isSingletonProperty, int attachedPropertiesId, IR::Expr *target)
+{
if (attachedPropertiesId != 0) {
Instruction::LoadAttachedQObjectProperty load;
load.propertyIndex = propertyIndex;