diff options
| author | Ulf Hermann <[email protected]> | 2024-11-11 13:01:36 +0100 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2024-11-12 13:55:13 +0100 |
| commit | f9d82816e6f1affd0fb388a54a2c49e38281abd9 (patch) | |
| tree | e0323cfb8f3464dda22a87cc47f7711adbf53dc6 /src/qml/compat | |
| parent | e0f002ef0d53e6ef9f60d7a2cedd4baa8a744e96 (diff) | |
QtQml: Remove CallGlobalLookup adapters for AOT-compiled code
It's currently impossible to generate code that uses them. Furthermore
the API is quite wrong in that it needlessly takes all types as part of
the call rather than the initialization.
Change-Id: Ic452cb68f43410d9ebafd29d55a4d02273d95b9b
Reviewed-by: Semih Yavuz <[email protected]>
Diffstat (limited to 'src/qml/compat')
| -rw-r--r-- | src/qml/compat/removed_api.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/qml/compat/removed_api.cpp b/src/qml/compat/removed_api.cpp index 4cbaab71a9..d812d36282 100644 --- a/src/qml/compat/removed_api.cpp +++ b/src/qml/compat/removed_api.cpp @@ -125,4 +125,28 @@ QVariant QQmlPrivate::AOTCompiledContext::constructValueType( resultMetaType, resultMetaObject, ctorIndex, args); } +bool QQmlPrivate::AOTCompiledContext::callGlobalLookup( + uint index, void **args, const QMetaType *types, int argc) const +{ + QV4::Lookup *lookup = compilationUnit->runtimeLookups + index; + QV4::Scope scope(engine->handle()); + QV4::ScopedFunctionObject function(scope, lookup->globalGetter(scope.engine)); + if (!function) { + scope.engine->throwTypeError( + QStringLiteral("Property '%1' of object [null] is not a function") + .arg(compilationUnit->runtimeStrings[lookup->nameIndex]->toQString())); + return false; + } + + function->call(nullptr, args, types, argc); + return true; +} + +void QQmlPrivate::AOTCompiledContext::initCallGlobalLookup(uint index) const +{ + Q_UNUSED(index); + Q_ASSERT(engine->hasError()); + engine->handle()->amendException(); +} + #endif |
