diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-02-07 08:56:24 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-03-09 08:59:05 +0000 |
commit | 3e80f3bef90d35bc6c8cec32de875b694988d668 (patch) | |
tree | aea8531ae7892ab36289e5317703fad63fbf850c /src/qml/compiler/qv4compiler.cpp | |
parent | 38221427bc21a11b96de7fa7666264c34298c0c0 (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/compiler/qv4compiler.cpp')
-rw-r--r-- | src/qml/compiler/qv4compiler.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp index 9cfac4a676..e9709f5fb4 100644 --- a/src/qml/compiler/qv4compiler.cpp +++ b/src/qml/compiler/qv4compiler.cpp @@ -296,6 +296,8 @@ void QV4::Compiler::JSUnitGenerator::writeFunction(char *f, QV4::IR::Function *i function->flags |= CompiledData::Function::IsNamedExpression; if (irFunction->hasTry || irFunction->hasWith) function->flags |= CompiledData::Function::HasCatchOrWith; + if (irFunction->canUseSimpleCall()) + function->flags |= CompiledData::Function::CanUseSimpleCall; function->nFormals = irFunction->formals.size(); function->formalsOffset = currentOffset; currentOffset += function->nFormals * sizeof(quint32); |