aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2014-01-22 17:46:20 +0100
committerThe Qt Project <[email protected]>2014-02-12 21:29:54 +0100
commitebef5a5a68d2432425109bd3e4945988c638786d (patch)
treef91b2d5e4003a0c5afb63ee703d4475e919bcd71 /src/qml/jsruntime/qv4functionobject.cpp
parent146741561373693d24e64891b8865d00146cf1dc (diff)
Satellite profiler for V4
Self-contained profiler for V4. By itself it doesn't have any connections to qqmlprofilerservice. Change-Id: I471a6119e07eab9c5f4712a16835be49c8886d1a Reviewed-by: Kai Koehne <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index a3e47c42ca..58e0277395 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -67,6 +67,7 @@
#include <iostream>
#include <algorithm>
#include "qv4alloca_p.h"
+#include "qv4profiling_p.h"
using namespace QV4;
@@ -450,7 +451,7 @@ ReturnedValue ScriptFunction::construct(Managed *that, CallData *callData)
QmlContextWrapper::registerQmlDependencies(v4, f->function->compiledFunction);
ExecutionContextSaver ctxSaver(context);
- ScopedValue result(scope, f->function->code(ctx, f->function->codeData));
+ ScopedValue result(scope, Q_V4_PROFILE(v4, ctx, f->function));
if (result->isObject())
return result.asReturnedValue();
return obj.asReturnedValue();
@@ -473,7 +474,7 @@ ReturnedValue ScriptFunction::call(Managed *that, CallData *callData)
QmlContextWrapper::registerQmlDependencies(ctx->engine, f->function->compiledFunction);
ExecutionContextSaver ctxSaver(context);
- return f->function->code(ctx, f->function->codeData);
+ return Q_V4_PROFILE(v4, ctx, f->function);
}
DEFINE_OBJECT_VTABLE(SimpleScriptFunction);
@@ -544,7 +545,7 @@ ReturnedValue SimpleScriptFunction::construct(Managed *that, CallData *callData)
if (f->function->compiledFunction->hasQmlDependencies())
QmlContextWrapper::registerQmlDependencies(v4, f->function->compiledFunction);
- Scoped<Object> result(scope, f->function->code(&ctx, f->function->codeData));
+ Scoped<Object> result(scope, Q_V4_PROFILE(v4, &ctx, f->function));
if (!result)
return callData->thisObject.asReturnedValue();
@@ -581,7 +582,7 @@ ReturnedValue SimpleScriptFunction::call(Managed *that, CallData *callData)
if (f->function->compiledFunction->hasQmlDependencies())
QmlContextWrapper::registerQmlDependencies(v4, f->function->compiledFunction);
- return f->function->code(&ctx, f->function->codeData);
+ return Q_V4_PROFILE(v4, &ctx, f->function);
}