aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-10-16 10:50:08 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-16 16:03:54 +0200
commitc1c526aafb2fc70ac6155eb775b3784f1e2e6504 (patch)
tree824bf1c301d24d51d3197f01400c55ec8b4e17ea /src/qml/jsruntime/qv4context_p.h
parentddd9c93b084c5168d7b12396450125e7a0929c28 (diff)
Speed up stack trace generation for the JIT
It turns out that in QML it is not unusual that during early binding evaluations due to the undefined order, the evaluation tries to look up properties in objects that aren't initialized yet and thus exceptions are thrown. Eeach thrown exception saves a stack trace, which is expensive to generate when using the JIT, as it does full stack unwinding. This patch implements a more light-weight approach by storing the instruction pointer in the context before leaving JIT generated code. Change-Id: I95e1cfd01179247dfc2c1df949828f474a23161b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4context_p.h')
-rw-r--r--src/qml/jsruntime/qv4context_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4context_p.h b/src/qml/jsruntime/qv4context_p.h
index 2535161713..d44c7d25f9 100644
--- a/src/qml/jsruntime/qv4context_p.h
+++ b/src/qml/jsruntime/qv4context_p.h
@@ -97,6 +97,7 @@ struct Q_QML_EXPORT ExecutionContext
EvalCode *currentEvalCode;
const uchar **interpreterInstructionPointer;
+ char *jitInstructionPointer;
void initBaseContext(Type type, ExecutionEngine *engine, ExecutionContext *parentContext)
{
@@ -110,6 +111,7 @@ struct Q_QML_EXPORT ExecutionContext
compilationUnit = 0;
currentEvalCode = 0;
interpreterInstructionPointer = 0;
+ jitInstructionPointer = 0;
}
CallContext *newCallContext(void *stackSpace, SafeValue *locals, FunctionObject *f, CallData *callData);