diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-10 08:51:09 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-10 10:42:13 +0000 |
commit | 1109b9df83b78fa8703c063f117b365a21fdccb1 (patch) | |
tree | 178c772640d82aec920389e97f6360b9a9206f58 /src/qml/jsruntime/qv4function.cpp | |
parent | 13f603aba593282493ef8d033a91c6dbac931a9f (diff) |
Remove one more layer of function calls when entering JS functions
Change-Id: I7d8b2e16d2eacf5e0eafb8b8574de51527fd0ac2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4function.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp index 78fb46327a..6a07c49478 100644 --- a/src/qml/jsruntime/qv4function.cpp +++ b/src/qml/jsruntime/qv4function.cpp @@ -45,7 +45,6 @@ #include "qv4engine_p.h" #include "qv4lookup_p.h" #include <private/qv4mm_p.h> -#include <private/qqmljavascriptexpression_p.h> QT_BEGIN_NAMESPACE @@ -119,26 +118,4 @@ void Function::updateInternalClass(ExecutionEngine *engine, const QList<QByteArr canUseSimpleCall = false; } - -// Do a call with this execution context as the outer scope -ReturnedValue Function::call(const FunctionObject *f, CallData *callData, Heap::ExecutionContext *context, Function *function) -{ - ExecutionEngine *engine = context->internalClass->engine; - - if (!function->canUseSimpleCall) { - context = ExecutionContext::newCallContext(context, function, callData); - if (f) - static_cast<Heap::CallContext *>(context)->function.set(engine, f->d()); - } - - ReturnedValue res = function->execute(context, callData, f); - - if (function->hasQmlDependencies) { - Q_ASSERT(context->type == Heap::ExecutionContext::Type_QmlContext); - QQmlPropertyCapture::registerQmlDependencies(static_cast<Heap::QmlContext *>(context), engine, function->compiledFunction); - } - - return res; -} - QT_END_NAMESPACE |