From 6a91dcba2e4fa85dc345c2d403c757ab7676e28c Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 9 Aug 2017 16:02:55 +0200 Subject: 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 --- src/qml/jsruntime/qv4context.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src/qml/jsruntime/qv4context.cpp') 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 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(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(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(context), engine, function->compiledFunction); - } - - engine->jsStackTop = jsStackTop; - - return res; -} - ExecutionContext::Error ExecutionContext::setProperty(String *name, const Value &value) { name->makeIdentifier(); -- cgit v1.2.3