diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-09 16:02:55 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-10 08:19:59 +0000 |
commit | 6a91dcba2e4fa85dc345c2d403c757ab7676e28c (patch) | |
tree | 502b483cd437f4a1a039717af0a59e493d40f7a2 /src/qml/jsruntime/qv4context.cpp | |
parent | 5571b666e6b9534a55347adcd249fa07b2e25c01 (diff) |
Always create a valid CallData object for interpreter calls
This will allow removing a few more special cases and to simplify
the code further.
Change-Id: I3a958e9f68e3c103ea4f2ee6825f893e5931b11d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4context.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp index 5732b904da..c04323c8ef 100644 --- a/src/qml/jsruntime/qv4context.cpp +++ b/src/qml/jsruntime/qv4context.cpp @@ -48,8 +48,6 @@ #include "qv4errorobject_p.h" #include "qv4string_p.h" #include "qv4qmlcontext_p.h" -#include "qv4profiling_p.h" -#include <private/qqmljavascriptexpression_p.h> using namespace QV4; @@ -226,33 +224,6 @@ bool ExecutionContext::deleteProperty(String *name) return !d()->v4Function->isStrict(); } -// Do a call with this execution context as the outer scope -ReturnedValue ExecutionContext::call(Heap::ExecutionContext *context, CallData *callData, Function *function, const FunctionObject *f) -{ - ExecutionEngine *engine = context->internalClass->engine; - Value *jsStackTop = engine->jsStackTop; - engine->jsStackTop = reinterpret_cast<QV4::Value *>(callData) + 2 + (int)function->nFormals; - for (int i = callData->argc; i < (int)function->nFormals; ++i) - callData->args[i] = Encode::undefined(); - - if (!function->canUseSimpleCall) { - context = newCallContext(context, function, callData); - if (f) - static_cast<Heap::CallContext *>(context)->function.set(engine, f->d()); - } - - ReturnedValue res = Q_V4_PROFILE(engine, context, function, f); - - if (function->hasQmlDependencies) { - Q_ASSERT(context->type == Heap::ExecutionContext::Type_QmlContext); - QQmlPropertyCapture::registerQmlDependencies(static_cast<Heap::QmlContext *>(context), engine, function->compiledFunction); - } - - engine->jsStackTop = jsStackTop; - - return res; -} - ExecutionContext::Error ExecutionContext::setProperty(String *name, const Value &value) { name->makeIdentifier(); |