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/qv4jsir_p.h | |
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/qv4jsir_p.h')
-rw-r--r-- | src/qml/compiler/qv4jsir_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h index 23ebe0c962..da2c350393 100644 --- a/src/qml/compiler/qv4jsir_p.h +++ b/src/qml/compiler/qv4jsir_p.h @@ -1352,6 +1352,12 @@ struct Function { int getNewStatementId() { return _statementCount++; } int statementCount() const { return _statementCount; } + bool canUseSimpleCall() const { + return nestedFunctions.isEmpty() && + locals.isEmpty() && formals.size() <= QV4::Global::ReservedArgumentCount && + !hasTry && !hasWith && !isNamedExpression && !usesArgumentsObject && !hasDirectEval; + } + private: BasicBlock *getOrCreateBasicBlock(int index); void setStatementCount(int cnt); |