From 30e3664bf3668bda9a211fe7d1404f8f806dbf7b Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 7 Aug 2017 08:37:45 +0200 Subject: Avoid creating a CallContext for simple functions This cuts out quite a bit of overhead when entering and leaving functions. Change-Id: I32670c98a4087ea3b2d45853d9cabff9066399e8 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4arrayobject.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/qml/jsruntime/qv4arrayobject.cpp') diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp index 5201924bcc..b269b39ff3 100644 --- a/src/qml/jsruntime/qv4arrayobject.cpp +++ b/src/qml/jsruntime/qv4arrayobject.cpp @@ -929,12 +929,11 @@ ReturnedValue ArrayPrototype::method_filter(const BuiltinFunction *b, CallData * a->arrayReserve(len); ScopedValue selected(scope); + ScopedValue v(scope); ScopedCallData cData(scope, 3); cData->thisObject = callData->argument(1); cData->args[2] = instance; - ScopedValue v(scope); - uint to = 0; for (uint k = 0; k < len; ++k) { bool exists; -- cgit v1.2.3