diff options
author | Ulf Hermann <[email protected]> | 2021-05-17 16:38:25 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2021-06-10 11:53:19 +0200 |
commit | e20650e0702259b4be79be85a3d27e45db42efc1 (patch) | |
tree | 7536cee98f4cc502774f807d1a609940cd20d4f5 /src/qml/jsruntime/qv4context.cpp | |
parent | 7fa28f98824a94396106eadfc028b329985a0cfc (diff) |
Eliminate JS call frame from metatypes calls
If we call an AOT-compiled function we never need the JavaScript call
frame. We can just skip its setup and save some overhead.
Change-Id: I39dc2ca6eea5b5a66f3b87b642a310534cecf6cd
Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4context.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp index 282046f3fa..fb002ec48d 100644 --- a/src/qml/jsruntime/qv4context.cpp +++ b/src/qml/jsruntime/qv4context.cpp @@ -71,8 +71,13 @@ Heap::CallContext *ExecutionContext::newBlockContext(CppStackFrame *frame, int b Heap::ExecutionContext *outer = static_cast<Heap::ExecutionContext *>(frame->context()->m()); c->outer.set(v4, outer); - c->function.set(v4, static_cast<Heap::FunctionObject *>( - Value::fromStaticValue(frame->jsFrame->function).m())); + if (frame->isJSTypesFrame()) { + c->function.set(v4, static_cast<Heap::FunctionObject *>( + Value::fromStaticValue( + static_cast<JSTypesStackFrame *>(frame)->jsFrame->function).m())); + } else { + c->function.set(v4, nullptr); + } c->locals.size = nLocals; c->locals.alloc = nLocals; |