diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2021-05-17 16:38:25 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-10 11:53:19 +0200 |
| commit | e20650e0702259b4be79be85a3d27e45db42efc1 (patch) | |
| tree | 7536cee98f4cc502774f807d1a609940cd20d4f5 /src/qml/jsruntime/qv4engine.cpp | |
| parent | 7fa28f98824a94396106eadfc028b329985a0cfc (diff) | |
| download | qtdeclarative-e20650e0702259b4be79be85a3d27e45db42efc1.tar.gz | |
Eliminate JS call frame from metatypes calls
If we call an AOT-compiled function we never need the JavaScript call
frame. We can just skip its setup and save some overhead.
Change-Id: I39dc2ca6eea5b5a66f3b87b642a310534cecf6cd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index fb5f5802f8..6b4fc81bf3 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -2112,12 +2112,11 @@ void ExecutionEngine::callInContext(Function *function, QObject *self, QV4::Scope scope(this); ExecutionContext *ctx = currentStackFrame ? currentContext() : scriptContext(); QV4::Scoped<QV4::QmlContext> qmlContext(scope, QV4::QmlContext::create(ctx, ctxtdata, self)); - QV4::ScopedValue selfValue(scope, QV4::QObjectWrapper::wrap(this, self)); if (!args) { Q_ASSERT(argc == 0); void *dummyArgs[] = { nullptr }; QMetaType dummyTypes[] = { QMetaType::fromType<void>() }; - function->call(selfValue, dummyArgs, dummyTypes, argc, qmlContext); + function->call(self, dummyArgs, dummyTypes, argc, qmlContext); return; } @@ -2125,7 +2124,7 @@ void ExecutionEngine::callInContext(Function *function, QObject *self, return; // implicitly sets the return value, which is args[0] - function->call(selfValue, args, types, argc, qmlContext); + function->call(self, args, types, argc, qmlContext); } void ExecutionEngine::initQmlGlobalObject() |
