diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-06-30 11:47:09 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-06-30 10:05:35 +0000 |
commit | b00fe4531841f4a61e093e5c9c18a1e1faa03aff (patch) | |
tree | ead762869001900e815d9995df99a3ffc8f102b7 /src | |
parent | b31ac3e4870ac73034e678fbdd8bca04de282dfc (diff) |
Remove interpreter instructions we can't generate anymore
This includes the backing runtime methods.
Change-Id: Ib8fb6091974794b11f732fadeb047a7347a50d66
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 8 | ||||
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 6 | ||||
-rw-r--r-- | src/qml/compiler/qv4codegen_p.h | 9 | ||||
-rw-r--r-- | src/qml/compiler/qv4instr_moth.cpp | 16 | ||||
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 28 | ||||
-rw-r--r-- | src/qml/compiler/qv4isel_moth.cpp | 82 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 59 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4runtimeapi_p.h | 8 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 21 |
9 files changed, 58 insertions, 179 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index fa5dbdeda7..6631452ca1 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -2001,9 +2001,7 @@ QQmlJS::Codegen::Reference JSCodeGen::fallbackNameLookup(const QString &name) if (!data) return Reference::fromName(this, name); Reference base = Reference::fromTemp(this, _qmlContextTemp); - bool requiresCapture = !data->isConstant() && _function->isQmlBinding; - return Reference::fromQmlScopeObject(base, data->coreIndex(), data->notifyIndex(), - requiresCapture); + return Reference::fromQmlScopeObject(base, data->coreIndex(), data->notifyIndex()); } if (_contextObject) { @@ -2011,9 +2009,7 @@ QQmlJS::Codegen::Reference JSCodeGen::fallbackNameLookup(const QString &name) if (!data) return Reference::fromName(this, name); Reference base = Reference::fromTemp(this, _qmlContextTemp); - bool requiresCapture = !data->isConstant() && _function->isQmlBinding; - return Reference::fromQmlContextObject(base, data->coreIndex(), data->notifyIndex(), - requiresCapture); + return Reference::fromQmlContextObject(base, data->coreIndex(), data->notifyIndex()); } #else Q_UNUSED(name) diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 6980e69ff7..bc3880b385 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -3275,7 +3275,6 @@ Codegen::Reference &Codegen::Reference::operator =(const Reference &other) case QmlContextObject: qmlCoreIndex = other.qmlCoreIndex; qmlNotifyIndex = other.qmlNotifyIndex; - requiresCapture = other.requiresCapture; break; case This: break; @@ -3319,8 +3318,7 @@ bool Codegen::Reference::operator==(const Codegen::Reference &other) const return closureId == other.closureId; case QmlScopeObject: case QmlContextObject: - return qmlCoreIndex == other.qmlCoreIndex && qmlNotifyIndex == other.qmlNotifyIndex && - requiresCapture == other.requiresCapture; + return qmlCoreIndex == other.qmlCoreIndex && qmlNotifyIndex == other.qmlNotifyIndex; case This: return true; } @@ -3517,7 +3515,6 @@ void Codegen::Reference::load(uint tmp) const Instruction::LoadScopeObjectProperty load; load.base = base; load.propertyIndex = qmlCoreIndex; - load.captureRequired = requiresCapture; load.result = temp; codegen->bytecodeGenerator->addInstruction(load); codegen->_function->scopeObjectPropertyDependencies.insert(qmlCoreIndex, qmlNotifyIndex); @@ -3525,7 +3522,6 @@ void Codegen::Reference::load(uint tmp) const Instruction::LoadContextObjectProperty load; load.base = base; load.propertyIndex = qmlCoreIndex; - load.captureRequired = requiresCapture; load.result = temp; codegen->bytecodeGenerator->addInstruction(load); codegen->_function->contextObjectPropertyDependencies.insert(qmlCoreIndex, qmlNotifyIndex); diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h index 5a74b3cf54..bac74149d4 100644 --- a/src/qml/compiler/qv4codegen_p.h +++ b/src/qml/compiler/qv4codegen_p.h @@ -326,22 +326,18 @@ public: r.closureId = functionId; return r; } - static Reference fromQmlScopeObject(const Reference &base, qint16 coreIndex, - qint16 notifyIndex, bool requiresCapture) { + static Reference fromQmlScopeObject(const Reference &base, qint16 coreIndex, qint16 notifyIndex) { Reference r(base.codegen, QmlScopeObject); r.base = base.asRValue(); r.qmlCoreIndex = coreIndex; r.qmlNotifyIndex = notifyIndex; - r.requiresCapture = requiresCapture; return r; } - static Reference fromQmlContextObject(const Reference &base, qint16 coreIndex, - qint16 notifyIndex, bool requiresCapture) { + static Reference fromQmlContextObject(const Reference &base, qint16 coreIndex, qint16 notifyIndex) { Reference r(base.codegen, QmlContextObject); r.base = base.asRValue(); r.qmlCoreIndex = coreIndex; r.qmlNotifyIndex = notifyIndex; - r.requiresCapture = requiresCapture; return r; } static Reference fromThis(Codegen *cg) { @@ -380,7 +376,6 @@ public: struct { // QML scope/context object case qint16 qmlCoreIndex; qint16 qmlNotifyIndex; - bool requiresCapture; }; }; mutable int tempIndex = -1; diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp index 01a5f2421b..c24afa76f9 100644 --- a/src/qml/compiler/qv4instr_moth.cpp +++ b/src/qml/compiler/qv4instr_moth.cpp @@ -197,14 +197,6 @@ void dumpBytecode(const char *code, int len) d << instr.base << ", " << instr.source; MOTH_END_INSTR(SetLookup) - MOTH_BEGIN_INSTR(StoreQObjectProperty) - d << instr.base << "[" << instr.propertyIndex << "]" << ", " << instr.source; - MOTH_END_INSTR(StoreQObjectProperty) - - MOTH_BEGIN_INSTR(LoadQObjectProperty) - d << instr.result << ", " << instr.base << "[" << instr.propertyIndex << "]"; - MOTH_END_INSTR(LoadQObjectProperty) - MOTH_BEGIN_INSTR(StoreScopeObjectProperty) d << instr.base << "[" << instr.propertyIndex << "]" << ", " << instr.source; MOTH_END_INSTR(StoreScopeObjectProperty) @@ -225,14 +217,6 @@ void dumpBytecode(const char *code, int len) d << instr.result << ", " << instr.base << "[" << instr.index << "]"; MOTH_END_INSTR(LoadIdObject) - MOTH_BEGIN_INSTR(LoadAttachedQObjectProperty) - d << instr.result << ", " << instr.attachedPropertiesId << "[" << instr.propertyIndex << "]"; - MOTH_END_INSTR(LoadAttachedQObjectProperty) - - MOTH_BEGIN_INSTR(LoadSingletonQObjectProperty) - d << instr.result << ", " << instr.base << "[" << instr.propertyIndex << "]"; - MOTH_END_INSTR(LoadSingletonQObjectProperty) - MOTH_BEGIN_INSTR(InitStackFrame) d << instr.value; MOTH_END_INSTR(InitStackFrame) diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index 0daca9bb9d..4350ec89f7 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -87,15 +87,11 @@ QT_BEGIN_NAMESPACE F(GetLookup, getLookup) \ F(StoreProperty, storeProperty) \ F(SetLookup, setLookup) \ - F(StoreQObjectProperty, storeQObjectProperty) \ - F(LoadQObjectProperty, loadQObjectProperty) \ F(StoreScopeObjectProperty, storeScopeObjectProperty) \ F(StoreContextObjectProperty, storeContextObjectProperty) \ F(LoadScopeObjectProperty, loadScopeObjectProperty) \ F(LoadContextObjectProperty, loadContextObjectProperty) \ F(LoadIdObject, loadIdObject) \ - F(LoadAttachedQObjectProperty, loadAttachedQObjectProperty) \ - F(LoadSingletonQObjectProperty, loadQObjectProperty) \ F(InitStackFrame, initStackFrame) \ F(CallValue, callValue) \ F(CallProperty, callProperty) \ @@ -340,14 +336,12 @@ union Instr int propertyIndex; Param base; Param result; - bool captureRequired; }; struct instr_loadContextObjectProperty { MOTH_INSTR_HEADER int propertyIndex; Param base; Param result; - bool captureRequired; }; struct instr_loadIdObject { MOTH_INSTR_HEADER @@ -355,19 +349,6 @@ union Instr Param base; Param result; }; - struct instr_loadQObjectProperty { - MOTH_INSTR_HEADER - int propertyIndex; - Param base; - Param result; - bool captureRequired; - }; - struct instr_loadAttachedQObjectProperty { - MOTH_INSTR_HEADER - int propertyIndex; - Param result; - int attachedPropertiesId; - }; struct instr_storeProperty { MOTH_INSTR_HEADER int name; @@ -392,12 +373,6 @@ union Instr int propertyIndex; Param source; }; - struct instr_storeQObjectProperty { - MOTH_INSTR_HEADER - Param base; - int propertyIndex; - Param source; - }; struct instr_loadElement { MOTH_INSTR_HEADER Param base; @@ -845,13 +820,10 @@ union Instr instr_loadScopeObjectProperty loadScopeObjectProperty; instr_loadContextObjectProperty loadContextObjectProperty; instr_loadIdObject loadIdObject; - instr_loadQObjectProperty loadQObjectProperty; - instr_loadAttachedQObjectProperty loadAttachedQObjectProperty; instr_storeProperty storeProperty; instr_setLookup setLookup; instr_storeScopeObjectProperty storeScopeObjectProperty; instr_storeContextObjectProperty storeContextObjectProperty; - instr_storeQObjectProperty storeQObjectProperty; instr_initStackFrame initStackFrame; instr_callValue callValue; instr_callProperty callProperty; diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp index 95fedc796a..addeb506ee 100644 --- a/src/qml/compiler/qv4isel_moth.cpp +++ b/src/qml/compiler/qv4isel_moth.cpp @@ -310,7 +310,7 @@ QQmlRefPointer<QV4::CompiledData::CompilationUnit> InstructionSelection::backend return result; } -void InstructionSelection::callValue(IR::Expr *value, IR::ExprList *args, IR::Expr *result) +void InstructionSelection::callValue(IR::Expr *value, IR::ExprList * /*args*/, IR::Expr *result) { Instruction::CallValue call; // prepareCallArgs(args, call.argc); @@ -366,7 +366,7 @@ void InstructionSelection::callProperty(IR::Expr *base, const QString &name, IR: } } -void InstructionSelection::callSubscript(IR::Expr *base, IR::Expr *index, IR::ExprList *args, +void InstructionSelection::callSubscript(IR::Expr *base, IR::Expr *index, IR::ExprList * /*args*/, IR::Expr *result) { // call the property on the loaded base @@ -430,7 +430,7 @@ void InstructionSelection::constructProperty(IR::Expr *base, const QString &name addInstruction(create); } -void InstructionSelection::constructValue(IR::Expr *value, IR::ExprList *args, IR::Expr *target) +void InstructionSelection::constructValue(IR::Expr *value, IR::ExprList * /*args*/, IR::Expr *target) { Instruction::CreateValue create; create.func = getParam(value); @@ -583,29 +583,29 @@ void InstructionSelection::setQmlContextProperty(IR::Expr *source, IR::Expr *tar } } -void InstructionSelection::setQObjectProperty(IR::Expr *source, IR::Expr *targetBase, int propertyIndex) +void InstructionSelection::setQObjectProperty(IR::Expr * /*source*/, IR::Expr * /*targetBase*/, int /*propertyIndex*/) { - Instruction::StoreQObjectProperty store; - store.base = getParam(targetBase); - store.propertyIndex = propertyIndex; - store.source = getParam(source); - addInstruction(store); +// Instruction::StoreQObjectProperty store; +// store.base = getParam(targetBase); +// store.propertyIndex = propertyIndex; +// store.source = getParam(source); +// addInstruction(store); } -void InstructionSelection::getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, bool captureRequired, IR::Expr *target) +void InstructionSelection::getQmlContextProperty(IR::Expr *source, IR::Member::MemberKind kind, int index, bool /*captureRequired*/, IR::Expr *target) { if (kind == IR::Member::MemberOfQmlScopeObject) { - Instruction::LoadScopeObjectProperty load; - load.base = getParam(source); - load.propertyIndex = index; - load.captureRequired = captureRequired; - load.result = getResultParam(target); - addInstruction(load); +// Instruction::LoadScopeObjectProperty load; +// load.base = getParam(source); +// load.propertyIndex = index; +// load.captureRequired = captureRequired; +// load.result = getResultParam(target); +// addInstruction(load); } else if (kind == IR::Member::MemberOfQmlContextObject) { Instruction::LoadContextObjectProperty load; load.base = getParam(source); load.propertyIndex = index; - load.captureRequired = captureRequired; +// load.captureRequired = captureRequired; load.result = getResultParam(target); addInstruction(load); } else if (kind == IR::Member::MemberOfIdObjectsArray) { @@ -619,29 +619,29 @@ void InstructionSelection::getQmlContextProperty(IR::Expr *source, IR::Member::M } } -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; - load.result = getResultParam(target); - load.attachedPropertiesId = attachedPropertiesId; - addInstruction(load); - } else if (isSingletonProperty) { - Instruction::LoadSingletonQObjectProperty load; - load.base = getParam(base); - load.propertyIndex = propertyIndex; - load.result = getResultParam(target); - load.captureRequired = captureRequired; - addInstruction(load); - } else { - Instruction::LoadQObjectProperty load; - load.base = getParam(base); - load.propertyIndex = propertyIndex; - load.result = getResultParam(target); - load.captureRequired = captureRequired; - addInstruction(load); - } +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; +// load.result = getResultParam(target); +// load.attachedPropertiesId = attachedPropertiesId; +// addInstruction(load); +// } else if (isSingletonProperty) { +// Instruction::LoadSingletonQObjectProperty load; +// load.base = getParam(base); +// load.propertyIndex = propertyIndex; +// load.result = getResultParam(target); +// load.captureRequired = captureRequired; +// addInstruction(load); +// } else { +// Instruction::LoadQObjectProperty load; +// load.base = getParam(base); +// load.propertyIndex = propertyIndex; +// load.result = getResultParam(target); +// load.captureRequired = captureRequired; +// addInstruction(load); +// } } void InstructionSelection::getElement(IR::Expr *base, IR::Expr *index, IR::Expr *target) @@ -1022,7 +1022,7 @@ void InstructionSelection::visitRet(IR::Ret *s) addInstruction(ret); } -void InstructionSelection::callBuiltinInvalid(IR::Name *func, IR::ExprList *args, IR::Expr *result) +void InstructionSelection::callBuiltinInvalid(IR::Name *func, IR::ExprList * /*args*/, IR::Expr *result) { if (useFastLookups && func->global) { Instruction::CallGlobalLookup call; diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 3342075f7f..78a15a2753 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -1056,7 +1056,7 @@ ReturnedValue Runtime::method_callActivationProperty(ExecutionEngine *engine, in ReturnedValue Runtime::method_callQmlScopeObjectProperty(ExecutionEngine *engine, int propertyIndex, CallData *callData) { Scope scope(engine); - ScopedFunctionObject o(scope, method_getQmlScopeObjectProperty(engine, callData->thisObject, propertyIndex, /*captureRequired*/true)); + ScopedFunctionObject o(scope, method_getQmlScopeObjectProperty(engine, callData->thisObject, propertyIndex)); if (!o) { QString error = QStringLiteral("Property '%1' of scope object is not a function").arg(propertyIndex); return engine->throwTypeError(error); @@ -1069,7 +1069,7 @@ ReturnedValue Runtime::method_callQmlScopeObjectProperty(ExecutionEngine *engine ReturnedValue Runtime::method_callQmlContextObjectProperty(ExecutionEngine *engine, int propertyIndex, CallData *callData) { Scope scope(engine); - ScopedFunctionObject o(scope, method_getQmlContextObjectProperty(engine, callData->thisObject, propertyIndex, /*captureRequired*/true)); + ScopedFunctionObject o(scope, method_getQmlContextObjectProperty(engine, callData->thisObject, propertyIndex)); if (!o) { QString error = QStringLiteral("Property '%1' of context object is not a function").arg(propertyIndex); return engine->throwTypeError(error); @@ -1276,7 +1276,7 @@ QV4::ReturnedValue Runtime::method_typeofName(ExecutionEngine *engine, int nameI ReturnedValue Runtime::method_typeofScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex) { Scope scope(engine); - ScopedValue prop(scope, method_getQmlScopeObjectProperty(engine, context, propertyIndex, /*captureRequired*/true)); + ScopedValue prop(scope, method_getQmlScopeObjectProperty(engine, context, propertyIndex)); if (scope.engine->hasException) return Encode::undefined(); return method_typeofValue(engine, prop); @@ -1285,7 +1285,7 @@ ReturnedValue Runtime::method_typeofScopeObjectProperty(ExecutionEngine *engine, ReturnedValue Runtime::method_typeofContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex) { Scope scope(engine); - ScopedValue prop(scope, method_getQmlContextObjectProperty(engine, context, propertyIndex, /*captureRequired*/true)); + ScopedValue prop(scope, method_getQmlContextObjectProperty(engine, context, propertyIndex)); if (scope.engine->hasException) return Encode::undefined(); return method_typeofValue(engine, prop); @@ -1520,48 +1520,16 @@ ReturnedValue Runtime::method_regexpLiteral(ExecutionEngine *engine, int id) return static_cast<CompiledData::CompilationUnit*>(engine->current->compilationUnit)->runtimeRegularExpressions[id].asReturnedValue(); } -ReturnedValue Runtime::method_getQmlQObjectProperty(ExecutionEngine *engine, const Value &object, int propertyIndex, bool captureRequired) -{ - Scope scope(engine); - QV4::Scoped<QObjectWrapper> wrapper(scope, object); - if (!wrapper) { - engine->throwTypeError(QStringLiteral("Cannot read property of null")); - return Encode::undefined(); - } - return QV4::QObjectWrapper::getProperty(scope.engine, wrapper->object(), propertyIndex, captureRequired); -} - -QV4::ReturnedValue Runtime::method_getQmlAttachedProperty(ExecutionEngine *engine, int attachedPropertiesId, int propertyIndex) -{ - QObject *scopeObject = engine->qmlScopeObject(); - QObject *attachedObject = qmlAttachedPropertiesObjectById(attachedPropertiesId, scopeObject); - - QJSEngine *jsEngine = engine->jsEngine(); - QQmlData::ensurePropertyCache(jsEngine, attachedObject); - return QV4::QObjectWrapper::getProperty(engine, attachedObject, propertyIndex, /*captureRequired*/true); -} - -ReturnedValue Runtime::method_getQmlScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired) +ReturnedValue Runtime::method_getQmlScopeObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex) { const QmlContext &c = static_cast<const QmlContext &>(context); - return QV4::QObjectWrapper::getProperty(engine, c.d()->qml->scopeObject, propertyIndex, captureRequired); + return QV4::QObjectWrapper::getProperty(engine, c.d()->qml->scopeObject, propertyIndex, false); } -ReturnedValue Runtime::method_getQmlContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired) +ReturnedValue Runtime::method_getQmlContextObjectProperty(ExecutionEngine *engine, const Value &context, int propertyIndex) { const QmlContext &c = static_cast<const QmlContext &>(context); - return QV4::QObjectWrapper::getProperty(engine, (*c.d()->qml->context)->contextObject, propertyIndex, captureRequired); -} - -ReturnedValue Runtime::method_getQmlSingletonQObjectProperty(ExecutionEngine *engine, const Value &object, int propertyIndex, bool captureRequired) -{ - Scope scope(engine); - QV4::Scoped<QQmlTypeWrapper> wrapper(scope, object); - if (!wrapper) { - scope.engine->throwTypeError(QStringLiteral("Cannot read property of null")); - return Encode::undefined(); - } - return QV4::QObjectWrapper::getProperty(scope.engine, wrapper->singletonObject(), propertyIndex, captureRequired); + return QV4::QObjectWrapper::getProperty(engine, (*c.d()->qml->context)->contextObject, propertyIndex, false); } ReturnedValue Runtime::method_getQmlIdObject(ExecutionEngine *engine, const Value &c, uint index) @@ -1591,17 +1559,6 @@ void Runtime::method_setQmlContextObjectProperty(ExecutionEngine *engine, const return QV4::QObjectWrapper::setProperty(engine, (*c.d()->qml->context)->contextObject, propertyIndex, value); } -void Runtime::method_setQmlQObjectProperty(ExecutionEngine *engine, const Value &object, int propertyIndex, const Value &value) -{ - Scope scope(engine); - QV4::Scoped<QObjectWrapper> wrapper(scope, object); - if (!wrapper) { - engine->throwTypeError(QStringLiteral("Cannot write property of null")); - return; - } - wrapper->setProperty(engine, propertyIndex, value); -} - ReturnedValue Runtime::method_getQmlImportedScripts(NoThrowEngine *engine) { QQmlContextData *context = engine->callingQmlContext(); diff --git a/src/qml/jsruntime/qv4runtimeapi_p.h b/src/qml/jsruntime/qv4runtimeapi_p.h index fdb24d5ca2..4fbbe60099 100644 --- a/src/qml/jsruntime/qv4runtimeapi_p.h +++ b/src/qml/jsruntime/qv4runtimeapi_p.h @@ -214,16 +214,12 @@ struct ExceptionCheck<void (*)(QV4::NoThrowEngine *, A, B, C)> { F(ReturnedValue, getQmlContext, (NoThrowEngine *engine)) \ F(ReturnedValue, getQmlImportedScripts, (NoThrowEngine *engine)) \ F(ReturnedValue, getQmlSingleton, (NoThrowEngine *engine, int nameIndex)) \ - F(ReturnedValue, getQmlAttachedProperty, (ExecutionEngine *engine, int attachedPropertiesId, int propertyIndex)) \ - F(ReturnedValue, getQmlScopeObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)) \ - F(ReturnedValue, getQmlContextObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, bool captureRequired)) \ - F(ReturnedValue, getQmlQObjectProperty, (ExecutionEngine *engine, const Value &object, int propertyIndex, bool captureRequired)) \ - F(ReturnedValue, getQmlSingletonQObjectProperty, (ExecutionEngine *engine, const Value &object, int propertyIndex, bool captureRequired)) \ + F(ReturnedValue, getQmlScopeObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex)) \ + F(ReturnedValue, getQmlContextObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex)) \ F(ReturnedValue, getQmlIdObject, (ExecutionEngine *engine, const Value &context, uint index)) \ \ F(void, setQmlScopeObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, const Value &value)) \ F(void, setQmlContextObjectProperty, (ExecutionEngine *engine, const Value &context, int propertyIndex, const Value &value)) \ - F(void, setQmlQObjectProperty, (ExecutionEngine *engine, const Value &object, int propertyIndex, const Value &value)) struct Q_QML_PRIVATE_EXPORT Runtime { Runtime(); diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index c1d010be49..e8f6645f2b 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -519,22 +519,13 @@ QV4::ReturnedValue VME::exec(ExecutionEngine *engine, const uchar *code) CHECK_EXCEPTION; MOTH_END_INSTR(SetLookup) - MOTH_BEGIN_INSTR(StoreQObjectProperty) - Runtime::method_setQmlQObjectProperty(engine, VALUE(instr.base), instr.propertyIndex, VALUE(instr.source)); - CHECK_EXCEPTION; - MOTH_END_INSTR(StoreQObjectProperty) - - MOTH_BEGIN_INSTR(LoadQObjectProperty) - STOREVALUE(instr.result, Runtime::method_getQmlQObjectProperty(engine, VALUE(instr.base), instr.propertyIndex, instr.captureRequired)); - MOTH_END_INSTR(LoadQObjectProperty) - MOTH_BEGIN_INSTR(StoreScopeObjectProperty) Runtime::method_setQmlScopeObjectProperty(engine, VALUE(instr.base), instr.propertyIndex, VALUE(instr.source)); CHECK_EXCEPTION; MOTH_END_INSTR(StoreScopeObjectProperty) MOTH_BEGIN_INSTR(LoadScopeObjectProperty) - STOREVALUE(instr.result, Runtime::method_getQmlScopeObjectProperty(engine, VALUE(instr.base), instr.propertyIndex, instr.captureRequired)); + STOREVALUE(instr.result, Runtime::method_getQmlScopeObjectProperty(engine, VALUE(instr.base), instr.propertyIndex)); MOTH_END_INSTR(LoadScopeObjectProperty) MOTH_BEGIN_INSTR(StoreContextObjectProperty) @@ -543,21 +534,13 @@ QV4::ReturnedValue VME::exec(ExecutionEngine *engine, const uchar *code) MOTH_END_INSTR(StoreContextObjectProperty) MOTH_BEGIN_INSTR(LoadContextObjectProperty) - STOREVALUE(instr.result, Runtime::method_getQmlContextObjectProperty(engine, VALUE(instr.base), instr.propertyIndex, instr.captureRequired)); + STOREVALUE(instr.result, Runtime::method_getQmlContextObjectProperty(engine, VALUE(instr.base), instr.propertyIndex)); MOTH_END_INSTR(LoadContextObjectProperty) MOTH_BEGIN_INSTR(LoadIdObject) STOREVALUE(instr.result, Runtime::method_getQmlIdObject(engine, VALUE(instr.base), instr.index)); MOTH_END_INSTR(LoadIdObject) - MOTH_BEGIN_INSTR(LoadAttachedQObjectProperty) - STOREVALUE(instr.result, Runtime::method_getQmlAttachedProperty(engine, instr.attachedPropertiesId, instr.propertyIndex)); - MOTH_END_INSTR(LoadAttachedQObjectProperty) - - MOTH_BEGIN_INSTR(LoadSingletonQObjectProperty) - STOREVALUE(instr.result, Runtime::method_getQmlSingletonQObjectProperty(engine, VALUE(instr.base), instr.propertyIndex, instr.captureRequired)); - MOTH_END_INSTR(LoadSingletonQObjectProperty) - MOTH_BEGIN_INSTR(InitStackFrame) TRACE(inline, "stack size: %u", instr.value); stackSize = instr.value; |