diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-10 08:51:09 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-10 10:42:13 +0000 |
commit | 1109b9df83b78fa8703c063f117b365a21fdccb1 (patch) | |
tree | 178c772640d82aec920389e97f6360b9a9206f58 /src/qml/jsruntime/qv4context.cpp | |
parent | 13f603aba593282493ef8d033a91c6dbac931a9f (diff) |
Remove one more layer of function calls when entering JS functions
Change-Id: I7d8b2e16d2eacf5e0eafb8b8574de51527fd0ac2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4context.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp index c04323c8ef..96f668f168 100644 --- a/src/qml/jsruntime/qv4context.cpp +++ b/src/qml/jsruntime/qv4context.cpp @@ -55,7 +55,7 @@ DEFINE_MANAGED_VTABLE(ExecutionContext); DEFINE_MANAGED_VTABLE(CallContext); DEFINE_MANAGED_VTABLE(CatchContext); -Heap::CallContext *ExecutionContext::newCallContext(Heap::ExecutionContext *outer, Function *function, CallData *callData) +Heap::CallContext *ExecutionContext::newCallContext(Heap::ExecutionContext *outer, Function *function, CallData *callData, const FunctionObject *f) { uint nFormals = qMax(static_cast<uint>(callData->argc), function->nFormals); uint localsAndFormals = function->compiledFunction->nLocals + sizeof(CallData)/sizeof(Value) - 1 + nFormals; @@ -68,6 +68,8 @@ Heap::CallContext *ExecutionContext::newCallContext(Heap::ExecutionContext *oute c->v4Function = function; c->outer.set(v4, outer); + if (f) + c->function.set(v4, f->d()); const CompiledData::Function *compiledFunction = function->compiledFunction; uint nLocals = compiledFunction->nLocals; |