aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4function.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-02-07 08:56:24 +0100
committerLars Knoll <lars.knoll@qt.io>2017-03-09 08:59:05 +0000
commit3e80f3bef90d35bc6c8cec32de875b694988d668 (patch)
treeaea8531ae7892ab36289e5317703fad63fbf850c /src/qml/jsruntime/qv4function.cpp
parent38221427bc21a11b96de7fa7666264c34298c0c0 (diff)
Make the decision about whether to use a Simple callcontext earlier
All required information is already available when creating the CompiledData::Function, so determine at that point whether we use a Simple or full CallContext. Change-Id: Ife489ca2ca6eaf2ffc7843544a56e8bd86590e9d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
-rw-r--r--src/qml/jsruntime/qv4function.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp
index b3feae4293..ed9e3699f2 100644
--- a/src/qml/jsruntime/qv4function.cpp
+++ b/src/qml/jsruntime/qv4function.cpp
@@ -83,12 +83,7 @@ Function::Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit,
for (quint32 i = 0; i < compiledFunction->nLocals; ++i)
internalClass = internalClass->addMember(compilationUnit->runtimeStrings[localsIndices[i]]->identifier, Attr_NotConfigurable);
- canUseSimpleCall = compiledFunction->nInnerFunctions == 0 &&
- !(compiledFunction->flags & CompiledData::Function::HasDirectEval) &&
- !(compiledFunction->flags & CompiledData::Function::UsesArgumentsObject) &&
- !(compiledFunction->flags & CompiledData::Function::HasCatchOrWith) &&
- nFormals <= QV4::Global::ReservedArgumentCount &&
- compiledFunction->nLocals == 0 && !isNamedExpression();
+ canUseSimpleCall = compiledFunction->flags & CompiledData::Function::CanUseSimpleCall;
}
Function::~Function()